Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write error log to data dir, not conf dir #398

Merged
merged 2 commits into from Sep 6, 2019

Conversation

@chkno
Copy link
Contributor

chkno commented Sep 5, 2019

Write xmobar.errors to XMOBAR_DATA_DIR, not XMOBAR_CONFIG_DIR. This
allows XMOBAR_CONFIG_DIR to be read-only. This brings xmobar into
alignment with how xmonad manages its analogous directories (before this
change, a read-only DATA dir worked with xmonad but not with xmobar).

Write xmobar.errors to XMOBAR_DATA_DIR, not XMOBAR_CONFIG_DIR.  This
allows XMOBAR_CONFIG_DIR to be read-only.  This brings xmobar into
alignment with how xmonad manages its analogous directories (before this
change, a read-only DATA dir worked with xmonad but not with xmobar).
@chkno

This comment has been minimized.

Copy link
Contributor Author

chkno commented Sep 5, 2019

(For folks wishing to reproduce this read-only XMOBAR_CONFIG_DIR setup, a build script (in a file called build in XMOBAR_CONFIG_DIR) like this one is also required to get ghc to write its intermediate files elsewhere):

#!/usr/bin/bash

bin=$1
object_dir=$(mktemp -d)

default_build_args=(--make xmobar.hs -i -ilib -fforce-recomp -main-is main -v0 -o "$bin" -threaded -rtsopts -with-rtsopts -V0)
extra_build_args=(-odir "$object_dir" -hidir "$object_dir")

ghc "${default_build_args[@]}" "${extra_build_args[@]}"
status=$?
rm -r "$object_dir"
exit $status
@jaor

This comment has been minimized.

Copy link
Owner

jaor commented Sep 5, 2019

Thanks @chkno, this looks good. Would you please also include that sample build script in examples/ in this same PR?

@chkno

This comment has been minimized.

Copy link
Contributor Author

chkno commented Sep 5, 2019

Build script added.

@jaor jaor merged commit d1ba328 into jaor:master Sep 6, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.