Move i3blocks battery command to script

This commit is contained in:
flyingscorpio@clevo 2022-02-14 08:55:58 +01:00
parent 8a0b0aedef
commit 6e050aaf10
3 changed files with 7 additions and 1 deletions

View file

@ -339,6 +339,9 @@ i3blocks:
- run:
command: pip install -U matplotlib feedparser --user
condition: debian
- symlink:
- dotfiles/i3/scripts/battery
- ~/.config/i3blocks/scripts/battery
- symlink:
- dotfiles/i3/scripts/corona_stats/corona_stats
- ~/.config/i3blocks/scripts/corona_stats

View file

@ -79,7 +79,6 @@ interval=900
interval=5
[battery]
command=echo " $(upower -d | grep 'percentage' | awk '{print $2}' | head -n 1) ($(upower -d | grep 'time to empty' | awk -F: '{print $2}' | awk '{print $1,$2}' | head -n 1))"
interval=5
[calendar]

4
dotfiles/i3/scripts/battery Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
icon=""
echo "${icon} $(upower -d | grep 'percentage' | awk '{print $2}' | head -n 1) ($(upower -d | grep 'time to empty' | awk -F: '{print $2}' | awk '{print $1,$2}' | head -n 1))"