allow capture to run in tmenu
This commit is contained in:
parent
ecbd242551
commit
8ed9beffba
|
@ -1,3 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$IS_RUNNING_IN_TMENU" = "yes" ]; then
|
||||
unset IS_RUNNING_IN_TMENU
|
||||
st -c tmenu-prompt -e "$0"
|
||||
exit
|
||||
fi
|
||||
|
||||
display=$(xrandr \
|
||||
| grep ' connected' \
|
||||
| awk -F ' ' '{print $1}' \
|
||||
|
@ -29,7 +37,7 @@ printf "[] capturing in medium %s\n" "$medium"
|
|||
|
||||
case "$medium" in
|
||||
*"mp4"*)
|
||||
ffcast -g $geom rec
|
||||
ffcast -g $geom rec $HOME/output.mp4
|
||||
;;
|
||||
*"png"*)
|
||||
ffcast -g $geom png
|
||||
|
|
|
@ -15,5 +15,6 @@ if [ "$(basename $0)" = "regenerate" ]; then
|
|||
xmessage "regeneration complete"
|
||||
exit
|
||||
else
|
||||
export IS_RUNNING_IN_TMENU="yes"
|
||||
cat $HOME/.local/share/tmenu_cache | tmenu | ${SHELL:-"/bin/sh"} &
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue