added waybar scripts

This commit is contained in:
2025-08-07 15:02:48 +02:00
parent bb34be73dc
commit 710f39d752
2 changed files with 38 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
# Aktives Wallpaper ermitteln
active=$(hyprctl hyprpaper listactive | grep -E '^[^[:space:]]+ =' | cut -d'=' -f2 | xargs)
echo $active
# Geladene Wallpaper extrahieren
output=$(hyprctl hyprpaper listloaded)
wallpapers=()
while IFS= read -r line; do
path=$(echo "$line" | cut -d',' -f2 | xargs)
wallpapers+=("$path")
done <<<"$output"
# Aktives Wallpaper im Array suchen
active_index=-1
for i in "${!wallpapers[@]}"; do
echo ${wallpapers[$i]}
if [[ "${wallpapers[$i]}" == "$active" ]]; then
active_index=$i
break
fi
done
# Nächstes Wallpaper setzen
echo nächstes WP= $wallpapers[$next_index]
if [[ $active_index -ge 0 ]]; then
next_index=$(((active_index + 1) % ${#wallpapers[@]}))
next_wallpaper="${wallpapers[$next_index]}"
echo nächstes WP = $next_wallpaper
hyprctl hyprpaper wallpaper "eDP-1, $next_wallpaper"
wal -i $next_wallpaper
pkill -SIGUSR2 waybar
else
echo "Aktives Wallpaper wurde nicht gefunden."
fi
+1
View File
@@ -17,6 +17,7 @@ copy ~/.config/hypr/hyprland.conf ./Hyprland
#waybar #waybar
copy ~/.config/waybar/style.css ./Waybar copy ~/.config/waybar/style.css ./Waybar
copy ~/.config/waybar/config.jsonc ./Waybar copy ~/.config/waybar/config.jsonc ./Waybar
cp -rv ~/.config/waybar/scripts/ ./Waybar/
#rsync ~/.config/waybar/frappe.css ./Waybar #rsync ~/.config/waybar/frappe.css ./Waybar