history for any menu (like dmenu, fzf, ...)

dm9pZCAq 085e678ca4 use AtomicFile for writing path cache and history 1 month ago
src 085e678ca4 use AtomicFile for writing path cache and history 1 month ago
.gitignore 119ffc3914 add .gitignore 5 months ago
LICENSE fe45ef347f add LICENSE 4 months ago
README.md 513fb32a4b src/bin: path-cache: make cache file path configurable 5 months ago
build.zig c8dbbade69 version 0.0.2, update to zig-0.12.0 1 month ago
build.zig.zon c8dbbade69 version 0.0.2, update to zig-0.12.0 1 month ago

README.md

menu-history

history for any menu (like dmenu, fzf, ...)

how to build

requires: zig-0.11.0

zig build -Doptimize=ReleaseFast
# see also: https://ziglang.org/documentation/0.11.0/#Build-Mode

# this will build menu-history and path-cache
ls ls zig-out/bin/

menu-history

# menu-history -h
menu-history [-Vh] [-H <path>] [-m <menu>] <arg>...
    -V, --version
            print version

    -h, --help
            show this help

    -H, --history <path>
            set path for history file (default: '${XDG_CACHE_HOME}/${menu}-history')

    -m, --menu <menu>
            set menu program (default: 'dmenu')

    <arg>...
            menu args

path-cache

path-cache is helper program to get all runnable executables and cache them

default cache file path: ${XDG_CACHE_HOME}/path-cache, can be changed with PATH_CACHE_FILE environment variable

example usage as dmenu_run:

~/.config/sxhkd/sxhkdrc:

# program launcher
@Menu
	$(path-cache | menu-history)