[bin] Don't pick just from visible windows when launching `browser`
This commit is contained in:
parent
8aa9e339aa
commit
bdb530a563
|
@ -5,7 +5,7 @@ BROWSER=qutebrowser
|
||||||
SWAYSOCK="/run/user/1000/sway-ipc.sock"
|
SWAYSOCK="/run/user/1000/sway-ipc.sock"
|
||||||
QUTE_SOCK="${XDG_RUNTIME_DIR}/qutebrowser/ipc-e1046d5b3be559e50bde86bda91e0739"
|
QUTE_SOCK="${XDG_RUNTIME_DIR}/qutebrowser/ipc-e1046d5b3be559e50bde86bda91e0739"
|
||||||
export SWAYSOCK
|
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
|
if [[ "$TREE" == "[]" ]]; then
|
||||||
echo "No ${BROWSER} found. Opening a new instance of ${BROWSER}"
|
echo "No ${BROWSER} found. Opening a new instance of ${BROWSER}"
|
||||||
|
|
Loading…
Reference in New Issue