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

Launcher or menu in i3

asked 2014-06-09 19:16:24 +0000

marilion gravatar image

Is there a way to create a launcher or menu within i3 without using an external program like dmenu?

edit retag flag offensive close merge delete

6 answers

Sort by » oldest newest most voted
4

answered 2014-06-10 04:59:39 +0000

phairland gravatar image

I made a menu using the mode feature of i3. This is the code in my configuration file:

set $MENU "Audacious Chromium Dolphin dOublecmd Foxit giMp Gvim Irfanview Nixnote Palemoon Qbittorrent Ranger Skype Vlc Xnview Wps Et Libreoffice"
bindsym Menu mode $MENU
mode $MENU {
bindsym d exec dolphin, mode, "default"
bindsym a exec audacious, mode "default"
bindsym l exec libreoffice, mode "default"
bindsym m exec gimp, mode "default"
bindsym c exec chromium, mode "default"
bindsym i exec irfanview,mode "default"
bindsym p exec palemoon, mode "default"
bindsym f exec foxitreader, mode "default"
bindsym g exec gvim, mode "default"
bindsym w exec wps, mode "default"
bindsym e exec et, mode "default"
bindsym q exec qbittorrent, mode "default"
bindsym v exec vlc, mode "default"
bindsym o exec doublecmd, mode "default"
bindsym x exec xnviewmp, mode "default"
bindsym r exec terminator --profile ranger, mode "default"
bindsym s exec skype, mode "default"
bindsym n exec nixnote, mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
}

Just press the Menu key and on the i3bar will appear the menu and you will select the application by pressing the capital letter of each application.

edit flag offensive delete link more
1

answered 2014-06-10 09:28:24 +0000

Man from Mars gravatar image

updated 2014-06-10 09:32:55 +0000

I like both answers (though I slightly prefer phairland's one since Adaephon's suggestion resembles dmenu). I also use xfce application launcher which works well (it is also recognized as floating window and placed in the center of screen) because I have added i3 to original Debian + XFCE install. GMRun is also a nice option you might want to try. For the menu I always thought about adding lxpanel (a little out of i3 "spirit" but useful anyway) since I have no info about a "menu only" application.

edit flag offensive delete link more
1

answered 2014-06-13 04:58:52 +0000

ANOKNUSA gravatar image

updated 2014-06-13 05:01:49 +0000

I did something similar to this, though I got tired of it after a while and slimmed it down to just a few things. (I'm a big fan of dmenu, myself). A keybinding is paired with a number to enter a mode for a category of applications, after which the number keys correspond to applications in that category.

Here's a snippet of what I had in my old config. The glyphs are from Font Awesome, so that needs to be locally installed if you actually want to use them:

# Enter Index mode
bindsym $mod+Mod1+2 mode   Index [Editor]
bindsym $mod+Mod1+3 mode   Index [Messages]

mode "  Index [Editor]" {
    bindsym 1 exec --no-startup-id termite -t "  Work" -r edr -e "vim '+cd ~/doc/work'"; mode default
    bindsym 2 exec --no-startup-id termite -t "  Blog" -r edr -e "vim '+cd ~/prj/web/crepcran'"; mode default
    bindsym 3 exec --no-startup-id termite -t "  Code" -r edr -e "vim '+cd ~/prj'"; mode default
    bindsym 4 exec --no-startup-id termite -t "  Conf" -r edr -e vim; mode default
    bindsym Escape mode "default"
}
mode "  Index [Messages]" {
    bindsym 1 exec --no-startup-id termite -t "  Mail" -r msg -e mutt; mode default
    bindsym 2 exec --no-startup-id termite -t '  Twitter' -r msg; mode default
    bindsym Escape mode "default"
}
edit flag offensive delete link more
0

answered 2014-06-10 05:19:11 +0000

Adaephon gravatar image

updated 2014-06-10 07:24:41 +0000

You could use i3-input for a primitive launcher:

bindsym $mod+p exec --no-startup-id i3-input -F 'exec "%s"' -P 'run> '

Although - strictly speaking - i3-input is an external program, it comes with i3 and should always be available.

edit flag offensive delete link more

Comments

How about the mode feature of i3. I managed to display a menu, much like when resizing the word "resize" appear on the i3bar, then capitalised each letter that binds the execution of the program as shown on my answer.

phairland gravatar imagephairland ( 2014-06-10 05:28:49 +0000 )edit

You're right, that would work. I removed the paragraph about this no being possible ;)

Adaephon gravatar imageAdaephon ( 2014-06-10 07:22:54 +0000 )edit
0

answered 2014-06-09 20:27:28 +0000

You can launch applications that you like by binding them to particular keyboard shortcuts, eg:

bindsym $mod+Return exec xterm
bindsym XF86Search exec /usr/bin/firefox
bindsym XF86Mail exec /usr/bin/thunderbird
edit flag offensive delete link more
-1

answered 2014-06-29 21:33:46 +0000

I use synapse with keybinding

bindsym $mod+x exec --no-startup-id synapse

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-06-09 19:16:24 +0000

Seen: 2,238 times

Last updated: Jun 29 '14