summaryrefslogtreecommitdiffstats
path: root/mowedline
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-07-31 16:36:18 +0200
committerGravatar Tom Willemse2015-07-31 16:36:18 +0200
commitf4f7f4fa3bc3dc26b56a0f8385b75e206261afab (patch)
tree5415201636a3e820fe03412242a80266cd9fc97d /mowedline
parent4236a079228943c3a4f19fbfd979b711a5ff6a9f (diff)
downloaddotfiles-f4f7f4fa3bc3dc26b56a0f8385b75e206261afab.tar.gz
dotfiles-f4f7f4fa3bc3dc26b56a0f8385b75e206261afab.zip
Update mowedline look for transparent background
Diffstat (limited to 'mowedline')
-rw-r--r--mowedline/.config/mowedline/init.scm65
1 files changed, 41 insertions, 24 deletions
diff --git a/mowedline/.config/mowedline/init.scm b/mowedline/.config/mowedline/init.scm
index 6056f61..b3a629c 100644
--- a/mowedline/.config/mowedline/init.scm
+++ b/mowedline/.config/mowedline/init.scm
@@ -1,13 +1,21 @@
(use srfi-1 matchable)
+(define (not-text? text)
+ (or (null? text) (and (not (pair? text)) (string-null? text))))
+
(define (string-maybe-pad-left text)
- (if (string-null? text)
+ (if (not-text? text)
+ text
+ (L " " text)))
+
+(define (text-maybe-pad-both text)
+ (if (not-text? text)
text
- (string-append " " text)))
+ (L " " text " ")))
(define (add-fa-icon icon)
(lambda (text)
- (if (string-null? text)
+ (if (not-text? text)
text
(list (list 'font "FontAwesome-10"
(string-append " " icon " "))
@@ -21,11 +29,11 @@
(define tag-display
(match-lambda
- ((#\# n) (L (L 'color "#ececec" 'font "FontAwesome-12" "") " "))
- ((#\- n) (L (L 'color "#bfbfbf" 'font "FontAwesome-12" "") " "))
- ((#\. n) (L (L 'color "#969696" 'font "FontAwesome-12" "") " "))
- ((#\: n) (L (L 'color "#969696" 'font "FontAwesome-12" "") " "))
- ((#\! n) (L (L 'color "#a85454" 'font "FontAwesome-12" "") " "))))
+ ((#\# n) (L (L 'color "#ececec" 'font "FontAwesome-10" "") " "))
+ ((#\- n) (L (L 'color "#bfbfbf" 'font "FontAwesome-10" "") " "))
+ ((#\. n) (L (L 'color "#969696" 'font "FontAwesome-10" "") " "))
+ ((#\: n) (L (L 'color "#969696" 'font "FontAwesome-10" "") " "))
+ ((#\! n) (L (L 'color "#a85454" 'font "FontAwesome-10" "") " "))))
(define (tag-list-display tag-list)
(map tag-display tag-list))
@@ -36,25 +44,34 @@
(text-widget-font "Fantasque Sans Mono-13:bold")
(text-widget-color "#ededed")
-(text-widget-format string-maybe-pad-left)
-(widget-background-color "#000000")
+(text-widget-format text-maybe-pad-both)
(window
- 'position 'top
+ 'position 'bottom
'width 1890
- 'margin-top 15
+ 'margin-bottom 15
'margin-left 15
'margin-right 15
+ 'background 'inherit
+ (widget:text 'name "taglist"
+ 'format (compose string-maybe-pad-left tag-list-formatter)
+ 'background-color "#3d3d3d")
+ (widget:spacer 'flex 1)
+ (widget:text 'name "mpd"
+ 'format (add-fa-icon "")
+ 'background-color "#3d3d3d")
+ (widget:spacer 'width 5)
+ (widget:text 'name "irclist"
+ 'background-color "#3d3d3d")
+ (widget:spacer 'width 5)
+ (widget:text 'name "email"
+ 'format (compose text-maybe-pad-both (add-fa-icon ""))
+ 'background-color "#3d3d3d")
+ (widget:spacer 'width 5)
+ (widget:flags 'name "keychain"
+ 'font "FontAwesome-10"
+ 'flags '(("Unlocked" . "")
+ ("Locked" . ""))
+ 'background-color "#3d3d3d")
(widget:spacer 'width 5)
- (widget:text 'name "taglist" 'format tag-list-formatter)
- (widget:spacer 'width 10)
- (widget:text 'name "mpd" 'format (add-fa-icon "") 'flex 1)
- (widget:flags
- 'name "keychain"
- 'font "FontAwesome-10"
- 'flags '(("Unlocked" . "")
- ("Locked" . ""))
- 'format text-maybe-pad-left)
- (widget:text 'name "email" 'format (add-fa-icon ""))
- (widget:clock)
- (widget:spacer 'width 5))
+ (widget:clock 'background-color "#3d3d3d"))