From e885129e442d30a55e391420ac82ab958bb65090 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 27 Oct 2021 15:27:24 +0300 Subject: polybar: habit script --- .config/polybar/config##h.lowe | 7 ++++++- .config/polybar/scripts/habit | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 .config/polybar/scripts/habit (limited to '.config/polybar') diff --git a/.config/polybar/config##h.lowe b/.config/polybar/config##h.lowe index caebed7..a631c77 100644 --- a/.config/polybar/config##h.lowe +++ b/.config/polybar/config##h.lowe @@ -47,7 +47,7 @@ font-1 = Siji:size=20;1 modules-left = i3 github modules-center = xwindow -modules-right = focus date time +modules-right = habit focus date time tray-position = right @@ -83,6 +83,11 @@ exec = ~/.config/polybar/scripts/focus double-click-left = exec ~/.config/polybar/scripts/stop & interval = 1 +[module/habit] +type = custom/script +exec = ~/.config/polybar/scripts/habit +interval = 10 + [module/spotify] type = custom/script interval = 1 diff --git a/.config/polybar/scripts/habit b/.config/polybar/scripts/habit new file mode 100755 index 0000000..e6380c6 --- /dev/null +++ b/.config/polybar/scripts/habit @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +RES=" " + +if [[ $(dijo --list | grep anki) ]]; then + RES="${RES}" +fi + +if [[ $(dijo --list | grep walking) ]]; then + RES="${RES} " +fi + +echo "${RES}" + -- cgit v1.2.3-70-g09d2