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...
CLI app to display list of trending anime, music charts or recommend anime to watch or song to listen to.

Description Anitrendz is a cli app that uses data from the anitiop api to list the top anime and songs or recommend a random anime to watch or song to

Display ZFS datasets' I/O in real time
Display ZFS datasets' I/O in real time

ztop Display ZFS datasets' I/O in real time Overview ztop is like top, but for ZFS datasets. It displays the real-time activity for datasets. The buil

Display financial Data on The Terminal
Display financial Data on The Terminal

tuinance Tuinance is a performant TUI program to display financial data, written completely in Rust. All data is gathered through the Yahoo Finance AP

Display a random Shiba from your terminal whenever you feel the need to. Because why not?
Display a random Shiba from your terminal whenever you feel the need to. Because why not?

Shiba CLI Command-line interface (CLI) to display a random Shiba Inu whenever needed, by just running shiba on your terminal. How To Use • How Does It

Rust command line utility to quickly display useful secrets in a Kubernetes namespace
Rust command line utility to quickly display useful secrets in a Kubernetes namespace

kube-secrets This is a command line utility for quickly looking at secrets in a Kubernetes namespace that are typically looked at by humans. It specif

Display candlestick chart in your terminal.
Display candlestick chart in your terminal.

cli-candlestick-chart This module allows you to display candle charts directly in your terminal. I did this project mainly to learn Rust, so the code

Rust crate that allows you to display status & progress information in a terminal

status-line This crate allows you to display status & progress information in a terminal This crate handles the problem of displaying a small amount o

Lemurs - A lightweight TUI display/login manager written in Rust 🐒
Lemurs - A lightweight TUI display/login manager written in Rust 🐒

Lemurs 🐒 A TUI Display/Login Manager written in Rust WIP: Whilst the project is working and installable, there are still a lot of bugs and limitation

🌈🙈 HDR -> display
🌈🙈 HDR - display

🌈 🙈 notorious6 Experiments in mapping HDR stimulus to display via shaders and stuff. Building and running Should work on Windows and Linux ( 🐧 not

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
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
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
Configurable, extensible, interactive line reader

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

Murarth 176 Jan 3, 2023
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

null 1.7k Jan 8, 2023
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

Pi Lanningham 16 Jan 31, 2023