local function exit_submap() hl.dispatch(hl.dsp.submap("reset")) end -- TODO: Update this for laptop hl.bind("code:232", hl.dsp.exec_cmd("brightnessctl set 5%-"), { description = "Decrease screen brightness" }) hl.bind("code:233", hl.dsp.exec_cmd("brightnessctl set +5%"), { description = "Increase screen brightness" }) hl.bind("code:123", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"), { description = "Increase volume by 5%" }) hl.bind("code:122", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { description = "Decrease volume by 5%" }) hl.bind("code:121", hl.dsp.exec_cmd("hyprpwcenter"), { description = "Open mixer" }) hl.define_submap("device", function() hl.bind("m", function() hl.dispatch(hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle")) exit_submap() end, { description = "Toggle mute for default audio input device" }) -- Touchpad hl.bind("SHIFT + T", function() hl.device({ name = "pnp0c50:00-093a:0255-touchpad", enabled = false, }) hl.dispatch(hl.dsp.exec_cmd("notify-send 'Disabled Trackpad' --app-name='Hyprctl'")) end, { description = "Disable trackpad" }) hl.bind("T", function() hl.device({ name = "pnp0c50:00-093a:0255-touchpad", enabled = true, }) hl.dispatch(hl.dsp.exec_cmd("notify-send 'Enabled Trackpad' --app-name='Hyprctl'")) end, { description = "Enable trackpad" }) -- clipboard history hl.bind("h", function() hl.dispatch(hl.dsp.exec_cmd("cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy")) exit_submap() end, { description = "Toggle clipboard history panel" }) hl.bind("Escape", function() exit_submap() end) end)