ADD icons to xmobar

This commit is contained in:
Nathan Dwarshuis 2020-03-15 13:45:53 -04:00
parent d5d0155b69
commit c0d97e83e4
11 changed files with 151 additions and 3 deletions

View File

@ -1,14 +1,25 @@
import Xmobar
import XMonad (getXMonadDir)
fgColor0 :: String
fgColor0 = "black"
fgColor1 :: String
fgColor1 = "#888888"
bgColor0 :: String
bgColor0 = "#eeeeee"
bdColor :: String
bdColor = "#cccccc"
wrapColor :: String -> String -> String
wrapColor c s = "<fc=" ++ c ++ ">" ++ s ++ "</fc>"
sep :: String
sep = wrapColor fgColor1 " : "
myTemplate :: String
myTemplate = concat
[ "%UnsafeStdinReader%"
, " }{ "
@ -20,7 +31,8 @@ myTemplate = concat
, sep, "%date% "
]
config = defaultConfig {
config :: String -> Config
config confDir = defaultConfig {
font = "xft:DejaVu Sans Mono:size=11:bold:antialias=true"
, additionalFonts =
[ "xft:FontAwesome:pixelsize=13:antialias=true:hinting=true"
@ -44,7 +56,7 @@ config = defaultConfig {
, overrideRedirect = True
, pickBroadest = False
, persistent = True
, iconRoot = "/home/ndwar/.local/share/xmobar/icons"
, iconRoot = confDir ++ "/icons"
, commands =
[ Run $ Alsa "default" "Master"
@ -97,4 +109,6 @@ config = defaultConfig {
}
main :: IO ()
main = xmobar config
main = do
confDir <- getXMonadDir
xmobar $ config confDir

21
icons/wifi_0.xpm Normal file
View File

@ -0,0 +1,21 @@
/* XPM */
static char * wifi_0_xpm[] = {
"16 16 2 1",
" c None",
". c #999999",
" ",
" ",
" .. ",
" .. ",
" .. .. ",
" .. .. ",
" .. .. .. ",
" .. .. .. ",
" .. .. .. .. ",
" .. .. .. .. ",
".. .. .. .. .. ",
".. .. .. .. .. ",
" ",
" ",
" ",
" "};

22
icons/wifi_1.xpm Normal file
View File

@ -0,0 +1,22 @@
/* XPM */
static char * wifi_1_xpm[] = {
"16 16 3 1",
" c None",
". c #999999",
"+ c #000000",
" ",
" ",
" .. ",
" .. ",
" .. .. ",
" .. .. ",
" .. .. .. ",
" .. .. .. ",
" .. .. .. .. ",
" .. .. .. .. ",
"++ .. .. .. .. ",
"++ .. .. .. .. ",
" ",
" ",
" ",
" "};

1
icons/wifi_2.xpm Symbolic link
View File

@ -0,0 +1 @@
wifi_3.xpm

22
icons/wifi_3.xpm Normal file
View File

@ -0,0 +1,22 @@
/* XPM */
static char * wifi_3_xpm[] = {
"16 16 3 1",
" c None",
". c #999999",
"+ c #000000",
" ",
" ",
" .. ",
" .. ",
" .. .. ",
" .. .. ",
" .. .. .. ",
" .. .. .. ",
" ++ .. .. .. ",
" ++ .. .. .. ",
"++ ++ .. .. .. ",
"++ ++ .. .. .. ",
" ",
" ",
" ",
" "};

1
icons/wifi_4.xpm Symbolic link
View File

@ -0,0 +1 @@
wifi_5.xpm

22
icons/wifi_5.xpm Normal file
View File

@ -0,0 +1,22 @@
/* XPM */
static char * wifi_5_xpm[] = {
"16 16 3 1",
" c None",
". c #999999",
"+ c #000000",
" ",
" ",
" .. ",
" .. ",
" .. .. ",
" .. .. ",
" ++ .. .. ",
" ++ .. .. ",
" ++ ++ .. .. ",
" ++ ++ .. .. ",
"++ ++ ++ .. .. ",
"++ ++ ++ .. .. ",
" ",
" ",
" ",
" "};

1
icons/wifi_6.xpm Symbolic link
View File

@ -0,0 +1 @@
wifi_7.xpm

22
icons/wifi_7.xpm Normal file
View File

@ -0,0 +1,22 @@
/* XPM */
static char * wifi_7_xpm[] = {
"16 16 3 1",
" c None",
". c #999999",
"+ c #000000",
" ",
" ",
" .. ",
" .. ",
" ++ .. ",
" ++ .. ",
" ++ ++ .. ",
" ++ ++ .. ",
" ++ ++ ++ .. ",
" ++ ++ ++ .. ",
"++ ++ ++ ++ .. ",
"++ ++ ++ ++ .. ",
" ",
" ",
" ",
" "};

21
icons/wifi_8.xpm Normal file
View File

@ -0,0 +1,21 @@
/* XPM */
static char * wifi_8_xpm[] = {
"16 16 2 1",
" c None",
". c #000000",
" ",
" ",
" .. ",
" .. ",
" .. .. ",
" .. .. ",
" .. .. .. ",
" .. .. .. ",
" .. .. .. .. ",
" .. .. .. .. ",
".. .. .. .. .. ",
".. .. .. .. .. ",
" ",
" ",
" ",
" "};

View File

@ -29,6 +29,7 @@ executable xmonad
executable xmobar
main-is: bin/xmobar.hs
build-depends: base
, xmonad >= 0.13
, xmobar
default-language: Haskell2010
ghc-options: -Wall -Werror -fno-warn-missing-signatures -threaded