summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2023-02-10 17:31:39 -0500
committerAdam T. Carpenter <atc@53hor.net>2023-02-10 17:31:39 -0500
commit1618f44c0c80414552663fb590859f65bd4bbffc (patch)
treed31c2f12752b645bf3f502d94acf6592d9dc1b77
parent3ec6dc8801b933c7d5bbf7fdca498d546c5d2f24 (diff)
downloadscripts-1618f44c0c80414552663fb590859f65bd4bbffc.tar.xz
scripts-1618f44c0c80414552663fb590859f65bd4bbffc.zip
feat: add image and video scripts, remove docking station scripts
-rwxr-xr-xdock.sh5
-rw-r--r--resize-pad-transparent.sh2
-rwxr-xr-xtranscode.sh13
-rwxr-xr-xundock.sh5
4 files changed, 15 insertions, 10 deletions
diff --git a/dock.sh b/dock.sh
deleted file mode 100755
index 5e248d8..0000000
--- a/dock.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-/bin/sleep 3
-/usr/local/bin/xrandr --output DP-3 --off --output DP-2 --auto --primary
-/sbin/sysctl hw.acpi.lid_switch_state=NONE
-/usr/local/bin/xautolock -disable
diff --git a/resize-pad-transparent.sh b/resize-pad-transparent.sh
new file mode 100644
index 0000000..4d81375
--- /dev/null
+++ b/resize-pad-transparent.sh
@@ -0,0 +1,2 @@
+# resize and pad image with transparency
+convert -background none -gravity center image.png -resize 400x400 -extent 400x400 result.png
diff --git a/transcode.sh b/transcode.sh
new file mode 100755
index 0000000..941d7cb
--- /dev/null
+++ b/transcode.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+for INPUT in "$@"
+do
+ echo "$INPUT"
+
+ HandBrakeCLI \
+ -x threads=16 \
+ --preset-import-file ~/presets.json \
+ --preset "Adam's DVD" \
+ --input "$INPUT" \
+ --output /mnt/out/"${INPUT##*/}"
+done
diff --git a/undock.sh b/undock.sh
deleted file mode 100755
index f4f9ec7..0000000
--- a/undock.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-/bin/sleep 3
-/usr/local/bin/xrandr --output DP-3 --auto --primary --output DP-2 --off
-/sbin/sysctl hw.acpi.lid_switch_state=S3
-/usr/local/bin/xautolock -enable