Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

New answers tagged

1 vote

Run a tmux new session with cron, then run a command

Use /usr/bin/tmux new-session -d -s ENTER and for good measure follow it up with /usr/bin/tmux detach -s ENTER. So your script would look like: /usr/bin/pkill -9 java /usr/bin/tmux new-session -d -...
user avatar
  • 966
-1 votes

How to change the tmux working directory with a shell command

So this is somewhat non-intuitive, but tmux allows you to call attach-session while inside a session. And attach-session takes -c to set working directory. We can combine the two to (re-)attach to the ...
user avatar
  • 189
0 votes
Accepted

tmux doesn't uninstall plugin

You're describing your config changes as not having an effect... and sourcing your .tmux.conf should do that but if it's not then you might need to close (kill, not detach) the sessions, and then ...
user avatar
  • 1,004
2 votes

How to automate the process to open 3 shells and run 3 commands?

Not an answer to your main question (I'm a screen user myself, never felt the need to move to tmux), but a comment on: However, since it is time consuming, so I wrote a shell script to do: cd foo/bar ...
user avatar
0 votes

Reload of tmux config not unbinding keys (bind-key is cumulative)

As of latest tmux (>=3.2), bringing together everything in these answers, true reloading can be done programmatically without having to manage a separate tmux.reset.conf. Just use this "...
user avatar
  • 111
0 votes

tmux, wayland and clipboard

I followed this tutorial https://www.rockyourcode.com/copy-and-paste-in-tmux/ They introduce a configuration of clipboard with tmux without plugin. It works for me ClipboardIndicator and Wayland. It ...
user avatar
  • 1
0 votes
Accepted

TMUX: confirm-before option for kill-session command

we know there is a confirm-before option for kill-window. No, confirm-before is not an option for kill-window. It's a tmux command like kill-window. The difference is confirm-before upon confirmation ...
user avatar
-1 votes

Set tmux status line color based on hostname

.tmux.conf: run "tmux set -g status-bg $(hostname -s | hexdump -e '\"0x%02x\"' | cut -c-4 | xargs printf 'colour%d')"
user avatar
0 votes

Why is tmux starting slower and slower over time?

For me, that was a problem with the following line in my .zprofile: echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/gbajson/.zprofile After a few weeks I had ...
user avatar
  • 101
-1 votes

Set tmux status line color based on hostname

I use this. Maybe the hexdump format string can make the the cut part obsolete but I didn't figure out how. .tmux.conf: run "tmux set -g status-bg $(hostname -s | hexdump -e '\"#%06x\"' ...
user avatar
  • 1
2 votes
Accepted

Why can't I use Ctrl+` as prefix in tmux?

As noted by @Kusalananda in the comments (and this mostly unrelated Stack Overflow answer), Ctrl+` typically returns an ASCII NUL/0 in most terminals. Ctrl+Space and (very oddly) Ctrl+2 do the same. @...
user avatar
  • 2,290
0 votes

How can I clear tmux history in all panes

tmux list-panes -s | sed 's/:.*//g' | xargs -n 1 tmux clear-history -t This will clear all panes on all windows.
user avatar

Top 50 recent answers are included