From 15fbefd21f608a15e4ee9606477a2b8674944e05 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 4 Nov 2020 20:11:31 +0530 Subject: updated some decorations and added sleep notifier --- lemonbar/launch | 2 +- lemonbar/mainbar | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'lemonbar') 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 + "'") -- cgit v1.2.3