The SUPER+SHIFT+F23 combo exists on the laptop's Copilot key only. On other keyboards (TypeMatrix 2030 with Dvorak, laptops without a Copilot key) there is no F23, so bind the same state-guarded scripts to SUPER+SHIFT+Pause as well: Pause is Fn+F12 on the TypeMatrix and a spare key elsewhere. Binds stay modifier-gated so bare Pause keeps its existing use.
48 lines
2.4 KiB
Lua
48 lines
2.4 KiB
Lua
-- Keybindings (converted from keybindings.conf)
|
|
local P = require("programs")
|
|
|
|
hl.bind(P.mainMod .. " + T", hl.dsp.exec_cmd(P.terminal))
|
|
hl.bind(P.mainMod .. " + B", hl.dsp.exec_cmd(P.browser))
|
|
hl.bind(P.mainMod .. " + W", hl.dsp.window.close())
|
|
hl.bind(P.mainMod .. " + SHIFT + M", hl.dsp.exit())
|
|
hl.bind(P.mainMod .. " + E", hl.dsp.exec_cmd(P.fileManager))
|
|
hl.bind(P.mainMod .. " + V", hl.dsp.window.float())
|
|
-- App menu (original was bindr = $mainMod, SUPER_L, exec, $app_menu)
|
|
hl.bind(P.mainMod .. " + SUPER_L", hl.dsp.exec_cmd(P.app_menu), { release = true })
|
|
hl.bind("SHIFT + SUPER_L", hl.dsp.exec_cmd(P.menu))
|
|
-- dwindle
|
|
hl.bind(P.mainMod .. " + P", hl.dsp.window.pseudo())
|
|
-- dwindle
|
|
hl.bind(P.mainMod .. " + J", hl.dsp.layout("togglesplit"))
|
|
|
|
hl.bind(P.mainMod .. " + F", hl.dsp.window.fullscreen())
|
|
|
|
-- Screenshot
|
|
hl.bind("CTRL + PRINT", hl.dsp.exec_cmd("hyprshot -m active -m output"))
|
|
hl.bind("PRINT", hl.dsp.exec_cmd("hyprshot -m window"))
|
|
hl.bind("SHIFT + PRINT", hl.dsp.exec_cmd("hyprshot -m region"))
|
|
|
|
-- Color picker
|
|
hl.bind(P.mainMod .. " + C", hl.dsp.exec_cmd("hyprpicker --autocopy"))
|
|
|
|
-- Lock
|
|
hl.bind(P.mainMod .. " + L", hl.dsp.exec_cmd("~/.config/hypr/scripts/lock.sh"))
|
|
hl.bind(P.mainMod .. " + SHIFT + L", hl.dsp.exec_cmd("wlogout --protocol layer-shell"))
|
|
|
|
-- Cheatsheet
|
|
hl.bind(P.mainMod .. " + F1", hl.dsp.exec_cmd("~/.config/hypr/scripts/cheatsheet.py ~/.config/hypr/shortcuts.txt"))
|
|
|
|
-- OBS
|
|
hl.bind(P.mainMod .. " + ALT + TAB", hl.dsp.pass({ window = "class:^(com.obsproject.Studio)$" }))
|
|
hl.bind("F1", hl.dsp.pass({ window = "class:^(com.obsproject.Studio)$" }))
|
|
hl.bind("F2", hl.dsp.pass({ window = "class:^(com.obsproject.Studio)$" }))
|
|
|
|
-- SUPER+SHIFT+F23 (the Copilot key emits this combo): hold-to-talk voice
|
|
-- dictation via whisrs. The scripts check the
|
|
-- daemon state so stray toggles (key repeat, missed release) can't invert it.
|
|
hl.bind("SUPER + SHIFT + F23", hl.dsp.exec_cmd("~/.config/hypr/scripts/whisrs-hold-start.sh"))
|
|
hl.bind("SUPER + SHIFT + F23", hl.dsp.exec_cmd("~/.config/hypr/scripts/whisrs-hold-stop.sh"), { release = true })
|
|
-- Pause is the alternate dictation key: Fn+F12 on the TypeMatrix 2030, and a
|
|
-- common spare key on laptops without a Copilot key
|
|
hl.bind("SUPER + SHIFT + Pause", hl.dsp.exec_cmd("~/.config/hypr/scripts/whisrs-hold-start.sh"))
|
|
hl.bind("SUPER + SHIFT + Pause", hl.dsp.exec_cmd("~/.config/hypr/scripts/whisrs-hold-stop.sh"), { release = true })
|