8 ms·
I discovered i3 and the concept of tiling window managers a few years ago and have never looked back. A new terminal or browser window is always a keystroke awa
by andrewstuart2 11y ago
I discovered i3 and the concept of tiling window managers a few years ago and have never looked back. A new terminal or browser window is always a keystroke away, as is swapping between "pages" of windows. It's all navigable completely by keyboard, so my vim/i3/dmenu editing environment has me very rarely touching the mouse. As an added bonus I get to use every part of the screen by default. No wasted space.
It's also pretty trivial to get some nice window arrangements so that I can quickly move to relevant parts of the code for whatever I'm working on.
I guess the major trade-off is that there aren't any menus for accessing functionality, but I personally consider that a win because I end up being forced to learn how to manage everything at the lowest config level, usually editing text files. This makes it vastly easier to script things when I realize I've been making the same changes over and over.
So if you like tmux and you're on Linux, I'd strongly recommend giving i3, awesome, or some other TWM a try.
- howeyc 11y agoIf you're really looking to do something strange, you could ditch the mouse all togeter. That's what I've done on one of my laptops. For some reason when i first set it up the touchpad didn't work, and need some driver or something. Instead of fixing it like a normal person, I said to me self "just go with it". I found a browser (qutebrowser) that works by using just the keyboard, and use tmux/vim and other terminal apps for everything else. The scrolling in the browser highlighted weird stuff (since the mouse cursor was always in the middle of the screen), but once I found a way to set the cursor to the top-left of the screen when X starts (a command in .xinitrc), no more issue. I still have a minor issue every once and while. Sometimes i'll browse around and see a code snippit, or just some text I'd like to copy-paste, or a link with a url I'd like to copy and I'm not sure how. That's really been my only downside of going mouse-free.
- branchless 11y agoI use keyboard as much as possible but find for things like flash one needs to click. Would you mind sharing your xinit snippit to set cursor location? BTW my browsing experience with keyboard only is made largely painless by chrome with vimium. You can also select and yank text with this.
- tetraodonpuffer 11y agonot the OP, but xdotool mousemove x y should work
- nazri1 11y agoCheckout keynav, from the same author of xdotool, Jordan Sissel, pretty cool dude.
- dave2000 11y agoWhy might someone need flash? (That was literally the last thing i was expecting in a discussion on HN about why someone might need a mouse!)
- rjayatilleka 11y agoSome sites only use Flash like Crunchyroll or Quia for DRM purposes (and lack of technical chops)
- farrelle25 11y agoOn Lubuntu: When I get stuck on Flash I use the following script bound to a key (Ctrl+shift+l in my case): #!/bin/bash # Activate Firefox window wmctrl -a "Mozilla Firefox" # Move cursor to specified position xdotool mousemove 250 50 # Send a mouse click (left click) xdotool click --repeat 2 1
- baldfat 11y agoThat's what i3 does as the previous poster showed. My i3 is 100% mouse free. dmenu is the launcher <ctl d> type name <return> everything with a tiled window manager is first class short cuts. Browser use a plug in with vim bindings and everything is a short cut also :) > just some text I'd like to copy-paste command line to browser - xclip is your friend to go from browser to command line - <ctl c> text in browser then <shift insert> to console (Normally)
- platform 11y agoThis very useful info for me as well. I have periodic pains in my neck when using mouse for too much. I have been switching hands. But still. I much prefer emacs-like interface where I can operate with keyboard only. And I like shells because I can connect from anywhere to the server where I do most dev and testing. However, I recently started doing android development and and I am forced to leave my emacs and shells. One reason is the running the emulator. It cannot run on remote x window sessions and I have to use mouse to access it. The other reason is AndroidStudio. Although I use emacs with flymaker, as a newcomer to Android -- I find Android Studio's tools to do code refactoring, on the fly suggestions, detection of new versions of updates, very useful.
- thedaemon 11y ago"Mouse shoulder" is the bane of my existence. I also swap hands and try to use keyboard shortcuts as much as possible.
- kohlerm 11y agohow do you copy from a terminal buffer to another window? tmux allows selection without a mouse, but I agree with others that tmux tries to do too many things at the same time and I would therefore like to have a simple solution for this.
- tingol 11y agoI go mostly mouseless by choice. Since I can move the mouse I have no need for the pointer lock but I use unclutter a small utility that makes the mouse disappear when it's not used for a time. For copying, qutebrowser has caret mode (I believe the hotkey is 'V') that lets you move the pointer with the keyboard and visually select and copy text as you would with vim. Copying url's is done with the 'y' hotkey and a terminal emulator I use (termite) has a hotkey for finding and opening urls from the terminal.
- BooneJS 11y agoI use tmux as a persistent terminal multiplexor on a higher-than-preferred latency connection. I'm worried that i3 over VNC would be even slower, but I'm willing to give it a shot. Do you use i3 on a local or a remote Linux machine?
- baldfat 11y agoi3 is your tiled window manager. You just open your terminal and connect on ssh as usual. i3 wouldn't have anything to do with your connection to the ssh session.
- manveru 11y agoI recommend you check out https://mosh.mit.edu/ https://mosh.mit.edu/ to speed up the felt latency of the connection.
- orik 11y agoI'd never heard of mosh before but this is just what I've been looking for. here's the previous discussion on hn. https://news.ycombinator.com/item?id=3819382 https://news.ycombinator.com/item?id=3819382
- aidenn0 11y agoIt depends on whether or not vnc is bandwidth limited on your link. A high bandwidth, high-latency connection shouldn't feel significanlty different over vnc or a terminal, but if your high-latency is due to being bandwith-limited, vnc will be much worse.
- lisivka 11y agoYou can open/switch between terminals using keystroke in other managers too. It's called "toggle-or-exec"/"jump-or-exec" in Sawfish (Gnome 1 WM). I implemented shell script for that functionality in other WM's: https://github.com/vlisivka/linux-tools/blob/master/scripts/gui/switch-or-exec https://github.com/vlisivka/linux-tools/blob/master/scripts/...
- andrewstuart2 11y agoThe benefit of i3, though, is that a terminal is just another window, and the direct navigation happens between windows. I can jump directly from a terminal to a browser or IDE because the construct is the same for all of them.
- bphogan 11y agoAgree 100%. And I wrote a book on tmux. I would love something like i3 on my Mac. I can't give up OSX because I need its accessibility features because I'm low vision. But if you're on Linux and you're not using i3, gosh, you have to give it a try.
- microcolonel 11y agoI'm interested in accessibility; what accessibility features of OS X are most valuable to you? Where are these things lacking or unavailable on linux?
- bphogan 11y agoOSX has an unbeatable ability to zoom the full screen without losing mouse focus. No other OS I've tried supports this. Windows Magnifier comes close but it doesn't let me set focus to follow the mouse and it's awkward. I use the full screen zoom and run Windows apps in virtualization. That's how important it is to me. Ubuntu tried to make this work with Compiz a few years ago, and it was terrible as well. Slow and jerky. But this is an absolute necessity for a low vision user like me. Got a Mac for my dad and he also can't live without it now.
- microcolonel 11y agoHopefully with Wayland coming around, this will all be simpler. The reference Wayland compositor (Weston) has a built in fullscreen zoom feature which is basically identical to OS X's (hold down key, scroll). In fact, the default implementation in Weston is, better in my opinion, and also enabled by default. Instead of having to go to the edge of the screen to move the region, it moves the region with the cursor in the same position relative to the screen as the region. Of course, for those with dyslexia or some other psychovisual disability; it may be worthwhile to have an option to go the OS X route. Thanks for the input, I'll maybe put it on the GNOME bugzilla if it isn't already there. :-)
- bphogan 11y ago
- st3v3r 11y agoWhat about saving sessions? With Tmux/Screen, when I close the window, the session can be saved, meaning when I come back tomorrow, everything is right where I left it.
- nilkn 11y agoI think you might be missing half of what tmux does. The tiling/multiplexing part is one half. The other half is the fact that it spawns a session that can run persistently in the background and which you can connect to from anywhere. You can also disconnect, let it sit there for a week, come back and it'll still be there exactly as you left it. I use tmux as my primary "IDE", and it's absolutely indispensable being able to connect to my tmux session from any computer anywhere. I actually run tmux on one remote machine, and from my tmux session I ssh to 15+ other machines. I also use it as a tiling window manager, and I make full use of that aspect of it by generally maximizing my terminal so that it fills up a standard 27" 1440p monitor. If I'm working from a small laptop, it's a little less ideal, but all I have to do is select the right window and then use tmux's built-in zoom feature to maximize that one window. It works beautifully overall. i3 is fantastic, but it can't replace tmux if tmux is being used to the full extent of its capabilities.
- adrusi 11y agoYeah, tmux has two functions, and that's my (and others') problem with it. Instead of doing one thing well, it does two things poorly. It's not a very good window manager; when you use tmux you can't easily put a graphical window between two terminal screens. Even as a text-mode-only window manager it's lacking. It has poor mouse support, and every command you send to it has to first be announced with a prefix keystroke. It's also not very good at keeping programs running. It can't survive a reboot, for example. It's possible to do that, and there's stable software that does it. Generally any program that can handle a suspend and resume can handle being persisted across reboots. Not that I have a great suggestion for alternatives — I'm not really in the market right now. I use i3 for window management (not 100% satisfied, but it's definitely high quality software). I don't often run long-lived processes in ssh sessions these days. When I do, I use tmux, which is fine, I guess, if I don't have to do it often.
- agumonkey 11y agoOther people thought that way I believe, hence the existence of dtach and dvtm. The nice argument is that by decoupling the two functionalities, you get two very tiny binaries instead of one quite ~larger tmux.
- alfiedotwtf 11y agoI have to say, I'm a happy i3 AND tmux user. Tmux for persistance, and i3 for x11 windows
- coldtea 11y agoTiling is the least useful thing that tmux does. Event the name (tmux) implies that it's core competency is something else entirely -- multiple sessions, kept open, switching between them, persisting, etc.
- fideloper 11y agoExactly this. I open tmux on remote connections, maybe to panel (Altho scrolling through output in tmux sucks), but definitely in case I lose my connection while running a longer process. My other favorite use is screen sharing without screen sharing (2 people connecting to the same session), super helpful when taking control over screens share is too slow due to network lag.
- adrusi 11y agoI'd agree that tiling is the less useful function, but the name refers to the tiling. Tmux is short for Terminal Multiplexer, in other words, it's a program that turns one terminal into multiple terminals, by way of tiling.
- gkya 11y agohttp://www.collinsdictionary.com/dictionary/english/multiplexer http://www.collinsdictionary.com/dictionary/english/multiple... multiplexer or multiplexor (ˈmʌltɪˌplɛksə) noun (computing) a device that enables the simultaneous transmission of several messages or signals over one communications channel
- adrusi 11y agoThat definition doesn't apply any better to the attach/detach functionality of tmux than the window management functionality, so you're going to have to use a more flexible definition than that for the term to ever apply to tmux. A USB hub multiplexes a USB port by making it so that multiple USB devices can be connected to the same port and all pretend that they're the only ones connected to it. The Ogg container format multiplexes a bitstream so that multiple timecoded media streams can be streamed through the same data channel and pretend that they're the only things going through it. An preemptive-multitasking OS kernel multiplexes the CPU so that multiple processes can run on the cpu and all pretend that they're the only ones on it A terminal multiplexer multiplexes the terminal so that multiple processes can output to the terminal and all pretend that they're the only ones using it. That describes the window management functions of tmux.
- girzel 11y agoFor some reason I've ended up using a combination of i3, tmux, and Emacs window splitting, all at the same time. So three different programs that do something like window management, each with its own set of behaviors and keystrokes. This sounds like it should be a nightmare, but it's actually not that bad. Others have mentioned the additional benefits of tmux beyond window management, but I also find that, much as I like i3, it's actually pretty hard to quickly and intuitively create, manipulate and delete window splits. Ie, top-bottom, side-by-side, rotate splits, stuff like that. The containers thing just seems unweildy, and just getting windows into the right containers always feels like a fight. I used to use StumpWM, and while that had its own problems, you could bang things next to each other for a second without having to really think about it. Part of it is probably that I end up very rarely needing top-level window splitting, so I never get used to the keybindings. Splitting in the terminal and in Emacs takes care of most of my needs; I want to see different programs side by side no more than once every few weeks. PS: There's a program called Sway that's basically a Wayland fork of i3. I keep it updated on my machine, and every once in a while amuse myself by using `startsway' instead of `startx'. It's coming along nicely, and you get that nice feeling of being retro and advanced at the same time. http://swaywm.org/ http://swaywm.org/
- exDM69 11y ago> So three different programs that do something like window management, each with its own set of behaviors and keystrokes. I've found this a bit painful too but it gets better if you configure your window management keys with similar bindings. But I still do find it a bit annoying to have three levels of windowing (vim, tmux, bspwm) when I'd be happy with just one.
- SilverSurfer972 11y agoI share the same feeling (as for the splitting feature alone). I also love the minimalism and the fact that there is no screen estate waste(1 windows takes 100% of the screen, 2 takes 50% each, etc...). Since I switched to i3 I completely stopped to use tmux. /r/unixporn is full of i3 screenshot and config to learn from i would encourage new users to look at it.
- wtbob 11y ago> So if you like tmux and you're on Linux, I'd strongly recommend giving i3, awesome, or some other TWM a try. I've heard great things about i3 & awesome, but haven't used them myself. I've been using stumpwm for several years now, and I just love it. There's nothing like being able to connect to one's WM in a SLIME session and recompile portions of it while it's running!
- cuillevel3 11y agoI never understood 'tmux as a window manager'. Well ok if you're not on Linux or working remotely it makes sense.
- cyphar 11y agoI use i3 for tiling graphical windows, but I use tmux for tiling and multiplexing terminal panes. The reason I prefer using tmux for terminal stuff is so that I only ever need one terminal window open, I can use the same tool when connected to remote machines with only one connection, etc.