jami reply + I don't what more

This commit is contained in:
inigoortega 2020-04-16 10:53:54 +02:00
parent fb8b2c5e94
commit 7067426a2b
3 changed files with 31 additions and 1 deletions

23
scripts/jami-reply.sh Normal file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env sh
jami
iterations=100
i=0
while [ "$i" -lt $iterations ]
do
window_id=$(xdotool search --onlyvisible --class Jami-gnome)
if [ -n "$window_id" ]; then
correct=$(xprop -id "$window_id" | grep "window state: Normal")
fi
[ -n "$correct" ] && break || i=$(( $i + 1 ))
sleep 0.2
done
if [ "$i" -lt $iterations ]; then
sleep 0.6
xdotool key alt+7 && xdotool key ctrl+l && xdotool key Tab
fi

View File

@ -1,7 +1,9 @@
#!/usr/bin/env sh
# if ! xdotool search --name "$MUSICPLAYERUI"; then
if [ "$(command -v disown > /dev/null)" ]; then
st -c "Music Player" -e $MUSICPLAYERUI & disown
else
st -c "Music Player" -e $MUSICPLAYERUI &
fi
# fi

View File

@ -141,7 +141,12 @@ fi
# Processing
[ -z "$preserve_oldvideos" ] && rm "$videos_file" 2> /dev/null
if [ -z "$preserve_oldvideos" ]; then
rm "$videos_file" 2> /dev/null
else
(dash $TSCRIPTS/play-videos-from-file.sh "$videos_file" &&
rm "$videos_file") &
fi
grep -vE '^#|^$|^!' "$subs_file" | sort -rg -k 6 -k 5 -k 4 | while read line; do
channel=$(echo "$line" | awk '{print $1}')