Created
December 8, 2019 09:48
-
-
Save Sprit3Dan/bb730c9405d4632cc90a1d36b5400207 to your computer and use it in GitHub Desktop.
Sway get currently active workspace id
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/sh | |
swaymsg -t get_workspaces | jq '.[] | select(.focused==true) | .id' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!
Used it to find current workspace width:
swaymsg -t get_workspaces | jq '.[] | select(.focused==true) | .rect.width'