From 1715cf42b29e62e4902585a92e3d0b86a741ed21 Mon Sep 17 00:00:00 2001 From: randomuser Date: Fri, 15 Jul 2022 15:48:02 -0500 Subject: [PATCH] add machine --- Makefile | 1 + sh/machine | 15 +++++++++++++++ sh/statusbar | 6 +++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 sh/machine diff --git a/Makefile b/Makefile index a584e7e..c29fa47 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ sh: cp -f sh/ss $(DESTDIR)$(PREFIX)/bin cp -f sh/net $(DESTDIR)$(PREFIX)/bin cp -f sh/bspwm-toggle-gaps $(DESTDIR)$(PREFIX)/bin + cp -f sh/machine $(DESTDIR)$(PREFIX)/bin mkc: c/scream c/timer c/boid c/anaconda c/colors diff --git a/sh/machine b/sh/machine new file mode 100755 index 0000000..9733ca7 --- /dev/null +++ b/sh/machine @@ -0,0 +1,15 @@ +#!/bin/sh + +host="$(hostname)" + +case "$host" in + "mlg" | "think") + exit 1 + ;; + "toaster") + exit 2 + ;; + "fish") + exit 3 + ;; +esac diff --git a/sh/statusbar b/sh/statusbar index 4c58361..d0f73b8 100755 --- a/sh/statusbar +++ b/sh/statusbar @@ -1,3 +1,7 @@ #!/bin/sh -st -c statusbar -g 195x1+0+0 -e status +machine + +[ "$?" -eq 2 ] && + st -c statusbar -g 142x1+0+0 -e status || + st -c statusbar -g 195x1+0+0 -e status