Last active
November 18, 2024 17:27
-
-
Save jajm/0941d641b92ffb713930ccb43e52359c to your computer and use it in GitHub Desktop.
Force Steam window redraw when switching workspace (i3)
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/sh | |
is_steam_on_current_workspace () { | |
printf '%s' "$1" | jq -e '.current.nodes.[] | select(.name == "Steam")' > /dev/null | |
} | |
while json=$(i3-msg -t subscribe '["workspace"]'); do | |
if is_steam_on_current_workspace "$json"; then | |
i3-msg -q '[class="steam"] border pixel 1' | |
sleep 0.1 | |
i3-msg -q '[class="steam"] border none' | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment