Files
2026-08-12 21:29:15 +02:00

178 lines
7.8 KiB
Nix

{
wayland.windowManager.hyprland = {
extraConfig = ''
-- ####################
-- ### KEYBINDINGS ###
-- ####################
local mod = "SUPER"
hl.bind(mod .. " + L", function() hl.dispatch(hl.dsp.exec_cmd(TERM)) end)
hl.bind(mod .. " + SPACE", function() hl.dispatch(hl.dsp.exec_cmd(DMENU)) end)
hl.bind(mod .. " + CTRL + B", function() hl.dispatch(hl.dsp.exec_cmd(RANDOM_WALL)) end)
hl.bind("CTRL + SHIFT + B", hl.dsp.exec_cmd("~/.config/rofi/wallpaper-picker.sh"))
-- hl.bind("CTRL + SHIFT + B", hl.dsp.exec_cmd("dms ipc dankdash wallpaper"))
hl.bind(mod .. " + V", function() hl.dispatch(hl.dsp.exec_cmd(CLIPBOARD)) end)
hl.bind(mod .. " + E", function() hl.dispatch(hl.dsp.exec_cmd(FILE_MAN)) end)
hl.bind(mod .. " + N", hl.dsp.exec_cmd("dunstctl history-pop"))
hl.bind(mod .. " + SHIFT + N", hl.dsp.exec_cmd("dunstctl close-all"))
hl.bind(mod .. " + Q", hl.dsp.window.close())
hl.bind(mod .. " + SHIFT + Q", hl.dsp.window.kill())
hl.bind(mod .. " + C", function() hl.dispatch(hl.dsp.exec_cmd(CALC)) end)
hl.bind(mod .. " + SHIFT + B", function() hl.dispatch(hl.dsp.exec_cmd(BAR)) end)
hl.bind(mod .. " + SHIFT + F", hl.dsp.window.float())
hl.bind(mod .. " + SHIFT + P", hl.dsp.exec_cmd("hyprpicker -a"))
hl.bind(mod .. " + SHIFT + W", function() hl.dispatch(hl.dsp.exec_cmd(WMENU)) end)
hl.bind(mod .. " + B", hl.dsp.exec_cmd("zen-beta"))
-- hl.bind(
-- mod .. " + SHIFT + E",
-- hl.dsp.exec_cmd(
-- "pkill -9 linux-wallpaper; awww img --transition-step 100 /home/user/Pictures/Wallpapers/syntaxerror_wallpaper.png"
-- )
-- )
hl.bind(
mod .. " + SHIFT + E",
hl.dsp.exec_cmd("noctalia-shell ipc call wallpaper set /home/user/Pictures/Wallpapers/syntaxerror_wallpaper.png")
)
hl.bind("ALT + Q", hl.dsp.exec_cmd("pkill -9 python; pkill -9 aria2c"))
hl.bind(mod .. " + P", hl.dsp.exec_cmd("prismlauncher"))
-- hl.bind(mod .. " + W", hl.dsp.exec_cmd("waypaper"))
-- ################
-- ## MEDIA KEYS ##
-- ################
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"))
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl -p mpd play-pause"))
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl -p mpd next"))
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl -p mpd previous"))
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("pactl set-sink-volume @DEFAULT_SINK@ +5%"))
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("pactl set-sink-volume @DEFAULT_SINK@ -5%"))
hl.bind(mod .. " + A", hl.dsp.exec_cmd("~/.scripts/play-previous"))
hl.bind(mod .. " + S", hl.dsp.exec_cmd("~/.scripts/play-next"))
hl.bind(mod .. " + D", hl.dsp.exec_cmd("~/.scripts/play-pause"))
hl.bind(mod .. " + SHIFT + D", hl.dsp.exec_cmd("playerctl play-pause"))
hl.bind(mod .. " + PLUS", hl.dsp.exec_cmd("~/.scripts/mpd-volume up"))
hl.bind(mod .. " + MINUS", hl.dsp.exec_cmd("~/.scripts/mpd-volume down"))
-- hl.bind(mod .. " + SHIFT + R", hl.dsp.exec_cmd("~/.scripts/skip30s"))
-- ################
-- ## FULLSCREEN ##
-- ################
hl.bind(mod .. " + F", hl.dsp.window.fullscreen())
-- ################
-- ## SCREENSHOT ##
-- ################
hl.bind(mod .. " + CTRL + S", hl.dsp.exec_cmd("grimblast --freeze --notify copysave active"))
hl.bind(mod .. " + SHIFT + S", hl.dsp.exec_cmd("grimblast --freeze --notify copysave area"))
hl.bind(mod .. " + ALT + S", hl.dsp.exec_cmd("wl-paste | satty -f -"))
-- ##########################
-- ## CENTER FLOAT WINDOW ##
-- ##########################
hl.bind(mod .. " + SHIFT + C", hl.dsp.window.center())
-- ##################
-- ## MOVE FOCUS ##
-- ##################
hl.bind(mod .. " + LEFT", hl.dsp.focus({ direction = "left" }))
hl.bind(mod .. " + RIGHT", hl.dsp.focus({ direction = "right" }))
hl.bind(mod .. " + UP", hl.dsp.focus({ direction = "up" }))
hl.bind(mod .. " + DOWN", hl.dsp.focus({ direction = "down" }))
-- #################
-- ## MOVE WINDOW ##
-- #################
hl.bind(mod .. " + SHIFT + LEFT", hl.dsp.window.move({ direction = "left" }))
hl.bind(mod .. " + SHIFT + RIGHT", hl.dsp.window.move({ direction = "right" }))
hl.bind(mod .. " + SHIFT + UP", hl.dsp.window.move({ direction = "up" }))
hl.bind(mod .. " + SHIFT + DOWN", hl.dsp.window.move({ direction = "down" }))
-- ###################
-- ## RESIZE WINDOW ##
-- ###################
-- hl.bind(mod .. " + CTRL + L", hl.dsp.window.resize(20, 0))
-- hl.bind(mod .. " + CTRL + H", hl.dsp.window.resize(-20, 0))
-- hl.bind(mod .. " + CTRL + K", hl.dsp.window.resize(0, -20))
-- hl.bind(mod .. " + CTRL + J", hl.dsp.window.resize(0, 20))
-- ################
-- ## WORKSPACES ##
-- ################
-- hl.bind(mod .. " + 1", hl.dsp.focus({ workspace = 1}))
-- hl.bind(mod .. " + 2", hl.dsp.focus({ workspace = 2}))
-- hl.bind(mod .. " + 3", hl.dsp.focus({ workspace = 3}))
-- hl.bind(mod .. " + 4", hl.dsp.focus({ workspace = 4}))
-- hl.bind(mod .. " + 5", hl.dsp.focus({ workspace = 5}))
-- hl.bind(mod .. " + 6", hl.dsp.focus({ workspace = 6}))
-- hl.bind(mod .. " + 7", hl.dsp.focus({ workspace = 7}))
-- hl.bind(mod .. " + 8", hl.dsp.focus({ workspace = 8}))
-- hl.bind(mod .. " + 9", hl.dsp.focus({ workspace = 9}))
-- hl.bind(mod .. " + 0", hl.dsp.focus({ workspace = 10}))
-- #################################
-- ## MOVE WINDOW TO WORKSPACES ##
-- #################################
-- hl.bind(mod .. " + SHIFT + 1", hl.dsp.window.move({ workspace = 1 }))
-- hl.bind(mod .. " + SHIFT + 2", hl.dsp.window.move({ workspace = 2 }))
-- hl.bind(mod .. " + SHIFT + 3", hl.dsp.window.move({ workspace = 3 }))
-- hl.bind(mod .. " + SHIFT + 4", hl.dsp.window.move({ workspace = 4 }))
-- hl.bind(mod .. " + SHIFT + 5", hl.dsp.window.move({ workspace = 5 }))
-- hl.bind(mod .. " + SHIFT + 6", hl.dsp.window.move({ workspace = 6 }))
-- hl.bind(mod .. " + SHIFT + 7", hl.dsp.window.move({ workspace = 7 }))
-- hl.bind(mod .. " + SHIFT + 8", hl.dsp.window.move({ workspace = 8 }))
-- hl.bind(mod .. " + SHIFT + 9", hl.dsp.window.move({ workspace = 9 }))
-- hl.bind(mod .. " + SHIFT + 0", hl.dsp.window.move({ workspace = 10 }))
-- ##################
-- ## SCRATCHPADS ##
-- ##################
hl.bind(mod .. " + SHIFT + G", hl.dsp.window.move({ workspace = "special:magic" }))
hl.bind(mod .. " + G", hl.dsp.workspace.toggle_special("magic"))
-- ##########################################
-- ## SCROLL THROUGH EXISTING WORKSPACES ##
-- ##########################################
-- hl.bind(mod .. " + MOUSEDOWN", hl.wm.workspace_relative(1))
-- hl.bind(mod .. " + MOUSEUP", hl.wm.workspace_relative(-1))
-- ###################
-- ## MOUSE ACTIONS ##
-- ###################
hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
-- ###########
-- ## MISC ##
-- ###########
-- hl.bind(mod .. " + MOUSEDOWN", hl.wm.layout_msg("move +col"))
-- hl.bind(mod .. " + MOUSEUP", hl.wm.layout_msg("move -col"))
-- hl.bind(mod .. " + T", hl.wm.toggle_group())
-- hl.bind(mod .. " + SHIFT + X", hl.dsp.exec_cmd("$POWER_MENU"))
hl.bind("CTRL + ALT + F", hl.dsp.exec_cmd("kando -m kandomain"))
-- hl.bind(mod .. " + W", hl.dsp.exec_cmd("$WIFI_MENU"))
-- hl.bind(mod .. " + X", hl.dsp.exec_cmd("hyprlock"))
'';
};
}