diff options
author | Mattias Andrée <maandree@kth.se> | 2024-06-07 11:53:01 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-06-07 11:53:01 +0200 |
commit | ca34d991ad527fec5edde186bb8479982ac52c03 (patch) | |
tree | 3d82e92736a73a3276027d1d67ec6bb350ccc173 | |
parent | Update clawsrc and make python and st exclusive to zenith (diff) | |
download | dotfiles-ca34d991ad527fec5edde186bb8479982ac52c03.tar.gz dotfiles-ca34d991ad527fec5edde186bb8479982ac52c03.tar.bz2 dotfiles-ca34d991ad527fec5edde186bb8479982ac52c03.tar.xz |
Minor fixes
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 29 | ||||
-rw-r--r-- | alsa-utils/Makefile | 2 | ||||
-rw-r--r-- | base/xinit | 1 | ||||
-rw-r--r-- | man/Makefile | 2 | ||||
-rw-r--r-- | mate-settings-daemon/Makefile | 17 | ||||
-rw-r--r-- | ssh/Makefile | 2 | ||||
-rw-r--r-- | xorg-xsetroot/xinit | 1 |
7 files changed, 49 insertions, 5 deletions
@@ -1,13 +1,15 @@ .POSIX: -update: +update: update-common update-private update-work + +update-common: +@for PKGDIR in *; do \ if test -d "$${PKGDIR}"; then \ PKG="$$(printf '%s@\n' "$${PKGDIR}" | cut -d @ -f 1)"; \ HOST="$$(printf '%s@\n' "$${PKGDIR}" | cut -d @ -f 2 | tr A-Z a-z)"; \ if test -z "$${HOST}" || test "$${HOST}" = "$$(hostname | tr A-Z a-z)"; then \ if ./check-installed "$${PKG}" 2>/dev/null; then \ - if ! ./check-installed "$$(readlink -- "$${PKG}")" 2>/dev/null; then \ + if ! ./check-installed "$$(readlink -- "$${PKGDIR}")" 2>/dev/null; then \ printf -- '\033[1mcd %s && %s install\033[m\n' "$${PKGDIR}" '$(MAKE)'; \ (cd -- "$${PKGDIR}" && $(MAKE) install); \ fi; \ @@ -18,9 +20,32 @@ update: fi; \ fi; \ done + +update-private: +if test -f .private/pkgs/Makefile || test -f .private/pkgs/makefile; then \ cd -- .private/pkgs && $(MAKE); \ fi + +update-work: +if test -f .work/pkgs/Makefile || test -f .work/pkgs/makefile; then \ cd -- .work/pkgs && $(MAKE); \ fi + +.DEFAULT: + +@for PKGDIR in $@; do \ + if test -d "$${PKGDIR}"; then \ + PKG="$$(printf '%s@\n' "$${PKGDIR}" | cut -d @ -f 1)"; \ + HOST="$$(printf '%s@\n' "$${PKGDIR}" | cut -d @ -f 2 | tr A-Z a-z)"; \ + if test -z "$${HOST}" || test "$${HOST}" = "$$(hostname | tr A-Z a-z)"; then \ + if ./check-installed "$${PKG}" 2>/dev/null; then \ + if ! ./check-installed "$$(readlink -- "$${PKGDIR}")" 2>/dev/null; then \ + printf -- '\033[1mcd %s && %s install\033[m\n' "$${PKGDIR}" '$(MAKE)'; \ + (cd -- "$${PKGDIR}" && $(MAKE) install); \ + fi; \ + else\ + printf -- '\033[1mcd %s && %s uninstall\033[m\n' "$${PKGDIR}" '$(MAKE)'; \ + (cd -- "$${PKGDIR}" && $(MAKE) uninstall || :); \ + fi; \ + fi; \ + fi; \ + done diff --git a/alsa-utils/Makefile b/alsa-utils/Makefile index 13cc906..2a86985 100644 --- a/alsa-utils/Makefile +++ b/alsa-utils/Makefile @@ -13,7 +13,7 @@ install: mkdir -p -- ~/.config/X11/xinit/xinitrc.d test ! -e ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util || \ test -L ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util - ln -sf -- ~/.dotfiles/alsa-util/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util + ln -sf -- ~/.dotfiles/alsa-utils/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util uninstall: +! ../check-installed alsa-utils @@ -2,6 +2,7 @@ # Set keyboard settings setkeys || : +(sleep 2; setkeys || :) & # Start hotkey daemon xkbdbind & diff --git a/man/Makefile b/man/Makefile index 726047c..6fe759b 100644 --- a/man/Makefile +++ b/man/Makefile @@ -3,7 +3,7 @@ install: ../check-installed-shebang colourised-less-for-man ../check-installed-shebang man - ../check-in-path dmenu + -../check-in-path dmenu ../check-in-path sed ../check-in-path isfg ../check-in-path less diff --git a/mate-settings-daemon/Makefile b/mate-settings-daemon/Makefile new file mode 100644 index 0000000..6a335d8 --- /dev/null +++ b/mate-settings-daemon/Makefile @@ -0,0 +1,17 @@ +.POSIX: + +install: + test ! -e ~/.local/bin/mate-settings-daemon || test -L ~/.local/bin/mate-settings-daemon + if test -f /usr/libexec/mate-settings-daemon; then \ + ln -sf /usr/libexec/mate-settings-daemon ~/.local/bin/mate-settings-daemon; \ + elif test -f /usr/lib/mate-settings-daemon/mate-settings-daemon; then \ + ln -sf /usr/lib/mate-settings-daemon/mate-settings-daemon ~/.local/bin/mate-settings-daemon; \ + elif test -f /usr/lib/mate-settings-daemon; then \ + ln -sf /usr/lib/mate-settings-daemon ~/.local/bin/mate-settings-daemon; \ + else \ + rm -f -- ~/.local/bin/mate-settings-daemon 2>/dev/null; \ + fi + +uninstall: + +! ../check-installed mate-settings-daemon + -unlink -- ~/.local/bin/mate-settings-daemon diff --git a/ssh/Makefile b/ssh/Makefile index e7bf102..be4b0d5 100644 --- a/ssh/Makefile +++ b/ssh/Makefile @@ -3,7 +3,7 @@ DYNAMIC_ADDRESSES != \ for f in ../.secrets/ssh/hostfetch/* ../.work/ssh/hostfetch/* hostfetch/*; do \ test ! -x "$$f" || printf '%s\n' "$$f"; \ - done | sort -u | sed 's|^.*/\([^/]*[^/~]\)$$|\1|' + done | sort -u | sed -n 's|^.*/\([^/]*[^/~]\)$$|\1|p' install: -rm -f -- .ssh-config diff --git a/xorg-xsetroot/xinit b/xorg-xsetroot/xinit index 27f06b1..c172260 100644 --- a/xorg-xsetroot/xinit +++ b/xorg-xsetroot/xinit @@ -2,3 +2,4 @@ # Set cursor to right handed pointer xsetroot -cursor_name left_ptr +(sleep 2; xsetroot -cursor_name left_ptr) & |