diff --git a/.local/bin/dp1_mirror b/.local/bin/dp1_mirror new file mode 100755 index 0000000..f941f8b --- /dev/null +++ b/.local/bin/dp1_mirror @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP-1 --auto --output DP-1 --same-as eDP-1 --auto diff --git a/.local/bin/dp1_only b/.local/bin/dp1_only new file mode 100755 index 0000000..8f76f2d --- /dev/null +++ b/.local/bin/dp1_only @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output DP-1 --auto --output eDP-1 --off diff --git a/.local/bin/dp1_right b/.local/bin/dp1_right new file mode 100755 index 0000000..3176eae --- /dev/null +++ b/.local/bin/dp1_right @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP-1 --auto --output DP-1 --right-of eDP-1 --auto diff --git a/.local/bin/edp1_only b/.local/bin/edp1_only new file mode 100755 index 0000000..08eab74 --- /dev/null +++ b/.local/bin/edp1_only @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP-1 --auto --output HDMI-1 --off --output DP-1 --off diff --git a/.local/bin/hdmi1_mirror b/.local/bin/hdmi1_mirror new file mode 100755 index 0000000..456defb --- /dev/null +++ b/.local/bin/hdmi1_mirror @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP-1 --auto --output HDMI-1 --same-as eDP-1 --auto diff --git a/.local/bin/hdmi1_only b/.local/bin/hdmi1_only new file mode 100755 index 0000000..aa6b526 --- /dev/null +++ b/.local/bin/hdmi1_only @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output HDMI-1 --auto --output eDP-1 --off diff --git a/.local/bin/hdmi1_right b/.local/bin/hdmi1_right new file mode 100755 index 0000000..e567214 --- /dev/null +++ b/.local/bin/hdmi1_right @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP-1 --auto --output HDMI-1 --right-of eDP-1 --auto diff --git a/.local/bin/pub b/.local/bin/pub new file mode 100755 index 0000000..51f229d --- /dev/null +++ b/.local/bin/pub @@ -0,0 +1,27 @@ +#!/bin/sh + +err () { + printf '\033[31m%s\033[m\n' "$*" +} + +# mia's 0x0.st -- fast! +curl -sfSL -F"file=@${1:--}" 0x0.st && exit 0 +err "Mia's (0x0.st) pastebin failed!" + +# pb1n.de -- fast! +curl -sfSL -F"f=@${1:--}" pb1n.de && exit 0 +err "pb1n.de pastebin failed!" + +# chris titus' hastebin -- not that fast +response="$(curl -sfSL --data-binary @"${1:--}" bin.christitus.com/documents)" && + { hasteKey="$(printf %s "$response" | jq -r '.key')" && [ -n "${hasteKey}" ] && + echo "http://bin.christitus.com/raw/$hasteKey" && exit 0 || err "Couldn't extract hasteKey. Sorry!"; } +err "Chris' pastebin failed!" + +# paste.rs -- damn slow +curl -sfSL --data-binary @"${1:--}" paste.rs && exit 0 +err "paste.rs pastebin failed!" + +# ix.io, broken +curl -sfSL -F"f=@${1:--}" pb1n.de && exit 0 +err "ix.io pastebin failed!" diff --git a/.local/bin/qr b/.local/bin/qr new file mode 100755 index 0000000..98ab27d --- /dev/null +++ b/.local/bin/qr @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -t 1 ] && +qrencode -m2 -t ANSI256UTF8 "$@" || +qrencode -m2 -t UTF8 "$@"