feat: finish migrate

This commit is contained in:
2026-06-14 18:20:19 +02:00
parent 04a5d8919c
commit dce3c77a29
24 changed files with 92 additions and 200 deletions
+48 -49
View File
@@ -1,50 +1,49 @@
return function(is_laptop)
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
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)
if is_laptop then
hl.bind("d", function()
hl.dispatch(hl.dsp.exec_cmd("notify-send 'Set to mirror internal display' --app-name'Hyprctl'"))
hl.monitor({
output = "HDMI-A-1",
mirror = "eDP-1",
})
exit_submap()
end)
hl.bind("e", function()
hl.dispatch(hl.dsp.exec_cmd("notify-send 'Set to expand internal display' --app-name'Hyprctl'"))
hl.monitor({
output = "HDMI-A-1",
mirror = "",
})
exit_submap()
end)
end
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)
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)
hl.bind("Escape", function()
exit_submap()
end)
end)
local function exit_submap()
hl.dispatch(hl.dsp.submap("reset"))
end
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)
-- 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)
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)
-- ── DMS controls ─────────────────────────────────────────────────
-- clipboard history
hl.bind("h", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call clipboard toggle"))
exit_submap()
end)
-- Dash
hl.bind("d", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call dash toggle"))
exit_submap()
end)
-- Settings
hl.bind("s", function()
hl.dispatch(hl.dsp.exec_cmd("dms ipc call settings toggle"))
exit_submap()
end)
hl.bind("Escape", function()
exit_submap()
end)
end)