From f4c4550e327d9090c82a735d39d104d0bedb602d Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 30 Mar 2025 01:00:51 -0400 Subject: Loads of laptop shit --- .local/bin/dwmbar/check-eselect | 8 ++++++++ .local/bin/dwmbar/check-mail | 5 +++++ .local/bin/dwmbar/dwmb-layout | 4 +++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 .local/bin/dwmbar/check-eselect create mode 100755 .local/bin/dwmbar/check-mail (limited to '.local/bin/dwmbar') 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" -- cgit v1.2.3