diff options
author | Oskar <[email protected]> | 2024-10-09 17:04:50 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-10-09 17:04:50 +0200 |
commit | bee423d15287eb1908773fa3e92a8ee8792fae75 (patch) | |
tree | 8ad8501b42e6a8e426eb3011168288ff1ae99e01 |
some of the scripts i use
-rwxr-xr-x | clicker.sh | 8 | ||||
-rwxr-xr-x | import-cam-photos | 4 | ||||
-rwxr-xr-x | screenrec | 15 | ||||
-rwxr-xr-x | sshot | 2 |
4 files changed, 29 insertions, 0 deletions
diff --git a/clicker.sh b/clicker.sh new file mode 100755 index 0000000..e6b1b49 --- /dev/null +++ b/clicker.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Uses xdotool to perform keypresses. In this case it types a letter, sleeps and then deletes it + +while true; do + xdotool key a + sleep 3 + xdotool key BackSpace +done diff --git a/import-cam-photos b/import-cam-photos new file mode 100755 index 0000000..d95f66f --- /dev/null +++ b/import-cam-photos @@ -0,0 +1,4 @@ +#!/bin/bash + +cd "$HOME/pic/CANON" +yes | gphoto2 -P diff --git a/screenrec b/screenrec new file mode 100755 index 0000000..31c6720 --- /dev/null +++ b/screenrec @@ -0,0 +1,15 @@ +#!/bin/dash + +stop_ffmpeg() { + pkill -f "ffmpeg -v quiet -f x11grab -video_size 1920x1080 -i :0.0" + exit +} + + +# Check if argument is provided +if [ "$1" = "stop" ]; then + stop_ffmpeg +fi + +# Start ffmpeg screen recording +ffmpeg -v quiet -f x11grab -video_size 1920x1080 -i :0.0 "$HOME/pic/screenrec_$(date +"%Y%m%d_%H%M").mp4" @@ -0,0 +1,2 @@ +#!/bin/dash +ffmpeg -f x11grab -video_size 1920x1080 -i :0.0 -pix_fmt rgba "$HOME/pic/screenshot_$(date +%Y%m%d_%H%M%S).png" |