Easy configurable tmux display-menu

Overview

tmux-easy-menu

Easy configurable tmux display-menu

Alt Text

Setup

cargo build

And run with

./target/debug/tmux-menu show --menu {path-to-your-config}

Configuration

To see more actual config files, checkout ./examples folder.

# On tmux.conf, add below line.
#
# bind-key k run-shell "$HOME/tmux-menu/target/debug/tmux-menu show --menu $HOME/tmux-menu/examples/menu.yaml --working_dir #{pane_current_path}"
#                       ^~~ Or add binary to your path
# =============================
#
# title: "..."
#
# position:
#   x: ...
#   y: ...
#
# items:
#   - Seperate: {}                    # Draw seperate line
#
#   - NoDim:                          # Add row, but unselectable
#       name: "..."
#
#   - Menu:                           # Add selectable row
#       name: "..."
#       shortcut: "..."
#       ------------------
#
#       next_menu: "..."              # Show this menu if it selected
#
#        ... OR
#
#       command: "command %%KEY%%"    # Or run command
#       background: false
#       close_after_command: true
#       inputs:
#         - KEY                       # This input will be replaced with '%%KEY%%' on command
#       position:
#         x: ...
#         y: ...
#         w: ...
#         h: ...

Dynamic menu

Alt Text Alt Text Below example will show running brew services on display-menu, and restart it if clicked.

#!/bin/bash
# generate_brew_services_restart_menu.sh

TEMP_MENU_FILE="/tmp/temp_menu.yaml"
rm -f $TEMP_MENU_FILE
cat > $TEMP_MENU_FILE << EOM
title: " brew services "
items:
  - Seperate: {}
  - NoDim:
      name: " Running services "
  - NoDim:
      name: " (select to restart) "
  - Seperate: {}
EOM

brew services list | while read line
do
    program=$(echo $line | awk '{print $1}')
    status=$(echo $line | awk '{print $2}')

    if [ "$status" == "started" ]; then
        cat >> $TEMP_MENU_FILE <<- EOM
  - Menu:
      name: "$program"
      shortcut: ".."
      command: "brew services restart $program"
      background: true
EOM
    fi
done

$PATH_TO_BINARY/tmux-menu show --menu $TEMP_MENU_FILE
rm -f $TEMP_MENU_FILE

and add menu item as below

  - Menu:
      name: "restart brew services"
      shortcut: b
      command: "$PATH_TO_SCRIPT/generate_brew_services_restart_menu.sh"
      background: true
You might also like...
A small program which makes a rofi game launcher menu possible by creating .desktop entries for games
A small program which makes a rofi game launcher menu possible by creating .desktop entries for games

rofi-games A small program which makes a `rofi` game launcher menu possible by creating `.desktop` entries for games Installation Manual Clone repo: g

Maccha is an extremely extensible and themable power menu for Windows, macOS, and Linux.

Maccha I hate coffee. Maccha is an extremely extensible and themable power menu for Windows, macOS, and Linux. Plugins Plugins are written in Rust (ot

Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.
Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.

UEFI Variable Tool (UVT) UEFI Variable Tool (UVT) is a command-line application that runs from the UEFI shell. It can be launched in seconds from any

Configurable, extensible, interactive line reader

linefeed linefeed is a configurable, concurrent, extensible, interactive input reader for Unix terminals and Windows console. API Documentation linefe

Monorepo for dprint—a pluggable and configurable code formatting platform

dprint Monorepo for dprint—a pluggable and configurable code formatting platform. This project is under active early development. I recommend you chec

Uses the cardano mini-protocols to receive every block and transaction, and save them to a configurable destination

cardano-slurp Connects to one or more cardano-node's, streams all available transactions, and saves them to disk (or to S3) in raw cbor format. Usage

⚡️(cd with env) Is a configurable cd wrapper that lets you define your environment per directory.
⚡️(cd with env) Is a configurable cd wrapper that lets you define your environment per directory.

⚡️cdwe (cd with env) A simple configurable cd wrapper that provides powerful utilities for customizing your envionment per directory. (For ZSH / BASH

Simple OpenAI CLI wrapper written in Rust, feat. configurable prompts and models

Quick Start git clone https://github.com/ryantinder/ask-rs cd ask cargo install --path . Example ask tell me about the Lockheed Martin SR71 The Loc

Create, reorder, group, and focus workspaces easily in i3. Fully configurable with enhanced polybar modules.
Create, reorder, group, and focus workspaces easily in i3. Fully configurable with enhanced polybar modules.

Create, reorder, group, and focus workspaces fast and easily in i3. Features Focus Mode: Eliminate Distractions Enable Focus Mode: Use groups and focu

Comments
  • Window doesn't pop up on command

    Window doesn't pop up on command

    This seems to be working on my arch box (tmux 3.3a), but not working on my fedora WSL instance on my windows 10 box (again tmux 3.3a). The menu pops up > click 'n' (network) > click 'p' (ping) > enter IP and window just closes. Is there a way to debug why the window isn't opening/staying open? I've tried using the exact same tmux.conf from the arch box as well.

    opened by serosenstein 2
Releases(0.1.1)
Owner
🇺🇸🇯🇵🇰🇷 \[T]/
null
Rust code for T-Display S3 AMOLED, ESP32-S3 board with RM67162 AMOLED display

T-Display S3 AMOLED What is it? This is a Rust BSP for the Lilygo's T-Display S3 AMOLED board. RM67162 AMOLED driver in QSPI mode RM67162 AMOLED drive

BH1XUW 4 Jun 28, 2023
Facilitates navigating between tmux and nvim with C-hjkl

neovim-tmux-navigator Usage Use C-<hjkl> to navigate left, down, up, right, respectively. neovim-tmux-navigator will switch between vim splits and tmu

Amiel Martin 1 Dec 2, 2021
A Rust-based tmux sessionizer

RUTS A Rust-based tmux sessionizer Installation Currently you can install this package by either compiling from source or from the AUR. AUR yay -S rut

Ethan Holz 2 Nov 6, 2022
Think tmux, then aim... lower

shpool shpool is a service that enables session persistence by allowing the creation of named shell sessions owned by shpool so that the session is no

null 14 Mar 4, 2024
falling sand sim for tmux 3.4+

termsand this is VERY rough and hacked together in a couple hours it may not work exactly right for you how do i use it this thing is designed to work

null 265 Oct 23, 2024
A lightweight terminal menu for Rust

youchoose A simple, easy to use command line menu for Rust. Usage There are two methods you need to be familiar with to get started: Menu::new which t

Nathan Thomas 143 Dec 21, 2022
A small utility that moves the start menu to the top-center of the screen in Windows 11.

TopCenterStart11 A small utility that moves the start menu to the top-center of the screen in Windows 11. As of right now, this application can only p

Ryan de Jonge 12 Nov 12, 2022
Menu Utilities for Desktop Applications in Rust.

muda Menu Utilities for Desktop Applications. Example Create the root menu and add submenus and men items. let mut menu = Menu::new(); let file_menu

Amr Bashir 28 Dec 16, 2022
A menu widget for tui-rs ecosystem

tui-menu A menu widget for tui-rs ecosystem. Features Sub menu groups. Intuitive movement. Item's data is generic as long as it Cloneable. Try cargo r

shuo 3 Nov 30, 2022
A launcher/menu program written in Rust for wlroots-based Wayland compositors

tehda tehda (ᴛᴀʏ-dah /ˈteɪ̯.dæ/ or /teh.da/; Finnish for "to do, perform, execute") is a launcher/menu program, like dmenu, rofi, or wofi, written in

Nadia 4 Jan 29, 2023