aboutsummaryrefslogtreecommitdiff
path: root/xmonad
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-02-20 17:09:41 -0300
committerEuAndreh <eu@euandre.org>2021-02-20 17:10:14 -0300
commita98ac34e479b4beeff29126b1abbedf5b5a71d1d (patch)
tree5148db57bfb7f799a255636edce1e08f616d9322 /xmonad
parentUse solution that is both more elegant AND faster for xmobar-mpris stuff (diff)
downloaddotfiles-a98ac34e479b4beeff29126b1abbedf5b5a71d1d.tar.gz
dotfiles-a98ac34e479b4beeff29126b1abbedf5b5a71d1d.tar.xz
Add minimalistic notifications with xmobar
Diffstat (limited to 'xmonad')
-rwxr-xr-xxmonad/scripts/xmobar-notifications.sh8
-rw-r--r--xmonad/xmobar.hs3
2 files changed, 10 insertions, 1 deletions
diff --git a/xmonad/scripts/xmobar-notifications.sh b/xmonad/scripts/xmobar-notifications.sh
new file mode 100755
index 00000000..d05a2d48
--- /dev/null
+++ b/xmonad/scripts/xmobar-notifications.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -eu
+
+CUR_PATH="$HOME/.cache/euandreh/xmobar-notifications.txt"
+mkdir -p "$(dirname "$CUR_PATH")"
+touch "$CUR_PATH"
+
+tail -f "$CUR_PATH" 2> /dev/null
diff --git a/xmonad/xmobar.hs b/xmonad/xmobar.hs
index 459fe9d2..2107ed6b 100644
--- a/xmonad/xmobar.hs
+++ b/xmonad/xmobar.hs
@@ -19,7 +19,8 @@ Config {
"-l", "red"]
10
, Run CommandReader "~/dev/libre/dotfiles/xmonad/scripts/xmobar-mpris.sh" "mpris"
+ , Run CommandReader "~/dev/libre/dotfiles/xmonad/scripts/xmobar-notifications.sh" "notifications"
, Run CommandReader "~/dev/libre/dotfiles/xmonad/scripts/xmobar-notmuch.sh" "notmuch"
]
- , template = " <fc=#5ea2a4>%date%</fc> | %default:Master%| %mpris% } { | %notmuch% | %wlp59s0wi% | %battery% | %memory% * %swap% | %cpu% | %disku% "
+ , template = " <fc=#5ea2a4>%date%</fc> | %default:Master%| %mpris% } { <fc=#008000>%notifications%</fc> | %notmuch% | %wlp59s0wi% | %battery% | %memory% * %swap% | %cpu% | %disku% "
}