16 Commits 76b2d5b1e3 ... ca74a0e7f2

Author SHA1 Message Date
  Fabian Peter Hammerle ca74a0e7f2 merge i3blocks config 1 week ago
  Fabian Peter Hammerle 00461c94de mail: wait for changes via inotifywait 3 months ago
  Fabian Peter Hammerle c9d70337c4 wallpaper: download new meteosat image only if modified 4 months ago
  Fabian Peter Hammerle 6726b3f501 wallpaper: meteosat central europe 4 months ago
  Fabian Peter Hammerle c2d69be521 meteosat wallpaper: only show northern hemisphere 4 months ago
  Fabian Peter Hammerle 2f1d3b5a0b added wallpaper/background: latest meteosat image 4 months ago
  Fabian Peter Hammerle 8474031941 added timewarrior status 4 months ago
  Fabian Peter Hammerle 626abcb9d1 bandwidth: added up-down arrow label 5 months ago
  Fabian Peter Hammerle 7b15b64aba added gpg-agent passphrase cache 5 months ago
  Fabian Peter Hammerle d808dd0e8f mail: set urgent flag when new mail arrived 5 months ago
  Fabian Peter Hammerle 52d6a02664 added power consumption 5 months ago
  Fabian Peter Hammerle 9da60a986a added number of new mail 5 months ago
  Fabian Peter Hammerle dbf314ad39 reduce distance between cpu usage, load average & temperature 5 months ago
  Fabian Peter Hammerle 599d971c9d added wifi ssid 5 months ago
  Fabian Peter Hammerle 51b73ad5a4 added wttr.in weather 5 months ago
  Fabian Peter Hammerle 1f0d5efd4a i3status -> i3blocks 5 months ago
2 changed files with 52 additions and 6 deletions
  1. 6 1
      README.md
  2. 46 5
      config

+ 6 - 1
README.md

@@ -3,6 +3,11 @@
 https://py3status.readthedocs.io/en/latest/configuration.html
 
 ```sh
-sudo apt-get install py3status
+sudo apt-get install py3status \
+    curl feh moreutils `# background` \
+    timewarrior \
+    gpg \
+    inotify-tools python3 \
+    curl `# weather`
 git clone git@git.hammerle.me:fphammerle/config-py3status.git $HOME/.config/py3status
 ```

+ 46 - 5
config

@@ -1,13 +1,19 @@
-# order += "ipv6"
+order += "external_script background"
+order += "external_script timewarrior"
+order += "external_script key"
+order += "external_script mail"
+order += "volume master"
 order += "disk /"
 # order += "run_watch DHCP"
 # order += "run_watch VPN"
 order += "wireless _first_"
 order += "ethernet _first_"
-order += "volume master"
-order += "battery 0"
-order += "cpu_temperature 0"
+order += "netdata"
+order += "sysdata"
 order += "load"
+order += "cpu_temperature 0"
+order += "battery 0"
+order += "external_script weather"
 order += "tztime local"
 
 wireless _first_ {
@@ -42,7 +48,7 @@ run_watch VPN {
 }
 
 tztime local {
-    format = "%Y-%m-%d %H:%M:%S"
+    format = "%a %Y-%m-%d %H:%M:%S"
 }
 
 load {
@@ -66,3 +72,38 @@ volume master {
     format = "♪ %volume"
     format_muted = "♪ %volume" # yellow
 }
+
+external_script background {
+    script_path = "curl --silent --time-cond ~/.fehbg https://eumetview.eumetsat.int/static-images/latestImages/EUMETSAT_MSG_RGBNatColourEnhncd_CentralEurope.jpg | ifne feh --bg-fill - && echo || echo 'background\n#FF0000'"
+    cache_timeout = 600
+}
+
+external_script timewarrior {
+    script_path = "timew 2>/dev/null | grep -Po 'Tracking \K.*' || echo 'timew inactive\n#FF0000'"
+    cache_timeout = 60
+}
+
+external_script key {
+    script_path = "gpg-connect-agent 'GET_PASSPHRASE --no-ask KEYGRIP error prompt desc' /bye | grep --quiet OK && echo || echo 'key\n#FF0000'"
+    cache_timeout = 60
+}
+
+external_script mail {
+    format = "✉️ {output}"
+    script_path = "inotifywait -qq --recursive --event move --event delete --exclude mbsyncstate ~/.mail || sleep 60; python3 -c \"import glob, os, sys; num=len(glob.glob(os.path.expanduser('~/.mail/*/inbox/new/*'))); print(num); print('#FF0000' if num else '')\""
+}
+
+netdata {
+    format = "{down}↓ {up}↑ KiB"
+    cache_timeout = 5
+}
+
+sysdata {
+    format = "[\?color=cpu {cpu_used_percent}%]"
+    cache_timeout = 10
+}
+
+external_script weather {
+    script_path = "curl --silent 'https://wttr.in/?format=%c+%t'"
+    cache_timeout = 600
+}