mirror of
https://github.com/Keyitdev/dotfiles.git
synced 2026-09-24 01:52:09 +00:00
Update: Changed scripts, added wayland support for screenshots, added ability to control external monitors via ddcutil.
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
step=+5
|
||||
|
||||
video_card=$(ls -1 /sys/class/backlight/)
|
||||
cur_brightness=$(cat /sys/class/backlight/"$video_card"/brightness)
|
||||
max_brightness=$(cat /sys/class/backlight/"$video_card"/max_brightness)
|
||||
|
||||
while getopts s: flag
|
||||
do
|
||||
@@ -13,18 +11,28 @@ do
|
||||
s) step=${OPTARG};;
|
||||
*) echo "Usage: -s <-value/+value>";;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
step=$(echo "$step" | sed 's/+//g')
|
||||
step_c=$(( (step*max_brightness)/100 ))
|
||||
# step_c=$(echo "scale=2; $step*($max_brightness/100)" | bc -l | sed 's/\..*$//')
|
||||
new_brightness=$((cur_brightness + step_c))
|
||||
if [ -n "$video_card" ] && [ -d "/sys/class/backlight/$video_card" ]; then
|
||||
step=$(echo "$step" | sed 's/+//g')
|
||||
cur_brightness=$(cat /sys/class/backlight/"$video_card"/brightness)
|
||||
max_brightness=$(cat /sys/class/backlight/"$video_card"/max_brightness)
|
||||
|
||||
step_c=$(( (step*max_brightness)/100 ))
|
||||
# step_c=$(echo "scale=2; $step*($max_brightness/100)" | bc -l | sed 's/\..*$//')
|
||||
new_brightness=$((cur_brightness + step_c))
|
||||
|
||||
if [ "$new_brightness" -le "0" ]; then
|
||||
echo "0" > /sys/class/backlight/"$video_card"/brightness
|
||||
elif [ "$new_brightness" -ge "$max_brightness" ] ; then
|
||||
echo "$max_brightness" > /sys/class/backlight/"$video_card"/brightness
|
||||
else
|
||||
echo "$new_brightness" > /sys/class/backlight/"$video_card"/brightness
|
||||
fi
|
||||
|
||||
if [ "$new_brightness" -le "0" ]; then
|
||||
echo "0" > /sys/class/backlight/"$video_card"/brightness
|
||||
elif [ "$new_brightness" -ge "$max_brightness" ] ; then
|
||||
echo "$max_brightness" > /sys/class/backlight/"$video_card"/brightness
|
||||
else
|
||||
echo "$new_brightness" > /sys/class/backlight/"$video_card"/brightness
|
||||
sign=$(printf "%s" "$step" | cut -c1)
|
||||
value=$(printf "%s" "$step" | sed 's/^[-+]//')
|
||||
|
||||
ddcutil --disable-dynamic-sleep --noverify --skip-ddc-checks --sleep-multiplier 0.1 --bus 12 setvcp 10 "$sign" "$value"
|
||||
fi
|
||||
@@ -1,14 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
dir_icons="/usr/local/bin/icons"
|
||||
video_card=$(ls -1 /sys/class/backlight/ 2>/dev/null | head -n 1)
|
||||
|
||||
max_bri=$(cat /sys/class/backlight/*/max_brightness)
|
||||
cur_bri=$(cat /sys/class/backlight/*/brightness)
|
||||
|
||||
cur_per=$((cur_bri * 100 / max_bri))
|
||||
|
||||
if [ "$cur_per" -ge 50 ]; then
|
||||
dunstify "Screen" "Brightness: $cur_per%" -r 100 -i "$dir_icons"/sun.svg
|
||||
if [ -n "$video_card" ]; then
|
||||
max_bri=$(cat /sys/class/backlight/"$video_card"/max_brightness)
|
||||
cur_bri=$(cat /sys/class/backlight/"$video_card"/brightness)
|
||||
cur_per=$((cur_bri * 100 / max_bri))
|
||||
else
|
||||
dunstify "Screen" "Brightness: $cur_per%" -r 100 -i "$dir_icons"/moon.svg
|
||||
cur_per=$(ddcutil --disable-dynamic-sleep --noverify --skip-ddc-checks --sleep-multiplier 0.1 --bus 12 getvcp 10 2>/dev/null | sed -n 's/.*current value = *\([0-9]*\).*/\1/p')
|
||||
fi
|
||||
|
||||
if [ -n "$cur_per" ]; then
|
||||
if [ "$cur_per" -ge 50 ]; then
|
||||
dunstify "Screen" "Brightness: $cur_per%" -r 100 -i "$dir_icons"/sun.svg
|
||||
else
|
||||
dunstify "Screen" "Brightness: $cur_per%" -r 100 -i "$dir_icons"/moon.svg
|
||||
fi
|
||||
fi
|
||||
+37
-12
@@ -5,15 +5,40 @@ green="9ece6a"
|
||||
red="db4b4b"
|
||||
wallpaper="$HOME/Pictures/wallpapers/background.png"
|
||||
|
||||
i3lock -n --force-clock -F -i $wallpaper -e \
|
||||
--refresh-rate=1 --line-uses-inside --pointer=default --pass-media-keys --pass-volume-keys --pass-screen-keys \
|
||||
--inside-color="$green" --ring-color="$green" --insidever-color="$green" --ringver-color="$green" --insidewrong-color="$red" --ringwrong-color="$red" \
|
||||
--keyhl-color="$green" --separator-color="$green" --bshl-color="$green" --color=000000 \
|
||||
--time-str="%H:%M" --time-size=160 --time-pos="960:300" --time-font="Open sans:style=Bold" --time-color="$font" \
|
||||
--date-str="%a %d %b" --date-size=45 --date-pos="960:380" --date-font="Open sans" --date-color="$font" \
|
||||
--verif-text="Verifying" --greeter-text="" --wrong-text="Wrong Password!" --noinput-text="No input" \
|
||||
--verif-font="Open sans" --greeter-font="Open sans" --wrong-font="Open sans" \
|
||||
--verif-size=35 --greeter-size=35 --wrong-size=35 \
|
||||
--verif-pos="960:540" --greeter-pos="960:600" --wrong-pos="960:540" \
|
||||
--verif-color="$green" --greeter-color="$font" --wrong-color="$red" \
|
||||
--bar-indicator --bar-direction=0 --bar-step=10 --bar-max-height=10 --bar-base-width=10 --bar-total-width=1920 --bar-color=00000000 --bar-pos="0:1070"
|
||||
# --screenshots \
|
||||
swaylock \
|
||||
-f \
|
||||
-i $wallpaper \
|
||||
--clock \
|
||||
--timestr="%H:%M" \
|
||||
--datestr="" \
|
||||
--indicator \
|
||||
--indicator-radius=350 \
|
||||
--indicator-thickness=15 \
|
||||
--indicator-y-position=400 \
|
||||
--font="Open sans:style=Bold" \
|
||||
--font-size=200 \
|
||||
--text-color="${font}ff" \
|
||||
--text-clear-color="${font}ff" \
|
||||
--text-wrong-color="${red}ff" \
|
||||
--text-ver-color="${font}ff" \
|
||||
--text-caps-lock-color="${red}ff" \
|
||||
--inside-color="00000000" \
|
||||
--ring-color="00000000" \
|
||||
--line-color="00000000" \
|
||||
--separator-color="00000000" \
|
||||
--inside-clear-color="00000000" \
|
||||
--ring-clear-color="00000000" \
|
||||
--line-clear-color="00000000" \
|
||||
--inside-wrong-color="00000000" \
|
||||
--ring-wrong-color="00000000" \
|
||||
--line-wrong-color="00000000" \
|
||||
--inside-ver-color="00000000" \
|
||||
--ring-ver-color="00000000" \
|
||||
--line-ver-color="00000000" \
|
||||
--inside-caps-lock-color="00000000" \
|
||||
--ring-caps-lock-color="00000000" \
|
||||
--line-caps-lock-color="00000000" \
|
||||
--key-hl-color="${green}ff" \
|
||||
--bs-hl-color="${red}ff"
|
||||
# --effect-blur 2x10
|
||||
@@ -8,10 +8,8 @@ get_options() {
|
||||
echo " Full screen screenshot"
|
||||
echo " Selected area video"
|
||||
echo " Full screen video"
|
||||
echo " Record audio (microphone)"
|
||||
echo " Record audio (desktop)"
|
||||
echo " Selected area video with audio (microphone)"
|
||||
echo " Full screen video with audio (microphone)"
|
||||
echo " Selected area video with audio"
|
||||
echo " Full screen video with audio"
|
||||
echo " Stop Recording"
|
||||
}
|
||||
|
||||
@@ -34,17 +32,11 @@ main() {
|
||||
' Full screen video')
|
||||
screenshot -vf
|
||||
;;
|
||||
' Record audio (microphone)')
|
||||
screenshot -am
|
||||
' Selected area video with audio')
|
||||
screenshot -vaad
|
||||
;;
|
||||
' Record audio (desktop)')
|
||||
screenshot -ad
|
||||
;;
|
||||
' Selected area video with audio (microphone)')
|
||||
screenshot -vaam
|
||||
;;
|
||||
' Full screen video with audio (microphone)')
|
||||
screenshot -vfam
|
||||
' Full screen video with audio')
|
||||
screenshot -vfad
|
||||
;;
|
||||
' Stop Recording')
|
||||
screenshot -s
|
||||
|
||||
+144
-102
@@ -9,145 +9,187 @@ mkdir -p "$screenshot_directory"
|
||||
mkdir -p "$videos_directory"
|
||||
mkdir -p "$audio_directory"
|
||||
|
||||
# date=$(date '+%d-%m-%Y-%H-%M-%S') #10-08-2025-18-53-58
|
||||
date=$(date '+%Y-%m-%d_%H-%M-%S') #2025-08-10_18-53-58
|
||||
screen_resolution="$(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/')"
|
||||
microphone="$(pacmd list-sources | grep -E '^\s+name: .*alsa_input' | cut -c 8- | sed 's/[<,>]//g')"
|
||||
desktop="$(pacmd list-sources | grep -E '^\s+name: .*alsa_output' | cut -c 8- | sed 's/[<,>]//g')"
|
||||
# date=$(date '+%d-%m-%Y-%H-%M-%S_pc') #10-08-2025-18-53-58
|
||||
filename=$(date '+%Y-%m-%d_%H-%M-%S_pc') #2025-08-10_18-53-58
|
||||
|
||||
# Detect display server
|
||||
if [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
DISPLAY_SERVER="wayland"\
|
||||
# h264_nvenc libx264rgb
|
||||
VIDEO_CODEC="libx264rgb"
|
||||
FRAMERATE=60
|
||||
# microphone="$(pactl list sources | grep -A2 'Name:.*input' | grep 'Name:' | head -1 | awk '{print $2}')"
|
||||
desktop="$(pactl list sources | grep -A2 'Name:.*output' | grep 'Name:' | head -1 | awk '{print $2}')"
|
||||
else
|
||||
DISPLAY_SERVER="x11"
|
||||
# yuv420p yuv444p rgba
|
||||
VIDEO_CODEC="yuv444p"
|
||||
FRAMERATE=60
|
||||
screen_resolution="$(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/')"
|
||||
fi
|
||||
|
||||
get_area(){
|
||||
slop="$(slop -n -f '%w,%h,%x,%y')"
|
||||
w=$(echo "$slop" | cut -d ',' -f1)
|
||||
h=$(echo "$slop" | cut -d ',' -f2)
|
||||
x=$(echo "$slop" | cut -d ',' -f3)
|
||||
y=$(echo "$slop" | cut -d ',' -f4)
|
||||
if [ "$DISPLAY_SERVER" = "wayland" ]; then
|
||||
slurp_output="$(slurp)"
|
||||
x=$(echo "$slurp_output" | cut -d' ' -f1 | cut -d',' -f1)
|
||||
y=$(echo "$slurp_output" | cut -d' ' -f1 | cut -d',' -f2)
|
||||
w=$(echo "$slurp_output" | cut -d' ' -f2 | cut -d'x' -f1)
|
||||
h=$(echo "$slurp_output" | cut -d' ' -f2 | cut -d'x' -f2)
|
||||
else
|
||||
slop="$(slop -n -f '%w,%h,%x,%y')"
|
||||
w=$(echo "$slop" | cut -d ',' -f1)
|
||||
h=$(echo "$slop" | cut -d ',' -f2)
|
||||
x=$(echo "$slop" | cut -d ',' -f3)
|
||||
y=$(echo "$slop" | cut -d ',' -f4)
|
||||
fi
|
||||
|
||||
[ $((w%2)) -eq 1 ] && w=$(( w + 1 ))
|
||||
[ $((h%2)) -eq 1 ] && h=$(( h + 1 ))
|
||||
[ $((x%2)) -eq 1 ] && x=$(( x + 1 ))
|
||||
[ $((y%2)) -eq 1 ] && y=$(( y + 1 ))
|
||||
wh="${w}x${h}"
|
||||
geometry="${x},${y} ${w}x${h}"
|
||||
}
|
||||
|
||||
# audio devices (Wayland / PulseAudio)
|
||||
microphone="$(pactl list short sources | grep input | head -1 | awk '{print $1}')"
|
||||
desktop="$(pactl list short sources | grep output | head -1 | awk '{print $1}')"
|
||||
|
||||
screenshot_selected_area(){
|
||||
ffcast -q -g "$(slop)" png "$screenshot_directory/$date.png"
|
||||
xclip -selection clipboard -t image/png "$screenshot_directory/$date.png"
|
||||
notify-send -i "$screenshot_directory/$date.png" "Screenshot" "Area screenshot taken"
|
||||
if [ "$DISPLAY_SERVER" = "wayland" ]; then
|
||||
geometry="$(slurp)"
|
||||
grim -g "$geometry" "$screenshot_directory/$filename.png"
|
||||
wl-copy < "$screenshot_directory/$filename.png"
|
||||
else
|
||||
ffcast -q -g "$(slop)" png "$screenshot_directory/$filename.png"
|
||||
xclip -selection clipboard -t image/png "$screenshot_directory/$filename.png"
|
||||
fi
|
||||
notify-send -i "$screenshot_directory/$filename.png" "Screenshot" "Area screenshot taken"
|
||||
}
|
||||
|
||||
screenshot_full_screen(){
|
||||
ffcast -q png "$screenshot_directory/$date.png"
|
||||
xclip -selection clipboard -t image/png "$screenshot_directory/$date.png"
|
||||
notify-send -i "$screenshot_directory/$date.png" "Screenshot" "Full screen screenshot taken"
|
||||
if [ "$DISPLAY_SERVER" = "wayland" ]; then
|
||||
grim "$screenshot_directory/$filename.png"
|
||||
wl-copy < "$screenshot_directory/$filename.png"
|
||||
else
|
||||
ffcast -q png "$screenshot_directory/$filename.png"
|
||||
xclip -selection clipboard -t image/png "$screenshot_directory/$filename.png"
|
||||
fi
|
||||
notify-send -i "$screenshot_directory/$filename.png" "Screenshot" "Full screen screenshot taken"
|
||||
}
|
||||
|
||||
video_selected_area(){
|
||||
get_area
|
||||
ffmpeg -hide_banner -loglevel error -show_region 1 \
|
||||
-f x11grab -video_size "$wh" -framerate 30 -i :0.0+"$x","$y" -pix_fmt yuv420p "$videos_directory/$date.mp4"
|
||||
ffmpeg -i "$videos_directory/$date.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$date.png"
|
||||
notify-send -i "/tmp/$date.png" "Video" "Area video taken"
|
||||
if [ "$DISPLAY_SERVER" = "wayland" ]; then
|
||||
geometry="$(slurp)"
|
||||
wf-recorder -g "$geometry" -c "$VIDEO_CODEC" -r "$FRAMERATE" -f "$videos_directory/$filename.mp4"
|
||||
grim -g "$geometry" -t png "/tmp/$filename.png"
|
||||
else
|
||||
get_area
|
||||
ffmpeg -hide_banner -loglevel error -show_region 1 \
|
||||
-f x11grab -video_size "$wh" -framerate "$FRAMERATE" -i :0.0+"$x","$y" -pix_fmt "$VIDEO_CODEC" "$videos_directory/$filename.mp4"
|
||||
ffmpeg -i "$videos_directory/$filename.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$filename.png"
|
||||
fi
|
||||
notify-send -i "/tmp/$filename.png" "Video" "Area video taken"
|
||||
}
|
||||
|
||||
video_full_screen(){
|
||||
ffmpeg -hide_banner -loglevel error -show_region 1 \
|
||||
-f x11grab -video_size "$screen_resolution" -framerate 30 -i :0.0 -pix_fmt yuv420p "$videos_directory/$date.mp4"
|
||||
ffmpeg -i "$videos_directory/$date.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$date.png"
|
||||
notify-send -i "/tmp/$date.png" "Video" "Full screen video taken"
|
||||
if [ "$DISPLAY_SERVER" = "wayland" ]; then
|
||||
wf-recorder -c "$VIDEO_CODEC" -r "$FRAMERATE" -f "$videos_directory/$filename.mp4"
|
||||
ffmpeg -i "$videos_directory/$filename.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$filename.png" 2>/dev/null
|
||||
else
|
||||
ffmpeg -hide_banner -loglevel error -show_region 1 \
|
||||
-f x11grab -video_size "$screen_resolution" -framerate "$FRAMERATE" -i :0.0 -pix_fmt "$VIDEO_CODEC" "$videos_directory/$filename.mp4"
|
||||
ffmpeg -i "$videos_directory/$filename.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$filename.png"
|
||||
fi
|
||||
notify-send -i "/tmp/$filename.png" "Video" "Full screen video taken"
|
||||
}
|
||||
video_full_screen_rgba(){
|
||||
ffmpeg -hide_banner -loglevel error -show_region 1 \
|
||||
-f x11grab -video_size "$screen_resolution" -framerate 30 -i :0.0 -pix_fmt rgba "$videos_directory/$date.mp4"
|
||||
ffmpeg -i "$videos_directory/$date.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$date.png"
|
||||
notify-send -i "/tmp/$date.png" "Video" "Full screen video taken (rgba)"
|
||||
|
||||
video_selected_area_audio(){
|
||||
if [ "$DISPLAY_SERVER" = "wayland" ]; then
|
||||
geometry="$(slurp)"
|
||||
wf-recorder -g "$geometry" -c "$VIDEO_CODEC" -r "$FRAMERATE" --audio --audio-device "$desktop" -f "$videos_directory/$filename.mp4"
|
||||
grim -g "$geometry" -t png "/tmp/$filename.png"
|
||||
else
|
||||
get_area
|
||||
ffmpeg -hide_banner -loglevel error -show_region 1 \
|
||||
-f x11grab -video_size "$wh" -framerate "$FRAMERATE" -i :0.0+"$x","$y" \
|
||||
-f alsa -i default -pix_fmt "$VIDEO_CODEC" "$videos_directory/$filename.mp4"
|
||||
ffmpeg -i "$videos_directory/$filename.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$filename.png"
|
||||
fi
|
||||
notify-send -i "/tmp/$filename.png" "Video" "Area video with desktop audio taken"
|
||||
}
|
||||
audio_microphone(){
|
||||
ffmpeg -f pulse -i "$microphone" -metadata title="$date" "$audio_directory/$date.mp3"
|
||||
notify-send "Audio" "Microphone audio recorded"
|
||||
}
|
||||
audio_desktop(){
|
||||
ffmpeg -f pulse -i "$desktop" -metadata title="$date" "$audio_directory/$date.mp3"
|
||||
notify-send "Audio" "Desktop audio recorded"
|
||||
}
|
||||
video_selected_area_audio_microphone(){
|
||||
get_area
|
||||
ffmpeg -hide_banner -loglevel error -show_region 1 \
|
||||
-f x11grab -video_size "$wh" -framerate 30 -i :0.0+"$x","$y" \
|
||||
-f alsa -i default -pix_fmt yuv420p "$videos_directory/$date.mp4"
|
||||
ffmpeg -i "$videos_directory/$date.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$date.png"
|
||||
notify-send -i "/tmp/$date.png" "Video" "Area video with audio taken"
|
||||
}
|
||||
video_full_screen_audio_microphone(){
|
||||
ffmpeg -hide_banner -loglevel error -show_region 1 \
|
||||
-f x11grab -video_size "$screen_resolution" -framerate 30 -i :0.0 \
|
||||
-f alsa -i default -pix_fmt yuv420p "$videos_directory/$date.mp4"
|
||||
ffmpeg -i "$videos_directory/$date.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$date.png"
|
||||
notify-send -i "/tmp/$date.png" "Video" "Full screen video with audio taken"
|
||||
|
||||
video_full_screen_audio(){
|
||||
if [ "$DISPLAY_SERVER" = "wayland" ]; then
|
||||
wf-recorder -c "$VIDEO_CODEC" -r "$FRAMERATE" --audio --audio-device "$desktop" -f "$videos_directory/$filename.mp4"
|
||||
ffmpeg -i "$videos_directory/$filename.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$filename.png" 2>/dev/null
|
||||
else
|
||||
ffmpeg -hide_banner -loglevel error -show_region 1 \
|
||||
-f x11grab -video_size "$screen_resolution" -framerate "$FRAMERATE" -i :0.0 \
|
||||
-f alsa -i default -pix_fmt "$VIDEO_CODEC" "$videos_directory/$filename.mp4"
|
||||
ffmpeg -i "$videos_directory/$filename.mp4" -ss 00:00:01.000 -vframes 1 "/tmp/$filename.png"
|
||||
fi
|
||||
notify-send -i "/tmp/$filename.png" "Video" "Full screen video with desktop audio taken"
|
||||
}
|
||||
|
||||
stop(){
|
||||
pkill -fxn '(/\S+)*ffmpeg\s.*\sx11grab\s.*'
|
||||
pkill -fxn '(/\S+)*ffmpeg\s.*\spulse\s.*'
|
||||
pkill -fxn '(/\S+)*wf-recorder\s.*'
|
||||
pkill -fxn '(/\S+)*pw-record\s.*'
|
||||
exit 1
|
||||
}
|
||||
|
||||
help(){
|
||||
cat << EOF
|
||||
Display server: $DISPLAY_SERVER
|
||||
-h | -help | --help
|
||||
-s | -stop
|
||||
-sa | -screenshot_selected_area
|
||||
-sf | -screenshot_full_screen
|
||||
-va | -video_selected_area
|
||||
-vf | -video_full_screen
|
||||
-am | -audio_microphone
|
||||
-ad | -audio_desktop
|
||||
-vaam | -video_selected_area_audio_microphone
|
||||
-vfam | -video_full_screen_audio_microphone
|
||||
-vaad | -video_selected_area_audio
|
||||
-vfad | -video_full_screen_audio
|
||||
EOF
|
||||
}
|
||||
|
||||
main(){
|
||||
while [ "$1" != "" ]; do
|
||||
PARAM="$1"
|
||||
case $PARAM in
|
||||
-h | -help | --help)
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
-s | -stop)
|
||||
stop
|
||||
exit 1
|
||||
;;
|
||||
-sa | -screenshot_selected_area)
|
||||
screenshot_selected_area
|
||||
;;
|
||||
-sf | -screenshot_full_screen)
|
||||
screenshot_full_screen
|
||||
;;
|
||||
-va | -video_selected_area)
|
||||
video_selected_area
|
||||
;;
|
||||
-vf | -video_full_screen)
|
||||
video_full_screen
|
||||
;;
|
||||
-vf_rgba | -video_full_screen_rgba)
|
||||
video_full_screen_rgba
|
||||
;;
|
||||
-am | -audio_microphone)
|
||||
audio_microphone
|
||||
;;
|
||||
-ad | -audio_desktop)
|
||||
audio_desktop
|
||||
;;
|
||||
-vaam | -video_selected_area_audio_microphone)
|
||||
video_selected_area_audio_microphone
|
||||
;;
|
||||
-vfam | -video_full_screen_audio_microphone)
|
||||
video_full_screen_audio_microphone
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: unknown parameter \"$PARAM\""
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
case "$1" in
|
||||
-h|-help|--help)
|
||||
help
|
||||
exit 0
|
||||
;;
|
||||
-s|-stop)
|
||||
stop
|
||||
;;
|
||||
-sa|-screenshot_selected_area)
|
||||
screenshot_selected_area
|
||||
;;
|
||||
-sf|-screenshot_full_screen)
|
||||
screenshot_full_screen
|
||||
;;
|
||||
-va|-video_selected_area)
|
||||
video_selected_area
|
||||
;;
|
||||
-vf|-video_full_screen)
|
||||
video_full_screen
|
||||
;;
|
||||
-vaad|-video_selected_area_audio)
|
||||
video_selected_area_audio
|
||||
;;
|
||||
-vfad|-video_full_screen_audio)
|
||||
video_full_screen_audio
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: unknown parameter $1"
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
# done
|
||||
set -e
|
||||
}
|
||||
|
||||
main "$1" &
|
||||
exit 0
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user