diff options
author | 2022-04-27 11:25:38 +0200 | |
---|---|---|
committer | 2022-04-27 11:25:38 +0200 | |
commit | 2f03fb9f1bb43c25e2ab8723590a093e168d5b18 (patch) | |
tree | b172ae2063c4ff0cfcdd34d68112aa4a8fa63779 | |
download | dwmrc-2f03fb9f1bb43c25e2ab8723590a093e168d5b18.tar.gz dwmrc-2f03fb9f1bb43c25e2ab8723590a093e168d5b18.zip |
Initial commit
-rw-r--r-- | .dwmrc | 8 | ||||
-rwxr-xr-x | dwmaudio | 3 | ||||
-rwxr-xr-x | dwmbar | 33 | ||||
-rwxr-xr-x | dwmwttr | 7 |
4 files changed, 51 insertions, 0 deletions
@@ -0,0 +1,8 @@ +# This file it's not part of dwm. + +xwallpaper --zoom ~/.config/wallpaper.jpg + +dwmwttr & # This script checks the weather +dwmbar & # This script build the right up side bar + +exec /home/alessandro/devel/dwm/dwm diff --git a/dwmaudio b/dwmaudio new file mode 100755 index 0000000..bf58d40 --- /dev/null +++ b/dwmaudio @@ -0,0 +1,3 @@ +#!/bin/sh + +mixer vol | sed -E "s/.*\:(.*)/\1%/" @@ -0,0 +1,33 @@ +#!/bin/sh + +delim="|" + +check_audio() +{ + volume="`dwmaudio` $delim" +} + +check_datetime() +{ + datetime=`date '+%d %B %Y %H:%M:%S'` +} + +check_weather() +{ + weather="`cat ~/.dwm/weather_report` $delim" +} + +check_battery() +{ + battery="`sysctl hw.acpi.battery | grep life | sed -E 's/.*: (.*)/\1%/'` $delim" +} + +while true; do + check_datetime + check_weather + check_audio + check_battery + xsetroot -name "$battery $weather $volume $datetime"; + sleep 1; +done + @@ -0,0 +1,7 @@ +#!/bin/sh + +while true; do + #curl -s wttr.in/Ortona?format=1 | sed -E "s/^(.).*([+|-].*)/\1 \2/g" > ~/.dwm/weather_report + curl -s wttr.in/Guardiagrele?format=1 | sed -E "s/^(.).*([+|-].*)/\1 \2/g" > ~/.dwm/weather_report + sleep 1800 +done; |