deafmute1 / deb-pkg

Debian packaging files for packages maintained by me. Find PPAs (and direct .deb downloads) at https://launchpad.net/~deafmute.
2 stars 0 forks source link

Package 'meta-mac'? #4

Open canadaduane opened 2 years ago

canadaduane commented 2 years ago

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.

canadaduane commented 2 years ago

There are a couple of considerations for packaging meta-mac:

  1. 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.
  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.
deafmute1 commented 2 years ago
  1. 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.

canadaduane commented 2 years ago

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.