aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/lua/startup.lua
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/lua/startup.lua')
-rw-r--r--config/hypr/lua/startup.lua19
1 files changed, 15 insertions, 4 deletions
diff --git a/config/hypr/lua/startup.lua b/config/hypr/lua/startup.lua
index 6c189113..1fa4df82 100644
--- a/config/hypr/lua/startup.lua
+++ b/config/hypr/lua/startup.lua
@@ -25,9 +25,18 @@ local function exec_once(cmd)
local key = cmd:gsub("[^%w_.-]", "_"):sub(1, 80)
local marker = "/tmp/hypr-lua-exec-once-" .. session .. "-" .. key
local log = "/tmp/hypr-lua-startup-" .. key .. ".log"
- local readiness = "runtime=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}; export XDG_RUNTIME_DIR=\"$runtime\"; for _ in $(seq 1 200); do if [ -n \"$WAYLAND_DISPLAY\" ] && [ -S \"$runtime/$WAYLAND_DISPLAY\" ]; then break; fi; for sock in \"$runtime\"/wayland-[0-9]*; do [ -S \"$sock\" ] || continue; case \"$(basename \"$sock\")\" in *awww*) continue ;; esac; export WAYLAND_DISPLAY=\"$(basename \"$sock\")\"; break 2; done; sleep 0.1; done; if [ -n \"$HYPRLAND_INSTANCE_SIGNATURE\" ]; then hypr_sock=\"$runtime/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket.sock\"; for _ in $(seq 1 200); do [ -S \"$hypr_sock\" ] && break; sleep 0.1; done; fi"
+ local readiness =
+ 'runtime=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}; export XDG_RUNTIME_DIR="$runtime"; for _ in $(seq 1 200); do if [ -n "$WAYLAND_DISPLAY" ] && [ -S "$runtime/$WAYLAND_DISPLAY" ]; then break; fi; for sock in "$runtime"/wayland-[0-9]*; do [ -S "$sock" ] || continue; case "$(basename "$sock")" in *awww*) continue ;; esac; export WAYLAND_DISPLAY="$(basename "$sock")"; break 2; done; sleep 0.1; done; if [ -n "$HYPRLAND_INSTANCE_SIGNATURE" ]; then hypr_sock="$runtime/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket.sock"; for _ in $(seq 1 200); do [ -S "$hypr_sock" ] && break; sleep 0.1; done; fi'
local inner = readiness .. "; " .. cmd
- local script = "[ -e " .. shell_quote(marker) .. " ] || { touch " .. shell_quote(marker) .. " && sh -lc " .. shell_quote(inner) .. " >>" .. shell_quote(log) .. " 2>&1 & }"
+ local script = "[ -e "
+ .. shell_quote(marker)
+ .. " ] || { touch "
+ .. shell_quote(marker)
+ .. " && sh -lc "
+ .. shell_quote(inner)
+ .. " >>"
+ .. shell_quote(log)
+ .. " 2>&1 & }"
os.execute("sh -lc " .. shell_quote(script))
end
-- Prefer lifecycle-hook orchestration for clarity while keeping exec_once
@@ -39,9 +48,11 @@ local startup_commands = {
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP",
scriptsDir .. "/Polkit.sh",
"nm-applet",
- "nm-tray",
+ -- nm-tray now optional for ubuntu
+ -- "nm-tray",
"swaync",
scriptsDir .. "/PortalHyprland.sh",
+ "sh $HOME/.config/hypr/scripts/ApplyThemeMode.sh",
"sh " .. scriptsDir .. "/WaybarStartup.sh",
"qs -c overview",
"hypridle",
@@ -67,5 +78,5 @@ end
-- Optional startup examples retained from the original config:
-- exec_once("mpvpaper '*' -o \"load-scripts=no no-audio --loop\" \"\"")
--- exec_once(userScripts .. "/WallpaperAutoChange.sh " .. wallDir)
+-- exec_once(scriptsDir .. "/WallpaperAutoChange.sh " .. wallDir)
-- exec_once(userScripts .. "/RainbowBorders.sh")
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage