My Command Line and Keybindings

March 16th, 2013

I spend a LOT of time in the terminal. If it wasn’t for the Internet, and Games I’d probably spend all of my time in the terminal. While unintuitive, and sometimes hard to read/process, they provide a powerful way to interact with your computer. I like shiny GUI’s, and use them all the time, however, they aren’t nearly as powerful as being able to manage data by CLI.

As I spend most of my time in the command line, I like to make my control of it as simple, effective, and smooth as possible. I also hate using my mouse. I find it to unavoidable for Web-Browsing at the moment (Yes, I know about Vimperator, I just haven’t had time to look into it), and most games require it, but for everything else I’m keyboard only. I love using the keyboard. It’s quicker, and MUCH more explicit.

There are 3 main “levels” I use to manage everything from the keyboard:




I’ve also got a lot of custom key-bindings in place to manage these 3 levels. My goal, is to use the mouse and extra keys (arrow, number-pad, volume-buttons, etc. ) little as possible. I want to be able to do everything from the Standard keyboard set. I don’t want my hands to leave the home-row if I can help it.

I find that when I stop typing, my mind gets distracted. Similar to where, in movies, the character is writing with a ink, dips his quill into the inkwell, and stops to think before going back to the page. I find myself easily distracted if I have to stop what I’m doing, even to grab the mouse, or hit the arrow-keys.

I’m going to show you how I manage each of these levels with just the basic keyboard. There are alternatives to each of these, and the way I have them all set up is oriented to MY work-flow. This is how it makes sense to me, and doesn’t necessarily make sense to anyone else. And even though I use these systems, I don’t use their defaults by any means. I use a lot of custom configurations which even expands on my unique setup. In fact, I kinda dread the idea of someone using my keyboard. I’m pretty sure they’d cry!

Since there are arguably 3 standard modifier keys (alt, ctrl, super), I try to manage each level with these keys as modifiers. I also tend towards vim-style bindings.

My key-bindings, let me show you them:

OS / Super-Key:

I use the Super (Windows key) to manage my OS level. I do this using Unity. I’m getting this out of the way. I know, it’s popular to hate on Unity, but I really like it. Let me explain why:

Unity is simple. It gets me to the basics of what I want and gets it’s ass out of the way. I generally want two different things running all the time: A Terminal, and a Web-Browser. There are a few things that I want outside of that, but 90% of my computer interaction falls withing those two programs. Unity does a good job of that. It pulls up the window, looks good full-screen, and lets me move back and forth between those workspaces using Super+hjkl. If I want to open a program, I just hit Super, and start typing, and my new program launches (Yes, I use Unity’s application lens. I do, however, remove the other lenses, because fuck advertisements in my window-manager). As I primarily use only two programs, this works great for me.

And when I have my applications up, and am working in them, Unity gets out of my way. It takes up less real-estate than most traditional window managers. It also does this with little interaction with the mouse. I can launch, move, maximize, close, etc. all without touching my mouse. And I use the Super key as my only modifier. This tells my computer to send all keystrokes to the “OS” level.

Here’s a video of me in action:

Window-Management / Alt-Key:

If you’ve never used Tmux, you should. Tmux is my Window manager. Technically, it’s a terminal multiplexer, the successor to screen, but I use it as though it were a window manager. I don’t really need to manage any windows, except for terminal’s “panes”. I prefer this because my applications are all run full-screen, and tied to a desktop. Tmux is a window-manager on steroids, and because it does so much more than just “organize” my windows, it helps me interact with them.

Tiling window managers allow you to use a lot more real-estate in your terminal. A good chunk of a standard terminal is wasted space. Tiling window managers make that much more manageable. I use tmux to make this work for me.

Compare this:

With this:

I don’t need 35 visible full-width lines, I need 10 in one window, 15 in another, 30 in another, etc. I often have 3+ windows open for the same project, and I don’t want to have to move back and forth between said windows. I want them all on my screen at once, and I want to switch back and forth between them without touching the mouse. Here’s where tmux works it’s magic. Feel free to follow along with my tmux.conf file!

tmux example video here:


Notice how I don’t have to use my mouse at all? Or any arrows unless I was out of tmux? My goal is to have everything bound by the standard keyboard and modifier keys. My modifier for tmux is Alt.


Application / Ctrl-Key:

For the last level, I use Ctrl as the modifier for the applications shortcuts. This isn’t very exciting, as every application has different uses, but I’ll show you what I can.


And there you go! I do pretty much all of my cli activity via standard keyboard and modifier keys. I still find myself using arrow-keys and the mouse, but I’m working on cleaning that up. If you have any suggestions on how to make my work-flow more efficient, let me know!

2 Responses to “My Command Line and Keybindings”

  1. Filco Das on March 30, 2013 12:16 pm

    I prefer to use the repeat function of the keyboard and then modulate it with a modifier key after the repeating function has commenced.

  2. CaptSpify on April 4, 2013 5:38 pm

    Repeat function? I don’t think I’ve ever seen that on a keyboard. Does that just repeat the key when held down or something?

Trackback URI | Comments RSS

Leave a Reply

Name (required)

Email (required)


Speak your mind

    Sponsored by AdSense