aboutsummaryrefslogtreecommitdiff
path: root/lemonbar/mainbar
diff options
context:
space:
mode:
Diffstat (limited to 'lemonbar/mainbar')
-rwxr-xr-xlemonbar/mainbar21
1 files changed, 16 insertions, 5 deletions
diff --git a/lemonbar/mainbar b/lemonbar/mainbar
index 2158556e..7737938f 100755
--- a/lemonbar/mainbar
+++ b/lemonbar/mainbar
@@ -1,5 +1,9 @@
#!/bin/python
+# kinda minimal lemonbar script by Vidhu Kant Sharma
+# for herbstluftwm
+# needs roboto, foboto nerd and adobe hans sans jp fonts
+
import datetime
import time
import os
@@ -35,7 +39,7 @@ def getTags():
else:
tags[i] = '%{F#443837} ' + tag_names[tag[1]] + '%{F-} ' # format other tags
- return '%{B#6c71c4}' + ' '.join((str(x) for x in tags)) + '%{B-}' + '%{F#268bd2}%{F-}' # return formatted list in a cleaner form
+ return '%{A4:NEXT:}%{A5:PREV:}%{B#6c71c4} ' + ' '.join((str(x) for x in tags)) + '%{B-}' + '%{F#268bd2}%{F-}%{A}%{A}' # return formatted list in a cleaner form
def getTime():
@@ -44,10 +48,17 @@ def getTime():
day = "(" + day_name[day_raw] + ")" # day but in a more readable form
time = datetime.datetime.now().strftime("%H:%M") # time in H:M format
- return date + day + ' ' + time
+ return '%{F#CB4B16}%{F-}%{B#CB4B16} ' + date + day + ' ' + time + ' %{B-}'
+def sleepNotifier():
+ if int(datetime.datetime.now().strftime("%M")) > 3:
+ return "%{c}%{F#171520}%{B#dc322f} Go to sleep! %{B-}%{F-}"
+ else:
+ return ""
+
-while True:
+for i in range(0, 10000):
+# while True:
time.sleep(0.3)
- output = getTags() + '%{r}' + getTime()
- os.system("echo ' " + output + " '")
+ output = getTags() + '%{r}' + getTime() + sleepNotifier()
+ os.system("echo '" + output + "'")