summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-10-09 17:04:50 +0200
committerOskar <[email protected]>2024-10-09 17:04:50 +0200
commitbee423d15287eb1908773fa3e92a8ee8792fae75 (patch)
tree8ad8501b42e6a8e426eb3011168288ff1ae99e01
some of the scripts i use
-rwxr-xr-xclicker.sh8
-rwxr-xr-ximport-cam-photos4
-rwxr-xr-xscreenrec15
-rwxr-xr-xsshot2
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"
diff --git a/sshot b/sshot
new file mode 100755
index 0000000..f5583dd
--- /dev/null
+++ b/sshot
@@ -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"