input-remapper icon indicating copy to clipboard operation
input-remapper copied to clipboard

Custom config directory

Open tpeacock19 opened this issue 2 years ago • 2 comments

The configuration directory can be set by using --config-dir with input-remapper-control. However, this option is not offered with input-remapper-gtk or any of the other executables. This makes it impossible to edit the presets located in those directories.

I came across this because I have a non-standard xdg-config-home among other directories. So this defaulting to .config/input-remapper is a bit annoying for me.

I tried looking into the codebase to see how easily it would be to use the actual XDG_CONFIG_HOME variable but it seems to be a bit more involved than just a simple edit to the user.py. I think it would be great to incorporate the actual XDG_CONFIG_HOME variable as well as allowing the user to set the config directory when running input-remapper-service.

tpeacock19 avatar Jul 29 '22 01:07 tpeacock19

Did you look at the beta source? I am not sure how it is set up on main, but it should be relative simple to implement this in beta:

  1. I think it makes sense to merge user.py into configs/paths.py they are both short and closely related.
  2. update paths.py because .config/input-remapper is currently hard-coded in line 33
  3. go through the source and make sure we always use the HOME, USER and CONFIG_PATH constants form paths.py and not some other hard-coded paths.

jonasBoss avatar Jul 31 '22 11:07 jonasBoss

Sorry, I messed up with a previous request. Now I fixed it. Again, this is just an example of what can be done. It appears to me that paths.py will be used by the daemon as well.

yngmjgsd avatar Jan 12 '23 20:01 yngmjgsd