aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-06-26 14:04:42 +0200
committerMattias Andrée <maandree@kth.se>2021-06-26 14:04:42 +0200
commit13096e0f271be8140c3546d0c50234c355b56d5f (patch)
treeb4ac6adc7f881c6d3241d621f66160e7eda3e62f
parentAdd xpybar (diff)
downloaddotfiles-13096e0f271be8140c3546d0c50234c355b56d5f.tar.gz
dotfiles-13096e0f271be8140c3546d0c50234c355b56d5f.tar.bz2
dotfiles-13096e0f271be8140c3546d0c50234c355b56d5f.tar.xz
Add radharc wrapper, iswork bin, and secret bins
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--base/Makefile7
-rw-r--r--radharc/Makefile5
-rwxr-xr-xradharc/radharc10
3 files changed, 22 insertions, 0 deletions
diff --git a/base/Makefile b/base/Makefile
index dd780a6..607a0da 100644
--- a/base/Makefile
+++ b/base/Makefile
@@ -29,6 +29,11 @@ install:
test -L ~/.config/locations/current || ln -sf default ~/.config/locations/current
ln -sf locations/current/geolocation ~/.config/geolocation
ln -sf locations/current/metar ~/.config/metar
+ mkdir -p -- ~/.local/bin
+ test ! -d ~/.local/bin/iswork
+ test -x /bin/false
+ ln -sf -- /bin/false ~/.local/bin/iswork
+ test ! -r ../.secrets/bin/Makefile || make -C ../.secrets/bin install
uninstall:
-unlink -- ~/.config/profile
@@ -37,5 +42,7 @@ uninstall:
-unlink -- ~/.config/locations
-unlink -- ~/.config/geolocation
-unlink -- ~/.config/metar
+ -unlink -- ~/.local/bin/iswork
+ -test ! -r ../.secrets/bin/Makefile || make -C ../.secrets/bin uninstall
.PHONY: install uninstall
diff --git a/radharc/Makefile b/radharc/Makefile
index 0a7a4ab..9c94b2a 100644
--- a/radharc/Makefile
+++ b/radharc/Makefile
@@ -4,14 +4,19 @@ include ../common.mk
XINITRC_ORDER = 20
install:
+ test -x /bin/dash
mkdir -p -- ~/.config/X11/xinit/xinitrc.d
test ! -d ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-radharc
ln -sf -- ~/.dotfiles/radharc/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-radharc
+ mkdir -p -- ~/.local/bin
+ test ! -d ~/.local/bin/radharc
+ ln -sf -- ~/.dotfiles/radharc/radharc ~/.local/bin/radharc
uninstall:
-unlink -- ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-radharc
-rmdir -- ~/.config/X11/xinit/xinitrc.d
-rmdir -- ~/.config/X11/xinit
-rmdir -- ~/.config/X11
+ -unlink -- ~/.local/bin/radharc
.PHONY: install uninstall
diff --git a/radharc/radharc b/radharc/radharc
new file mode 100755
index 0000000..b630bc9
--- /dev/null
+++ b/radharc/radharc
@@ -0,0 +1,10 @@
+#!/bin/dash
+
+location=
+if test -r ~/.config/geolocation; then
+ location=-L"$(head -n1 ~/.config/geolocation | tr ' ' :)"
+elif test -r /etc/geolocation; then
+ location=-L"$(head -n1 /etc/geolocation | tr ' ' :)"
+fi
+
+exec /usr/bin/radharc $location -l3500 -h5500 "$@"