2016/07/28

Xmonad: clickable workspaces with azerty layout

Xmonad is a keyboard oriented desktop manager. But sometimes, you still want to do some mouse actions.

Dzen2 provides clickable areas that allows to bind a command to a mouse click on a specific area of a Dzen bar. If you use Dzen2 as your status bar, it is then only a question of mapping the right keystroke to the workspace name and it should work.

The standard configuration to do this is already well documented:

However I am using an azerty keyboard layout. I am then using a slightly different keyboard layout to switch workspaces. Typing “alt+1”, “alt+2” and so on to switch workspace will then not have any effect for my configuration.

An additional caveat is xdotool which does not honor default keymap unless you explicitly set it beforehand with setxkbmap.

All this taken into account, here is the resulting config snippet that works:

Note that some of my workspaces are named with plain text instead of number. I am also using the super key instead of alt as my Xmonad mod key.

If you are more Haskell fluent than I am, do not hesitate to suggest some factorization.

2013/03/15

Terminal Emulator: Termite

From rxvt-unicode …

Up to a few days ago, I was using rxvt-unicode as my terminal emulator. It works fine, is light (especially with its client/server mode) and integrates nicely with a tilled window manager. But I was needing Fontconfig support which is lacking from rxvt-unicode.

rxvt-unicode

rxvt-unicode

… to LilyTerm …

I first tried to switch to LilyTerm which seems to be appreciated by some people but I was not convinced. The default configuration has some annoying behaviors (confirmation needed when starting the term to launch a specific command, reusing existing window, …) and it has some shortcomings as well (most importantly TERM is set to xterm which is wrong since LilyTerm has 256 colors support).

… to Termite

I have been then suggested to try Termite, a rather recent (first commit is from May 2012), VTE based (as LilyTerm), terminal emulator. The config is really easy and in a few minutes I had a config replicating my rxvt config.

Termite

Termite

Here is my old rxvt config :

And, here is my Termite config (not exactly the same behavior than rxvt but same look) :

Moreover, Termite brings some interesting features:

  • Open a new terminal in the current directory: a basic feature I was trying to achieve directly in my Xmonad configuration for months.
  • A command mode which takes its roots into Vim command mode.
  • Scrollback search (really useful when you forgot to pipe a long running command into grep, less or whatever and that you need to find something specific in the output).

Some features are still lacking like settings specifics parameters through CLI arguments and (probably) sending events. These features are needed to use Termite with programs like Cluster SSH. But this is OK as it is something I do not use everyday and I can keep using urxvt for this.

Termite does not have client/server mode either but it is light enough for this not to be a requirement.

If you are looking for a lightweight terminal emulator, I strongly suggest you give Termite a try.

2013/03/15

Edito

I have decided to start a new blog. This new blog has a different scope from my personal blog and thus it does not mean I will not resumeĀ  blogging (my last article is one year old now) there as well.

This blog will be written in English as the content will not be be franco-centric and will be aimed at people with technical background who likely understands English.

Here is a few ideas I have for the first articles:

  • Articles about my desktop environment: which pieces of software I use, some config highlights, …
  • Articles about my HTPC setup: hardware components selection, XBMC setup, …
  • Maybe some articles about monitoring tools (Cacti, Monitorix, …)