46 lines
1.6 KiB
Lua
46 lines
1.6 KiB
Lua
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 -S"), { description = "Doesn't do anything yet" })
|
|
-- bind = ,code:232, exec, light -U 5 && notify-send 'Display brightness decreased by 5%'
|
|
-- bind = ,code:233, exec, light -A 5 && notify-send 'Display brightness increased by 5%'
|
|
|
|
hl.bind("code:123", hl.dsp.exec_cmd("pamixer -i 5"), { description = "Increase volume by 5%" })
|
|
hl.bind("code:122", hl.dsp.exec_cmd("pamixer -d 5"), { description = "Decrease volume by 5%" })
|
|
hl.bind("code:121", hl.dsp.exec_cmd("pamixer t"), { 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)
|