diff options
author | Florian Pritz <florian.pritz@rise-world.com> | 2019-04-08 13:19:07 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2019-04-13 18:30:35 +0200 |
commit | 0da0ce428e49da5b5ee96b0699090fe503e8d563 (patch) | |
tree | 05ccb982e027b56a14e364eada67dca1fc72a1fc | |
parent | 44b7be6d4ca4b006d22b62151721141cb6e35936 (diff) | |
download | bin-0da0ce428e49da5b5ee96b0699090fe503e8d563.tar.gz bin-0da0ce428e49da5b5ee96b0699090fe503e8d563.tar.xz |
Add various scripts
Signed-off-by: Florian Pritz <florian.pritz@rise-world.com>
-rwxr-xr-x | connect-screen | 7 | ||||
-rwxr-xr-x | fw | 3 | ||||
-rwxr-xr-x | invert-display | 6 | ||||
-rwxr-xr-x | reindent | 13 | ||||
-rwxr-xr-x | sudo-ssh | 3 |
5 files changed, 32 insertions, 0 deletions
diff --git a/connect-screen b/connect-screen new file mode 100755 index 0000000..657b07f --- /dev/null +++ b/connect-screen @@ -0,0 +1,7 @@ +#!/bin/bash + +xrandr --output VIRTUAL1 --off +xrandr --output HDMI2 --off +xset r rate 250 50 +xrandr --output HDMI2 --right-of eDP1 --auto +xkbcomp .xkbmap "$DISPLAY" @@ -0,0 +1,3 @@ +#!/bin/bash + +exec firefox --new-window "$@" diff --git a/invert-display b/invert-display new file mode 100755 index 0000000..0cbc4df --- /dev/null +++ b/invert-display @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e + +xcalib -invert -alter -o 0 +xcalib -invert -alter -o 1 diff --git a/reindent b/reindent new file mode 100755 index 0000000..9237ae2 --- /dev/null +++ b/reindent @@ -0,0 +1,13 @@ +#!/bin/bash + +if [[ $# < 3 ]]; then + echo "usage: reindent <from space count> <to space count> <file> ..." + exit 1 +fi + +from=$1; shift +to=$1; shift + +for file in "$@"; do + unexpand -t "$from" "$file" | expand -i -t "$to" | sponge "$file" +done diff --git a/sudo-ssh b/sudo-ssh new file mode 100755 index 0000000..813ca95 --- /dev/null +++ b/sudo-ssh @@ -0,0 +1,3 @@ +#!/bin/bash + +exec sudo SSH_AUTH_SOCK="$SSH_AUTH_SOCK" "$@" |