You are not logged in.

#51 2009-12-23 19:39:14

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Yes I have, and I've waited for 3 days without anyone knowing the answer... frustrating.

Offline

#52 2009-12-23 20:20:36

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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

#53 2009-12-24 00:11:29

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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

#54 2009-12-24 04:20:42

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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

#55 2009-12-25 22:12:26

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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

#56 2010-01-07 06:58:35

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#57 2010-01-13 23:56:01

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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

#58 2010-01-14 00:05:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#59 2010-01-25 14:10:03

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Any chance of tmux showing current $PWD? That would be great. I'm trying to unclutter my shell prompt..

Offline

#60 2010-01-26 08:20:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#61 2010-01-31 10:24:57

tzervo
Member
From: Athens
Registered: 2009-04-03
Posts: 86

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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

#62 2010-01-31 13:15:01

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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

#63 2010-02-01 06:34:13

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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

#64 2010-02-01 09:08:29

Dead Code
Member
Registered: 2009-01-18
Posts: 227

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

tmux is an angel in disguise. thanks to this thread. this will be very handy at work

Offline

#65 2010-02-01 21:39:20

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

JohannesSM64 wrote:

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 smile

@everyone: I appreciate the responses. These gave me something else to look into for other information.

Offline

#66 2010-02-05 21:24:38

s3kt0r
Member
Registered: 2009-01-20
Posts: 208

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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

#67 2010-02-17 00:56:05

phinze
Member
From: Iowa City, IA
Registered: 2009-11-10
Posts: 1
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Barrucadu wrote:

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:

`man tmux` wrote:

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

#68 2010-02-17 00:58:03

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

I finally made the switch as well... tmux can just do too many things that screen can't tongue


.:[My Blog] || [My GitHub]:.

Offline

#69 2010-02-17 06:59:17

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

Ghost1227 wrote:

I finally made the switch as well... tmux can just do too many things that screen can't tongue

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

#70 2010-02-17 07:13:24

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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. sad

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

#71 2010-02-17 07:24:12

humanzoo
Member
Registered: 2007-10-14
Posts: 28

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

dmz wrote:
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. sad

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

#72 2010-02-21 21:53:46

sime
Member
Registered: 2007-12-14
Posts: 96

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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:

2010-02-21-230635.png

2010-02-21-230642.png

2010-02-21-230648.png

2010-02-21-230657.png

Any ideas?

Last edited by sime (2010-02-21 23:02:01)

Offline

#73 2010-02-22 00:15:41

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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

#74 2010-02-22 09:59:32

sime
Member
Registered: 2007-12-14
Posts: 96

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

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

#75 2010-02-22 10:09:15

livibetter
Member
From: Taipei
Registered: 2008-05-14
Posts: 95
Website

Re: Anyone loving Tmux in place of Screen? Info/Tips etc. URLs I've found

sime wrote:

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

Board footer

Powered by FluxBB