XDG launcher implements a dmenu-style XDG application launcher in Emacs using standard Emacs minibuffer completion. It works best with a vertical completion framework like icomplete-vertical-mode, fido-vertical-mode, vertico, etc.
(use-package xdg-launcher
:vc (:url "https://github.com/emacs-exwm/xdg-launcher"))(straight-use-package
'(xdg-launcher :type git :host github :repo "emacs-exwm/xdg-launcher"))Or if you are using use-package (thanks @daviwil)
(use-package xdg-launcher
:straight '(xdg-launcher :host github :repo "emacs-exwm/xdg-launcher"))Run M-x xdg-launcher-run-app and select your desired application.
This package provides the following configuration options:
xdg-launcher-icon-themes– If you use this package’s nerd-icons support, you’ll likely want to customize this list to include your icon theme(s) as this package doesn’t auto-detect the current icon theme.xdg-launcher-action-function– Specify how to launch an application, once selected. Customize this if you, e.g., need to spawn applications in a special shell, via systemd, etc.xdg-launcher-terminal-function– Specify how to open applications in a terminal.xdg-launcher-apps-directories– A list of directories to scan for*.desktopfiles. You probably don’t need to change this.
This package integrates with nerd icons and consult.
This package integrates with nerd-icons-completion to provide application icons. Application icons are automatically loaded from the themes specified in xdg-launcher-icon-themes, in order; include the “hicolor” theme in this list to use the default icon provided by the application.
You can add Linux desktop applications to consult-buffer by adding xdg-launcher-consult-source to consult-buffer-sources. For example, add the following to your init.el add XDG application candidates immediately after buffer candidates in consult-buffer.
(with-eval-after-load 'consult
(push 'xdg-launcher-consult-source (cdr (memq 'consult-source-buffer consult-buffer-sources))))xdg-launcher-consult-source is a general-purpose consult--multi source and can be used in, e.g., consult-omni as well.
- This package is a fork of app-launcher by Sebastian.
- App-launcher used code from the Counsel package by Oleh Krehel.