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 \
|
display=$(xrandr \
|
||||||
| grep ' connected' \
|
| grep ' connected' \
|
||||||
| awk -F ' ' '{print $1}' \
|
| awk -F ' ' '{print $1}' \
|
||||||
|
@ -29,7 +37,7 @@ printf "[] capturing in medium %s\n" "$medium"
|
||||||
|
|
||||||
case "$medium" in
|
case "$medium" in
|
||||||
*"mp4"*)
|
*"mp4"*)
|
||||||
ffcast -g $geom rec
|
ffcast -g $geom rec $HOME/output.mp4
|
||||||
;;
|
;;
|
||||||
*"png"*)
|
*"png"*)
|
||||||
ffcast -g $geom png
|
ffcast -g $geom png
|
||||||
|
|
|
@ -15,5 +15,6 @@ if [ "$(basename $0)" = "regenerate" ]; then
|
||||||
xmessage "regeneration complete"
|
xmessage "regeneration complete"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
|
export IS_RUNNING_IN_TMENU="yes"
|
||||||
cat $HOME/.local/share/tmenu_cache | tmenu | ${SHELL:-"/bin/sh"} &
|
cat $HOME/.local/share/tmenu_cache | tmenu | ${SHELL:-"/bin/sh"} &
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue