Update: Changed scipts, updated readme.

This commit is contained in:
Keyitdev
2022-06-22 19:27:20 +02:00
parent 35c6ea42ec
commit c589d31ace
11 changed files with 208 additions and 163 deletions
+32 -32
View File
@@ -1,73 +1,73 @@
#!/usr/bin/env bash
# rofi theme
THEME="$HOME/.config/rofi/compact_without_icons.rasi"
theme="$HOME/.config/rofi/compact_without_icons.rasi"
get_options() {
echo " Capture Region"
echo " Capture Region (without saving)"
echo " Capture Screen"
echo " Capture Screen (without saving)"
echo " Record Region (GIF)"
echo " Record Screen (GIF)"
echo " Record Region (MP4)"
echo " Record Screen (MP4)"
#echo " Record Region (MP4+audio_virt)"
#echo " Record Region (MP4+audio_mic)"
#echo " Record Audio virt"
#echo " Record Audio mic"
echo " Stop Recording"
echo " Capture Region"
echo " Capture Region (without saving)"
echo " Capture Screen"
echo " Capture Screen (without saving)"
echo " Record Region (GIF)"
echo " Record Screen (GIF)"
echo " Record Region (MP4)"
echo " Record Screen (MP4)"
#echo " Record Region (MP4+audio_virt)"
#echo " Record Region (MP4+audio_mic)"
#echo " Record Audio virt"
#echo " Record Audio mic"
echo " Stop Recording"
}
main() {
# Get choice from rofi
CHOICE=$( (get_options) | rofi -dmenu -i -fuzzy -p "" -theme "$THEME")
# get choice from rofi
choice=$( (get_options) | rofi -dmenu -i -fuzzy -p "" -theme "$theme")
# If user has not picked anything, exit
if [[ -z "${CHOICE// /}" ]]; then
# if user has not picked anything, exit
if [[ -z "${choice// /}" ]]; then
exit 1
fi
# run the selected command
case $CHOICE in
' Capture Region (without saving)')
case $choice in
' Capture Region (without saving)')
screenshot -crtc
;;
' Capture Region')
' Capture Region')
screenshot -crtf
;;
' Capture Screen (without saving)')
' Capture Screen (without saving)')
screenshot -cstc
;;
' Capture Screen')
' Capture Screen')
screenshot -cstf
;;
' Record Region (GIF)')
' Record Region (GIF)')
screenshot -rrg
;;
' Record Screen (GIF)')
' Record Screen (GIF)')
screenshot -rsg
;;
' Record Region (MP4)')
' Record Region (MP4)')
screenshot -rrv
;;
' Record Screen (MP4)')
' Record Screen (MP4)')
screenshot -rsv
;;
' Record Region (MP4+audio_virt)')
' Record Region (MP4+audio_virt)')
screenshot -rrav
;;
' Record Region (MP4+audio_mic)')
' Record Region (MP4+audio_mic)')
screenshot -rrmv
;;
' Record Audio virt')
' Record Audio virt')
screenshot -rav
;;
' Record Audio mic')
' Record Audio mic')
screenshot -ram
;;
' Stop Recording')
' Stop Recording')
screenshot -s
;;
esac