-
Notifications
You must be signed in to change notification settings - Fork 162
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 optional hotkeys to be unbound via. config-file #120
Conversation
I was looking for exactly this. I use tmux inside tilda so only a show/hide copy and paste are really useful but cant seem to unbind all the other keysbinds Currently I just bound all the keys to except the couple I use. |
This should be easy to merge into your local copy if you don't mind building from source. I think it's not a very neat solution - which is probably why it hasn't been pulled in. |
e541a2f
to
f37badd
Compare
Is there something I can do to make this (or another solution to the same problem) merged? I see that there's e.g. a bunch of whitespace changes in this PR that obscure what's really going on. I'm not really a C / GTK programmer, but I feel comfortable doing some minor things. |
@Ladicek Tilda sets up default config values on load of it can't find user set ones, unfortunately atm libconfuse doesn't provide us with a way to distinguish an unset value for an existing key e.g. This patch got around the issue by checking if a config file exists and assuming keys with NULL values are intentionally unset if it does. You could cherry-pick it for personal use. The proper way to do this I think, especially now that libconfuse has a new maintainer would be to provide a distinct |
I finally had time to pick up this pull and take a closer look. I have rebased the code and took a slightly different approach that is inspired by #113, personally I prefer the solution of storing |
Hi |
This will allow optional keybinds (all the ones except for the primary tilda key) to be unbound via. a blank string or commenting out the target. The only time config_init will set the optional default keybinds is if the config file did not previously exist.
The slight drawback is that if a user writes a new config without specifying default-keybinds (or letting tilda create the config itself) these keys will not be auto-bound. #110 #113