Add Omarchy Hyprland bindings

This commit is contained in:
2026-10-09 00:51:49 -04:00
parent 5b31d14829
commit e73d3acc39
13 changed files with 680 additions and 419 deletions
+22 -3
View File
@@ -1,3 +1,21 @@
sjb = sjb or {}
local function file_exists(path)
local file = io.open(path, "r")
if file then
file:close()
return true
end
return false
end
function sjb.omarchy_tools_available()
return file_exists("/usr/bin/omarchy-menu")
end
sjb.HYPR = "SUPER + CONTROL + SHIFT + ALT + "
function sysinfo()
local mem = io.popen("free -h | awk '/^Mem/ {print $3 \"/\" $2}'"):read("*a")
local cpu = io.popen("top -bn1 | grep 'Cpu(s)' | awk '{print $2 + $4 \"%\"}'"):read("*a")
@@ -191,8 +209,9 @@ function window_resize_percentage(px, py)
end
function toggle_master_scrolling()
local current = hl.get_config("general.layout")
local next_layout = current == "master" and "scrolling" or "master"
local ws = hl.get_active_workspace()
hl.config({ general = { layout = next_layout } })
local next_layout = ws.tiled_layout == "master" and "scrolling" or "master"
hl.notification.create({ text = "Workspace layout set to " .. next_layout, icon = "hint", duration = 5000 })
hl.workspace_rule({ workspace = ws.id, layout = next_layout })
end