first commit
This commit is contained in:
29
waybar/scripts/app-icons.sh
Executable file
29
waybar/scripts/app-icons.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define tus apps favoritas y su ícono Unicode (usa Font Awesome u otra)
|
||||
declare -A apps=(
|
||||
["zen"]=""
|
||||
["kitty"]=""
|
||||
["nvim"]=""
|
||||
["ranger"]=""
|
||||
["steam"]=""
|
||||
)
|
||||
|
||||
# Colores (puedes personalizarlos desde CSS también)
|
||||
active_color="#b8bb26"
|
||||
inactive_color="#bdae93"
|
||||
|
||||
output=""
|
||||
|
||||
for app in "${!apps[@]}"; do
|
||||
icon="${apps[$app]}"
|
||||
# Detectar si el proceso está corriendo
|
||||
if pgrep -x "$app" > /dev/null; then
|
||||
output+="<span color='$active_color'>$icon</span> "
|
||||
else
|
||||
output+="<span color='$inactive_color'>$icon</span> "
|
||||
fi
|
||||
done
|
||||
|
||||
echo -e "$output"
|
||||
|
||||
Reference in New Issue
Block a user