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

Allow specifying BSPWM socket #6

Open
MyNameIsCosmo opened this Issue Jan 25, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@MyNameIsCosmo
Copy link

MyNameIsCosmo commented Jan 25, 2019

Currently, btops hard-codes the BSPWM_SOCKET path to /tmp/bspwm_0_0-socket
https://github.com/cmschuetz/btops/blob/master/ipc/ipc.go#L11

bspwm allows for the BSPWM_SOCKET environment variable to be set, which will set the unix socket for bspwm to output to.
https://github.com/baskerville/bspwm/blob/ab7e5abc260bfa555bc8407d7820b5dfafadf46e/doc/bspwm.1.asciidoc#environment-variables

This may change per user configuration, whether by the user passing an environment, or by the system configuration:
/tmp/bspwm<host_name>_<display_number>_<screen_number>-socket

One solution would simply be to allow the user to set the BSPWM_SOCKET via environment variables.
Reference:
https://gobyexample.com/environment-variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment