A simple cli menu tool to launch a set of predefined commands.
Mookie launcher allows you to specify a menu structure in JSON format and execute the selected command. It can be useful for quickly launching hard to remember oneliners, bash scripts, programs, etc.
yay -S mkl-bin
go install github.com/make0x20/mkl@latest
# 64-bit
curl -sSL "https://github.com/make0x20/mkl/releases/latest/download/mkl_linux_amd64" -o mkl && chmod +x mkl && sudo mv mkl /usr/local/bin/
# 32-bit
curl -sSL "https://github.com/make0x20/mkl/releases/latest/download/mkl_linux_386" -o mkl && chmod +x mkl && sudo mv mkl /usr/local/bin/
# ARM CPUs
curl -sSL "https://github.com/make0x20/mkl/releases/latest/download/mkl_darwin_amd64" -o mkl && chmod +x mkl && sudo mv mkl /usr/local/bin/
# Intel CPUs
curl -sSL "https://github.com/make0x20/mkl/releases/download/v0.2.2/mkl_darwin_arm64" -o mkl && chmod +x mkl && sudo mv mkl /usr/local/bin/
# 64-bit
curl -sSL "https://github.com/make0x20/mkl/releases/latest/download/mkl_linux_armv6" -o mkl && chmod +x mkl && sudo mv mkl /usr/local/bin/
# 64-bit
curl -sSL "https://github.com/make0x20/mkl/releases/latest/download/mkl_freebsd_amd64" -o mkl && chmod +x mkl && sudo mv mkl /usr/local/bin/
# 64-bit
curl -sSL "https://github.com/make0x20/mkl/releases/latest/download/mkl_openbsd_amd64" -o mkl && chmod +x mkl && sudo mv mkl /usr/local/bin/
I have no idea honestly. Something along the lines of downloading mkl_windows_amd64.exe
from the Releases page, renaming it to mkl.exe
and putting it in your PATH.
Create a menu.json inside ~/.config/mookielauncher
(or pass a custom path using -m /path/to/menu.json
). Example menu:
{
"System monitor": "htop",
"Code editor": "nvim",
"Calendar": "cal -3",
"Git": {
"Log - pretty": "git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all",
"Log - oneline": "git log --oneline"
},
"System": {
"Update (Arch)": "sudo pacman -Syu",
"Disk usage": "df -h",
"Free memory": "free -h",
"Kernel version": "uname -r"
},
"Security": {
"Generate password": "head -c 32 /dev/random | base64 | tr -dc 'a-zA-Z0-9'",
"Check ports": "sudo netstat -tulnp",
"External IP": "curl ifconfig.me"
}
}
You can customize the colors of the menu by creating a theme.json
file inside ~/.config/mookielauncher
(or pass a custom path using -t /path/to/theme.json
). Example theme with all possible parameters:
{
"base_foreground": "#FFFFFF",
"base_background": "",
"base_bold": false,
"title_foreground": "#FF0053",
"title_background": "",
"title_bold": true,
"title_separator": "double",
"option_foreground": "#00BDED",
"option_background": "",
"option_bold": false,
"selected_foreground": "#00BDED",
"selected_background": "#000000",
"selected_bold": true,
"selector_foreground": "#000000",
"selector_background": "#FF0053",
"selector_bold": true,
"selector_string": "❯ ",
"submenu_pointer": " ❯"
}
title_separator
options are: normal
, thick
, double
, block
, block_outer
, block_inner
.
# simple usage - will look for menu.json and theme.json inside ~/.config/mookielauncher
mkl
# specify a menu file
mkl -m <path to menu JSON file>
# set custom menu name
mkl -n <menu name>
# print the selected command to stdout instead of executing it - useful for piping to other commands
mkl -p
# specify a theme file
mkl -t <path to theme JSON file>
Search through entries using / - courtesy of huh.