makke xmobar fancy

This commit is contained in:
qvalentin 2021-10-30 14:52:24 +02:00
parent 2e1bd2e9c6
commit aa8caa69ca
8 changed files with 109 additions and 38 deletions

View File

@ -1,12 +1,16 @@
Config { overrideRedirect = False
, font = "xft:Roboto Mono for Powerline:size=11"
, bgColor = "#0C0C0F"
, fgColor = "#ccdee5"
, font = "xft:FiraCode Nerd Font:size=11",
additionalFonts = [ "xft:FiraCode Nerd Font:bold:pixelsize=19:antialias=true:hinting=true"
, "xft:FiraCode Nerd Font:bold:pixelsize=25:antialias=true:hinting=true"
, "xft:FiraCode Nerd Font:bold:pixelsize=20:antialias=true:hinting=true" ]
, bgColor = "#0d141b"
, fgColor = "#c4c1df"
, position = TopW L 100
, iconRoot = ".config/xmobar/xpm/"
, commands = [Run Cpu
[ "-L", "3"
, "-H", "50"
[ "--template", "<total>%"
,"-w", "2"
] 10
, Run Alsa "default" "Master"
[ "--template", "<volumestatus>"
@ -14,12 +18,16 @@ Config { overrideRedirect = False
, "--"
, "--on", ""
]
, Run Memory ["--template", "Mem: <usedratio>%"] 10
, Run Date "%a %Y-%m-%d <fc=#8EB7CF>%H:%M</fc>" "date" 10
, Run Memory ["--template", "<used>"] 10
, Run Date "%a %Y-%m-%d<fn=2><fc=#0d141b,#2C546F:0></fc></fn><fc=#6D89C1,#0d141b:0>%H:%M</fc>" "date" 10
, Run XMonadLog
, Run Com "get_music_info" [] "" 10
]
, sepChar = "%"
, alignSep = "}{"
, template = " <icon=haskell_20.xpm/> %XMonadLog% }{ %get_music_info% | %alsa:default:Master% | %cpu% | %memory% | %date% "
}
, template = " <icon=haskell_20.xpm/> %XMonadLog% }{\
\<fn=2><fc=#2C546F,#0d141b:0></fc></fn><fc=#c4c1df,#2C546F:0>%get_music_info%</fc>\
\<fn=2><fc=#0d141b,#2C546F:0></fc></fn><fc=#c4c1df,#0d141b:0><fn=1><fc=#2C546F> </fc></fn>%alsa:default:Master%</fc>\
\<fn=2><fc=#2C546F,#0d141b:0></fc></fn><fc=#c4c1df,#2C546F:0><fn=1><fc=#0d141b,#2C546F:0>﬙ </fc></fn>%cpu%</fc>\
\<fn=2><fc=#0d141b,#2C546F:0></fc></fn><fc=#c4c1df,#0d141b:0><fn=1><fc=#2C546F> </fc></fn>%memory%</fc>\
\<fn=2><fc=#2C546F,#0d141b:0></fc></fn><fc=#c4c1df,#2C546F:0>%date%</fc>"

View File

@ -1,25 +0,0 @@
Config { overrideRedirect = False
, font = "xft:Roboto Mono for Powerline:size=11"
, bgColor = "BGCOLOR"
, fgColor = "FGCOLOR"
, position = TopW L 100
, iconRoot = ".config/xmobar/xpm/"
, commands = [Run Cpu
[ "-L", "3"
, "-H", "50"
] 10
, Run Alsa "default" "Master"
[ "--template", "<volumestatus>"
, "--suffix" , "True"
, "--"
, "--on", ""
]
, Run Memory ["--template", "Mem: <usedratio>%"] 10
, Run Date "%a %Y-%m-%d <fc=COLOR6>%H:%M</fc>" "date" 10
, Run XMonadLog
, Run Com "get_music_info" [] "" 10
]
, sepChar = "%"
, alignSep = "}{"
, template = " <icon=haskell_20.xpm/> %XMonadLog% }{ %get_music_info% | %alsa:default:Master% | %cpu% | %memory% | %date% "
}

View File

@ -0,0 +1,33 @@
Config { overrideRedirect = False
, font = "xft:FiraCode Nerd Font:size=10",
additionalFonts = [ "xft:FiraCode Nerd Font:bold:pixelsize=19:antialias=true:hinting=true"
, "xft:FiraCode Nerd Font:bold:pixelsize=25:antialias=true:hinting=true"
, "xft:FiraCode Nerd Font:bold:pixelsize=20:antialias=true:hinting=true" ]
, bgColor = "BGCOLOR"
, fgColor = "FGCOLOR"
, position = TopW L 100
, iconRoot = ".config/xmobar/xpm/"
, commands = [Run Cpu
[ "--template", "<total>%"
,"-w", "2"
] 10
, Run Alsa "default" "Master"
[ "--template", "<volumestatus>"
, "--suffix" , "True"
, "--"
, "--on", ""
]
, Run Memory ["--template", "<used>"] 10
, Run Date "%a %Y-%m-%d<fn=2><fc=BGCOLOR,COLOR9:0></fc></fn><fc=COLOR6,BGCOLOR:0>%H:%M</fc>" "date" 10
, Run XMonadLog
, Run Com "get_music_info" [] "" 10
]
, sepChar = "%"
, alignSep = "}{"
, template = " <icon=haskell_20.xpm/> %XMonadLog% }{\
\<fn=2><fc=COLOR9,BGCOLOR:0></fc></fn><fc=FGCOLOR,COLOR9:0>%get_music_info%</fc>\
\<fn=2><fc=BGCOLOR,COLOR9:0></fc></fn><fc=FGCOLOR,BGCOLOR:0><fn=1><fc=COLOR9> </fc></fn>%alsa:default:Master%</fc>\
\<fn=2><fc=COLOR9,BGCOLOR:0></fc></fn><fc=FGCOLOR,COLOR9:0><fn=1><fc=BGCOLOR,COLOR9:0> </fc></fn>%cpu%</fc>\
\<fn=2><fc=BGCOLOR,COLOR9:0></fc></fn><fc=FGCOLOR,BGCOLOR:0><fn=1><fc=COLOR9> </fc></fn>%memory%</fc>\
\<fn=2><fc=COLOR9,BGCOLOR:0></fc></fn><fc=FGCOLOR,COLOR9:0>%date%</fc>"

View File

@ -0,0 +1,25 @@
/* XPM */
static char * haskell_20_xpm[] = {
"20 20 2 1",
" c None",
". c #FFFFFF",
" ",
" ",
" ",
".... .... ",
" .... ... ",
" ... .... ",
" .... .... ",
" .... ... ........",
" ... .... .......",
" .... .... ",
" .... .... ",
" ... ...... .....",
" .... ....... ....",
" .... .... ... ",
" ... .... .... ",
" .... ... .... ",
".... .... ... ",
" ",
" ",
" "};

@ -1 +1 @@
Subproject commit a3ad5c55441dab9447a785c69b71ea720f984849
Subproject commit 4d947ab1a3907e42bf51ded588ac088007b19cfe

View File

@ -1,4 +1,6 @@
#
export PATH=$PATH:/home/qv/.local/bin:/home/qv/.ghcup/bin:/home/qv/.scripts:/home/qv/.emacs.d/bin:/opt/texlive/2021/bin/x86_64-linux
export _JAVA_AWT_WM_NONREPARENTING=1

View File

@ -20,7 +20,7 @@ xmobar_change(){
-e "s/COLOR13/$color13/g" \
-e "s/COLOR14/$color14/g" \
-e "s/COLOR15/$color15/g" \
~/.config/xmobar/xmobarrc-template > ~/.config/xmobar/xmobarrc
~/.config/xmobar/xmobarrc-template.hs > ~/.config/xmobar/xmobarrc
}
args=("$@")
PATH_TO_IMG="${args[0]}"

28
.scripts/update_xmobar.sh Executable file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env bash
xmobar_change(){
echo "changing xmobarrc"
source ~/.cache/wal/colors.sh
sed -e "s/BGCOLOR/$background/g" \
-e "s/FGCOLOR/$foreground/g" \
-e "s/COLOR1/$color1/g" \
-e "s/COLOR2/$color2/g" \
-e "s/COLOR3/$color3/g" \
-e "s/COLOR4/$color4/g" \
-e "s/COLOR5/$color5/g" \
-e "s/COLOR6/$color6/g" \
-e "s/COLOR7/$color7/g" \
-e "s/COLOR8/$color8/g" \
-e "s/COLOR9/$color9/g" \
-e "s/COLOR10/$color10/g" \
-e "s/COLOR11/$color11/g" \
-e "s/COLOR12/$color12/g" \
-e "s/COLOR13/$color13/g" \
-e "s/COLOR14/$color14/g" \
-e "s/COLOR15/$color15/g" \
~/.config/xmobar/xmobarrc-template.hs > ~/.config/xmobar/xmobarrc
}
xmobar_change
killall xmobar
xmobar