Skip to content

Hyprland Tweaks

Curated, community-popular Hyprland (Lua config, hyprland.lua) tweaks. Reviewed against the 0.55 Lua API. None were added to the live config — kept here as a reference for a limited/minimal setup. Snippets use the hl.* Lua API and drop into the relevant module under ~/.config/hypr/modules/.

Performance (good for limited hardware)

hl.config({ misc = { cursor_inactive_pause = true } })  -- stop rendering when nothing changes
- Lower blur cost in appearance.lua: blur = { size = 4, passes = 2 } instead of 6/3. - hl.config({ render = { explicit_sync = true } }) — avoids frame stutter on supported GPUs (newer).

Quality-of-life (most-loved community bits)

hl.config({
  binds = {
    workspace_back_and_forth = true,   -- same workspace key toggles last one
    allow_workspace_cycles   = true,   -- 1 -> 0 wraps to 10
    workspace_center_on      = true,   -- focus follows on switch
    mouse_move_enables_dpms  = true,   -- moving mouse wakes screen
  },
  dwindle = { persist_focus = true },  -- keep focus when switching workspaces
  misc = { layers_hog_keyboard_focus = false },  -- launchers/rofi grab keys properly
})

Groups & layout polish

hl.config({
  group = { auto_group = true, group_on_movetoworkspace = true },  -- auto-tab similar windows
  master = { mfact = 0.55, orientation = "left" },                 -- nicer master split
  input = { repeat_rate = 50, repeat_delay = 300 },                -- snappier key repeat
})

hl.window_rule({ match = { class = "Pavucontrol" },      float = true, center = true, size = "800 600" })
hl.window_rule({ match = { class = "Keepassxc" },        float = true, center = true })
hl.window_rule({ match = { class = ".(b|d)luemanage" },  float = true, center = true })
hl.window_rule({ match = { class = "xdg-desktop-portal" }, no_focus = true, float = false })
For HiDPI/XWayland: hl.config({ xwayland = { force_zero_scaling = true } }).

hl.config({ ecosystem = { enforce_permissions = true } })
hl.permission({ binary = "/usr/bin/grim",     type = "screencopy", mode = "allow" })
hl.permission({ binary = "/usr/bin/hyprshot", type = "screencopy", mode = "allow" })
hl.permission({ binary = "/usr/bin/wlogin",   type = "keyboard",   mode = "ask"   })

Keybind fixes applied (2026-08-20)

Three bugs in keybinds.lua were found and fixed in the live config:

Bug Before After Cause
h1 typo hl.dsp.exec_cmd(...) via h1.dsp.exec_cmd hl.dsp.exec_cmd(...) Typo on line 22; LSP reported undefined-global h1
Garbage line R323413# Present (line 4) Removed Accidental paste; caused 2+ LSP errors
rkitty command rkitty --class opencode-term -e ... kitty --class opencode-term -e ... rkitty binary does not exist on this system

Keybind: SUPER + CTRL + O → opens kitty with opencode inside.

Verification: hyprctl binds confirmed modmask 68 (SUPER+CTRL) + key O; hyprctl dispatch exec tested both components; user confirmed it works.

If performance/lag is a concern, prioritise: - cursor_inactive_pause - workspace_back_and_forth, allow_workspace_cycles - layers_hog_keyboard_focus = false - the floating window rules - reducing blur passes/size

Screenpipe desktop capture (2026-08-23)

Built and installed screenpipe for passive screen content logging — OCR what you see, not just which window was open.

Install: built from source (Rust via rustup), binary at ~/.local/bin/screenpipe (78MB).

Autostart (in autostart.lua):

hl.exec_cmd("bash -c 'sleep 15 && screenpipe record --port 3030 &'")

Key commands: | Command | What it does | |---------|-------------| | screenpipe search "query" | CLI search — find text you saw on any screen | | screenpipe record --port 3030 | Start capture + API server | | curl localhost:3030/health | Health check | | screenpipe status | Capture freshness, history, storage |

Storage: ~/.screenpipe/db.sqlite (~300MB per 8hr session). Two 2560x1440 monitors captured via grim (Wayland). Tesseract 5.5.3 for OCR fallback.

Build fix applied: patched antirez-asr-sys/build.rs — changed -std=c11 to -std=gnu11 to fix strdup implicit declaration in C11 mode.

Privacy: 100% local, no cloud, no account needed.