summaryrefslogtreecommitdiffhomepage
path: root/doc/screenshots/xmobar-top.png
diff options
context:
space:
mode:
authorslotThe <soliditsallgood@mailbox.org>2021-07-06 09:23:37 +0200
committerslotThe <soliditsallgood@mailbox.org>2021-07-06 09:23:37 +0200
commitf2907ced81dc25bfe19ba3bd705d3b60f33ee68d (patch)
tree30e4abb61a1942c8506ca77b3f6da63ffe24acfc /doc/screenshots/xmobar-top.png
parent12273cc0bf562b53d701fd0e8ccbbf67d40fd81b (diff)
downloadxmobar-f2907ced81dc25bfe19ba3bd705d3b60f33ee68d.tar.gz
xmobar-f2907ced81dc25bfe19ba3bd705d3b60f33ee68d.tar.bz2
Filter filename when executing Haskell-based config
We are now—in case the user specified a Haskell file as their xmobar configuration—threading the command line arguments that xmobar receives to the relevant execv() call. However, we simply shove in all arguments originally given to xmobar, including the path to the configuration file. As main is now defined within that very file, this seems unneccessary. By filtering out that part of the arguments, the pattern that a lot of users seem to follow for easy setting of certain options becomes a little bit nicer. For example: main :: IO () main = getArgs >>= \case ["-x", n, _] -> xmobar . config $ read n _ -> xmobar $ config 0 becomes main :: IO () main = getArgs >>= \case ["-x", n] -> xmobar . config $ read n _ -> xmobar $ config 0 Related: https://github.com/jaor/xmobar/pull/553
Diffstat (limited to 'doc/screenshots/xmobar-top.png')
0 files changed, 0 insertions, 0 deletions