MyNixOS website logo
Description

A small wrapper around dmenu.

hdmenu is a small wrapper around dmenu that can 1. Display commands in order of usage and, optionally, apply a frequency decay every time an item is selected. 2. Specify extra files to consider, which will be opened by a program of your choice (e.g., xdg-open). 3. Open certain executables inside of your terminal.

hdmenu

hdmenu is a small wrapper around dmenu—it can't do very much, though I guess that's the point. It might be most notable for being a discount yeganesh.

Features

  1. Display commands in order of usage and, optionally, apply a frequency decay every time an item is selected.
  2. Specify extra files to consider, which will be opened by a program of your choice (e.g., xdg-open).
  3. Open certain executables inside of your terminal.

Configuration

Hdmenu is configured using a TOML file inside the $XDG_CONFIG_HOME/hdmenu directory (probably ~/.config/hdmenu). See example.toml for an example configuration.

Note that, while having a config file is optional, the $XDG_CONFIG_HOME/hdmenu directory will be created in either case, in order to store the history file there.

Configuration option

The configuration file takes the following arguments:

  • open : A custom opening script (default: xdg-open).

  • files: Files one wishes to edit; they will be opened according to open. This can also take directories

    files = [ "~/.config/emacs/" ]
    

    in which case all files in that directory will be added to the list of files that hdmenu cares about. Directories can also be traversed recursively:

    # Files from `~/.config/emacs/' and all of its subdirectories.
    files = [ "~/.config/emacs/" ]
    
  • executable: Custom dmenu executable (default: dmenu).

  • terminal: A terminal emulator (default: xterm).

  • tty-programs: A list of programs to be opened in the above terminal emulator. For example, specifying

    tty-programs = [ "htop" ]
    

    will effectively enable one to start htop directly from dmenu without having to open an extraneous terminal.

  • decay: A frequency decay; all non-selected items will be multiplied by this number (default: 1). A good value may be something like 0.997

Command line options

  • --histFile

    • Short: -f
    • Description: Path to the history file to use.
  • --files-only

    • Short: -o
    • Description: Whether to only show the user-specified files.
  • --decay

    • Short: -d
    • Description: A frequency decay; all non-selected items will be multiplied by this

All options after -- will be directly forwarded to dmenu, so you may specify options in the following way:

hdmenu -f /path/to/file -- -i -f -nb '#282A36' -nf '#BBBBBB' -sb '#8BE9FD' -sf '#000000' -fn 'Inconsolata Regular-10'

Installation

Stack

Build with stack build, then copy the executable to a convenient location (or just use stack install, to copy the executable to the local-bin-path).

Cabal

Build with cabal install.

Metadata

Version

0.3.0

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows