Updated the shbangs to be more flexible. (#29)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user