Fix some Hyprland settings
This commit is contained in:
@@ -1,29 +1,35 @@
|
|||||||
-- Window management
|
-- Window management
|
||||||
hl.bind("SUPER + Q", hl.dsp.window.close())
|
hl.bind("SUPER + Q", hl.dsp.window.close())
|
||||||
|
|
||||||
hl.bind("SUPER + M", hl.dsp.window.float())
|
hl.bind("SUPER + M", hl.dsp.window.float())
|
||||||
hl.bind("SUPER + M", hl.dsp.window.center())
|
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"))
|
||||||
hl.bind("SUPER + SPACE", hl.dsp.global("quickshell:peek_bar"), {release = true})
|
hl.bind("SUPER + SPACE", hl.dsp.global("quickshell:peek_bar"), {release = true})
|
||||||
hl.bind("SUPER + SUPER_L", hl.dsp.exec_cmd("quickshell ipc call topbar toggle"))
|
hl.bind("SUPER + SUPER_L", hl.dsp.exec_cmd("quickshell ipc call topbar toggle"))
|
||||||
|
|
||||||
hl.bind("SUPER + K", hl.dsp.layout("movetoroot"))
|
hl.bind("SUPER + K", hl.dsp.layout("movetoroot"))
|
||||||
hl.bind("SUPER + B", hl.dsp.layout("togglesplit"))
|
hl.bind("SUPER + B", hl.dsp.layout("togglesplit"))
|
||||||
hl.bind("SUPER + x", hl.dsp.layout("swapsplit"))
|
hl.bind("SUPER + x", hl.dsp.layout("swapsplit"))
|
||||||
|
|
||||||
|
-- Select windows ordered top to bottom, left to right
|
||||||
local function focus_window(n)
|
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(
|
table.sort(
|
||||||
windows,
|
windows,
|
||||||
function (a, b)
|
function (a, b)
|
||||||
if a.at.x < b.at.x then
|
if a.at.x < b.at.x then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
if a.at.y < b.at.y then
|
if a.at.x > b.at.x then
|
||||||
return true
|
return false
|
||||||
end
|
end
|
||||||
return false
|
return a.at.y < b.at.y
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
if windows[n] ~= nil then
|
if windows[n] ~= nil then
|
||||||
@@ -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 + E", function() focus_window(7) end)
|
||||||
hl.bind("SUPER + SHIFT + U", function() focus_window(8) 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
|
-- Workspaces
|
||||||
hl.bind("SUPER + 1", hl.dsp.focus({workspace = 1}))
|
hl.bind("SUPER + 1", hl.dsp.focus({workspace = 1}))
|
||||||
hl.bind("SUPER + 2", hl.dsp.focus({workspace = 2}))
|
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:272", hl.dsp.window.drag(), ({mouse = true}))
|
||||||
hl.bind("SUPER + mouse:273", hl.dsp.window.resize(), ({mouse = true}))
|
hl.bind("SUPER + mouse:273", hl.dsp.window.resize(), ({mouse = true}))
|
||||||
|
|
||||||
-- Open favourites
|
-- Multi-monitor
|
||||||
hl.bind("SUPER + G", hl.dsp.exec_cmd("zen-browser"))
|
hl.bind("SUPER + PERIOD", hl.dsp.focus({monitor = -1}))
|
||||||
hl.bind("SUPER + C", hl.dsp.exec_cmd("vesktop"))
|
hl.bind("SUPER + P", hl.dsp.workspace.move({monitor = -1}))
|
||||||
hl.bind("SUPER + R", hl.dsp.exec_cmd("keepassxc"))
|
|
||||||
hl.bind("SUPER + L", hl.dsp.exec_cmd("kitty"))
|
-- 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
|
-- Adjust brightness
|
||||||
hl.bind(
|
hl.bind(
|
||||||
@@ -125,8 +125,23 @@ hl.bind("SUPER + ALT + COMMA", hl.dsp.exec_cmd(
|
|||||||
hl.bind("SUPER + SHIFT + 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"
|
"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("SHIFT + XF86Display", hl.dsp.exec_cmd("~/.config/scripts/vnc-toggle.sh"))
|
||||||
hl.bind("XF86Display", hl.dsp.exec_cmd("pkill -x quickshell; quickshell"))
|
hl.bind("XF86Display", hl.dsp.exec_cmd("pkill -x quickshell; quickshell"))
|
||||||
hl.bind("SUPER + D", hl.dsp.exec_cmd("wayscriber --active"))
|
hl.bind("SUPER + D", hl.dsp.exec_cmd("wayscriber --active"))
|
||||||
hl.bind("SUPER + SHIFT + D", hl.dsp.exec_cmd("wl-paste | satty -f -"))
|
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 = {
|
general = {
|
||||||
gaps_in = 4,
|
gaps_in = 4,
|
||||||
gaps_out = 6,
|
gaps_out = 6,
|
||||||
|
float_gaps = 6,
|
||||||
border_size = 0,
|
border_size = 0,
|
||||||
|
|
||||||
layout = "dwindle",
|
layout = "dwindle",
|
||||||
no_focus_fallback = true
|
no_focus_fallback = true
|
||||||
},
|
},
|
||||||
@@ -60,6 +60,7 @@ hl.config({
|
|||||||
},
|
},
|
||||||
cursor = {
|
cursor = {
|
||||||
persistent_warps = true,
|
persistent_warps = true,
|
||||||
|
zoom_detached_camera = false,
|
||||||
},
|
},
|
||||||
xwayland = {
|
xwayland = {
|
||||||
force_zero_scaling = true,
|
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]" }, border_size = 0 })
|
||||||
hl.window_rule({ match = { float = false, workspace = "f[1]s[false]" }, rounding = 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
|
-- Misc window rules
|
||||||
hl.window_rule({
|
hl.window_rule({
|
||||||
match = {
|
match = {
|
||||||
|
|||||||
Reference in New Issue
Block a user