Last active
May 14, 2022 00:18
-
-
Save LC43/e31a3ceb8f5f5f31e6838022991a4024 to your computer and use it in GitHub Desktop.
Send window to next workspace
This file contains 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 | |
## workspace Number ( count ) | |
WS_N=$(wmctrl -d | wc -l) | |
## workspace ID | |
WS_ID=$(wmctrl -d | grep '*' | cut -d ' ' -f1) | |
## next workspace id ( loops around ) | |
NEXT_ID=$(( ( $WS_ID + 1 ) % $WS_N )); | |
wmctrl -r :ACTIVE: -t "${NEXT_ID}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment