[bin] Add quick launcher to join an alfaview room

This commit is contained in:
Sebastian Schulze 2023-04-24 08:25:06 +02:00
parent 925728a8f1
commit 2719fd4d77
No known key found for this signature in database
GPG Key ID: F6BA63C6A7D3044E
2 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -58,6 +58,11 @@ then
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
FZF_DEFAULT_OPTS="--prompt='🧮 '${FZF_DEFAULT_OPTS}"
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
exec foot --app-id launcher --config ~/.config/foot/foot-launcher.ini ~/bin/launcher-run
fi;