updating wallpaper with a cycle 7am and 8pm

This commit is contained in:
samantha42
2026-04-18 08:11:37 +02:00
parent 75aa2e6605
commit 1788010c7e
13 changed files with 122 additions and 61 deletions

42
hypr/autostart.sh Executable file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
# ~/.config/hypr/autostart.sh
# Launches apps and moves them to the correct workspace once their window appears.
# Use in hyprland.conf:
# exec-once = ~/.config/hypr/autostart.sh
# ── helpers ───────────────────────────────────────────────────────────────────
# Wait for a window matching a class/title regex, then move it to a workspace.
# Usage: launch_on <workspace> <class_regex> <command>
launch_on() {
local ws="$1"
local class="$2"
shift 2
local cmd=("$@")
# Launch the app in the background
"${cmd[@]}" &
# Poll until the window appears, then move it
for _ in $(seq 1 30); do
sleep 1
local addr
addr=$(hyprctl clients -j \
| grep -i "\"class\": \"$class\"" \
| head -1)
if [[ -n "$addr" ]]; then
hyprctl dispatch movetoworkspacesilent "$ws,class:^(${class})$"
break
fi
done
}
# ── app definitions ───────────────────────────────────────────────────────────
# launch_on <workspace> <window class> <command ...>
launch_on 1 firefox firefox
launch_on 2 code code
launch_on 3 kitty kitty
launch_on 4 vesktop vesktop
launch_on 5 steam steam
launch_on 6 spotify spotify