hyprland: Migrate config to Lua, bump back to current
Hyprland 0.56.x dropped the hyprlang (.conf) config backend in favor of Lua-only config. Switch configType to "lua" and rewrite monitors, workspace/window rules, binds, env vars, and autostart using the new hl.* dispatcher API. Un-pin the hyprland flake input (back to current, following root nixpkgs) now that the config no longer depends on the old hyprlang backend. Every module that injects Hyprland keybinds (foot, wezterm, bemenu, music, light, sound, screenshot, physlock, hyprlock) is converted to the same Lua bind syntax, since the config is all-or-nothing per configType. hyprlock's swayidle dpms toggle and the hyprland-monitors hotplug script's hyprctl dispatch calls are updated to the new hl.dsp.* expression syntax the same way. One behavior change: hl.workspace_rule keeps only the last monitor set per workspace (unlike hyprlang's rule list), so workspaces that used to declare two candidate monitors now declare one static default; the hyprland-monitors service still re-dispatches the correct monitor on startup and hotplug.
This commit is contained in:
@@ -38,12 +38,19 @@ in
|
||||
MUTED=$(${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep MUTED | wc -l)
|
||||
echo $MUTED > /sys/class/leds/platform::micmute/brightness
|
||||
'';
|
||||
|
||||
mkExec = key: cmd: {
|
||||
_args = [
|
||||
key
|
||||
(lib.generators.mkLuaInline ''hl.dsp.exec_cmd("${cmd}")'')
|
||||
];
|
||||
};
|
||||
in
|
||||
[
|
||||
", XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%+"
|
||||
", XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
|
||||
", XF86AudioMute, exec, ${toggle-output-mute}"
|
||||
", XF86AudioMicMute, exec, ${toggle-input-mute}"
|
||||
(mkExec "XF86AudioRaiseVolume" "${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%+")
|
||||
(mkExec "XF86AudioLowerVolume" "${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-")
|
||||
(mkExec "XF86AudioMute" "${toggle-output-mute}")
|
||||
(mkExec "XF86AudioMicMute" "${toggle-input-mute}")
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user