The minimalistic app Yeganesh improves XMonad’s default app launcher with a small but time-saving feature: It shows your most frequently used apps first. So most of the time you will be able start an app by writing a single character.
Yeganesh is an app launcher, which means that you can type the first letters of a terminal or graphical app and yeganesh will present apps that match those letters to launch one. It shows you the available apps in a new menu window on top of the screen without using a terminal.
It is a wrapper around dmenu, which is used by XMonad by default, so that you already should have installed it when you installed XMonad. However, yeganesh
presents your most frequently used apps first, which will allow you to start a desired app with fewer keystrokes. It hasn’t been updated for a long time, but it still works as it should.
Install Yeganesh using Stack
To install yeganesh
, you need to have stack
installed.
[[How to install Stack?][xmonadinstallstackPage]]
Furthermore, you need the dmenu
app, which you can install by running
sudo apt-get install suckless-tools
in your terminal, if you haven’t already when you installed XMonad.
[[How to install XMonad?][xmonadinstallPage]]
Finally, run
stack install yeganesh
in your terminal to install yeganesh
.
Afterwards run
yeganesh -x
in your terminal to verify that yeganesh
is indeed installed. You should see a list of apps and be able to type in the name of an app like firefox
.
Configure XMonad to use Yeganesh
To actually use yeganesh
with XMonad, you can modify the existing keyboard shortcut Mod + p to start an app-launcher. Add this line into the list of keymaps in your XMonad config file:
= [
myKeys -- ...
"$(yeganesh -x)")
, ((modMask, xK_p ), spawn -- ...
]
If you use the EZ keymap notation, use this line:
= [
myKeys -- ...
"M-p", spawn "$(yeganesh -x)")
, (-- ...
]
Explain the code
Code | Note |
---|---|
(modMask, xK_p ) ,"M-p"
|
The standard Mod + p keyboard shortcut in XMonad to start an app-launcher. We override it to use yeganesh .
|
spawn ".."
|
Run an app or script. You can run anything that you can run in a terminal. |
$( ... )
|
Command substitution. Run the app inside () in a terminal and run its output literally as an app or script.If you run yeganesh -x on a terminal, it will just print the name of your selected app. You still have to run that printed name, which you do with “command substituion”.
|
-x
|
Only show (eXecutable) apps for selection, not ordinary files. |
You have to restart and recompile XMonad to take this new keyboard shortcut into account. You can do it by pressing Mod + q.
[How to configure XMonad?]
[How to modify XMonad keyboard shortcuts?]
[What are mod-keys?]