diff options
author | Adam T. Carpenter <atc@53hor.net> | 2021-04-30 16:33:05 -0400 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2021-04-30 16:33:05 -0400 |
commit | 4252450f86624adf31b57f0863825b0539df119c (patch) | |
tree | 4fa85dab9df30ca12694fd201de9648c2648f814 /.config/i3blocks/config | |
parent | 514f130fa95f2cc24cbccdf7e8b8dd2b38b52f58 (diff) | |
download | dotfiles-4252450f86624adf31b57f0863825b0539df119c.tar.xz dotfiles-4252450f86624adf31b57f0863825b0539df119c.zip |
updated a bunch of configs, added some themes
Diffstat (limited to '.config/i3blocks/config')
-rw-r--r-- | .config/i3blocks/config | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/.config/i3blocks/config b/.config/i3blocks/config index 367681d..8791d17 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -13,17 +13,17 @@ separator_block_width=15 [packages] interval=3600 -command=count=$(pkg upgrade -n | sed -n 's/^Number of packages to be upgraded:\(.*\)/\1/p') ; [ -n "$count" ] && [ "$count" -gt 0 ] && printf "%s" $count && return 33 || return 0 +command=[ "$BLOCK_BUTTON" == 3 ] && alacritty -e zsh -i -c "doas pkg upgrade" || count=$(pkg upgrade -n | sed -n 's/^Number of packages to be upgraded:\(.*\)/\1/p') ; [ -n "$count" ] && [ "$count" -gt 0 ] && printf "%s" $count && return 33 || return 0 [mail] interval=1800 signal=12 -command=unread=$(ls ~/.mail/gmail/Inbox/new/ | wc -l | cut -w -f2) ; [ $unread -gt 0 ] && printf "%s\n" $unread || echo +command=unread=$(ls ~/.mail/gmail/Inbox/new/ | wc -l | cut -w -f2) ; [ $unread -gt 0 ] && printf "%s\n" $unread && return 33 || return 0 [news] interval=1800 signal=13 -command=unread=$(newsboat -x print-unread|cut -w -f1) ; [ "$unread" != 0 ] && [ "$unread" != Authentication ] && printf "A:%s\n" $unread +command=unread=$(newsboat -x print-unread|cut -w -f1) && [ "$unread" != 0 ] && [ "$unread" != Authentication ] && printf "%s\n" $unread || return 0 #[uptime] #interval=300 @@ -35,11 +35,12 @@ command=doas freebsd-update updatesready > /dev/null ; [ $? -ne 2 ] && printf " [weather] interval=3600 -command=fetch -qo - "https://wttr.in/23435?format=2" +#command=[ "$BLOCK_BUTTON" = 3 ] && alacritty -e zsh -i -c "fetch --user-agent=curl -qo - https://wttr.in/23435 && read line" || fetch -qo - "https://wttr.in/23435?format=%c+%f+%h+%w" +command=weather.sh [net] interval=10 -command=inet=$(ifconfig lagg0 | grep inet\ | cut -w -f3 | tr '\n' ' ') ; [ "$(ifconfig em0|grep status|cut -d\: -f2)" = " active" ] && printf "%s\n" "$inet" || [ "$(ifconfig wlan0|grep status|cut -d\: -f2)" = " associated" ] && ssid=$(ifconfig wlan0|sed -n 's/^.*ssid \(.*\) channel.*$/\1/p') && [ -n "$ssid" ] && printf "%s %s\n" "$ssid" "$inet" || printf "Offline\n" +command=[ "$BLOCK_BUTTON" = 3 ] && doas service netif restart || inet=$(ifconfig lagg0 | grep inet\ | cut -w -f3 | tr '\n' ' ') ; [ "$(ifconfig em0|grep status|cut -d\: -f2)" = " active" ] && printf "%s\n" "$inet" || [ "$(ifconfig wlan0|grep status|cut -d\: -f2)" = " associated" ] && ssid=$(ifconfig wlan0|sed -n 's/^.*ssid \(.*\) channel.*$/\1/p') && [ -n "$ssid" ] && printf "%s %s\n" "$ssid" "$inet" || printf "Offline\n" [screencast] interval=once |