Launcher or menu in i3
Is there a way to create a launcher or menu within i3 without using an external program like dmenu?
Is there a way to create a launcher or menu within i3 without using an external program like dmenu?
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.
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.
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"
}
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.
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
I use synapse with keybinding
bindsym $mod+x exec --no-startup-id synapse
Asked: 2014-06-09 19:16:24 +0000
Seen: 2,238 times
Last updated: Jun 29 '14