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" != "notif-panel-on" ]] &&
|
|
|
|
[[ "$element" != "heart" ]] &&
|
|
|
|
[[ "$element" != "osk" ]] &&
|
|
|
|
[[ "$element" != "tablet" ]] &&
|
|
|
|
[[ "$element" != "quick-settings-toggle" ]] &&
|
2023-08-17 22:53:55 -04:00
|
|
|
[[ "$element" != "playerinfo" ]] &&
|
2023-08-03 23:07:22 -04:00
|
|
|
#[[ "$element" != "" ]] &&
|
|
|
|
eww close "$element"
|
2023-06-27 10:13:14 -04:00
|
|
|
done
|