[i3] Gesture recognizer dev approach

  • From: Ahmet Emre Çepoğlu <aecepoglu@xxxxxxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Mon, 9 Jul 2012 13:02:40 +0300

Hey guys,
I am going to start writing a gesture recognizer for utilizing pointer
devices (singe/multi touch) on linux as a front end to window managers. I
wanted to hear your opinions on it before actually starting the development.

I'm thinking of a layered structure like this
__gesture recognizer
__gesture recognizer interface for window manager
__window-manager
So, simply, a gesture recognizer is gonna be an app that prints an
identifier when a gesture is recognized
The middle layer is going to read those identifiers, and send commands to
the window manager
And the window manager is... the window manager.

I'd like the user to be able to change to a different gesture recognizer
without having to do too much tweaking. I'd like it to be usable on all the
window managers.

There are obvious issues though
Say "gr1","gr2","gr*" are gesture recognizers. They print an identifier
like "close-win","switch-next-workspace" etc.
"i3wm-gr-interface", "blackbox-gr-interface" etc are various middle layer
applications
"i3wm", "blackbox" etc are the window managers

consider the middle layer:
* i3wm-gr-interface will likely be implementing i3wm-ipc-protocol.
* blackbox-gr-interface however will implement xlib
And sadly, there are not many window managers like i3 that's easy to
communicate with. For example when I need to list available workspaces in a
window manager other than i3, I will have to implement workspaces myself,
because there is no means of learning about them from blackbox. When this
is the case, it's better to embed the gesture recognizer within the window
manager.

Should I just stick with writing a gesture recognizer for i3wm only? This
way, the top and the middle layers can be put together. This will be my
route of choice, unless I learn about a way window managers can be
communicated with.

I don't plan on creating an online repo for my code until it has a working
demo, unless people would like me to. I plan to develop using C, and finish
it in a month's time, if things go as I'd like them to.

That's all, cheers.

Other related posts:

  • » [i3] Gesture recognizer dev approach - Ahmet Emre Çepoğlu