all repos — dotfiles @ 995132c01d23140846a93171fd4c42aa0645fd8a

personal dotfiles

add xmobar config
la-ninpre leobrekalini@gmail.com
Fri, 17 Jun 2022 11:05:44 +0300
commit

995132c01d23140846a93171fd4c42aa0645fd8a

parent

c6a6a500dbac9ddccca5e5909accfadddc89a6ce

4 files changed, 166 insertions(+), 0 deletions(-)

jump to
M .gitignore.gitignore

@@ -4,3 +4,8 @@ !moc/.config/moc/keymap

!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
M README.mdREADME.md

@@ -36,6 +36,8 @@ * newsboat

* 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.
A 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 "<fc=#223333>|</fc>" + +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 + --, "<fc=#7f9848><fn=1>\xf017</fn> uptime: <days>d</fc>" + -- sitelen pona pona by jackhumbert + --, "<fc=#7f9848><fn=3>\xee6b\xee64\xee3d</fn><days></fc>" + -- linja pona + -- tenpo suno nanpa + , "<fn=3>\xe66b\xe664\xe63d</fn><days>" + ] 60 + , Run $ Cpu + ["-t" + -- normie + --, "<fc=#c74444><fn=1>\xf108</fn>cpu: <total>%</fc>" + -- sitelen pona pona by jackhumbert + --, "<fc=#c74444><fn=3>\xee24\xee4d\xee0e\xee3d</fn>: <total>%</fc>" + -- linja pona + , "<fn=3>\xe624\xe730\xe60e\xe63d</fn>: <total>%" + -- lawa pi ilo sona + , "-H", "50", "--high", "#ffaaaa" + ] 20 + , Run $ Memory + ["-t" + -- normie + --, "<fc=#d7a06d><fn=1>\xf538</fn> ram: <used>M (<usedratio>%)</fc>" + -- sitelen pona pona by jackhumbert + --, "<fc=#d7a06d><fn=3>\xee53\xee49</fn>: <used>M (<usedratio>%)</fc>" + -- linja pona + , "<fn=3>\xe653\xf174</fn>: <used>M (<usedratio>%)" + -- poki pali + ] 20 + , Run $ DiskU + [("/home" + -- normie + --, "<fc=#4e96d5><fn=1>\xf0a0</fn> hdd: <free> free</fc>") + -- sitelen pona pona by jackhumbert + --, "<fc=#4e96d5><fn=3>\xee53\xee08</fn>: <free></fc>") + -- linja pona + , "<fn=3>\xe653\xf109</fn>: <free>") + -- poki awen + ] [] 60 + , Run $ Kbd + -- normie + --[ ("us", "<fc=#55b795><fn=1>\xf11c</fn> EN</fc>") + --, ("ru", "<fc=#55b795><fn=1>\xf11c</fn> RU</fc>") + --] + -- sitelen pona pona by jackhumbert + --[ ("us", "<fc=#55b795><fn=3>\xee6c\xee4d\xee0e\xee60 inli</fn></fc>") + --, ("ru", "<fc=#55b795><fn=3>\xee6c\xee4d\xee0e\xee60 losi</fn></fc>") + --] + -- toki pi ilo sitelen + -- linja pona + [ ("us", "<fn=3>\xe66c\xe730\xe619\xe660 [INLI]</fn>") + , ("ru", "<fn=3>\xe66c\xe730\xe619\xe660 [LOSI]</fn>") + ] + -- toki pi ilo sitelen + , Run $ Date + -- normie + --"<fc=#ceced2><fn=1>\xf017</fn> %d %b %Y %R</fc>" + -- sitelen pona pona by jackhumbert + --"<fc=#ceced2><fn=3>\xee6b</fn> %d-%m-%Y %R</fc>" + -- linja pona + "<fn=3>\xe66b</fn> %d-%m-%Y %R" + -- tenpo + "date" 50 + , Run $ Network "wg0" + ["-t" + -- normie + --, "<fc=#ceced2><fn=1>\xf6d5</fn></fc>" + -- sitelen pona pona by jackhumbert + --, "<fc=#ceced2><fn=3>\xee01</fn></fc>" + -- linja pona + , "<fn=3>\xe601</fn>" + -- akesi + ] 20 + , Run Sep + , Run UnsafeXMonadLog + ] + , sepChar = "%" + , alignSep = "}{" + -- ... }{ <fc=#ceced2><fn=2></fn> ... -- normie + -- ... }{ <fc=#ceced2><fn=3> linu</fn> ... -- sitelen pona pona by jackhumbert + -- ... }{ <fc=#ceced2><fn=3> [_L_IN_U]</fn> ... -- linja pona + , template = " <icon=la_ninpre.xpm/>\ + \%UnsafeXMonadLog% }{ \ + \<fn=3>\xe674 [LINU]</fn> %kern% %s% \ + \%uptime% %s% \ + \%cpu% %s% \ + \%memory% %s% \ + \%disku% %s% \ + \%kbd% %s% \ + \%date% %s% \ + \%wg0% %s%" + } + +main :: IO () +main = xmobar config
A 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", +" ", +" .... ", +" ...+@+@... ", +" ..#@#@$%@@@@.. ", +" .@+@%@+@@@@%@@@. ", +" .%#@$@+$%@$@@@$%@. ", +" .@#@$@#@@@@@%@@@@@@. ", +" .%@+@+@@%$@@@@$%@@@. ", +" .%@%@$@@@$%@@@@@@. ", +" ...+@%@+@@@@%... ", +" .......... ", +" .&&%%. ", +" .&$%%. ", +" .$%$%. ", +" .$$$%%%. ", +" .&$%$%&. ", +" ...... ", +" .&%%&. ", +" ..%%%%.. ", +" .&&....&&. ", +" .&$&$%&%&. ", +" .%$%$%%. ", +" ..%%%%.. ", +" .... "};