Open canadaduane opened 2 years ago
There are a couple of considerations for packaging meta-mac:
dconf
tweaking to get gnome-terminal to do the right thing for copy/paste ("Command-C / Command-V" instead of "Ctrl+Shift-C / Ctrl+Shift-V"); however, I'm not sure what the "right" thing to do is here--override user settings? Let users figure out how to set gnome-terminal shortcuts manually? Looking for best practices and alternatives here.
- It uses a clipboard_keys.yaml file that should be packaged and is referenced inside the main interception config file so that the keys generated by the virtual keyboard can exceed the capabilities of the source keyboard that was grabbed.
This is very easy to achieve, dpkg/apt does all of the heavily lifting here, all you have to do is put the file into the package. See here. The difficulty with packaging interception plugins and auto-configuring comes with managing the main interception config file, as it is shared by every plugin; essentially this is the purpose of interception-config
package, which is just a package which ships with all possible config files for each combination of plugins, then a basic script which installs these on postinst
in the plugin packages. I'm not sure if there is a superior way - I am not a very experienced debian packager (in fact these days I use neither interception nor a debian based desktop distro. Back when I first packaged this, more complete tools such as keyd
and kmonad
did not exist or where too beta-like)
2. I do a little
dconf
tweaking to get gnome-terminal to do the right thing for copy/paste ("Command-C / Command-V" instead of "Ctrl+Shift-C / Ctrl+Shift-V"); however, I'm not sure what the "right" thing to do is here--override user settings? Let users figure out how to set gnome-terminal shortcuts manually? Looking for best practices and alternatives here.
In my opinion, this should be separate package, something like interception-meta-mac-dconf
or interception-meta-mac-gnome
or even interception-meta-mac-gnome-terminal
(if its specific to just gnome terminal), in the spirit of supporting multiple desktops. This would be very easy to do, basically an empty package which sets some dconf
options on postinst
and removes them on postrm
; perhaps also it should write to a file the value of the modified values on postinst
so they can be restored exactly on postrm
.
Thanks so much! This is really helpful. I hadn't heard of keyd or kmonad, either, so that's interesting... hmmm. Lots to explore!
I like your approach to combining config files via interception-config
. It seems a reasonable solution given the constraints.
I just made this interception plugin publicly available:
https://github.com/canadaduane/meta-mac
It makes the transition from Mac OS a little easier for folks who are used to the Command key doing most of the shortcut heavy lifting.