Load the whole config again under Hyprland 0.57

Hyprland 0.57 refuses a bind on a bare modifier and an empty input:scroll_method. The switcher's Super-release commit now binds Super_L and Super_R, which also brings back every bind below it in keybinds.lua. An empty scroll method is left unwritten, so libinput still picks per device.
This commit is contained in:
Gabriel Brown committed 2026-10-29 13:56:53 -04:00
1 parent 48e5ea9a39
commit 0add5af1b9
3 files changed
+26 -19

No files matched your search

+12 -8
View File
@@ -8,6 +8,14 @@
local prefs = require("prefs")
local actions = require("actions")
-- Empty means "let libinput pick per device". Hyprland 0.57 rejects "" for
-- this option, so empty is expressed by not writing it at all: nil drops the
-- key from the table below and the option stays at its unset default.
local scroll_method = prefs.get("scrollMethod", "")
if scroll_method == "" then
scroll_method = nil
end
hl.config({
input = {
kb_layout = prefs.get("keyboardLayout", "us"),
@@ -52,16 +60,12 @@ hl.config({
scroll_factor = prefs.get("scrollFactor", 1.0),
left_handed = prefs.get("leftHanded", false),
-- Empty is a value, not an omission: it is what `hyprctl getoption`
-- reports as "[[EMPTY]]" before anything writes the option, and it means
-- "let libinput pick per device" -- two fingers on a touchpad, the wheel
-- on a mouse. Writing it back explicitly is the same branch a stock
-- Hyprland takes, and it keeps the setting reversible: without an empty
-- choice in the schema there would be no way back from a scroll method
-- once one was picked. Settings offers 2fg / edge / on_button_down /
-- Empty (omitted, see above) is what `hyprctl getoption` reports as
-- "[[EMPTY]]": libinput picks per device -- two fingers on a touchpad,
-- the wheel on a mouse. Settings offers 2fg / edge / on_button_down /
-- no_scroll alongside it, the four words the option's own description
-- names (it publishes no map).
scroll_method = prefs.get("scrollMethod", ""),
scroll_method = scroll_method,
-- Only consulted while scroll_method is on_button_down. 0 means the
-- device's own middle button.