myself included, like to customize our environment to our liking. They are happy when it improves their efficiency, even if only a little. > You could call them a kind of "Environment Improvement Geek". > Matz 私を含めて多くのプログラマは,自分の環境を自分の好みに合わせてカスタマイズすることを好みます。それによってほんのわずかでも自分の効率が向上すると喜びを感じるのです。 ある種の 「環境改善オタク」と呼んでもよいでしょう。 [改訂新版]Emacs実践入門──思考を直感的にコード化し、開発を加速する より 本書に寄せて まつもと ゆきひろ
• only X.Org • Many Configuration options • Gestures were not supported • Release of libinput 1.0 in 2015 • Used in Wayland and X.Org • No configuration file • Improvements to gesture support Synaptics 2015 libinput 2010 2020 Libinput Synaptics Linuxのタッチパッドドライバ
Test different laptops' gesture behavior in electronics store Prototype on Synaptics Synapticsドライバでのプロトタイプ Released xSwipe in 2012 • Discovered logging capability with `$ synclient -m` for synaptics • Read and parse logs in loop • Detect direction and send shortcut • Written in Perl Synaptics 2015 libinput 2010 2020 My first DIY
driver in maintenance mode • xSwipe only worked with Synaptics driver • Frustration with inability to use gestures My First Gem Synaptics 2015 libinput 2010 2020 Released Fusuma in 2016 • Use `libinput debug-events` • Rewrite xSwipe in Ruby for libinput • `rake release`! 🪦
y SWIPE BEGIN +37.492s 3 10.23 -1.14 SWIPE UPDATE. +37.492s 3 10.54 -1.17 SWIPE UPDATE. +37.499s 3 7.62 -1.76 SWIPE UPDATE. +37.506s 3 10.25 -2.64 Detect a left swipe with three fingers => `swipe / 3 / right` Compare the average movement with threshold Detector Create Event with search index
gesture • Use Process.spawn to avoid slowing down the main loop • Use Process.detach to avoid zombie Detect a left swipe with three fingers `swipe /3 / right` => { command: ‘xdotool key alt+Left’ }
with a plug-in system プラグインでパイプラインを拡張する • Depends on result(event) previous tasks • Unified interface for each task ◦ e.g) Input#io, Executor#execute • Pipeline just call methods along the interface • Additional features using Gem • Implement tasks that satisfy interface pipeline plugins Input Buffer Detector Executor Libinput Tap Gesture Timer Swipe Pinch Rotate Hold Command Timer App Tap App Tap App Keypress Keypress Sendkey Wmctrl
device ◦ evdev is a generic kernel interface used by both X11 and Wayland ◦ Using libevdev requires ffi ▪ need to install ruby-dev fusuma-plugin-sendkey evdevを利用したキーイベント送信プラグイン
coding simplifies understanding and testing 🙆 Easily decide where to place the source code Cons 🙅 Processing can be redundant 🙅 State management can be difficult Pipeline Plugin Pros 🙆 Release of experimental features 🙆 Pipeline no longer dependent on plug-ins Cons 🙅 Code maintenance can be complicated 🙅 Difficult to detect conflicts and interference between external plugins, resulting in bugs プラグインとパイプラインのメリット・デメリット
drag with one finger ends when the finger leaves the touchpad 🙅 3-finger dragging is also difficult to operate due to the narrow range of movement 🙅 Difficult to move and scroll the workspace while dragging operation is in progress
_CHI'03 Extended Abstracts on Human Factors in Computing Systems_. 2003. https://www2.sonycsl.co.jp/person/rekimoto/papers/chi03tsense.pdf ThumbSense タッチパッドは修飾キー Only when the finger is on the touchpad • Switch specific keys to left-click or right-click • Replace with any command or keybinding
while Fusuma only detects events ◦ As a side effect, Appmatcher + Remapper allows you to define customizable key remappers for specific app ◦ Remapper can also call existing executor plugin such as command/wmctrl/sendkey