diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2025-03-30 01:00:51 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2025-03-30 01:00:51 -0400 |
commit | f4c4550e327d9090c82a735d39d104d0bedb602d (patch) | |
tree | fcfa762512155c132a66d3adbb56067ca2d5d61b /.local/bin/dwmbar | |
parent | 43dbb32d741e11f8e06341f515944ec757d4578f (diff) |
Loads of laptop shit
Diffstat (limited to '.local/bin/dwmbar')
-rwxr-xr-x | .local/bin/dwmbar/check-eselect | 8 | ||||
-rwxr-xr-x | .local/bin/dwmbar/check-mail | 5 | ||||
-rwxr-xr-x | .local/bin/dwmbar/dwmb-layout | 4 |
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" |