Updated the shbangs to be more flexible. (#29)

This commit is contained in:
Jas Singh
2024-07-28 12:55:12 -07:00
committed by GitHub
parent fca893ae57
commit 83b60ddaab
2 changed files with 23 additions and 23 deletions

View File

@@ -1,9 +1,9 @@
#!/bin/bash #!/usr/bin/env bash
outputDir="$HOME/Videos/Screencasts" outputDir="$HOME/Videos/Screencasts"
checkRecording() { checkRecording() {
if pgrep -f "gpu-screen-recorder" > /dev/null; then if pgrep -f "gpu-screen-recorder" >/dev/null; then
return 0 return 0
else else
return 1 return 1
@@ -47,24 +47,24 @@ stopRecording() {
-u normal \ -u normal \
--action="scriptAction:-dolphin $outputDir=Directory" \ --action="scriptAction:-dolphin $outputDir=Directory" \
--action="scriptAction:-xdg-open $recentFile=Play" --action="scriptAction:-xdg-open $recentFile=Play"
} }
case "$1" in case "$1" in
start) start)
startRecording "$@" startRecording "$@"
;; ;;
stop) stop)
stopRecording stopRecording
;; ;;
status) status)
if checkRecording; then if checkRecording; then
echo "recording" echo "recording"
else else
echo "not recording" echo "not recording"
fi fi
;; ;;
*) *)
echo "Usage: $0 {start [screen_name|window_id]|stop|status}" echo "Usage: $0 {start [screen_name|window_id]|stop|status}"
exit 1 exit 1
;; ;;
esac esac

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
outputDir="$HOME/Pictures/Screenshots/" outputDir="$HOME/Pictures/Screenshots/"
outputFile="snapshot_$(date +%Y-%m-%d_%H-%M-%S).png" outputFile="snapshot_$(date +%Y-%m-%d_%H-%M-%S).png"