From 1ee2fa29da8776eb0ca9231f0f9e090230f08af4 Mon Sep 17 00:00:00 2001 From: appeasementPolitik <108810900+appeasementPolitik@users.noreply.github.com> Date: Thu, 6 Oct 2022 12:34:48 +0000 Subject: [PATCH] Small improvements --- .local/bin/setbg | 2 +- .local/bin/statusbar/sb-mpdup | 2 +- .local/bin/statusbar/sb-music | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.local/bin/setbg b/.local/bin/setbg index b72dc7d5..40d292df 100755 --- a/.local/bin/setbg +++ b/.local/bin/setbg @@ -15,7 +15,7 @@ zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc" trueloc="$(readlink -f "$1")" && case "$(file --mime-type -b "$trueloc")" in - image/* ) ln -sf "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..." ;; + image/* ) ln -sf "$trueloc" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..." ;; inode/directory ) ln -sf "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random Wallpaper chosen." ;; *) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;; esac diff --git a/.local/bin/statusbar/sb-mpdup b/.local/bin/statusbar/sb-mpdup index af81a7d6..ced910ff 100755 --- a/.local/bin/statusbar/sb-mpdup +++ b/.local/bin/statusbar/sb-mpdup @@ -4,5 +4,5 @@ # music player's status. mpd must be running on X's start for this to work. while : ; do - mpc idle >/dev/null && kill -45 "$(pidof "${STATUSBAR:-dwmblocks}")" || break + mpc idle >/dev/null && pkill -RTMIN+11 "${STATUSBAR:-dwmblocks}" || break done diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music index 7ea70320..d164b4be 100755 --- a/.local/bin/statusbar/sb-music +++ b/.local/bin/statusbar/sb-music @@ -1,6 +1,6 @@ #!/bin/sh -filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;} +filter() { sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;} pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 &