[bin] Add quick launcher to join an alfaview room
This commit is contained in:
parent
925728a8f1
commit
2719fd4d77
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
MAIN_ID="$(alfaview-get-window-id)"
|
||||||
|
LOG=$(/usr/bin/env ls -d -- ~/.local/share/alfaview-staging/logs/*.log|tail -n 1)
|
||||||
|
#LOG=$(lsof -Fn +D ~/.local/share/alfaview-staging|grep ^n | cut -d "n" -f 2-)
|
||||||
|
ROOM=$(grep -z obj=SubroomModel ${LOG}|grep -Po "SubroomInfo\\K.*," | grep -Po ",name=\\K.*" | cut -d , -f 1|sort -u|fzf)
|
||||||
|
swaymsg "[con_id=$MAIN_ID]" focus
|
||||||
|
wtype -d 50 -M ctrl f
|
||||||
|
wtype -d 50 "${ROOM}"
|
||||||
|
wtype -d 50 -k down -d 100 -k return
|
|
@ -58,6 +58,11 @@ then
|
||||||
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
|
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
|
||||||
FZF_DEFAULT_OPTS="--prompt='🧮 '${FZF_DEFAULT_OPTS}"
|
FZF_DEFAULT_OPTS="--prompt='🧮 '${FZF_DEFAULT_OPTS}"
|
||||||
COMMAND=~/bin/iqalc
|
COMMAND=~/bin/iqalc
|
||||||
|
elif [[ "$1" == "alfaview-room" ]]
|
||||||
|
then
|
||||||
|
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
|
||||||
|
FZF_DEFAULT_OPTS="--prompt='🧮 '${FZF_DEFAULT_OPTS}"
|
||||||
|
COMMAND=~/bin/alfaview-join-room
|
||||||
else
|
else
|
||||||
exec foot --app-id launcher --config ~/.config/foot/foot-launcher.ini ~/bin/launcher-run
|
exec foot --app-id launcher --config ~/.config/foot/foot-launcher.ini ~/bin/launcher-run
|
||||||
fi;
|
fi;
|
||||||
|
|
Loading…
Reference in New Issue