<<<

dotfiles

Updated scripts are maintained at github.com/davidemerson/dotfiles.

These dotfiles configure a workstation on Debian Linux, OpenBSD, or macOS from a single POSIX shell script. No Salt, Ansible, or other configuration management tools — just sh provision.sh. The script is idempotent and safe to re-run after pulling updates.

how it works

The provisioning script detects the OS via uname -s and branches accordingly:

os-conditional blocks

Some config files need different content per OS. Rather than maintaining separate files, we use simple markers:

# @@IF_OPENBSD@@
export EDITOR="${EDITOR:-nano}"
# @@END_IF@@
# @@IF_LINUX@@
export EDITOR="${EDITOR:-subl}"
# @@END_IF@@

At deploy time, sed strips blocks for other OSes and removes the marker comments, leaving a clean config file. This replaces the Jinja2/Salt templating from the earlier version of this project with zero dependencies.

file routing

Not every dotfile deploys on every OS. The provision script skips irrelevant configs:

procedure

linux (debian)

VMWare Workstation settings (if applicable):

Standard Debian installation, selecting Desktop, SSH Server, and Standard System Utilities. Then:

su -
apt update && apt install git
git clone https://github.com/davidemerson/dotfiles.git
cd dotfiles/
sh provision.sh
reboot

After reboot, log in on tty1. Sway launches automatically. Mod4+Return opens foot.

The script also sets the console font to Terminus 14 (visible briefly before sway takes over) and installs Sublime Text from the official apt repository.

openbsd

Standard OpenBSD installation. On smaller disks, ensure /usr/local has at least 2GB (the full install uses about 1.6GB in /usr/local).

pkg_add git
git clone https://github.com/davidemerson/dotfiles.git
cd dotfiles/
sh provision.sh
reboot

After reboot, log in on ttyC0. X and i3 launch automatically via startx. Mod4+Return opens st.

The script configures doas for the wheel group, adds the hostname to /etc/hosts (prevents slow DNS lookups), sets the UTF-8 locale for proper Unicode rendering in st/btop, and removes the default /etc/i3/config that conflicts with the user config.

Why i3 instead of sway on OpenBSD? OpenBSD on VMware arm64 uses a simplefb framebuffer with no DRM/GPU driver, which means sway (Wayland) can’t create a rendering backend. i3 on X11 works out of the box. The i3 config mirrors the sway config — same keybindings, colors, gaps, workspaces.

macos

git clone https://github.com/davidemerson/dotfiles.git ~/dotfiles
cd ~/dotfiles
sh provision.sh

Run as your normal user, not root. The script installs Homebrew if missing, then installs CLI tools and WezTerm. Only relevant dotfiles are deployed — .zshrc (macOS uses zsh by default), .gitconfig, .wezterm.lua, .ssh/config.

what gets installed

ComponentLinuxOpenBSDmacOS
Window ManagerSway (Wayland)i3 (X11)
TerminalfootstWezTerm
Status Barwaybari3bar + i3status
Launcherwofidmenu
Lockswaylocki3lock + xautolock
Volumepamixer + wobsndioctl
Privilegesudodoassudo
BrowserFirefox ESRFirefox ESR
Emailneomutt + msmtpneomutt + msmtpneomutt + msmtp
Editormicro, nano, Sublime Textnanomicro, nano
Shellbashbashzsh
Toolshtop, btop, nmap, screen, lsdhtop, btop, nmap, screen, lsdhtop, btop, nmap, lsd
FontBerkeley Mono Variable (foot)Berkeley Mono Variable (i3bar)Berkeley Mono Variable (WezTerm)

keybindings

Consistent across sway (Linux) and i3 (OpenBSD):

KeyAction
Mod4 + ReturnTerminal (foot / st)
Mod4 + dLauncher (wofi / dmenu)
Mod4 + zLock screen
Mod4 + Shift+qKill window
Mod4 + Shift+eExit (with confirmation)
Mod4 + Shift+sShutdown (with confirmation)
Mod4 + j/k/i/lFocus left/down/up/right
Mod4 + Shift+j/k/i/lMove window
Mod4 + h/vSplit horizontal/vertical
Mod4 + 1-0Switch workspace
Mod4 + Shift+1-0Move to workspace
Mod4 + m/nVolume up/down
Mod4 + rEnter resize mode

shell aliases

Set in .bashrc (Linux/OpenBSD) and .zshrc (macOS):

alias ls='lsd -laF'
alias ll='lsd -laF'
alias la='lsd -la'
alias top='btop'

notes

mail secrets

Password credentials for neomutt/msmtp are stored in ~/.secrets/mailpass, not in the repository.

vmware svga emulation

On Linux, sway launches with WLR_NO_HARDWARE_CURSORS=1 in .bashrc to work around VMWare SVGA limitations. Remove this on bare metal.

windows lock command

If running VMWare on a Windows host, disable Win+L via registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DisableLockWorkstation set to 1.

re-applying updates

cd /path/to/dotfiles
git pull
sh provision.sh

All operations are idempotent. Package managers skip installed packages. Files are overwritten with the current version. Services are configured with || true guards.

additional references

home | about | github | mastodon

XXIIVV webring

built
epoch
1776095038