Skip to content

emacs-exwm/xdg-launcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 

Repository files navigation

xdg-launcher

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.

Installation

How to install with use-package’s :vc keyword

(use-package xdg-launcher
  :vc (:url "https://github.com/emacs-exwm/xdg-launcher"))

How to install with straight.el

(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"))

Usage

Run M-x xdg-launcher-run-app and select your desired application.

Configuration

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 *.desktop files. You probably don’t need to change this.

Integrations

This package integrates with nerd icons and consult.

Icons

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.

Consult

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.

Credits

About

Launch application from Emacs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5