diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2022-01-20 17:07:39 -0600 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2022-01-20 17:07:39 -0600 |
commit | 1ffe58f3ee6eeb2d81729eb7c458a8979eb2df68 (patch) | |
tree | abf5bd1cfa67232bc349174135814e316be3de3b /x11 | |
parent | 32d34ac9c5e3b682800f65f24743f2f29af04347 (diff) | |
download | scripts-1ffe58f3ee6eeb2d81729eb7c458a8979eb2df68.tar.xz scripts-1ffe58f3ee6eeb2d81729eb7c458a8979eb2df68.zip |
moved many scripts around, small tweaks/rewrites, mounter verify xsudo and xclick scripts
Diffstat (limited to 'x11')
-rwxr-xr-x | x11/testtimmywm | 1 | ||||
-rwxr-xr-x | x11/xclick | 7 | ||||
-rwxr-xr-x | x11/xsudo | 7 | ||||
-rwxr-xr-x | x11/xvsync | 2 |
4 files changed, 15 insertions, 2 deletions
diff --git a/x11/testtimmywm b/x11/testtimmywm index 330a328..33cda37 100755 --- a/x11/testtimmywm +++ b/x11/testtimmywm @@ -1,5 +1,4 @@ #!/bin/sh - Xephyr -br -ac -reset -screen 2160x1440 :1 & sleep 1 export DISPLAY=:1 diff --git a/x11/xclick b/x11/xclick new file mode 100755 index 0000000..3b05b38 --- /dev/null +++ b/x11/xclick @@ -0,0 +1,7 @@ +#!/bin/sh +pkill xdotool && echo 'Killed old xclick process! Exiting...' && exit 0 + +delay=${1:-`seq 500 500 10000 | dmenu -p 'Delay between clicks (in milliseconds): '`} +click=${2:-`seq -f'Button %g' 5 | dmenu -p 'Mouse click: ' | tr -cd '[:digit:]'`} + +xdotool click --delay $delay --repeat 2147483647 $click # signed 32-bit integer limit is probably enough clicks since xdotool doesn't have an infinite repeat option diff --git a/x11/xsudo b/x11/xsudo new file mode 100755 index 0000000..5feabb1 --- /dev/null +++ b/x11/xsudo @@ -0,0 +1,7 @@ +#!/bin/sh +sudo=doas +while ! echo "$pass" | $sudo -n true; do + pass="$(dmenu -p 'Password: ' <&-)" # Ask user for password pass is incorrect (skipped if nopass in enabled) + [ "$pass" = '' ] && exit 0 +done +echo "$pass" | $sudo xauth -f /root/.Xauthority add $(xauth list $DISPLAY) && echo "$pass" | $sudo "$@" @@ -1,5 +1,5 @@ #!/bin/sh # Since this script runs xrandr to get the connected monitors, it is unnecessary to run xrandr by itself in your xinitrc for monitor in `xrandr | sed -n 's/ connected.*//p'`; do - #xrandr --output $monitor --set TearFree ${1:-on} + xrandr --output $monitor --set TearFree ${1:-on} done |