5 ms·
If any screen folks are trying out tmux, here is my .tmux.conf assembled to have screen like bindings. https://github.com/rahulkmr/dotfiles/blob/master/.tmux.c
by irahul 14y ago
If any screen folks are trying out tmux, here is my .tmux.conf assembled to have screen like bindings.
https://github.com/rahulkmr/dotfiles/blob/master/.tmux.conf https://github.com/rahulkmr/dotfiles/blob/master/.tmux.conf
C-a c new window
C-a | vertical split
C-a S horizontal split
etc etc.
As far as copy paste goes, I use this https://wiki.archlinux.org/index.php/Tmux#ICCCM_Selection_Integration https://wiki.archlinux.org/index.php/Tmux#ICCCM_Selection_In... C-a C-c copies tmux buffer to clipboard, C-a C-v sets tmux buffer to clipboard and pastes it(it's already in the configs; just putting it here).
As far as terminal emulators go, I have tried out a lot of them(gnome-terminal, konsole, urxvt, xterm) and finally settled on terminator. gnome-terminal will keep messing with my readline settings(alt opens up the menu), urxvt won't let me copy-paste the clipboard...Terminator is no frills - you can graphically set the preferences, or have a config file; it lets you copy paste to and from the clipboard; you can configure it to copy the x-selection to clipboard(middle click to paste - just not it). For anyone looking for a terminal emulator on linux(or whatever other platforms it runs on), I highly recommend it.
- rgrau 14y agoLong time screen user here, and with all the screen-like tmux configs I always miss one thing. When I create a couple of windows and I split one of those into 2 panes, I couldn't manage to move panes from one window to another. In screen, apps you run are absolutely detatched from any visual configuration, and everything is reachable from everywhere. It's a bit difficult to explain, but I'm sure some screen users will understand that situation. That is what also got me hooked to ratpoison[1] wm. [1] http://ratpoison.nongnu.org/ http://ratpoison.nongnu.org/
- bphogan 14y agoI covered that in the tmux book briefly - you want the join-pane and break-pane commands. By default, prefix ! will break a pane into a new window, and join-pane will let you move a pane to a different window - you have to specify the window number and the pane. Does that help?
- rgrau 14y agoThanks for the suggestions! Yeah, this kind of works, but I need to do maybe too many steps to get what I want, maybe with some tmux scripting fu I'd make it work. The main issue is that I can open my apps always in the same order, so I know wich window number it has, then, joining-pane by window number would be doable. the problem is that after breaking and joining a few times, numbers may get scrambled. Another issue is that if an app is in a pane, it looses the identity, and cannot be joined to another window alone. I'm thinking on doing something in the lines of: WINDOW=`tmux list-windows | grep active | sed -e 's/^\(.\).*/\1'` choose-window "join-pane -s $WINDOW -t %%" But for the moment, no luck. Will keep trying :)
- q_revert 14y agoI had similar issues to yourself when migrating from screen.. the notion of 'panes' ~= 'windows' doesn't really work in some sense.. in screen when you split you initiate an empty 'pane' (if that makes sense).. and then you put some content into it.. you can also move the 'windows' around to wherever you want.. but all within a single 'pane'-buffer however, in tmux.. what you have is like a whole series of pane containers.. these are called windows.. now, each window can have a name.. whilst a pane on its own does not.. you can fortunately 'join' and 'send' panes between windows.. also, another thing I tend to find useful is the ability to 'break' a 'pane' out've its current window and devote a full window to it.. the .tmux.conf bits you need are bind-key 'j' command-prompt -p "join pane from:" "join-pane -s '%%'" bind-key '@' command-prompt -p "send pane to:" "join-pane -t ':%%'" whilst :break-pane (or ^b ! by default) allows you to send a 'pane' away to its own window.. (apologies it that sounds awfully convoluted/confusing)
- rgrau 14y agoThat's what I was thinking of :). Thanks! Maybe that's as far as we can get by now with it. Luckily tmux is heavily developed so there's hope for that workflow being easily usable in the future.