Keyboard shortcuts using xbindkeys

Hey folks, I’m trying to keep my fingers more on the keyboard this year 2020 (resolution maybe?), minimizing the switching costs to the mouse to optimize flow.

I’m considering using something like xbindkeys

# place this file at ~/.xbindkeysrc

# make F8 launch Google Chrome browser

I’ve used preconfigured linux window startup organizers to help with this in the past, but curious if anyone has setup xbindkeys or something similiar and can comment about productivity improvements. Would be cool to see some popular template files of keyboard shortcut to application mappings…


It helped me a lot to switch to a tiled window manager, i3 back then, where I started everything via keyboard and also window navigation, resizing, ordering, etc was fully via keyboard.

I’m not a fan of single application hotkeys. I tend to forget that they are there anyway… Also some tools (like chrome) are started only once per session and linger on another desktop, waiting to be used.

Later I switched to awesomewm as it’s automatic layouting saves me a lot of additional time that I earlier had to fiddle to have a good layout. Also awesomewm can be used in a hybrid mode much easier than i3.

My next step is to fully switch to Emacs from VScode, though my office place makes this a hard problem. And as my boss has the dream to fully convert to a cloud based eclipse I fear I’ve lost that battle finally…

Conclusion: you don’t save that much of mouse time by changing how you start your programs, especially not if you operate them with the mouse (like you do in a browser usually), important is to use programs that allow mouse free operation.

1 Like

Yeah xbindkeys is nice for its Guile Scheme support :slight_smile: This is my ~/.xbindkeysrc.scm:

(define (xbindkey-list key-list cmd)
  (for-each (lambda (key) (xbindkey key cmd)) key-list))

(xbindkey-list '( (XF86AudioMute) (Control F1) ) "amixer set Master toggle")
(xbindkey-list '( (XF86AudioLowerVolume) (Control F2) ) "amixer set Master 5%-")
(xbindkey-list '( (XF86AudioRaiseVolume) (Control F3) ) "amixer set Master 5%+")
(xbindkey-list '( (XF86AudioMicMute) (Control F4) ) "amixer set Capture toggle")
(xbindkey-list '( (XF86MonBrightnessDown) (Control F5) ) "xbacklight -dec 10")
(xbindkey-list '( (XF86MonBrightnessUp) (Control F6) ) "xbacklight -inc 10")

As you can see I only use it for for Fn keys, but I also wanted to be able to use Ctrl for when I’m using an external keyboard without Fn, so I defined a function to define aliases and keep the config nice and clean.

If you wanna go full keyboard my suggestion would be the same as @NobbZ and try awesomewm, which is basically a framework to write your own window environment using Lua. This is my configuration:

1 Like

And of course KDE global shortcuts are awesome.

I still wouldn’t bind something like F8 to chrome though, I just hit alt+f2 (or rebind to whatever) to access the task launcher and just type chEnter, lol. ^.^

The KDE task launcher is awesome, so pluggable with functionality, not just a simple runner. :slight_smile:

1 Like