cargo install tmux-menu
To see more actual config files, checkout ./examples
folder.
```yaml
#
#
#
#
#
#
#
#
#
```
Below example will show running brew services on display-menu, and restart it if clicked.
```bash
TEMPMENUFILE="/tmp/tempmenu.yaml" rm -f $TEMPMENUFILE cat > $TEMPMENU_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
tmux-menu show --menu $TEMPMENUFILE
rm -f $TEMPMENUFILE
and add menu item as below
yaml
- Menu:
name: "restart brew services"
shortcut: b
command: "$PATHTOSCRIPT/generatebrewservicesrestartmenu.sh"
background: true
```