Skip to content

Instantly share code, notes, and snippets.

View jaderfeijo's full-sized avatar

Jader Feijo jaderfeijo

View GitHub Profile
@jaderfeijo
jaderfeijo / README.md
Last active October 25, 2026 10:13
Omarchy: Chromium hardware video decoding (VA-API + enhanced-h264ify, auto-picks codecs your GPU can decode)

Omarchy Chromium hardware video

Makes Chromium on Omarchy decode video on the GPU instead of the CPU. On a ThinkPad T480 (Intel UHD 620) this took a YouTube tab from about 4 cores of CPU to under 1.

It does two things:

  • Turns on Chromium's VA-API video decoding in ~/.config/chromium-flags.conf.
  • Installs enhanced-h264ify to stop
@jaderfeijo
jaderfeijo / README.md
Last active October 25, 2026 10:13
Omarchy media visualiser: cava bars in the status bar media widget (installer)

Omarchy media visualiser

Adds live audio bars to the Omarchy status bar's media widget, next to the scrolling track title. The bars run on cava and only while something is playing.

It also changes the title so it always scrolls while something is playing (and holds still while paused), and fixes a stock bug where a short title stayed off to the side after a long one had been scrolling.

@jaderfeijo
jaderfeijo / README.md
Last active October 25, 2026 10:13
Omarchy: fix external monitor DDC/CI brightness (slider snaps back, + dims the screen)

Omarchy: fix external monitor brightness (DDC/CI)

Some external monitors report a different DDC/CI brightness than the one they were set to. On Omarchy, the panel slider then jumps back to the wrong percentage a few seconds after you set it, and the brightness keys behave erratically (+ makes the screen dimmer). The internal display is unaffected.

Example from a BOE panel with a RealTek scaler:

Set to Monitor reports
100 34
70 21
@jaderfeijo
jaderfeijo / README.md
Last active October 25, 2026 10:13
Omarchy: screensaver that requires your password to dismiss, and Lock starts the screensaver (installer)

Omarchy: screensaver that asks for your password

On stock Omarchy, any key closes the screensaver and you're back on the desktop. The idle lock only engages if you leave the screensaver running until idle.lock. This makes every screensaver, from idle or started by hand, require your password to dismiss, with no delay. Lock (SUPER+CTRL+L and Menu → Lock) now starts the screensaver, and the password prompt appears as soon as you try to dismiss it.

Built for Omarchy with the Lua Hyprland config (Hyprland 0.56). Nothing under /usr/share/omarchy is edited, so it survives omarchy update.

Install

curl -fsSL https://gist.githubusercontent.com/jaderfeijo/8fa29a18bdbde28e2635cacdf8fd7279/raw/install.sh | bash
@jaderfeijo
jaderfeijo / README.md
Last active October 25, 2026 10:13
Omarchy: make the screenshot picker see the open scratchpad

Omarchy: screenshot picker ignores the scratchpad

With a special workspace (scratchpad) open, Print Screen offers the windows on the regular workspace underneath it instead of the scratchpad's windows.

Cause: omarchy-capture-region uses .activeWorkspace.id from hyprctl monitors, which stays on the underlying workspace while a special workspace is shown. The open special workspace is in .specialWorkspace.id.

Fix (user-side, survives omarchy update):

@jaderfeijo
jaderfeijo / README.md
Created September 21, 2026 06:23
Omarchy/Hyprland: raise the focused window when switching with SUPER+arrows

Omarchy: raise the focused window when switching with SUPER+arrows

On Omarchy, when windows are floating, moving focus with SUPER + ←/→/↑/↓ leaves the newly focused window behind the others. ALT + TAB doesn't have this problem, because Omarchy binds that key twice: once to cycle focus and once to raise the window (/usr/share/omarchy/default/hypr/bindings/tiling.lua):

o.bind("ALT + TAB", "Focus on next window", hl.dsp.window.cycle_next())
@jaderfeijo
jaderfeijo / README.md
Created September 21, 2026 06:13
Hyprland scrolling layout: let keyboard resize grow the last column (Omarchy)

Resize the last column in Hyprland's scrolling layout (Omarchy)

On a workspace using Hyprland's scrolling layout, the keyboard resize keys (SUPER + =, SUPER + ALT + =, SUPER + CTRL + = in Omarchy) cannot make the last window wider. You first have to open another window to its right.

This gist fixes that with a small script and a few keybinding overrides.

Tested on Omarchy 4.0.4 with Hyprland 0.56.2 (Lua config).

@jaderfeijo
jaderfeijo / 8250-lpss-pm.patch
Last active September 15, 2026 05:47
MacBook8,1 (12" 2015) on Linux 7.2: fix built-in keyboard/trackpad at boot and after sleep, trackpad lag and Bluetooth UART after sleep
--- a/drivers/tty/serial/8250/8250_lpss.c
+++ b/drivers/tty/serial/8250/8250_lpss.c
@@ -45,6 +45,10 @@
#define BYT_TX_OVF_INT 0x820
#define BYT_TX_OVF_INT_MASK BIT(1)
+#define BYT_PRV_RESETS 0x804
+#define BYT_PRV_RESETS_FUNC 0x3
+#define BYT_PRV_RESETS_IDMA BIT(2)
+
@jaderfeijo
jaderfeijo / macbook8-1-cs4208-speakers.md
Last active September 15, 2026 06:22
Omarchy / Arch on a MacBook8,1 (12-inch, Early 2015): silent internal speakers with CS4208 — chime un-mute + omnidecker/macbook8.1-speaker-driver, quiet chime via SystemAudioVolumeDB, plus everything that was tried and didn't work

Silent internal speakers on a MacBook8,1 (12-inch, Early 2015) under Linux — what works

Codec: Cirrus Logic CS4208 (codec SSID 106b:6400) · Verified on: MacBook8,1 running Omarchy (Arch Linux), kernel 7.2.3-arch1-3, PipeWire 1.6.8 + WirePlumber 0.5.17

Headphones work. Internal speakers are completely silent. PipeWire shows an active sink, speaker-test exits 0, the PCM is RUNNING — and nothing comes out.

MacBook9,1 / MacBook10,1 (2016–2017)? You want the other guide: Silent internal speakers on a 12-inch MacBook (MacBook9,1 / MacBook10,1).

@jaderfeijo
jaderfeijo / 00-README.md
Last active September 14, 2026 17:31
Bluetooth on the MacBook8,1 (12-inch, Early 2015) under Linux 7.2: serdev swap module, hci_bcm/btbcm patches, DKMS package, investigation notes

Bluetooth on the MacBook8,1 (12", Early 2015) under Linux 7.2

The MacBook8,1's Broadcom Bluetooth controller is attached to an Intel LPSS UART, not USB, and on a stock kernel it never appears: there is no hci0, bluetooth.service stays inactive and bluetoothctl reports No default controller available. This gist contains the investigation and a working fix: a small out-of-tree module plus two small patches to hci_bcm and btbcm, packaged with DKMS.

Tested on Arch Linux (Omarchy), kernel 7.2.3-arch1-3, BlueZ 5.87. After the fix the controller initialises (Broadcom, HCI 4.2, LMP subversion 0x6152, build 1288), is powered on by BlueZ, and LE scanning works.

TL;DR

Three separate problems stack up: