Skip to content

uhop/dotfiles

Repository files navigation

dotfiles

It all started as a gist to keep track of my dotfiles: https://gist.github.com/uhop/f11632fa81bff6fa4c25300656dce6e7

Now I decided to use chezmoi to manage them across computers.

Installation

Generic instructions (see platform-specific notes below):

  • Install brew on MacOS or Linux.
  • Install chezmoi:
    brew install chezmoi
  • Initialize dotfiles:
    chezmoi init --apply uhop
  • Reboot.

Important! If you are not me, change your name and email in the global git config:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

And update your GitHub user name in .chezmoi.toml.tmpl and at the bottom of .bashrc.

Installed tools

The choice of tools and aliases is influenced by:

The following tools are installed and aliased:

  • wget, httpie — like curl.
  • age, gpg — encryption utilities.
  • meld — a visual diff/merge utility.
  • diff-so-fancy — a nice diff pager.
  • tealdeer, cheat — a man replacement. Alternatives: tldr.
  • exa — better ls.
  • bat — better cat.
  • fd — better find.
  • ncdu, dust — better du.
  • ag, ripgrep — better ack.
  • tig, lazygit — text interface for git.
  • broot — better tree.
  • prettyping, gping — better ping.
  • htop — better top.
  • awscli, aws-iam-authenticator, kubernetes-cli, helm, gh, hub, nginx, net-tools, xh — useful utilities for web development.
  • parallel — shell parallelization.
  • fzf — a command-line fuzzy finder.
  • micro — an editor. Alternatives: nano.
  • jq — JSON manipulations.
  • tmux — the venerable terminal multiplexor.
  • golang, python3, pyenv, rustc, wabt, zig — language environments we use and love.
  • brotli — better than gzip, used by HTTP.
  • mc — Midnight Commander for file manipulations.
  • alacritty — no-nonsense terminal.
  • duf — a disk utility.
  • hyperfine — benchmarking better than time.
  • zoxide — better cd.
  • bottom — a system monitor.
  • node, nvm, deno, bun — JavaScript environments.
  • helix — a modal text editor.
  • whalebrew — like brew but for Docker images.
  • xc — a task runner.
  • mosh — a mobile shell.
  • lnav — a log navigator

Check .bash_aliases for a list of aliases.

Platform-specific notes

Ubuntu (Debian)

Installation

These instructions assume a newly installed OS. Otherwise, adjust accordingly.

  • Install prerequisites:
    sudo apt install build-essential curl git git-gui gitk micro
  • Install brew:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    • The exact installation instructions can change from time to time. Check https://brew.sh/ if you encounter any problems.
  • Restart the session or initialize brew:
    eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
  • Install chezmoi:
    bash install chezmoi
  • Initialize dotfiles:
    chezmoi init --apply uhop
    • The initial script installs various utilities using apt. Thus it requires a sudo password. Don't be alarmed. Inspect run_onchange_before_install-packages.sh.tmpl for more details.
  • Reboot.

Fonts

Fonts on Linux (Ubuntu): see https://askubuntu.com/questions/3697/how-do-i-install-fonts

FiraCode Nerd Font is used for code (Visual Studio Code). It supports common programming ligatures. Hack Nerd Font is used as a monospaced font for terminals (e.g., gnome-terminal) and similar programs (git-gui, gitk, …).

These dotfiles assume that these fonts are preinstalled and use them as appropriate.

Video

Restricted soft on Ubuntu to play videos:

sudo apt install ubuntu-restricted-extras vlc libdvd-pkg
sudo dpkg-reconfigure libdvd-pkg

More on videos: https://www.omgubuntu.co.uk/2022/08/watch-bluray-discs-in-vlc-on-ubuntu-with-makemkv

Cut-and-paste

To support cut-and-paste in the micro editor:

  • Use the default ("external") for the clipboard option.
  • Install a proper command-line clipboard tool:
    • For Wayland:
      sudo apt install wl-clipboard
    • For X11 (realistically only one could be installed):
      sudo apt install xclip xsel
    • You may install all of them for a good measure:
      sudo apt install wl-clipboard xclip xsel

Keyboard shortcuts

F10 doesn't work in a terminal: https://superuser.com/questions/1543538/f10-key-not-working-in-terminal-mc-ubuntu-19-10

Titan security key

See: https://support.google.com/titansecuritykey/answer/9148044?hl=en

A key should be registered only once. When I attempted to do so, I was misleadingly informed that "this device cannot be used to create passkeys". When it happened, press "Use other device", which will switch from the current computer to the key and now everything will go smoothly.

Ubuntu on Mac

Enabling Fn keys:

Video driver:

GUI

Package managers

I use apt, snap, flatpak, brew and AppImageLauncher. Most GUI apps are installed with flatpak. They are installed manually using Win-A (Cmd-A) from Gnome.

  • flatpak
    • flatsealflatpak permission editor.
    • calibre — an e-book manager.
    • Web browsers (used for testing):
      • Brave
      • Chromium
      • Google Chrome
      • Microsoft Edge
    • Communications:
      • Skype
      • Slack
      • Zoom
    • steam — the game launcher from Valve.
    • wezterm — a modern terminal.
  • snap
    • code — Visual Studio Code.
    • firefox — a web browser (it comes preinstalled).
    • postman — a tool for debugging network services.
      • It is available as a flatpak, but apparently it is completely unusable.
  • AppImageLauncher

Micro

The prettier plugin is installed manually: https://github.com/claromes/micro-prettier

Consider its cousing for Python: https://github.com/claromes/micro-yapf

Links on customization:

About

My dotfiles managed by ChezMoi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published