dotfiles/yambar/scripts/hypractive.sh

19 lines
292 B
Bash
Raw Normal View History

2024-04-27 21:47:45 +02:00
#!/bin/bash
while true; do
hypractive=$(hyprctl activeworkspace -j)
hyprwindow=$(echo "$hypractive" | grep -E '"id": ' | tr -dc '0-9')
if [ $hyprwindow -gt 10 ]
then
workspace=$((hyprwindow - 10))
else
workspace=$hyprwindow
fi
echo "workspace|int|$workspace"
echo ""
sleep 0.5
done