summaryrefslogtreecommitdiff
path: root/.local/bin/dwmbar
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/dwmbar')
-rwxr-xr-x.local/bin/dwmbar/check-eselect8
-rwxr-xr-x.local/bin/dwmbar/check-mail5
-rwxr-xr-x.local/bin/dwmbar/dwmb-layout4
3 files changed, 16 insertions, 1 deletions
diff --git a/.local/bin/dwmbar/check-eselect b/.local/bin/dwmbar/check-eselect
new file mode 100755
index 0000000..760765b
--- /dev/null
+++ b/.local/bin/dwmbar/check-eselect
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ "$(eselect news count all)" -eq 0 ]; then
+ exit 1
+else
+ exit 0
+fi
+
diff --git a/.local/bin/dwmbar/check-mail b/.local/bin/dwmbar/check-mail
new file mode 100755
index 0000000..c9ab3b2
--- /dev/null
+++ b/.local/bin/dwmbar/check-mail
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ -z "$($HOME/.local/bin/dwmbar/dwmb-mail)" ] && exit 1
+
+exit 0
diff --git a/.local/bin/dwmbar/dwmb-layout b/.local/bin/dwmbar/dwmb-layout
index 1455398..83d1ba3 100755
--- a/.local/bin/dwmbar/dwmb-layout
+++ b/.local/bin/dwmbar/dwmb-layout
@@ -1,3 +1,5 @@
#!/bin/sh
-echo "  $(cat "$HOME/.cache/layout")"
+text="  $(cat "$HOME/.cache/layout")"
+
+printf '{ "text": "%s", "class": "block" }\n' "$text"