Skip to content
Diogo on GitHub Diogo on Linkedin Diogo on Twitter Email

My work computer setup

OS

Whichever latest LTS version of Ubuntu.

Terminal

I use Terminator as my terminal.

sudo apt install terminator

Shell

zsh is my preferred shell. ohmyzsh manages its configuration.

sudo apt install zsh

History

I use zsh-peco-history to improve shell history search using Ctrl+R, with the following configuration:

# .zshrc

HISTSIZE=10000000
SAVEHIST=10000000

setopt EXTENDED_HISTORY          # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY        # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY             # Share history between all sessions.
setopt HIST_EXPIRE_DUPS_FIRST    # Expire duplicate entries first when trimming history.
setopt HIST_IGNORE_DUPS          # Don't record an entry that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS      # Delete old recorded entry if new entry is a duplicate.
setopt HIST_FIND_NO_DUPS         # Do not display a line previously found.
setopt HIST_IGNORE_SPACE         # Don't record an entry starting with a space.
setopt HIST_SAVE_NO_DUPS         # Don't write duplicate entries in the history file.
setopt HIST_REDUCE_BLANKS        # Remove superfluous blanks before recording entry.

Aliases

I make heavy use of aliases on my ~/.zshrc file to help me navigate to common directories or open projects on the appropriate IDE. Some examples:

export EDITOR='vim'

# .zshrc
alias ezshrc="$EDITOR $HOME/.zshrc"
alias szshrc="source $HOME/.zshrc"

# projects
export PROJECTS_HOME="$HOME/projects"
export AOC="$PROJECTS_HOME/aoc-2022"

alias aoc="cd $AOC"
alias iaoc="launch_rubymine $AOC"

# functions
launch_rubymine() {
        nohup $HOME/bin/rubymine $1 > /dev/null 2>&1 &
}

I can type ezshrc from anywhere in my terminal to edit my zsh config file and then szshrc to source it.

I can also type aoc to access the root of my Advent of Code project or iaoc to open the project in RubyMine.

Window Manager

i3wm is my preferred tiling window manager. Regolith provides a bunch of sane defaults for i3 on Ubuntu, so that's I use in order to simplify my setup.

Regolith install instructions.

Regolith Config

# ~/.config/regolith3/i3/config.d/40_workspace-config

# Custom Bindings
bindsym $mod+m move workspace to output left
bindsym Ctrl+Shift+Print exec --no-startup-id maim --select | xclip -selection clipboard -t image/png

# Workspace assignment

## Notion Chromium App
assign [instance="crx_jpebhcbfinglhpgbfclggnfppgbkklnh"] $ws8

assign [class="thunderbird"] $ws1
assign [class="Slack"] $ws3
assign [class="Google-chrome"] $ws4
assign [class="jetbrains-rubymine"] $ws5
assign [class="jetbrains-idea"] $ws6
assign [class="jetbrains-datagrip"] $ws7

# workaround for spotify
for_window [class="Spotify"] move container to workspace $ws9
# ~/.config/regolith3/Xresources

gtk.font_name: Ubuntu
gtk.monospace_font_name: Ubuntu Mono
i3-wm.font: Ubuntu Mono

wm.workspace.01.name: 1: 1: Email
wm.workspace.02.name: 2: 2: Terminal
wm.workspace.03.name: 3: 3: Slack
wm.workspace.04.name: 4: 4: Chrome
wm.workspace.05.name: 5: 5: IntelliJ
wm.workspace.06.name: 6: 6: RubyMine
wm.workspace.07.name: 7: 7: Datagrip
wm.workspace.08.name: 8: 8: Notion
wm.workspace.09.name: 9: 9: Spotify
wm.workspace.10.name: 10: 10:
wm.workspace.11.name: 11: 11:
wm.workspace.12.name: 12: 12:
wm.workspace.13.name: 13: 13:
wm.workspace.14.name: 14: 14:
wm.workspace.15.name: 15: 15:
wm.workspace.16.name: 16: 16:
wm.workspace.17.name: 17: 17:
wm.workspace.18.name: 18: 18:
wm.workspace.19.name: 19: 19:

asdf

I use asdf to manage different versions of tools (Ruby, Python, Node, etc) on my machine.

IDE

I use Jetbrain's toolbox app to manage all IDE's I use.