From 4d28ba01df0a579b0b26af5058e144d02ece5e94 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 4 Jul 2018 12:07:05 -0400 Subject: [PATCH] torrent script added, minor bar changes --- .config/i3blocks/config | 8 ++++++-- .scripts/i3pacman | 2 +- .scripts/i3torrent | 7 +++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100755 .scripts/i3torrent 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' ' ' +