Skip to content

Instantly share code, notes, and snippets.

@masbudisulaksono
Forked from lidgnulinux/toggle-desktop
Created September 14, 2022 13:28
Show Gist options
  • Save masbudisulaksono/ad4108b8cd74717a20e2262f949cf61c to your computer and use it in GitHub Desktop.
Save masbudisulaksono/ad4108b8cd74717a20e2262f949cf61c to your computer and use it in GitHub Desktop.
#!/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
@masbudisulaksono
Copy link
Author

Ok...๐Ÿ‘๐Ÿ‘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment