My desktop setup

    My desktop setup

    It's been 5 years since I posted anything related to the kinds of tools and apps I'm using. It's also been a year and a half since I bashed Linux last time. While the more I use computers, the more I hate them (and not just in the way most people "don't like computer", but because I learn more and more why things are bad and just how truly awful they are), I've come to a fairly stable setup for my home desktops, with which I am fairly happy.

    As mentioned in my last Linux post, I've started using ArchLinux. It's fairly stable, except for when I try to upgrade the whole system once every 2-3 months. Invariably some packages are completely changed and don't clean up nicely after them. Luckily, Googling for the problem has so far always turned up a result fairly quickly. But on the other hand, I've always had the option to get the most recent version of all my programs, so that's nice.

    i3 Window Manager

    I'm not using a desktop en­vi­ron­ment, instead I am using a tiling window manager, called i3. It took me a while to get used to it, it has some quirks, but it makes life much easier.

    I have it set up so that on the first workspace I have my terminal and on the second workspace I have Chrome. These two are fixed, and on the others I have whatever I need (which doesn't happen to often). At work I actually have a similar setup, except I have a separate workspace with Chrome for each project I'm working on.

    Having this fixed setup helps me know: I want to do stuff, I need to press "Win" (Meta) + 1. I want to browse stuff or search for something, I press "Win" + 2. Because of this I never get lost among a bazilion windows and I know where things are.

    You can also get a status bar that displays useful things like RAM usage, IP address, CPU tem­per­a­ture, CPU load, date and time and audio volume, by using i3status.

    I use the standard i3 con­fig­u­ra­tion, with only a couple of changes:

    # To set a random background picture on each login.
    exec feh --recursive --randomize --bg-max ~/Pictures
    # To be able to lock my computer. Needs i3lock.
    bindsym Mod1+l exec i3lock
    # Forces Chrome and Terminal to be in the correct workspace, to not have 
    # a border and to start on login.
    for_window [class="^google-chrome$"] border none
    for_window [class="^gnome-terminal-server$"] border none
    assign [class="^gnome-terminal-server$"] 1
    assign [class="^google-chrome$"] 2
    exec google-chrome-stable
    exec gnome-terminal 
    # I had to Google this myself: power management. Go to standby after 300
    # seconds, suspend after 600 and turn after 900.
    exec xset dpms 300 600 900 &
    # Volume control. 
    bind mod1+Up exec amixer sset 'Master' 5%+ 
    bind mod1+Down exec amixer sset 'Master' 5%-
    Tmux

    For my terminal I use a terminal mul­ti­plex­er called tmux. Tmux creates multiple terminal sessions inside a single terminal window and enables you to switch between them easily. You can have multiple tabs or split the terminal screen however you want.

    The "special sauce" of my tmux setup is that it's integrated with vim. I use the vim-tmux-navigator plugin so that I can use the same commands to navigate between vim splits and tmux panes. This means that I press CTRL-L and I go to the right, even if that is another vim split or another tmux pane. Again, this means uniformity in how I handle navigation, which means less thinking on how to do stuff, so I'm more free to think what I must do. At work I have some hacks that enable me to do the same for i3, so that I can use the same set of keys to move one to the left, but because I almost never have two different ap­pli­ca­tions open on the same workspace, I don't really use it that much.

    fish

    The last thing: fish. I use the fish shell because it's a modern thing. It's not encumbered by decades of legacy shell scripts. This does mean that oc­ca­sion­al­ly stuff that I copy-paste from the Internet doesn't work out of the box, but that's probably a good thing, because it forces me to at least try to understand what I'm doing. One of the things that I love most about it is how it au­to­mat­i­cal­ly recalls the last command you ran based on the prefix of what you typed. You don't even have to go press up to go into history, it con­tin­u­ous­ly does that for you, showing a preview of what command fits. And it's dependent on which folder you are in, so when I start typing "a" in my blog's root folder, it shows me "acr_serve" (that's how I develop locally), while in my home folder it shows "a­pachectl" (to start an Apache server).

    Then of course, you can configure fish from a web browser, so you can see the colors you are setting. It has full 24 bit support. It has super smart completion system, which is integrated with git for example. When I type "git add " it completes only with files that are considered modified by git. It can also parse man pages to enable command line flag au­to­com­ple­tions. And of course, syntax is just much nicer than with bash or zsh. Much, much, much nicer.

    So there you go, my first post in which I'm not com­plain­ing horribly about Linux. I'm glad that I finally found an en­vi­ron­ment where I'm content and where I can be quite productive. If anyone has any more cool tools, please share them in the comments.