diff options
author | Mattias Andrée <maandree@kth.se> | 2023-11-18 23:23:40 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-11-18 23:23:40 +0100 |
commit | 0f1df0db903ba576fd17b08197d3066af7a61e5f (patch) | |
tree | a59c04307b1382257afa3c3512ec3abadf7e0e47 /radharc | |
parent | Use losetup -d instead of --detach and add clean up (diff) | |
download | dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.gz dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.bz2 dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.xz |
A lot of changes
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'radharc')
-rw-r--r-- | radharc/Makefile | 11 | ||||
-rwxr-xr-x | radharc/radharc | 9 |
2 files changed, 11 insertions, 9 deletions
diff --git a/radharc/Makefile b/radharc/Makefile index 9c94b2a..f68072b 100644 --- a/radharc/Makefile +++ b/radharc/Makefile @@ -1,22 +1,21 @@ .POSIX: -include ../common.mk XINITRC_ORDER = 20 install: - test -x /bin/dash + ../check-installed-shebang radharc mkdir -p -- ~/.config/X11/xinit/xinitrc.d - test ! -d ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-radharc + test ! -e ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-radharc || \ + test -L ~/.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 + test ! -e ~/.local/bin/radharc || test -L ~/.local/bin/radharc ln -sf -- ~/.dotfiles/radharc/radharc ~/.local/bin/radharc uninstall: + +! ../check-installed radharc -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 index b630bc9..6b32699 100755 --- a/radharc/radharc +++ b/radharc/radharc @@ -1,10 +1,13 @@ #!/bin/dash -location= if test -r ~/.config/geolocation; then - location=-L"$(head -n1 ~/.config/geolocation | tr ' ' :)" + location="-L $(head -n1 ~/.config/geolocation | tr ' ' :)" elif test -r /etc/geolocation; then - location=-L"$(head -n1 /etc/geolocation | tr ' ' :)" + location="-L $(head -n1 /etc/geolocation | tr ' ' :)" +elif test $# = 0; then + exec /usr/bin/radharc -t 5500 +else + exec /usr/bin/radharc "$@" fi exec /usr/bin/radharc $location -l3500 -h5500 "$@" |