mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-22 23:08:01 +00:00
[polybar] Improve loop code at task_manager
This commit is contained in:
parent
07f564f956
commit
953c14a5b0
@ -68,17 +68,15 @@ show_tasks()
|
|||||||
|
|
||||||
mv $STATUS_FILE.current $STATUS_FILE
|
mv $STATUS_FILE.current $STATUS_FILE
|
||||||
|
|
||||||
counter=1
|
|
||||||
num_windows=$(wc -l $STATUS_FILE | cut -f 1 -d " ")
|
num_windows=$(wc -l $STATUS_FILE | cut -f 1 -d " ")
|
||||||
while [ $counter -le "$max_tasks" ]; do
|
for counter in $(seq 1 "$max_tasks"); do
|
||||||
if [ $counter -le "$num_windows" ]; then
|
if [ "$counter" -le "$num_windows" ]; then
|
||||||
polybar-msg hook taskbar$counter 2 > /dev/null
|
polybar-msg hook taskbar"$counter" 2 > /dev/null
|
||||||
else
|
else
|
||||||
polybar-msg hook taskbar"$counter" 1 > /dev/null
|
polybar-msg hook taskbar"$counter" 1 > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
counter=$((counter+1))
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user