[bin] Don't pick just from visible windows when launching `browser`

This commit is contained in:
Sebastian Schulze 2023-10-15 21:07:23 +02:00
parent 8aa9e339aa
commit bdb530a563
No known key found for this signature in database
GPG Key ID: F6BA63C6A7D3044E
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ BROWSER=qutebrowser
SWAYSOCK="/run/user/1000/sway-ipc.sock"
QUTE_SOCK="${XDG_RUNTIME_DIR}/qutebrowser/ipc-e1046d5b3be559e50bde86bda91e0739"
export SWAYSOCK
TREE=$(swaymsg -t get_tree | jq -r '[ recurse(.nodes[],.floating_nodes[]) | select(.app_id == "org.qutebrowser.qutebrowser" and .visible == true) ]')
TREE=$(swaymsg -t get_tree | jq -r '[ recurse(.nodes[],.floating_nodes[]) | select(.app_id == "org.qutebrowser.qutebrowser") ]')
if [[ "$TREE" == "[]" ]]; then
echo "No ${BROWSER} found. Opening a new instance of ${BROWSER}"