Fix some Hyprland settings
This commit is contained in:
@@ -3,6 +3,7 @@ hl.bind("SUPER + Q", hl.dsp.window.close())
|
||||
|
||||
hl.bind("SUPER + M", hl.dsp.window.float())
|
||||
hl.bind("SUPER + M", hl.dsp.window.center())
|
||||
hl.bind("SUPER + F", hl.dsp.window.fullscreen())
|
||||
|
||||
hl.bind("SUPER + SPACE", hl.dsp.global("quickshell:peek_bar"))
|
||||
hl.bind("SUPER + SPACE", hl.dsp.global("quickshell:peek_bar"), {release = true})
|
||||
@@ -12,19 +13,24 @@ hl.bind("SUPER + K", hl.dsp.layout("movetoroot"))
|
||||
hl.bind("SUPER + B", hl.dsp.layout("togglesplit"))
|
||||
hl.bind("SUPER + x", hl.dsp.layout("swapsplit"))
|
||||
|
||||
-- Select windows ordered top to bottom, left to right
|
||||
local function focus_window(n)
|
||||
local windows = hl.get_windows({workspace = hl.get_active_workspace()})
|
||||
local workspace = hl.get_active_special_workspace()
|
||||
if workspace == nil then
|
||||
workspace = hl.get_active_workspace()
|
||||
end
|
||||
local windows = hl.get_windows({workspace = workspace})
|
||||
table.sort(
|
||||
windows,
|
||||
function (a, b)
|
||||
if a.at.x < b.at.x then
|
||||
return true
|
||||
end
|
||||
if a.at.y < b.at.y then
|
||||
return true
|
||||
end
|
||||
if a.at.x > b.at.x then
|
||||
return false
|
||||
end
|
||||
return a.at.y < b.at.y
|
||||
end
|
||||
)
|
||||
if windows[n] ~= nil then
|
||||
hl.dispatch(hl.dsp.focus({window = windows[n]}))
|
||||
@@ -40,17 +46,6 @@ hl.bind("SUPER + SHIFT + O", function() focus_window(6) end)
|
||||
hl.bind("SUPER + SHIFT + E", function() focus_window(7) end)
|
||||
hl.bind("SUPER + SHIFT + U", function() focus_window(8) end)
|
||||
|
||||
-- Screen locking
|
||||
hl.bind("SUPER + ESCAPE", hl.dsp.exec_cmd("~/.config/scripts/lock.sh"), {locked = true})
|
||||
hl.bind("XF86Go", hl.dsp.exec_cmd("~/.config/scripts/idle-toggle.sh"))
|
||||
hl.bind("switch:on:Lid Switch", hl.dsp.exec_cmd(
|
||||
"quickshell ipc call lock instalock; sleep 0.5; systemctl suspend"
|
||||
))
|
||||
|
||||
-- Multi-monitor
|
||||
hl.bind("SUPER + PERIOD", hl.dsp.focus({monitor = -1}))
|
||||
hl.bind("SUPER + P", hl.dsp.workspace.move({monitor = -1}))
|
||||
|
||||
-- Workspaces
|
||||
hl.bind("SUPER + 1", hl.dsp.focus({workspace = 1}))
|
||||
hl.bind("SUPER + 2", hl.dsp.focus({workspace = 2}))
|
||||
@@ -80,11 +75,16 @@ hl.bind("SUPER + W", hl.dsp.window.move({workspace = -1}))
|
||||
hl.bind("SUPER + mouse:272", hl.dsp.window.drag(), ({mouse = true}))
|
||||
hl.bind("SUPER + mouse:273", hl.dsp.window.resize(), ({mouse = true}))
|
||||
|
||||
-- Open favourites
|
||||
hl.bind("SUPER + G", hl.dsp.exec_cmd("zen-browser"))
|
||||
hl.bind("SUPER + C", hl.dsp.exec_cmd("vesktop"))
|
||||
hl.bind("SUPER + R", hl.dsp.exec_cmd("keepassxc"))
|
||||
hl.bind("SUPER + L", hl.dsp.exec_cmd("kitty"))
|
||||
-- Multi-monitor
|
||||
hl.bind("SUPER + PERIOD", hl.dsp.focus({monitor = -1}))
|
||||
hl.bind("SUPER + P", hl.dsp.workspace.move({monitor = -1}))
|
||||
|
||||
-- Screen locking
|
||||
hl.bind("SUPER + ESCAPE", hl.dsp.exec_cmd("~/.config/scripts/lock.sh"), {locked = true})
|
||||
hl.bind("XF86Go", hl.dsp.exec_cmd("~/.config/scripts/idle-toggle.sh"))
|
||||
hl.bind("switch:on:Lid Switch", hl.dsp.exec_cmd(
|
||||
"quickshell ipc call lock instalock; sleep 0.5; systemctl suspend"
|
||||
))
|
||||
|
||||
-- Adjust brightness
|
||||
hl.bind(
|
||||
@@ -125,8 +125,23 @@ hl.bind("SUPER + ALT + COMMA", hl.dsp.exec_cmd(
|
||||
hl.bind("SUPER + SHIFT + COMMA", hl.dsp.exec_cmd(
|
||||
"pgrep slurp || hyprshot -o ~/Pictures/Screenshots -z -s -m active -m output"
|
||||
))
|
||||
hl.bind("SUPER + SEMICOLON", hl.dsp. exec_cmd("~/.config/scripts/zoom.sh"))
|
||||
local zoom = false
|
||||
hl.bind("SUPER + SEMICOLON", function ()
|
||||
if zoom then
|
||||
hl.config({cursor = {zoom_factor = 1.0}})
|
||||
zoom = false
|
||||
else
|
||||
hl.config({cursor = {zoom_factor = 3.0}})
|
||||
zoom = true
|
||||
end
|
||||
end)
|
||||
hl.bind("SHIFT + XF86Display", hl.dsp.exec_cmd("~/.config/scripts/vnc-toggle.sh"))
|
||||
hl.bind("XF86Display", hl.dsp.exec_cmd("pkill -x quickshell; quickshell"))
|
||||
hl.bind("SUPER + D", hl.dsp.exec_cmd("wayscriber --active"))
|
||||
hl.bind("SUPER + SHIFT + D", hl.dsp.exec_cmd("wl-paste | satty -f -"))
|
||||
|
||||
-- Open favourites
|
||||
hl.bind("SUPER + G", hl.dsp.exec_cmd("zen-browser"))
|
||||
hl.bind("SUPER + C", hl.dsp.exec_cmd("vesktop"))
|
||||
hl.bind("SUPER + R", hl.dsp.exec_cmd("keepassxc"))
|
||||
hl.bind("SUPER + L", hl.dsp.exec_cmd("kitty"))
|
||||
|
||||
@@ -10,8 +10,8 @@ hl.config({
|
||||
general = {
|
||||
gaps_in = 4,
|
||||
gaps_out = 6,
|
||||
float_gaps = 6,
|
||||
border_size = 0,
|
||||
|
||||
layout = "dwindle",
|
||||
no_focus_fallback = true
|
||||
},
|
||||
@@ -60,6 +60,7 @@ hl.config({
|
||||
},
|
||||
cursor = {
|
||||
persistent_warps = true,
|
||||
zoom_detached_camera = false,
|
||||
},
|
||||
xwayland = {
|
||||
force_zero_scaling = true,
|
||||
|
||||
@@ -6,6 +6,9 @@ hl.window_rule({ match = { float = false, workspace = "w[tv1]s[false]" }, roundi
|
||||
hl.window_rule({ match = { float = false, workspace = "f[1]s[false]" }, border_size = 0 })
|
||||
hl.window_rule({ match = { float = false, workspace = "f[1]s[false]" }, rounding = 0 })
|
||||
|
||||
-- Special workspace
|
||||
hl.workspace_rule({ workspace = "s[true]", gaps_out = 64, gaps_in = 12})
|
||||
|
||||
-- Misc window rules
|
||||
hl.window_rule({
|
||||
match = {
|
||||
|
||||
Reference in New Issue
Block a user