DEV Community

0 seconds of 1 minute, 48 secondsVolume 90%
Press shift question mark to access a list of keyboard shortcuts
00:00
00:00
01:48
 
Waylon Walker
Waylon Walker

Posted on β€’ Edited on β€’ Originally published at waylonwalker.com

2

tmux command line

So far we have covered a lot of tmux commands and how they map to keybindings but these same commands can be executed at the command line.

From the command line

Let's make a popup that displays our git status for 5s or until we close it manually. We can run the following command at the command line, in a split.

tmux display-popup -E -d '#{pane_current_path}' 'git status && sleep 5'
Enter fullscreen mode Exit fullscreen mode

From the tmux command line

Or we can open the tmux command line and run it from tmux's built in command line, which is very similar to bim EX mode. By default the tmux command line
can be opened with prefix+[.

display-popup -E -d '#{pane_current_path}' 'git status && sleep 5'
Enter fullscreen mode Exit fullscreen mode

πŸ—’οΈ note that the tmux command is called by default when inside of tmux.

Make it a keybinding

Finally we can make it a keybinding by adding a bind command ahead of our tmux command, then we can execute this in the tmux command line or add it to our
~/.tmux.conf.

bind s display-popup -E -d '#{pane_current_path}' 'git status && sleep 5'
Enter fullscreen mode Exit fullscreen mode

Be sure to check out the full youtube playlist and subscribe if you like it.

tmux playlist on youtub

Also check out this long form post for more about how I use tmux.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay