Nathan Dwarshuis 397a5b87aa | ||
---|---|---|
.files | ||
.symlinks | ||
dot_bin | ||
dot_config | ||
dot_local | ||
dot_ssh | ||
private_dot_librewolf | ||
.chezmoi.yaml.tmpl | ||
.chezmoiexternal.yaml | ||
.chezmoiignore | ||
LICENSE | ||
README.md | ||
dot_zshenv.tmpl | ||
empty_dot_hushlogin |
README.md
dotfiles
My personal dotfiles used for Arch Linux. Use at your own risk ;)
First, a story...
This is a rough outline of how these dotfiles evolved. Perhaps others can relate:
- Install Linux. Best day ever.
- Notice these annoying files with dots in front of them. There aren't too many, so whatever.
- Use Linux more, notice funny files with dots in front of them are exponentially multiplying.
- Research funny files with dots in front of them. Find they are called "dotfiles" and apparently they annoy others as well.
- Research more and find "dotfile management systems" that claim to be able to tame said "dotfiles."
- Try many "dotfile management systems" only to be disappointed. Resort to using git.
- Discover a terribly powerful tool called ansible. Get the brilliant idea to manage dotfiles with ansible.
- Spend a week setting up neat roles for ansible. All seems right in the universe.
- Change one tiny thing in my config. Ansible breaks. Abandon playbooks in fit of rage and revert to using git.
- Forget I'm using git to manage my dotfiles.
- SSD begins failing. Remember git exists and frantically commit "everything."
- Install fresh SSD. Deploy dotfiles with git.
- Realize half my config is missing and/or wrong.
- Research again what dotfiles management systems might exist. Discover chezmoi. Put all dotfiles in chezmoi...
Which brings me here.
These dotfiles are managed with chezmoi, which seems like a nice balance between the revision control aspects of git, the template-based configurability of ansible, and light scripting for extra wiggle room. I just started using chezmoi so only time will tell if it can fill my ultimate desire to have a clutter-free, OCD-friendly home directory with minimal hassle.
Design Overview
Headless Configuration
Environment
All environmental variables are set in .pam_environment
which has the
advantage of being loaded before everything else, including my shell. This
allows me to neatly organize everything according to XDG base specifications (eg
configurations files actually go in ~/.config
) which makes this repo
exponentially more pleasent to use.
Shell
See zsh config.
X Server Configuration
Window Manager
Xmonad is minimalist window manager written and configured in Haskell, which makes it automatically awesome as well as super stable.
See my xmonad repo (which also includes xmobar).
Rofi
Rofi displays a pretty menu that allows the user to select something and possibly perform an action with that selection. It is infinitely useful and comes with many extensions.
My use cases:
- launching apps (Start Button (TM) replacement)
- forking background daemons
- managing the clipboard
- selecting workspaces and windows
- selecting monitor configurations
- controlling networking interfaces
- mounting block devices
- querying passwords from Bitwarden
Some of these are custom wrappers found here.
Conky
Conky is a super-configurable system monitor that runs on the desktop (your nerdiness on full display). See here for my configuration.
Emacs
Emacs is an operating system masquerading as a text editor. See here for my emacs config.
Keyboard Shortcuts
I have gigantic hands, which means I need to contort my pinkies to press the control keys (among other things). The obvious solution is to remap my keyboard so these important keys are within reach.
I do this with an xkb layout which here is installed as a custom package because these files need to be root-owned along with the rest of the xkb layouts (X server limitation?).
Since this layout will map some keys on top of one another (for example, the RETURN key is right control) I use xcape to differentiate between keypress, keyhold, and keyrelease (in the past example, keyrelease is mapped back to RETURN). To make this even more complicated, VirtualBox doesn't filter out xcape'd keybindings, which means some keys will be "pressed" twice from the guest viewpoint. This is handled as gracefully as possible with a small utility I wrote called xman which will kill xcape when a VirtualBox window is in focus.
If this isn't confusing enough, imagine the look on someone's face who dares to use my laptop, only to find that the ALT key is actually the spacebar :)
Usage
If you are new to Linux or dotfile management in general, I would discourage you from blindly deploying these dotfiles. Instead, read each file and understand how it works. If you find something interesting, copy the interesting bit to your own config and experiment with that.
Distro Requirements
Arch Linux only
Dependencies
- chezmoi
- yay
- sudo
Note that any build tools (stack for Haskell binaries) will be installed during deployment.
Pre-Installation
These must be done before cloning and applying these dotfiles.
- create the user for whom these dotfiles will be deployed (including home directory)
- set up sudo privileges for the user who will be cloning these dotfiles
- set up makepkg to according to preferences
- set up yay according to preferences
Installation
Deploy using chezmoi
chezmoi init --apply --verbose https://ndwarshuis/dotfiles-chezmoi.git
This will:
- clone the dotfiles and apply them
- clone other git repos as applicable (emacs, xmonad, conky, etc)
- install system packages as needed
- install any custom PKGBUILDs (which many have some special compile flags or pull a different version that what is in the repos)
- compile any Haskell binaries as needed (xmonad and associated tooling)