From 0da0ce428e49da5b5ee96b0699090fe503e8d563 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 8 Apr 2019 13:19:07 +0200 Subject: Add various scripts Signed-off-by: Florian Pritz --- connect-screen | 7 +++++++ fw | 3 +++ invert-display | 6 ++++++ reindent | 13 +++++++++++++ sudo-ssh | 3 +++ 5 files changed, 32 insertions(+) create mode 100755 connect-screen create mode 100755 fw create mode 100755 invert-display create mode 100755 reindent create mode 100755 sudo-ssh 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" diff --git a/fw b/fw new file mode 100755 index 0000000..834073c --- /dev/null +++ b/fw @@ -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 ..." + 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" "$@" -- cgit v1.2.3-24-g4f1b