The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

alias in keybind doesn't work

asked 2013-05-10 20:16:05 +0000

updated 2013-05-11 06:38:04 +0000

In the terminal I use the alias "lo" for "libreoffice4.0", but assigning this alias to a keybinding shortcut doesn't work:

# keybind libreoffice4.0

assign [class="libreoffice-startcenter"] 5: kantoor bindsym $mod+Ctrl+o exec lo; workspace 5: kantoor

(I assigned it to open on workspace "5: kantoor") Replacing "lo" with "libreoffice4.0" here does very nicely, though.

Doesn't i3wm read the aliases at all, or how can I make it to do so?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-05-10 20:19:04 +0000

badboy_ gravatar image

aliases are only evaluated in an interactive shell, exec does not use such a shell. Just keep the long name in the config (you don't have to retype, so why shorten it?)

edit flag offensive delete link more


Thanks Badboy, You're sort of right about the uselessness of using a shortcut in the config, but I thought that, when libreoffice4.1 or libreoffice5.0 should appear, I would just have to change the alias, and not retype the whole name into config. That would certainly save me some seconds ;-)

Maestraccio gravatar imageMaestraccio ( 2013-05-10 20:21:24 +0000 )edit

If you are so inclined, put the alias before the test in `.${SHELL}rc` whether it is an interactive terminal.

joepd gravatar imagejoepd ( 2013-05-10 22:05:17 +0000 )edit

Thank you, but that is out of my league. I am just a piano player...

Maestraccio gravatar imageMaestraccio ( 2013-05-11 06:34:35 +0000 )edit

On my system `libreoffice` or `loffice` always points to the latest installed version, check your system, I'm sure there is a file like this. If not file a ticket on the package for your distribution.

badboy_ gravatar imagebadboy_ ( 2013-05-12 11:45:56 +0000 )edit

I know, but I get the latest version directly from the site (now @ 4.0) and not from the repo (still @ 3.6), so that doesn't work for me. Thanks anyway.

Maestraccio gravatar imageMaestraccio ( 2013-05-12 15:18:46 +0000 )edit

Question Tools


Asked: 2013-05-10 20:16:05 +0000

Seen: 471 times

Last updated: May 11 '13