diff --git a/.scripts/awesome_startup.sh b/.scripts/awesome_startup.sh new file mode 100755 index 0000000..d8b6dd2 --- /dev/null +++ b/.scripts/awesome_startup.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +killall wbar +killall xbattbar +killall pasystray +killall compton + +wbar & +pasystray & +compton & diff --git a/.scripts/decop.sh b/.scripts/decop.sh new file mode 100755 index 0000000..240f80c --- /dev/null +++ b/.scripts/decop.sh @@ -0,0 +1,11 @@ +#!/bin/zsh +if [ -e /tmp/compton.lock ] +then + echo locked +else + touch /tmp/compton.lock + awk -F= '{if($1 == "shadow-opacity " && $2+0.0 < 1) {$2=$2+0.1;$2 = $2 ";";}}1' OFS="= " ~/.compton.conf > /tmp/compton.conf + cat /tmp/compton.conf > ~/.compton.conf + kill -SIGUSR1 `pidof compton` + rm /tmp/compton.lock +fi diff --git a/.scripts/emulator_dev.sh b/.scripts/emulator_dev.sh new file mode 100755 index 0000000..67e91e0 --- /dev/null +++ b/.scripts/emulator_dev.sh @@ -0,0 +1,4 @@ +#!/bin/bash +export ANDROID_SDK=/opt/android-sdk-update-manager +export PATH=$ANDROID_SDK/emulator:$ANDROID_SDK/tools:$PATH +emulator -accel on -avd Pixel_4_XL_API_28 -no-snapshot-load diff --git a/.scripts/grabscreen.sh b/.scripts/grabscreen.sh new file mode 100755 index 0000000..75f8e45 --- /dev/null +++ b/.scripts/grabscreen.sh @@ -0,0 +1,5 @@ +#!/bin/zsh +#sudo rmmod v4l2loopback +#sudo modprobe v4l2loopback video_nr=1,2 + +ffmpeg -f x11grab -show_region 1 -framerate 25 $(slop -f '-video_size %wx%h -i +%x,%y') -draw_mouse 1 -f v4l2 /dev/video2 diff --git a/.scripts/incop.sh b/.scripts/incop.sh new file mode 100755 index 0000000..42ac343 --- /dev/null +++ b/.scripts/incop.sh @@ -0,0 +1,11 @@ +#!/bin/zsh +if [ -e /tmp/compton.lock ] +then + echo locked +else + touch /tmp/compton.lock + awk -F= '{if($1 == "shadow-opacity " && $2+0.0 > 0) {$2=$2-0.1;$2 = $2 ";";}}1' OFS="= " ~/.compton.conf > /tmp/compton.conf + cat /tmp/compton.conf > ~/.compton.conf + kill -SIGUSR1 `pidof compton` + rm /tmp/compton.lock +fi diff --git a/.scripts/loadv42l.sh b/.scripts/loadv42l.sh new file mode 100755 index 0000000..4c37e72 --- /dev/null +++ b/.scripts/loadv42l.sh @@ -0,0 +1,4 @@ +#!/bin/sh +rmmod v4l2loopback +modprobe v4l2loopback video_nr=1,2 + diff --git a/.scripts/lock.sh b/.scripts/lock.sh new file mode 100755 index 0000000..3c652aa --- /dev/null +++ b/.scripts/lock.sh @@ -0,0 +1,9 @@ +if `dunstctl is-paused`; then + #i3lock -n -c 222222 + i3lock -n -i ~/.config/i3/locked.png +else + dunstctl set-paused true + i3lock -n -i ~/.config/i3/locked.png + dunstctl set-paused false +fi + diff --git a/.scripts/ocrcp.sh b/.scripts/ocrcp.sh new file mode 100755 index 0000000..19d2f40 --- /dev/null +++ b/.scripts/ocrcp.sh @@ -0,0 +1,3 @@ +#!/bin/sh +#maim -g `xrectsel` | png22pnm | ocrad | xsel -bi +maim -g `xrectsel` | png22pnm | tesseract - - | xsel -bi diff --git a/.scripts/screencut.sh b/.scripts/screencut.sh new file mode 100755 index 0000000..abbe681 --- /dev/null +++ b/.scripts/screencut.sh @@ -0,0 +1,4 @@ +#!/bin/sh +maim -u -g `slop -b 3 -c 1,0,0` | convert - -alpha off ~/CUTS/`date +%s`.jpg +#adb root +#adb push ~/CUTS /storage/emulated/0/Download/ diff --git a/.scripts/screenrec.sh b/.scripts/screenrec.sh new file mode 100755 index 0000000..fb883eb --- /dev/null +++ b/.scripts/screenrec.sh @@ -0,0 +1,2 @@ +#!/bin/sh +ffmpeg -y -threads 4 -i /dev/video2 -vcodec mpeg4 -b:v 800k MP4/`date +%s`.mp4 diff --git a/.scripts/screenshot.sh b/.scripts/screenshot.sh new file mode 100755 index 0000000..7981afc --- /dev/null +++ b/.scripts/screenshot.sh @@ -0,0 +1 @@ +maim -u -m 10 -f png ~/PNG/`date +%s`.png diff --git a/.scripts/spawn_urxvt_tmux.sh b/.scripts/spawn_urxvt_tmux.sh new file mode 100755 index 0000000..95f5311 --- /dev/null +++ b/.scripts/spawn_urxvt_tmux.sh @@ -0,0 +1,3 @@ +#!/bin/bash +#TODO: add support for more parameters :D +urxvt -e tmux new $1' '$2' '$3'; $SHELL'