Skip to content

Instantly share code, notes, and snippets.

@ahmadraniri
Created October 6, 2023 00:57
Show Gist options
  • Save ahmadraniri/e55ef4b07022db732dec9fdf9b1d1270 to your computer and use it in GitHub Desktop.
Save ahmadraniri/e55ef4b07022db732dec9fdf9b1d1270 to your computer and use it in GitHub Desktop.
Simple-toggle-desktop.sh
#!/usr/bin/bash
unminimize () {
jum=$(lswt | wc -l)
count=$jum
for i in $(seq $count); do
wlrctl toplevel focus state:minimized
done
}
minimize () {
wlrctl toplevel minimize
}
if [[ $(lswt -j | grep '"activated": true' | wc -l) -eq 1 ]]; then
minimize
else
unminimize
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment