Sync Keybindings #538
Replies: 2 comments
-
Hi, I think it will easier to configure everything in userpref.conf so that they are preserved... |
Beta Was this translation helpful? Give feedback.
-
Just found out about Unbind haha. Thank you. Honestly, I am really obsessed with making this repo have a way to sync with user preferences and preserve them as I am planning to add this to the AUR. Also, I am planning to implement this as a backend for a GUI for setting keybindings and preserving it for the user. I will still try to find a way to do this. I just really need the hyprland to mature more. Thanks for the hard work man! |
Beta Was this translation helpful? Give feedback.
-
Trying to resolve some Sync/restore Questions on how to have their preferred keybinds unchanged upon update.
We know we have ./userprefs.conf, and this is basically enough but we have keybindings that should strictly follow the recent implementations from main.
This script helps synchronize your personal keybindings with Hyprdots' default keybindings. If you've customized keybindings in your local keybindings.conf file and want to merge these with the default ones, this script is for you.
The script reads the default keybindings.conf file line by line. For each line, it checks for a corresponding line in your local file. If it finds one, it replaces the default keybinding with your custom one, while keeping the original command (the part from the dispatcher to the parameter). Essentially, it divides the keybindings.conf into two parts: the first column for the user, and the second for Hyprdots.
If there are duplicate scripts in the keybindings.conf it selects the first one, so it's advisable to make the comments distinctive.Any changes to the second column will override the user keybindings, and the line will follow Hyprdots' keybindings.conf. For variables, the first column is for Hyprdots and, if it exists, the right side is for the user. This approach ensures that the keybindings still follow Hyprdots' structure, helping to prevent errors.
To use the script, provide two arguments: the path to your local keybindings.conf file and the path to the default keybindings.conf file in the Hyprland repository. For example:
./sync_keybindings.sh /path/to/your/keybindings.conf /path/to/Hyprland/repo/keybindings.conf
After running the script, your custom keybindings will be merged into the default keybindings, and the result will be saved in the default keybindings.conf file.
Please note that this script deals with basic synchronizing of keybindings, and it may not cover all possible scenarios. That is why I need your insights.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions