summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/i3blocks/config8
-rwxr-xr-x.scripts/i3pacman2
-rwxr-xr-x.scripts/i3torrent7
3 files changed, 14 insertions, 3 deletions
diff --git a/.config/i3blocks/config b/.config/i3blocks/config
index c5bdacc..0fd119c 100644
--- a/.config/i3blocks/config
+++ b/.config/i3blocks/config
@@ -11,14 +11,19 @@ signal=9
label=🎼
command=i3mpd
interval=once
-align=left
signal=11
[pacman]
+label=📦
command=i3pacman
interval=once
signal=8
+#[torrents]
+#command=i3torrent
+#interval=20
+#signal=7
+
[weather]
command=i3weather
interval=3600
@@ -27,7 +32,6 @@ interval=3600
label=📬
command=i3mail
interval=180
-align=left
signal=12
[volume]
diff --git a/.scripts/i3pacman b/.scripts/i3pacman
index 02f7136..852c5b7 100755
--- a/.scripts/i3pacman
+++ b/.scripts/i3pacman
@@ -5,4 +5,4 @@ esac
pacman -Qu | wc -l | sed -e '/^0$/d' > ~/.larbs/.pacupgrade && pkill -RTMIN+8 i3blocks
-cat ~/.larbs/.pacupgrade | sed -e "/^$/d;s/^/📦 /g"
+cat ~/.larbs/.pacupgrade | sed -e "/^$/d"
diff --git a/.scripts/i3torrent b/.scripts/i3torrent
new file mode 100755
index 0000000..a367649
--- /dev/null
+++ b/.scripts/i3torrent
@@ -0,0 +1,7 @@
+#!/bin/bash
+case $BLOCK_BUTTON in
+ 1) $TERMINAL -e transmission-remote-cli
+esac
+
+transmission-remote -l | grep % | sed -e "s/.*100%.*/Z/g;s/.*Idle.*/A/g;s/.*%.*/M/g" | sort -h | uniq -c | sed -e "s/Z/🌱/g;s/A/⌛️/g;s/M/⬇️/g" | awk '{print $2, $1}' | tr '\n' ' '
+