From 542c50579637b43915a744d358747b9bed0d3867 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 3 Jul 2018 10:54:50 -0400 Subject: [PATCH] i3blocks changes, pacman module added --- .config/i3blocks/config | 10 ++++++++-- .scripts/i3pacman | 8 ++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100755 .scripts/i3pacman diff --git a/.config/i3blocks/config b/.config/i3blocks/config index 498d798..c5bdacc 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -14,12 +14,17 @@ interval=once align=left signal=11 +[pacman] +command=i3pacman +interval=once +signal=8 + [weather] command=i3weather interval=3600 [mail] -label=📮 +label=📬 command=i3mail interval=180 align=left @@ -28,15 +33,16 @@ signal=12 [volume] interval=once command=i3volume -markup=pango signal=10 [iface] +label=🌐 #instance=wlan0 color=#00FF00 interval=10 [wifi] +label=📶 #instance=wlp3s0 interval=10 diff --git a/.scripts/i3pacman b/.scripts/i3pacman new file mode 100755 index 0000000..02f7136 --- /dev/null +++ b/.scripts/i3pacman @@ -0,0 +1,8 @@ +#!/bin/bash +case $BLOCK_BUTTON in + 1) $TERMINAL -e sudo pacman -Syu && pacman -Qu | wc -l > ~/.larbs/.pacupgrade && pkill -RTMIN+8 i3blocks ;; +esac + +pacman -Qu | wc -l | sed -e '/^0$/d' > ~/.larbs/.pacupgrade && pkill -RTMIN+8 i3blocks + +cat ~/.larbs/.pacupgrade | sed -e "/^$/d;s/^/📦 /g"