rofi: fix brotab script calling itself when selecting tab
This commit is contained in:
parent
c206159758
commit
35f22bbe00
1 changed files with 2 additions and 2 deletions
|
@ -4,13 +4,13 @@ let
|
||||||
with pkgs; # bash
|
with pkgs; # bash
|
||||||
''
|
''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
if [ -z ''${1} ]; then
|
if [ -z "''${1}" ]; then
|
||||||
${brotab}/bin/bt list;
|
${brotab}/bin/bt list;
|
||||||
else
|
else
|
||||||
TARGET_TAB=$(sed "s/\t.*$//g" <<< ''${1});
|
TARGET_TAB=$(sed "s/\t.*$//g" <<< ''${1});
|
||||||
# activate window as focused to it is easy to switch to
|
# activate window as focused to it is easy to switch to
|
||||||
${brotab}/bin/bt activate --focused ''${TARGET_TAB} > /dev/null 2>&1;
|
${brotab}/bin/bt activate --focused ''${TARGET_TAB} > /dev/null 2>&1;
|
||||||
if [ -n ''${SWAYSOCK} ] && which swaymsg; then
|
if [ -n ''${SWAYSOCK} ] && which swaymsg >/dev/null 2>&1; then
|
||||||
swaymsg "[urgent=latest] focus" > /dev/null 2>&1;
|
swaymsg "[urgent=latest] focus" > /dev/null 2>&1;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue