From 93a9e978dadf0a855dd78b3e4b88c4c9640d39ee Mon Sep 17 00:00:00 2001 From: Richard Halford <63303646+rsHalford@users.noreply.github.com> Date: Thu, 23 Sep 2021 16:48:58 +0100 Subject: [PATCH 1/3] Add partition label to dmenuumount script (#999) If a partition doesn't have a label, it results in a double space that awk ignores. Which is why the changes include a pipe into sed. --- .local/bin/dmenuumount | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/dmenuumount b/.local/bin/dmenuumount index 52dd7ff..f7d0747 100755 --- a/.local/bin/dmenuumount +++ b/.local/bin/dmenuumount @@ -26,7 +26,7 @@ asktype() { \ esac } -drives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$4!~/\/boot|\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}') +drives=$(lsblk -nrpo "name,type,size,mountpoint,label" | sed 's/ /:/g' | awk -F':' '$4!~/\/boot|\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s) %s\n",$4,$3,$5}') if ! grep simple-mtpfs /etc/mtab; then [ -z "$drives" ] && echo "No drives to unmount." && exit From fb8923b841e03b99b14e5f94f27e988f30628147 Mon Sep 17 00:00:00 2001 From: Arjun Karangiya Date: Thu, 23 Sep 2021 21:32:51 +0530 Subject: [PATCH 2/3] Here program name should be given not package name (#973) This can be known from ifinstalled code --- .local/bin/torwrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/torwrap b/.local/bin/torwrap index 4f94053..8b20ad4 100755 --- a/.local/bin/torwrap +++ b/.local/bin/torwrap @@ -1,6 +1,6 @@ #!/bin/sh -ifinstalled tremc-git transmission-cli || exit +ifinstalled tremc transmission-cli || exit ! pidof transmission-daemon >/dev/null && transmission-daemon && notify-send "Starting torrent daemon..." From dd8da1765a78117219e8b81d0945baa1e66c3a67 Mon Sep 17 00:00:00 2001 From: Future is FOSS <79040025+futureisfoss@users.noreply.github.com> Date: Thu, 23 Sep 2021 21:45:42 +0530 Subject: [PATCH 3/3] show red cross if wifi is disabled (#898) show a red cross mark if wifi is disabled/turned off. --- .local/bin/statusbar/sb-internet | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet index ee1a160..d3948d7 100755 --- a/.local/bin/statusbar/sb-internet +++ b/.local/bin/statusbar/sb-internet @@ -7,6 +7,7 @@ case $BLOCK_BUTTON in 1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;; 3) notify-send "🌐 Internet module" "\- Click to connect +❌: wifi disabled 📡: no wifi connection 📶: wifi connection with quality ❎: no ethernet @@ -17,7 +18,7 @@ case $BLOCK_BUTTON in esac case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in - down) wifiicon="📡 " ;; + down) [ "$(cat /sys/class/net/w*/flags)" = "0x1002" ] && wifiicon="❌ " || wifiicon="📡 " ;; up) wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;; esac