Make shortcut toolbar for F1-F12 keys in Tmux.
- zsh
- nodejs (only if for automatic generation of config)
- tmux
If you use oh-my-zsh
- Clone this repository into
~/.oh-my-zsh/custom/plugins
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zpm-zsh/tmux-keys
- After that, add
tmux-keys
to your oh-my-zsh plugins array.
If you use Zgen
- Add
zgen load zpm-zsh/tmux-keys
to your.zshrc
with your other plugin - run
zgen save
If you use ZPM
- Add
zpm load zpm-zsh/tmux-keys
into your.zshrc
You can define simple commands for FN keys in ~/.tmux-keys.yaml
file.
File should have two base keys:
default_view
- default view to show.views
- list of defined views.
views
section contains views you want to show. Key is a view name.
Under view name key you should define next keys:
text
- text that will show on touchbar key.action
orview
-action
means executing some action that under is this key andview
means show view that is under this key
default_view: "Main"
views:
"Main":
- title: "←"
type: tmux
action: previous-window
color: green
flash: false
- title: "→"
type: tmux
action: next-window
color: green
flash: false
- type: view
action: System
color: violet
- type: view
action: Git
color: chartreuse
- type: view
action: Python
color: rose
- type: view
action: NPM
color: magenta
- type: view
action: ZPM
color: yellow
"Git":
- type: view
action: Main
- title: Git Status
type: exec
action: "git status"
- title: Git Branch
type: exec
action: git branch
"Python":
- type: view
action: Main
- text: Python Install
type: insert
action: "pip install "
- title: Python CLI
type: insert
action: "python"
"NPM":
- type: view
action: Main
- title: NPM list
type: exec
action: "npm ls"
- title: NPM Install
type: insert
action: "npm i "
- title: Dev
type: insert
action: "npm run dev"
color: cyan
ZPM:
- type: view
action: Main
- title: Upgrade Plugins
type: exec
action: "zpm upgrade"
- title: Clean Cache
type: exec
action: "zpm clean"
- title: Readme
type: insert
action: "zpm readme"
System:
- type: view
action: Main
- title_exec: _tmux_uname
type: popup
action: "neofetch"
color: yellow
- title_exec: _tmux_myip
type: popup
action: ip addr
color: red
- Change plugin name
If you have some proposals how to improve this boilerplate feel free to open issues and send pull requests!
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
Available as open source under the terms of the MIT License.