~whynothugo/dotfiles

🏡 Configuration files and other dotfiles for my everyday laptop.
waybar: open bluetuith for bluetooth control
foot: bind home and end to scrollback
nvim: enable a few gitsigns mappings

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~whynothugo/dotfiles
read/write
git@git.sr.ht:~whynothugo/dotfiles

You can also use your local clone with git send-email.

#~/.dotfiles

Source | Issues | Patches | Chat

"A man and his tools make a man and his trade". -Vita Sackville-West

This repository contains configuration files for some of my hosts. My environment is configured in a declarative way, so recreating it and rolling back and forth can be done with confidence.

There's a few sets of files here:

#Dotfiles

Files in .dotfiles are user-specific configuration for applications. This includes settings and configuration for sway, foot, neovim, and quite a few other programs. Symlinks are placed in the home directory pointing to the files inside this repository, so it's easy to track any changes using just git.

I use my own rust-based tool (see src/) to keep this repository in sync with my actual dotfiles using symlinks. It can be executed quickly with cargo run. It won't overwrite any existing files by default. This gets the job done, and builds to a static binary, which makes bootstrapping simpler. homesick used to work, but it's given me issues with major ruby updates over the years. A binary-compiled homesick clone would be great.

#Installation

Deploying my configuration into a new device can be done with the following steps:

git clone https://git.sr.ht/~whynothugo/dotfiles .dotfiles
cd .dotfiles
cargo run

rustup can be configured to use the system compiler by default:

rustup toolchain link system /usr
rustup default system

Source: https://rust-lang.github.io/rustup/installation/package-managers.html

himitsu needs to be initialised:

himitsu-init

#Ansible

The ansible directory contains ansible playbooks to configure dconf-based applications and install flatpaks I use. Due to how ansible handles sudo, it can't be used for anything system wide. There's also bootstrapping issues in trying to use it to configure pristine systems, so the scope of what ansible handles will likely continue being rather narrow.

#Flatpak

flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install --user flathub com.github.micahflee.torbrowser-launcher

#Packages

packages contains a few meta-packages that install all desired packages and system-wide configuration files. See packages/README.md for details.

#Goals of this repo

  • Keep configurations in sync across devices.
  • Keep a versioned history of my configurations.
  • Quickly bootstrap new configure new machines (physical or virtual).
  • Roll back breaking setup or configuration changes.

#Tools I use

  • sway: desktop compositor
  • waybar: system status bar
  • neovim: code editor (using LSP, tree-sitter, and quite a few plugins)
  • zsh: shell and main working environment (it's designed for interactive use)
  • foot: very fast terminal emulator in C with great defaults
  • gammastep: screen colour temperature based on sunrise and sundown
  • darkman: automatic dark mode based on sundown and sunrise

I try to upstream any fixes, tweaks and improvements whenever possible, and limit this repository to customisations and very opinionated settings only.

#Neovim setup

This neovim setup is a major part of my IDE, the other component being foot, zsh, fzf, fd, ag, grep, and many other useful command line tools. All of these tools are pulled in via my whynothugo-desktop meta-package. On other platforms, they need to be installed via the distribution's package manager.

Plugins are managed via git submodules (pending: write a blog article on this).

Language servers also need to be installed via the system package manager (e.g.: pacman on Arch, brew on Darwin, etc). This means that, while the neovim setup is portable across distributions, language servers need to be installed via a distribution specific mechanism.

For distributions that's don't package LSPs (or have very old versions), perhaps https://github.com/williamboman/mason.nvim is a solution.

#Adding a new neovim plugin

Simply add a new submodule. E.g.:

git submodule add \
    https://github.com/rebelot/kanagawa.nvim.git \
    home/.local/share/nvim/site/pack/plugins/start/kanagawa.nvim

#Documentation

I try to keep things relatively well documented. Some settings or overrides require attention only once every couple of years (e.g.: Firefox style overrides), and keeping comments around lets me figure out what existing code does, and where I got it from.

git blame and git log $FILE are generally be rather useful too.

#LICENCE

Copyright 2012-2022, Hugo Osvaldo Barrera hugo@whynothugo.nl

This repository is licensed under the ISC licence. See LICENCE for details.