Skip to content

Instantly share code, notes, and snippets.

View mcjmigdal's full-sized avatar
🦖
The key to a happy life is to accept that you are never in control

Migdal mcjmigdal

🦖
The key to a happy life is to accept that you are never in control
View GitHub Profile
@mcjmigdal
mcjmigdal / custom_resolution_on_wayland.md
Last active December 15, 2025 02:59
Custom Resolutions on KDE Wayland via EDID Injection

This is a AI enhanced note on my half day struggle to make my monitor work after KDE transitioned to Wayland

Custom Resolutions on KDE Wayland via EDID Injection

Under Wayland (KWin) the kernel’s DRM/KMS (Direct Rendering Manager/Kernel Mode-Setting) controls display modes. Unlike X11, Wayland does not support on-the-fly modelines via xrandr – it only uses modes that the monitor reports via EDID. In practice, this means you must override the monitor’s EDID to add unsupported modes. This guide shows how to generate a custom EDID for 3440×1440@40Hz on HDMI-A-1 and load it so KDE/Wayland will offer the new mode.

Why xrandr and gtf/cvt don’t work on Wayland

On X11 you could use xrandr --newmode or feed a modeline from cvt/gtf. But on Wayland/KWin, the compositor ignores non-native modes. For example, KWin states “the display is not supported in any geometry other than what is supported by a native mode”. In other words, adding a virtual 40 Hz mode is impossible without changing the E

@mcjmigdal
mcjmigdal / gist:5491234407582ab4addd31a93ecf341b
Created July 10, 2025 14:43
Rmarkdown that can be run interactively or render to static output
---
title: "Report that can be run interactively or rendered to static output"
output:
html_document:
toc: yes
toc_float:
collapsed: no
smooth_scroll: no
toc_depth: 5
css: "./style/css/markdown.css"
@mcjmigdal
mcjmigdal / datatable_with_tabs.Rmd
Last active February 12, 2024 09:33
Rmarkdown datatable with tabs
---
title: "datatable with tabs"
author: "migdal"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
@mcjmigdal
mcjmigdal / index.html
Last active October 28, 2022 22:51
Javascript FASTA format validator
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body>
<div>
<label for="fasta">FASTA</label>
<textarea type="text" id="fasta" rows="15" cols="80" required autofocus onchange="validateFasta()"></textarea>
</div>