aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-11-04 20:11:31 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-11-04 20:11:31 +0530
commit15fbefd21f608a15e4ee9606477a2b8674944e05 (patch)
tree1dc5377b73f4e7f61c6213f88fad27b2fdb19bf1
parent4eed1fd5f8f3e5ed623bf8d96f37c94247517f0f (diff)
updated some decorations and added sleep notifier
-rwxr-xr-xlemonbar/launch2
-rwxr-xr-xlemonbar/mainbar21
2 files changed, 17 insertions, 6 deletions
diff --git a/lemonbar/launch b/lemonbar/launch
index e8ef57ad..8390171a 100755
--- a/lemonbar/launch
+++ b/lemonbar/launch
@@ -1,6 +1,6 @@
#!/bin/bash
-./mainbar | lemonbar -g 1366x23 -b -B '#171520' -p -F '#ffffff' -f "Roboto:style=Regular:size=9" -f "RobotoMono Nerd Font:style=Regular:size=14" -f "Source Han Sans JP:size=9"
+./mainbar | lemonbar -g 1366x21 -B '#171520' -p -F '#ffffff' -f "Source Han Sans JP:size=10" -o -3 -f "RobotoMono Nerd Font:style=Regular:size=15" -f -n "mainbar" -o 0
echo "lemonbar launched"
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 + "'")