mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-22 17:28: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
|
||||
|
||||
counter=1
|
||||
num_windows=$(wc -l $STATUS_FILE | cut -f 1 -d " ")
|
||||
while [ $counter -le "$max_tasks" ]; do
|
||||
if [ $counter -le "$num_windows" ]; then
|
||||
polybar-msg hook taskbar$counter 2 > /dev/null
|
||||
for counter in $(seq 1 "$max_tasks"); do
|
||||
if [ "$counter" -le "$num_windows" ]; then
|
||||
polybar-msg hook taskbar"$counter" 2 > /dev/null
|
||||
else
|
||||
polybar-msg hook taskbar"$counter" 1 > /dev/null
|
||||
fi
|
||||
|
||||
sleep 0.1
|
||||
counter=$((counter+1))
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user