btops icon indicating copy to clipboard operation
btops copied to clipboard

Allow specifying BSPWM socket

Open MyNameIsCosmo opened this issue 6 years ago • 0 comments

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

MyNameIsCosmo avatar Jan 25 '19 05:01 MyNameIsCosmo