From 0e28ee49b126949dae7784374eec9743068abc8d Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 30 Dec 2014 00:28:45 +0100 Subject: Default to opaque --- news.md | 2 ++ readme.md | 2 +- src/Config.hs | 2 +- src/Main.hs | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/news.md b/news.md index bd18ada..72f5932 100644 --- a/news.md +++ b/news.md @@ -9,6 +9,8 @@ _New features_ - New configuration parameters `textOffset` and `iconOffset` (see discussion in [issue #171] and [issue #201]). - New template variable `flags` in `MPD` monitor, by Duncan Burke. + - Xmobar can now use a (semi)transparent background: set it with the + new configuration option `alpha` (thanks to Edward Z. Yang). [issue #171]: https://github.com/jaor/xmobar/issues/171 [issue #201]: https://github.com/jaor/xmobar/issues/201 diff --git a/readme.md b/readme.md index fcca7f8..7fe00d4 100644 --- a/readme.md +++ b/readme.md @@ -377,7 +377,7 @@ xmobar --help): -f font name --font=font name The font name -B bg color --bgcolor=bg color The background color. Default black -F fg color --fgcolor=fg color The foreground color. Default grey - -a alpha --alpha=alpha The transparency: 0 is transparent, 255 is opaque + -A alpha --alpha=alpha The transparency: 0 is transparent, 255 (the default) is opaque -o --top Place xmobar at the top of the screen -b --bottom Place xmobar at the bottom of the screen -d --dock Try to start xmobar as a dock diff --git a/src/Config.hs b/src/Config.hs index ee58a92..6353112 100644 --- a/src/Config.hs +++ b/src/Config.hs @@ -112,7 +112,7 @@ defaultConfig = Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" , bgColor = "#000000" , fgColor = "#BFBFBF" - , alpha = 0 + , alpha = 255 , position = Top , border = NoBorder , borderColor = "#BFBFBF" diff --git a/src/Main.hs b/src/Main.hs index 4146c1c..48df632 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -145,8 +145,8 @@ options = "The foreground color. Default grey" , Option "i" ["iconroot"] (ReqArg IconRoot "path") "Root directory for icon pattern paths. Default '.'" - , Option "a" ["alpha"] (ReqArg Alpha "alpha") - "The transparency: 0 is transparent, 255 is opaque" + , Option "A" ["alpha"] (ReqArg Alpha "alpha") + "The transparency: 0 is transparent, 255 is opaque. Default: 255" , Option "o" ["top"] (NoArg T) "Place xmobar at the top of the screen" , Option "b" ["bottom"] (NoArg B) "Place xmobar at the bottom of the screen" -- cgit v1.2.3