commit 3e200ecb194d2695a36792ac065037b2746ca558
parent d724eaf55b7a181d44ff14c091e146dfa4e68163
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Fri, 12 Feb 2021 21:29:46 -0800
Update dp script
Add copywrite and license notice aswell as remove the `usage'
function since it was only used once.
Diffstat:
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/modules/scripts/.local/bin/dp b/modules/scripts/.local/bin/dp
@@ -1,17 +1,16 @@
-#!/usr/bin/env dash
-#! dp -- manage multi-monitor setup
-#!
-#! Each argument is taken as a display, if two are given the first is
-#! put to the left of the second, otherwise if only one is given that
-#! display is turned off.
-
-set -eu
-
-usage() { echo "usage, `basename $0` [output [output]]" ;}
+#!/bin/sh
+# Copywrite 2020, 2021 Jacob R. Edwards
+# License: GPLv3
+#
+# dp -- manage multi-monitor setup
+#
+# Each argument is taken as a display, if two are given the first is
+# put to the left of the second, otherwise if only one is given that
+# display is turned off.
case $#
in
2) xrandr --auto --output "$1" --left-of "$2" --auto;;
1) xrandr --output "$1" --off;;
- *) usage; exit 1;;
+ *) printf 'usage: %s [output [output]]\n' `basename $0`; exit 1;;
esac