Created
January 15, 2023 21:56
-
-
Save 2xlink/8a83d354305898b5c93b7d9f396efa72 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -eu | |
| touch /tmp/current_desktop | |
| last=$(cat /tmp/current_desktop) | |
| wmctrl -d | grep "*" | cut -d " " -f 1 > /tmp/current_desktop | |
| if [[ -z $last ]]; then | |
| last=$(cat /tmp/current_desktop) | |
| fi | |
| wmctrl -s $last |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment