]> git.newer.systems - dwmblocks.git/commitdiff
fix main
authorTucker Johnson <tucker@newer.systems>
Mon, 17 Feb 2025 02:25:43 +0000 (21:25 -0500)
committerTucker Johnson <tucker@newer.systems>
Mon, 17 Feb 2025 02:25:43 +0000 (21:25 -0500)
Makefile
config.h
statusbar-scripts/sb-weather [new file with mode: 0755]

index 32c9294738a9dffe2f158c93f57f25b9a58294fe..9ee494df0fcde8ad37972ee42bae04bbcc18c5ba 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,7 @@ install: dwmblocks
        chmod 755 $(DESTDIR)$(PREFIX)/bin/sb-memory
        chmod 755 $(DESTDIR)$(PREFIX)/bin/sb-nettraf
        chmod 755 $(DESTDIR)$(PREFIX)/bin/sb-volume
+       chmod 755 $(DESTDIR)$(PREFIX)/bin/sb-weather
 uninstall:
        rm -f $(DESTDIR)$(PREFIX)/bin/dwmblocks\
                $(DESTDIR)$(PREFIX)/bin/sb-*
index 859d9a27f9a74da47f9f6aca8d4258fb4310a4a3..26a2ea8c586f9005e39f726da2f6163b4a3995b5 100644 (file)
--- a/config.h
+++ b/config.h
@@ -2,8 +2,9 @@
 static const Block blocks[] = {
        /*Icon*/        /*Command*/             /*Update Interval*/     /*Update Signal*/
        {"",        "cat /tmp/recordingicon 2>/dev/null",       0,      9},
+       {"",        "sb-weather",               600,    19},
        {"",        "sb-memory",        10,     14},
-       {"",        "sb-cpu",           10,     18},
+/*     {"",        "sb-cpu",           10,     18}, */
        {"",        "sb-volume",        0,      10},
        {"",        "sb-nettraf",       1,      16},
        {"",        "sb-internet",      5,      4},
diff --git a/statusbar-scripts/sb-weather b/statusbar-scripts/sb-weather
new file mode 100755 (executable)
index 0000000..15e8734
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+case $BLOCK_BUTTON in
+    1) notify-send " weather" "$(curl 'wttr.in/Brockport?format=%l:+\n%C+%c\nfeels-like:%f+actual:%t\nsunrise:%S+sunset:%s\n')" ;;
+       6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
+esac
+
+echo ["$(curl 'wttr.in/Brockport?format=%f+%C\n')"]