Skip to content

WIP: Package the touch keyboard onboard and polybar (for i3)

Michael Hamann requested to merge michitux:packages into master

This adds the software required to replicate the i3touchmenu setup that makes i3 quite usable on a tablet without a keyboard. With some modifications this might also be usable on a phone. The fonts are partially missing, unfortunately, so just copying the setup does not work. More specifically, I have packaged:

  • The onboard keyboard. It offers different keyboard variants optimized for different display sizes, different themes, integration with gnome accessibility services (which can automatically launch the keyboard when an input field is focused) and it can be pinned to the screen edge. In i3 it also automatically resizes the windows to fit above the keyboard when it is pinned (this can be configured), in Xfce4 this unfortunately did not work for me (even though the option claims to have this effect). Unfortunately, it has a lot of dependencies that are required for it to work. I needed to add py3-distutils-extra and py3-dbus as new packages.
  • The polybar status bar. It allows to configure a dynamic status bar e.g. for i3 with lots of different buttons. Buttons can be configured to be expanded into several buttons, this allows to create a nested menu structure as shown in i3touchmenu. This means it can be used to create custom menus e.g. for starting applications or for moving windows to different virtual desktops.

Some questions:

  • Should this go into postmarketOS or directly into Alpine Linux?
  • I have added myself as contributor, should I also add myself as maintainer, if yes, what would be expected of me?
  • onboard uses the error() method of glibc. From the manual I understood that the way it is used (errnum=0), this would only add the program name as prefix and then just print the rest similar to printf. Therefore, I have replaced them with fprintf to stderr which is not equivalent but at least shows the messages. Is there a better fix?
  • onboard does not require py3-dbus, but without py3-dbus, some functionality is missing like showing the keyboard instead of starting a second instance when running onboard again. As I think this is quite difficult to discover, I have just added py3-dbus as a dependency.
  • py3-dbus shares some files with py-dbus, that's why Arch Linux has a third package with the common files (see PKGBUILD). How is such a situation handled in Alpine Linux?
  • Some dependencies of polybar are actually optional (only required for certain modules) but the build system just added them as dependencies. As mentioned in the discussion in the AUR, if the packages are not present during the build, they also cannot be enabled later, that's why I have added them as build dependencies. Should they be added as regular dependencies in the APKBUILD?
  • polybar has two git submodules, therefore a regular git archive does not work. I am now just using git directly. There are several alternatives though. Alpine Linux has an example how to create an archive manually (but I assume this does only work for packages built in their systems). One could also just download the archives of the submodules manually. Any opinions?
Edited by Martijn Braam

Merge request reports