You are not logged in.
Yes I have, and I've waited for 3 days without anyone knowing the answer... frustrating.
Offline
If you mean you've not got an answer in this thread for sure the IRC would be a very good choice because you are very interested and the IRC channel is a likely best for answers quick. Often IRC does not get an answer though I think you would get one right away at #tmux. 3 days for one needed tip for working is a long time and reminds me of as recent 6 week learning time. One of many. hehehe. Me, I like it if only 3 days as I am not very skilled yet, and not much is critical, so it is more learning and learning and searching and searching. Maybe becoming expert this is the only way for someone like me :--) To keep going I ask myself what it would be like, for example, if tmux did not exist. For you is seems important and it's a power user thing and perhaps so maybe IRC is only way?
best wishes
Last edited by yvonney (2009-12-23 22:50:23)
Offline
Heh, what I ment is I've been idling and waiting for someone to answer my question in #tmux for those 3 days. People tried but none could really help me. Anyway, maybe someday...
Offline
oh!! I guess you found something very specialized maybe. I had that a while back. Did you notice the developer there, as he is there. brilliant. Maybe it's the season that people are not there so much.
Last edited by yvonney (2009-12-24 04:30:53)
Offline
Patched together a few configs I found, and took a little from my old .screenrc:
### Unbind existing tmux key bindings (except 0-9).
# Set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix
# Bind appropriate commands similar to screen.
# lockscreen ^X x
unbind ^X
bind ^X lock-server
unbind x
bind x lock-server
# screen ^C c
unbind ^C
bind ^C new-window
bind c
bind c new-window
# detach ^D d
unbind ^D
bind ^D detach
# displays *
unbind *
bind * list-clients
# next ^@ ^N sp n
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window
# title A
unbind A
bind A command-prompt "rename-window %%"
# other ^A
unbind ^A
bind ^A last-window
# prev ^H ^P p ^?
unbind ^H
bind ^H previous-window
unbind ^P
bind ^P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window
# windows ^W w
unbind ^W
bind ^W list-windows
unbind w
bind w list-windows
# quit \
unbind \
bind \ confirm-before "kill-server"
# kill K k
unbind K
bind K confirm-before "kill-window"
unbind k
bind k confirm-before "kill-window"
# redisplay ^L l
unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client
# split -v |
unbind |
bind | split-window
# :kB: focus up
unbind Tab
bind Tab down-pane
unbind BTab
bind BTab up-pane
# " windowlist -b
unbind '"'
bind '"' choose-window
# Global parameters
set -g status-bg black
set -g status-fg cyan
set-window-option -g window-status-current-attr bright
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-fg magenta
set-option -g set-titles off
setw -g aggressive-resize on
setw -g monitor-activity on
set-option status-right '%k:%M #[fg=white]%m/%d'
# Establish initial session
new -d -s0 -nncmpcpp 'exec ncmpcpp'
setw -t0:0 monitor-activity off
neww -d 'exec bash'
neww -d 'exec bash'
neww -d 'exec bash'
neww -d -nhtop 'exec htop'
neww -d -nsyslog 'exec sudo inotail -f -n 30 /var/log/everything.log'
neww -d -nirssi 'exec irssi'
Really enjoying this over screen so far. Also using the same trick to reattach to the same session as with screen:
function t {
if [[ `tmux -L Main ls | grep windows` ]]; then
tmux -L Main a
else
tmux -L Main
fi
}
Offline
I've been trying for the last couple of hours to remap the prefix key to Caps_Lock: I have tried all manner of combinations, but for each one I get back:
/home/jason/.tmux.conf: unknown key: Caps_Lock at line 16
Obviously, it is a known key, but tmux doesn't recognize it. Anyone have any insights?
Offline
What does running 'xev' call the key?
The dev's on the IRC channel as usual right now.
I get all kinds of things happening in most programs due to my lack of deep enough skill etc.
Mentioning that as an apology 8-) if something like the TERM setting etc. is just too dumb to mention.
http://tmux.cvs.sourceforge.net/viewvc/ … x/tmux/FAQ
Last edited by yvonney (2010-01-13 23:56:33)
Offline
Thanks yvonney. xev calls it 'Caps_Lock' and I have tried all the different options. The man page talks about 'special keys' and omits Caps Lock so my suspicion is that tmux just doesn't see it...
Offline
Any chance of tmux showing current $PWD? That would be great. I'm trying to unclutter my shell prompt..
Offline
This works in the status bar:
#[fg=colour]#(pwd )
#edit Oops - only until you change directory...:P
Last edited by jasonwryan (2010-01-26 08:22:09)
Offline
I remember doing that in screen with $PROMPT_COMMAND and the xterm title. I have switched to screen for some time now and lost this config, but this could be a start for someone... The default also prints the current directory but truncates it. I tried playing with status-right-length but did not succeed. If we could find the default status bar?...
Anyway, even if we succeed in this, what about multiple panes, this could be a mess!
EDIT
I took the status bar from kitty and changed that a bit. See if it suits you. Also it changes automatically when you change panes, which is very convenient.
# Status Bar
set-option -g status-justify centre
set-option -g status-bg black
set-option -g status-fg white
set-option -g status-interval 5
set-option -g status-left-length 50
set-option -g status-left '#[fg=green] #T#[default]'
set-option -g status-right '#[fg=green]%k:%M #[fg=green]%a,%d-%b#[default] '
Last edited by tzervo (2010-01-31 10:43:03)
Offline
This works here (zsh):
precmd() {print -Pn "\e]2;[%2~]\a"}
Then show #T in your tmux statusbar.
Unfortunately, it doesn't support unicode dir names, even with tmux' utf8 settings on.
Offline
There's some very very recent tmux within tmux enhancements I vaguely understood. I subscribe to the mail-list so that's where I read it, and lots more too. And wow, there's sure a lot of tips and help on the #tmux channel in IRC. Great to read all the power-user comments here. thanks.
Last edited by yvonney (2010-02-01 09:52:33)
Offline
tmux is an angel in disguise. thanks to this thread. this will be very handy at work
Offline
This works here (zsh):
precmd() {print -Pn "\e]2;[%2~]\a"}
Then show #T in your tmux statusbar.
Unfortunately, it doesn't support unicode dir names, even with tmux' utf8 settings on.
This works great; just what I was looking for. Thanks
@everyone: I appreciate the responses. These gave me something else to look into for other information.
Offline
Big thanks to everyone, for sharing tmux knowledge. Leaving screen behind, I'm afraid.
box1: Arch (linux-3.17-rc5)
box2: Gentoo (linux-3.17-rc5)
wm: subtle
Offline
tmux looks nice, I'm still working on getting it configured to my liking, and I wish I new how to reload the configuration without restarting the server, but it's nice :)
Asking in #tmux helped me figure this one out. The answer lies in the `source-file` command:
source-file path (alias: source)
Execute commands from path.
So you can either do something like `[prefix] : source-file ~/.tmux.conf` whenever you want to reload the config, or you can bind that to a key with something like `bind r source-file ~/.tmux.conf` in your config.
Offline
I finally made the switch as well... tmux can just do too many things that screen can't
From what I've seen, it can only do a couple of things:
1. vertical splits, but screen can do that too with a patch
2. upon starting, the server is automatically created.
What are the other things you're referring to?
Offline
How do a man use that nifty "screen -x" thing in tmux? I want to attach to the same session in several windows on my desktop, and from what I've read 'tmux attach' should do it... though when I do that and switch window in attached #2, the window also changes in attached #1, which seems pointless.
Am I the only single person who can't live without this? How do you guys manage being attached to the same session on several places otherwise?
And yes, I've read the faq where they state '[...] similar to screen -x', but that doesn't work at all.
Offline
dmz wrote:How do a man use that nifty "screen -x" thing in tmux? I want to attach to the same session in several windows on my desktop, and from what I've read 'tmux attach' should do it... though when I do that and switch window in attached #2, the window also changes in attached #1, which seems pointless.
Am I the only single person who can't live without this? How do you guys manage being attached to the same session on several places otherwise?
And yes, I've read the faq where they state '[...] similar to screen -x', but that doesn't work at all.
Personally, I've always just been able to connect to the same session from multiple locations doing nothing more than "tmux a -t 0" ('0' being the target session's name as shown in "tmux ls"). This has worked for me in Arch as well as OSX, so I don't think it needs any special config options.
Offline
Hi,
I have this weird issue with tmux and 256 colors in urxvt. Everything works except a few odd cases where color messes up or when e.g. something is being displayed in bold whereas outside tmux it is alright. It is weird as I am seeing a lot of people using tmux with rxvt-unicode-256color without issues.
This is in my tmux.conf:
set -g default-terminal screen-256color
A couple of screenshots showing the state out/in of tmux:
Any ideas?
Last edited by sime (2010-02-21 23:02:01)
Offline
Not sure if it matters but why do you tell it to be 256? If your terminal supports 256 then tmux will detect it automatically. When I echo $TERM it just shows "screen", not "screen-256color" even though I have 256 colors (and using rxvt-unicode-256color). Again, I don't know if this has any bearing on the situation but I just found it curious. Try not using a .tmux.conf and see what happens-- unless you already have, in which case does the same thing happen?
Offline
No matter which combination I try, I get the same result. I used screen-256color in tmux as per the tmux FAQ. If I remove it, I don't get colors at all in vim. If I add t_Co=256 in vim, I get them without any config in tmux. I don't have $TERM specified in .bashrc. I tried specifying various values in $TERM, with the same result. Basically I tried every combination you could think of.
But it is not specific to vim. 256colors.pl script clearly shows the issue. I think this has something to do with different terminfo/termcap/whatever of urxvt terminal and tmux.
Offline
No matter which combination I try, I get the same result. I used screen-256color in tmux as per the tmux FAQ. If I remove it, I don't get colors at all in vim. If I add t_Co=256 in vim, I get them without any config in tmux. I don't have $TERM specified in .bashrc. I tried specifying various values in $TERM, with the same result. Basically I tried every combination you could think of.
But it is not specific to vim. 256colors.pl script clearly shows the issue. I think this has something to do with different terminfo/termcap/whatever of urxvt terminal and tmux.
I always run `tmux -2` to force 256 colors, keep $TERM=rxvt-unicode and I have t_Co=256 in vim, don't know if this would be helpful. Maybe the problem is the colorscheme? I don't have that one so I couldn't test.
Last edited by livibetter (2010-02-22 10:09:28)
Offline