fix hyprland folder

This commit is contained in:
2026-07-17 15:38:13 +02:00
parent 3a10f9f898
commit 1e56b05236
35 changed files with 5 additions and 18 deletions

View File

@@ -0,0 +1,96 @@
local programs = require("hyprland.variables.programs")
hl.config({
binds = {
hide_special_on_workspace_change = true
}
})
local mainMod = "SUPER"
hl.bind(mainMod .. " + T", hl.dsp.exec_cmd(programs.terminal))
hl.bind(mainMod .. " + B", hl.dsp.exec_cmd(programs.browser))
hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(programs.launcher))
hl.bind(mainMod .. " + Space", hl.dsp.exec_cmd(programs.launcher))
hl.bind(mainMod .. " + Q", hl.dsp.window.close())
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen())
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(programs.file_manager))
hl.bind(mainMod .. " + V", hl.dsp.exec_cmd("vicinae vicinae://launch/clipboard/history"))
hl.bind(mainMod .. " + X", hl.dsp.window.float({ action = "toggle" }))
hl.bind(mainMod .. " + P", hl.dsp.window.pin())
hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit"))
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.exec_cmd("hyprshot -m region"))
hl.bind(mainMod .. " + SHIFT + ALT + S", hl.dsp.exec_cmd("hyprshot -m window"))
hl.bind("PRINT", hl.dsp.exec_cmd("hyprshot -m active"))
hl.bind(mainMod .. " + SHIFT + B", hl.dsp.exec_cmd("pkill waybar && hyprctl dispatch exec waybar"))
hl.bind(mainMod .. " + SHIFT + C", hl.dsp.exec_cmd("hyprpicker | wl-copy"))
hl.bind(mainMod .. " + END", hl.dsp.exec_cmd("wlogout -b 6 -L 1100 -T 650 -B 650"))
hl.bind(mainMod .. " + N", hl.dsp.exec_cmd(programs.notepad))
-- Moving focus with mainMod + arrow keys
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" }))
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" }))
hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "up" }))
hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "down" }))
-- Moving windows with mainMod + SHIFT + arrow keys
hl.bind(mainMod .. " + SHIFT + left", hl.dsp.window.move({ direction = "left" }))
hl.bind(mainMod .. " + SHIFT + right", hl.dsp.window.move({ direction = "right" }))
hl.bind(mainMod .. " + SHIFT + up", hl.dsp.window.move({ direction = "up" }))
hl.bind(mainMod .. " + SHIFT + down", hl.dsp.window.move({ direction = "down" }))
local workspaces = require("hyprland.variables.workspaces")
-- Switch workspaces of primary monitor with mainMod + [1-7]
for i, workspace in ipairs(workspaces.primary) do
hl.bind(mainMod .. " + " .. i, hl.dsp.focus({ workspace = workspace }))
end
-- Switch workspaces of secondary monitor with mainMod + [F1-F7]
for i, workspace in ipairs(workspaces.secondary) do
hl.bind(mainMod .. " + F" .. i, hl.dsp.focus({ workspace = workspace }))
end
-- Move active window to a workspace with mainMod + SHIFT + [1-7] (primary monitor)
for i, workspace in ipairs(workspaces.primary) do
hl.bind(mainMod .. " + SHIFT + " .. i, hl.dsp.window.move({ workspace = workspace }))
end
-- Move active window to a workspace with mainMod + SHIFT + [F1-F7] (secondary monitor)
for i, workspace in ipairs(workspaces.secondary) do
hl.bind(mainMod .. " + SHIFT + F" .. i, hl.dsp.window.move({ workspace = workspace }))
end
-- Special workspaces are bound to F8-F12 (aliased to G1-G5 on my keyboard)
local order = { workspaces.special.term, workspaces.special.social, workspaces.special.media, workspaces.special.todo, workspaces.special.files }
for i, workspace in ipairs(order) do
local specialWorkspace = string.match(workspace, "special:(.+)")
local fkey = 12 - (i - 1)
hl.bind(mainMod .. " + F" .. fkey, hl.dsp.focus({ monitor = "DP-1"}))
hl.bind(mainMod .. " + F" .. fkey, hl.dsp.workspace.toggle_special(specialWorkspace))
hl.bind(mainMod .. " + SHIFT + F" .. fkey, hl.dsp.window.move({ workspace = workspace }))
end
-- Special workspace for recording
hl.bind(mainMod .. " + R", hl.dsp.focus({ workspace = workspaces.recording }))
hl.bind(mainMod .. " + SHIFT + R", hl.dsp.window.move({ workspace = workspaces.recording }))
-- Move/resize windows with mainMod + LMB/RMB and dragging
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
-- Media controls
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("swayosd-client --output-volume raise"), { locked = true, repeating = true })
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("swayosd-client --output-volume lower"), { locked = true, repeating = true })
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("swayosd-client --output-volume mute-toggle"), { locked = true, repeating = true })
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind(mainMod .. "+ L", hl.dsp.exec_cmd("loginctl lock-session"))
hl.bind(mainMod .. " + page_up", hl.dsp.exec_cmd("~/.config/hypr/scripts/random-wallpaper.sh"), { locked = true })