Browse Source

changing i3blocks

master
tiynger 1 year ago
parent
commit
27c1f621fa
6 changed files with 1059 additions and 45 deletions
  1. +6
    -6
      .config/i3blocks/config
  2. +1048
    -27
      .local/bin/statusbar/battery
  3. +2
    -2
      .local/bin/statusbar/disk
  4. +0
    -7
      .local/bin/statusbar/help
  5. +2
    -2
      .local/bin/statusbar/internet
  6. +1
    -1
      .local/bin/statusbar/weather

+ 6
- 6
.config/i3blocks/config

@ -9,7 +9,7 @@ signal=8
[weather]
command=~/.local/bin/statusbar/weather
interval=3600
interval=1200
signal=5
[mailbox]
@ -34,15 +34,15 @@ interval=once
signal=10
[disk]
interval=60
command=disk /
interval=180
command=~/.local/bin/statusbar/disk /
[disk]
interval=60
command=disk /home 🏠
interval=180
command=~/.local/bin/statusbar/disk /home
[battery]
command=~/.local/bin/statusbar/battery BAT0
command=~/.local/bin/statusbar/battery
interval=5
[clock]

+ 1048
- 27
.local/bin/statusbar/battery
File diff suppressed because it is too large
View File


+ 2
- 2
.local/bin/statusbar/disk

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# Status bar module for disk space
# $1 should be drive mountpoint
@ -15,4 +15,4 @@ case $BLOCK_BUTTON in
- Click to show all disk info." ;;
esac
printf "%s: %s" "$icon" "$(df -h "$1" | awk ' /[0-9]/ {print $3 "/" $2}')"
printf "%s: %s\n" "$icon" "$(df -h "$1" | awk ' /[0-9]/ {print $3 "/" $2}')"

+ 0
- 7
.local/bin/statusbar/help

@ -1,7 +0,0 @@
#!/bin/sh
case $BLOCK_BUTTON in
1) groff -mom ~/.local/share/larbs/readme.mom -Tpdf | zathura - ;;
2) i3 restart ;;
3) pgrep -x dunst >/dev/null && notify-send "❓ Help module" "\- Left click to open LARBS guide.
- Middle click to refresh i3.";;
esac; echo "❓"

+ 2
- 2
.local/bin/statusbar/internet

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
case $BLOCK_BUTTON in
1) $TERMINAL -e nmtui ;;
@ -14,4 +14,4 @@ esac
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }')
printf "%s %s" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")"
printf "%s %s\n" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")"

+ 1
- 1
.local/bin/statusbar/weather

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
location="$1"; [ -z "$location" ] || { location="$location+" && rm -f "$HOME/.local/share/weatherreport" ;}
getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1

Loading…
Cancel
Save