The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

alias in keybind doesn't work

asked May 10 '13

updated May 11 '13

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?

1 answer

Sort by » oldest newest most voted
3

answered May 10 '13

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?)

Comments

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 (May 10 '13)edit

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

joepd gravatar imagejoepd (May 10 '13)edit

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

Maestraccio gravatar imageMaestraccio (May 11 '13)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_ (May 12 '13)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 (May 12 '13)edit

Question Tools

Stats

Asked: May 10 '13

Seen: 471 times

Last updated: May 11 '13