From 529e149d220c2864084164cf2e5aaf8ab112c195 Mon Sep 17 00:00:00 2001 From: faulty Date: Mon, 20 Feb 2023 16:47:39 +0100 Subject: [PATCH] feat(dwm+main): tools update --- files/dwm/dwm-start.sh | 8 ++++++-- scripts/30-dwm.sh | 10 ++++++++-- sync.sh | 8 +++++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/files/dwm/dwm-start.sh b/files/dwm/dwm-start.sh index a6b9372..ae7f36b 100755 --- a/files/dwm/dwm-start.sh +++ b/files/dwm/dwm-start.sh @@ -27,6 +27,10 @@ done & nm-applet & mate-volume-control-status-icon & flameshot & -feh -z -Z --bg-scale /home/didier/Pictures/background.png +feh -z -Z --bg-scale $HOME/Pictures/background.* -exec dwm >/dev/null +touch /tmp/restart-dwm +while [ -f /tmp/restart-dwm ]; do + exec dwm >/dev/null + rm -rf /tmp/restart-dwm +done diff --git a/scripts/30-dwm.sh b/scripts/30-dwm.sh index 30a2e78..08b1f83 100644 --- a/scripts/30-dwm.sh +++ b/scripts/30-dwm.sh @@ -27,9 +27,15 @@ git apply -3 /tmp/dwm-systray.diff $SUDO make install popd -# start script -chmod +x ./files/dwm/dwm-start.sh +# dwm boot/manage scripts +chmod +x ./files/dwm/*.sh + $SUDO cp ./files/dwm/dwm-start.sh /usr/local/bin/dwm-start +$SUDO cp ./files/dwm/dwm-sync.sh /usr/local/bin/dwm-sync # DM entry $SUDO cp ./files/dwm/dwm.desktop /usr/share/xsessions/dwm.desktop + +# background +rm -rf $HOME/Pictures/background.* +curl https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/i/9757d496-239b-46c5-baea-6873cbfe9b3d/ddkbeml-015b05e6-6f8f-471e-a3a4-1c4360127ea6.jpg -o $HOME/Pictures/background.jpg diff --git a/sync.sh b/sync.sh index e0a04d2..b44e920 100755 --- a/sync.sh +++ b/sync.sh @@ -6,7 +6,13 @@ PM=${PM:-pacman} PM_INSTALL=${PM_INSTALL:--S} PM_NOCONFIRM=${PM_NOCONFIRM:---noconfirm} +set -e + main() { + if [ ! -z "$@" ]; then + . ./scripts/$@ + exit 0 + fi for script in ./scripts/* ; do echo "# exec $script" . $script @@ -15,4 +21,4 @@ main() { main "$@" -echo "# OK" \ No newline at end of file +echo "# OK"