z/tmux.go

26 lines
462 B
Go
Raw Normal View History

package main
import (
"strings"
2022-04-06 13:45:46 +00:00
Z "github.com/rwxrob/bonzai/z"
2022-04-09 08:50:54 +00:00
"github.com/rwxrob/help"
)
var tmux = &Z.Cmd{
Name: `tmux`,
Summary: `make tmux updates`,
Commands: []*Z.Cmd{help.Cmd, tmuxUpdate},
}
var tmuxUpdate = &Z.Cmd{
Name: `update`,
Summary: `update the onscreen status`,
Call: func(_ *Z.Cmd, args ...string) error {
msg := strings.Join(args, " ")
return Z.Exec(
"tmux", "-L", "live", "set", "-g", "status-right", msg,
)
},
}