summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-09-10 12:19:06 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-09-10 12:19:06 -0400
commit74f909fedcbe354055a7f5a492735e09ba6d15da (patch)
treeeb209f321bee3240d2a8e83c47c5e187ecde8ff8
parent8633c82378ab9b3a88b956def1a05cb76b4c11fd (diff)
downloadscripts-74f909fedcbe354055a7f5a492735e09ba6d15da.tar.xz
scripts-74f909fedcbe354055a7f5a492735e09ba6d15da.zip
Moved i3 commands into scripts, fixed screencast and added webcam toggles
-rwxr-xr-xi3-filescmd.sh3
-rwxr-xr-xi3-mailcmd.sh4
-rwxr-xr-xi3-mixercmd.sh3
-rwxr-xr-xi3-newsboatcmd.sh3
-rwxr-xr-xi3-screenie_regioncmd.sh2
-rwxr-xr-xi3-screeniecmd.sh2
-rwxr-xr-xtoggle-docked.sh4
-rwxr-xr-xtoggle-screencast.sh11
-rwxr-xr-xtoggle-webcam.sh3
9 files changed, 28 insertions, 7 deletions
diff --git a/i3-filescmd.sh b/i3-filescmd.sh
new file mode 100755
index 0000000..fc4a53c
--- /dev/null
+++ b/i3-filescmd.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+alacritty -e zsh -c "cat ~/.config/wpg/sequences && vifm"
+
diff --git a/i3-mailcmd.sh b/i3-mailcmd.sh
new file mode 100755
index 0000000..3d253fc
--- /dev/null
+++ b/i3-mailcmd.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+alacritty -t "Reading Email" -e zsh -c "cat ~/.config/wpg/sequences && mutt"
+mbsync -c ~/.config/mbsync/mbsyncrc -a
+pkill -77 i3blocks
diff --git a/i3-mixercmd.sh b/i3-mixercmd.sh
new file mode 100755
index 0000000..6eef2a1
--- /dev/null
+++ b/i3-mixercmd.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+alacritty -e zsh -c "cat ~/.config/wpg/sequences && mixertui"
+pkill -75 i3blocks
diff --git a/i3-newsboatcmd.sh b/i3-newsboatcmd.sh
new file mode 100755
index 0000000..c95063c
--- /dev/null
+++ b/i3-newsboatcmd.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+alacritty -t "Reading News" -e zsh -c "cat ~/.config/wpg/sequences && newsboat"
+pkill -78 i3blocks
diff --git a/i3-screenie_regioncmd.sh b/i3-screenie_regioncmd.sh
new file mode 100755
index 0000000..1b2ce32
--- /dev/null
+++ b/i3-screenie_regioncmd.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+scrot -sfz -e 'mkdir -p ~/pictures/screenshots && mv $f ~/pictures/screenshots/'
diff --git a/i3-screeniecmd.sh b/i3-screeniecmd.sh
new file mode 100755
index 0000000..4f62401
--- /dev/null
+++ b/i3-screeniecmd.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+scrot -z -e 'mkdir -p ~/pictures/screenshots && mv $f ~/pictures/screenshots/'
diff --git a/toggle-docked.sh b/toggle-docked.sh
index e062a31..54551a1 100755
--- a/toggle-docked.sh
+++ b/toggle-docked.sh
@@ -5,7 +5,7 @@ if [ "$hasVGA" = "connected" ]; then
xrandr \
--output VGA-0 \
--mode 1024x768 \
- --pos 0x0 \
+ --pos 1920x0 \
--rotate normal \
--dpi 82 \
--output DP-0 \
@@ -17,7 +17,7 @@ if [ "$hasVGA" = "connected" ]; then
--output DP-3 \
--primary \
--mode 1920x1080 \
- --pos 1024x0 \
+ --pos 0x0 \
--rotate normal \
--dpi 96 \
--output DP-4 \
diff --git a/toggle-screencast.sh b/toggle-screencast.sh
index 0a23d41..b8050da 100755
--- a/toggle-screencast.sh
+++ b/toggle-screencast.sh
@@ -2,7 +2,8 @@
## Config
output_dir=~/videos/screencasts
-sound_device=/dev/dsp5
+#sound_device=/dev/dsp4.0
+#-thread_queue_size 512 -f oss -i "$sound_device" \
## Start recording
@@ -14,7 +15,6 @@ start_recording() {
ffmpeg -video_size 1920x1080 \
-framerate 50 \
-thread_queue_size 512 -f x11grab -i :0.0+0,0 \
- -thread_queue_size 512 -f oss -i "$sound_device" \
-vcodec libx264rgb -crf 0 -preset:v ultrafast \
-acodec pcm_s16le \
-af aresample=async=1:first_pts=0 \
@@ -26,10 +26,11 @@ start_recording() {
## Stop recording
stop_recording() {
pkill -2 ffmpeg
- output_file="$output_dir"/cast_"$(date '+%F-%H-%M-%S')".mkv
- mv /tmp/cast.mkv "$output_file"
- notify-send "Screencast saved" "$output_file"
+ output_file="$output_dir"/cast_"$(date '+%F-%H-%M-%S')".mp4
+ notify-send "Screencast stopped, transcoding..." "$output_file"
+ ffmpeg -i /tmp/cast.mkv "$output_file" && rm /tmp/cast.mkv
pkill -76 i3blocks
+ notify-send "Transcode done!" "$output_file"
exit
}
diff --git a/toggle-webcam.sh b/toggle-webcam.sh
new file mode 100755
index 0000000..ea543bb
--- /dev/null
+++ b/toggle-webcam.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+#mpv --no-terminal --geometry=25%-10-40 --title="Live Webcam"
+pkill pwcview || pwcview -f 30 -s sif &