From 995132c01d23140846a93171fd4c42aa0645fd8a Mon Sep 17 00:00:00 2001 From: la-ninpre Date: Fri, 17 Jun 2022 11:05:44 +0300 Subject: add xmobar config --- .gitignore | 5 ++ README.md | 2 + xmobar/.config/xmobar/xmobar.hs | 123 ++++++++++++++++++++++++++++++++ xmobar/.config/xmobar/xpm/la_ninpre.xpm | 36 ++++++++++ 4 files changed, 166 insertions(+) create mode 100644 xmobar/.config/xmobar/xmobar.hs create mode 100644 xmobar/.config/xmobar/xpm/la_ninpre.xpm diff --git a/.gitignore b/.gitignore index b01e9e7..4ea9347 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,8 @@ moc/.config/moc/* !moc/.config/moc/themes/laninpre_theme mpd/.config/mpd/* !mpd/.config/mpd/mpd.conf +xmobar/.config/xmobar/xpm/tmp +xmobar/.config/xmobar/*.hi +xmobar/.config/xmobar/xmobar +xmobar/.config/xmobar/*.o +*.swp diff --git a/README.md b/README.md index 003c0e2..25129f7 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ a list of programs that i have configurations for. * starship prompt +* xmobar (although it's only useful with xmonad. see above for details) + ## scripts a list of useful (for me) shell scripts also provided in current repo. diff --git a/xmobar/.config/xmobar/xmobar.hs b/xmobar/.config/xmobar/xmobar.hs new file mode 100644 index 0000000..45a00b5 --- /dev/null +++ b/xmobar/.config/xmobar/xmobar.hs @@ -0,0 +1,123 @@ +import Xmobar + +data Separator = Sep deriving (Read, Show) + +instance Exec Separator where + alias Sep = "s" + run Sep = return "|" + +config :: Config +config = defaultConfig + { font = "xft:Lato:weight=bold:pixelsize=12:antialias=true:hinting=true" + , additionalFonts = [ "xft:Font Awesome 5 Free Solid:pixelsize=12" + , "xft:Font Awesome 5 Brands:pixelsize=14" + -- sitelen pona pona by jackhumbert + --, "xft:sitelen\-pona:pixelsize=20:antialias=true:hinting=true" + -- linja pona + , "xft:linja pona:pixelsize=22:antialias=true:hinting=true" + ] + , bgColor = "#111111" + , fgColor = "#ccbbcc" + , position = TopSize C 100 24 + , lowerOnStart = True + , hideOnStart = False + , persistent = True + , iconRoot = ".config/xmobar/xpm/" + , commands = [ Run $ Com "uname" ["-r"] "kern" 0 + , Run $ Uptime + ["-t" + -- normie + --, "\xf017 uptime: d" + -- sitelen pona pona by jackhumbert + --, "\xee6b\xee64\xee3d" + -- linja pona + -- tenpo suno nanpa + , "\xe66b\xe664\xe63d" + ] 60 + , Run $ Cpu + ["-t" + -- normie + --, "\xf108cpu: %" + -- sitelen pona pona by jackhumbert + --, "\xee24\xee4d\xee0e\xee3d: %" + -- linja pona + , "\xe624\xe730\xe60e\xe63d: %" + -- lawa pi ilo sona + , "-H", "50", "--high", "#ffaaaa" + ] 20 + , Run $ Memory + ["-t" + -- normie + --, "\xf538 ram: M (%)" + -- sitelen pona pona by jackhumbert + --, "\xee53\xee49: M (%)" + -- linja pona + , "\xe653\xf174: M (%)" + -- poki pali + ] 20 + , Run $ DiskU + [("/home" + -- normie + --, "\xf0a0 hdd: free") + -- sitelen pona pona by jackhumbert + --, "\xee53\xee08: ") + -- linja pona + , "\xe653\xf109: ") + -- poki awen + ] [] 60 + , Run $ Kbd + -- normie + --[ ("us", "\xf11c EN") + --, ("ru", "\xf11c RU") + --] + -- sitelen pona pona by jackhumbert + --[ ("us", "\xee6c\xee4d\xee0e\xee60 inli") + --, ("ru", "\xee6c\xee4d\xee0e\xee60 losi") + --] + -- toki pi ilo sitelen + -- linja pona + [ ("us", "\xe66c\xe730\xe619\xe660 [INLI]") + , ("ru", "\xe66c\xe730\xe619\xe660 [LOSI]") + ] + -- toki pi ilo sitelen + , Run $ Date + -- normie + --"\xf017 %d %b %Y %R" + -- sitelen pona pona by jackhumbert + --"\xee6b %d-%m-%Y %R" + -- linja pona + "\xe66b %d-%m-%Y %R" + -- tenpo + "date" 50 + , Run $ Network "wg0" + ["-t" + -- normie + --, "\xf6d5" + -- sitelen pona pona by jackhumbert + --, "\xee01" + -- linja pona + , "\xe601" + -- akesi + ] 20 + , Run Sep + , Run UnsafeXMonadLog + ] + , sepChar = "%" + , alignSep = "}{" + -- ... }{  ... -- normie + -- ... }{  linu ... -- sitelen pona pona by jackhumbert + -- ... }{  [_L_IN_U] ... -- linja pona + , template = " \ + \%UnsafeXMonadLog% }{ \ + \\xe674 [LINU] %kern% %s% \ + \%uptime% %s% \ + \%cpu% %s% \ + \%memory% %s% \ + \%disku% %s% \ + \%kbd% %s% \ + \%date% %s% \ + \%wg0% %s%" + } + +main :: IO () +main = xmobar config diff --git a/xmobar/.config/xmobar/xpm/la_ninpre.xpm b/xmobar/.config/xmobar/xpm/la_ninpre.xpm new file mode 100644 index 0000000..95e5d18 --- /dev/null +++ b/xmobar/.config/xmobar/xpm/la_ninpre.xpm @@ -0,0 +1,36 @@ +/* XPM */ +/* la-ninpre fungus xpm version */ +static char * la_ninpre_xpm[] = { +"24 24 8 1", +" c None", +". c #19191A", +"@ c #C74444", +"+ c #ED7C68", +"# c #F9A776", +"$ c #ECECF0", +"% c #CECED2", +"& c #88888F", +" ", +" .... ", +" ...+@+@... ", +" ..#@#@$%@@@@.. ", +" .@+@%@+@@@@%@@@. ", +" .%#@$@+$%@$@@@$%@. ", +" .@#@$@#@@@@@%@@@@@@. ", +" .%@+@+@@%$@@@@$%@@@. ", +" .%@%@$@@@$%@@@@@@. ", +" ...+@%@+@@@@%... ", +" .......... ", +" .&&%%. ", +" .&$%%. ", +" .$%$%. ", +" .$$$%%%. ", +" .&$%$%&. ", +" ...... ", +" .&%%&. ", +" ..%%%%.. ", +" .&&....&&. ", +" .&$&$%&%&. ", +" .%$%$%%. ", +" ..%%%%.. ", +" .... "}; -- cgit v1.2.3