Skip to content

Instantly share code, notes, and snippets.

@jajm
Last active November 18, 2024 17:27
Show Gist options
  • Save jajm/0941d641b92ffb713930ccb43e52359c to your computer and use it in GitHub Desktop.
Save jajm/0941d641b92ffb713930ccb43e52359c to your computer and use it in GitHub Desktop.
Force Steam window redraw when switching workspace (i3)
#!/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