Closed kbilsted closed 2 months ago
How about just make a script to do this.
Strategies:
keymapper
proceses, then starts with the defined configBased on a quick search, on Windows you should be able to do taskkill /F /IM keymapper.exe /T
in a script. If the config files are static, perhaps you could swap them using a keybinding done in Keymapper itself? :grin:
If I needed to do that, I'd make ~/.config/keymapper.conf a symlink, then replace it with e.g.
Meta{F1} >> $(ln -sf path_to_config_a.conf ~/.config/keymapper.conf)
Meta{F2} >> $(ln -sf path_to_config_b.conf ~/.config/keymapper.conf)
Many thanks those a good work arounds. Id still prefer the tool to support it if easy to implement;)
I find it a bit unconventional for a running app to replace itself. Either you allow running multiple instances at the same time or not.
If @houmain likes the idea, I'd suggest this would feel more intuitive/correct if it were done through keymapperctl
:
keymapperctl --replace-config <file>
Alternative verbs: set
, swap
, change
. I think it should convey the running config will get flushed. Using keymapperctl
would also avoid having to think if the --update
or --verbose
should be handled.
Yes its a matter of how portable it should be.. how many scripts etc to drag around.. anyway its just an idea :-)
I will try to add a keymapperctl --set-config <file>
.
I intend to keep the configurations in the cache, so they do not have to be parsed again and can be switched quickly.
parsing delay is not something I've noticed at all!
This is available in 4.1.3 and a really cool feature. Now I can quickly switch between my own configuration and the ones others want me to try out. Thanks!
Great
This is actually really convenient. Especially when combined with the new tray icon.
I just swapped the config to the repro on #138, but could not open an editor with the remapped keys. No problem, just disable the mappings from the tray icon, start the editor for testing and re-enable Keymapper.
While reverting back to my original config after doing the above, I noticed a small bug. To be able to type the path of the default config, I disabled Keymapper from the tray icon. This reversed the behavior of the tray icon. When the toggle is enabled, my config loads and vice versa.
Many times a day i switch config file - it would be great with a command line flag that allows changing the config rather than telling me an instance is already running ;)