My dotfiles are 99% similar between computers but there are minor tweaks that I keep for various minor settings. My plan was to discriminate using an if statement based on hostname. something that would look as follows in a shell config like bashrc or zshrc
if [ $(hostname) == 'host1' ]; then
# things to do differently on host1.
elif [ $(hostname) == 'host2' ]; then
# things to do differently on host2.
fi
I suspect that xmobar is simply a config file that is parsed with no real haskell in it. Any thoughts on how to get something similar to what I have with a shell in xmobar?
Mainly I am wanting to modify the widths and network interfaces in xmobar something like
Config {
if hostname == "host1"
then
font = "xft:Fixed-9",
position = Static { xpos = 0, ypos = 0, width = 1280, height = 16 },
else if hostname == "host2"
then
font = "xft:Fixed-12",
position = Static { xpos = 1920, ypos = 0, width = 1800, height = 16 },
lowerOnStart = True,
commands = [
-- if here as well to switch between eth0 and wls3
Run Network "wls3" ["-t","Net: <rx>, <tx>","-H","200","-L","10","-h","#cc9393","-l","#709080","-n","#705050"] 10,
Run Date "%a %b %_d %l:%M" "date" 10,
Run Battery ["-t", "Bat: <left>%","-L","10","-H","11","-l","#CC9393","-h","#709080"] 10,
Run StdinReader
],
sepChar = "%",
alignSep = "}{",
template = "%StdinReader% }{ %multicpu% | %memory% | %Vol% | %wls3% | %battery% | <fc=#709080>%date%</fc>"
}
I realize my syntax is wishful and likely wrong, I love xmonad but have not learned haskell syntax yet.