2023-06-27 10:13:14 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Store the output of the command in an array, keeping only lines with '*'
|
|
|
|
readarray -t array <<< "$(eww windows | grep '^\*')"
|
|
|
|
|
|
|
|
# Remove the '*' from each element
|
|
|
|
for ((i=0; i<${#array[@]}; i++))
|
|
|
|
do
|
|
|
|
array[i]=${array[i]#'*'}
|
|
|
|
done
|
|
|
|
|
|
|
|
# Close every window except permanent ones
|
|
|
|
for element in "${array[@]}"
|
|
|
|
do
|
2023-08-03 23:07:22 -04:00
|
|
|
[[ "$element" != "left-bar" ]] &&
|
|
|
|
[[ "$element" != "notif-panel" ]] &&
|
|
|
|
[[ "$element" != "quick-settings-toggle" ]] &&
|
2023-08-17 22:53:55 -04:00
|
|
|
[[ "$element" != "playerinfo" ]] &&
|
2023-08-03 23:07:22 -04:00
|
|
|
eww close "$element"
|
2023-06-27 10:13:14 -04:00
|
|
|
done
|