aboutsummaryrefslogtreecommitdiff
path: root/i3blocks
diff options
context:
space:
mode:
authorInigo Gutierrez <inigogf.95@gmail.com>2019-03-07 10:28:44 +0000
committerInigo Gutierrez <inigogf.95@gmail.com>2019-03-07 10:28:44 +0000
commit6f05b0ca6b3fa89cc2203839ad3096be4ffe726a (patch)
tree3c4cc52196518b4d2ac42686d789f5e2fe15711e /i3blocks
parent833b8e5015be7fc10025a0815567d9eab8ed9713 (diff)
downloadscripts-6f05b0ca6b3fa89cc2203839ad3096be4ffe726a.tar.gz
scripts-6f05b0ca6b3fa89cc2203839ad3096be4ffe726a.zip
Script changes tinkering with Arch.
Diffstat (limited to 'i3blocks')
-rwxr-xr-xi3blocks/i3battery.sh2
-rwxr-xr-xi3blocks/i3disk.sh4
-rwxr-xr-xi3blocks/i3vol.sh4
3 files changed, 5 insertions, 5 deletions
diff --git a/i3blocks/i3battery.sh b/i3blocks/i3battery.sh
index 3232a48..1e8d749 100755
--- a/i3blocks/i3battery.sh
+++ b/i3blocks/i3battery.sh
@@ -31,7 +31,7 @@ fi
[ "$status" = "Charging" ] && color="#1fffaf"
-remaining=$(acpi | cut -d' ' -f5)
+remaining=$(acpi | cut -d' ' -f5 | cut -d':' -f-2)
printf "<span color='%s'>%s%s%s (%s)</span>" "$color" "$(echo "$status" | sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" "$remaining"
echo ""
diff --git a/i3blocks/i3disk.sh b/i3blocks/i3disk.sh
index 2d994af..fc569f9 100755
--- a/i3blocks/i3disk.sh
+++ b/i3blocks/i3disk.sh
@@ -1,7 +1,7 @@
#!/bin/sh
case $BLOCK_BUTTON in
- 1) notify-send -h string:x-canonical-private-synchronous:disk -t 3000 "$(df -h | grep ^/dev/sda6 | awk '{print "/: Used "$3"/"$2" ("$5")"}')"
+ 1) notify-send -h string:x-canonical-private-synchronous:disk -t 3000 "$(df -h | grep ^/dev/sda8 | awk '{print "/: Used "$3"/"$2" ("$5")"}')"
esac
-df -h | grep ^/dev/sda6 | awk '{print $4"/"$2}'
+df -h | grep ^/dev/sda8 | awk '{print $4"/"$2}'
diff --git a/i3blocks/i3vol.sh b/i3blocks/i3vol.sh
index 0e6311e..f3a0745 100755
--- a/i3blocks/i3vol.sh
+++ b/i3blocks/i3vol.sh
@@ -5,8 +5,8 @@ case $BLOCK_BUTTON in
3) pgrep -x dunst >/dev/null && notify-send -h string:x-canonical-private-synchronous:i3volHint -t 2000 "Click for alsamixer" ;;
esac
-vol=$(pactl list sinks | grep Volumen: | awk '{print $5}')
-mute=$(pactl list sinks | grep Silencio: | cut -d' ' -f2)
+vol=$(pactl list sinks | grep "Volume:" | sed 1q | awk '{print $5}')
+mute=$(pactl list sinks | grep "Mute:" | cut -d' ' -f2)
if [ $mute = "no" ]; then
echo "🔊 $vol"
else