added waybar scripts
This commit is contained in:
Executable
+37
@@ -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
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user