Skip to content

A collection of my personal dotfiles.

Notifications You must be signed in to change notification settings

jswny/dotfiles-old

Repository files navigation

Dotfiles CI

These are my personal dotfiles which I use on a daily basis on MacOS!

Screenshot

Tools

Setup

Run the setup script:

git clone https://github.com/jswny/dotfiles.git
cd dotfiles
scripts/setup.sh

Local Configuration

Fish

  • To add local Fish configuration, simply create a file local.config.fish and place it in the same directory as config.fish. From there, config.fish will source that file if it exists (after it has already run all of its own commands).

Tmux

  • To add local Tmux configuration, simply create a file local.tmux.conf and place it in the same directory as tmux.conf. From there, tmux.conf will source that file if it exists (after it has already run all of its own commands). You can use the custom variables generated in tmux.conf in local.tmux.conf to easily cusomize Tmux.

Docker

This repository contains a Dockerfile which you can use to test out these dotfiles. This will build an Ubuntu-based docker image and run it for you: docker build -t jswny/dotfiles . && docker run -it --rm jswny/dotfiles You can also pull the image from GitHub Container Registry if you don't want to build it yourself.

Philosophy

  • Minimalism
    • Minimal configuration where possible
  • Filesystem Heirarchy
    • Use the XDG Base Directory Spec where possible/reasonable
    • Accordingly, consume the existing XDG environment variable if possible or use a default set at the point of use, instead of relying on XDG variables being already set before the point of use.
    • See this Arch Linux guide for a good summary of which programs support XDG
  • Operating Systems
    • Support MacOS and Linux
    • Support Windows to some extent, but only through WSL. When WSL 2 is stable Windows support might be more feasable, but at the moment WSL 1 breaks Fish
  • Errors
    • Fail gracefully wherever possible but try to warn when something is going wrong if it is potentially a problem
    • Fail silently but gracefully for anticipated errors
  • Colors
    • Use Solarized dark wherever possible due to its widespread support and ease on the eyes.
    • Use truecolor (hex colors) when possible, fallback to 256 colors, and only then fallback to ANSI colors.
  • Packaging
    • Install packages with Brew. This provides the most up-to-date versions of packages.
    • Install packages from source in $PACKAGE_SOURCE_HOME which defaults to ~/.local/src. This doesn't include things like Tmux Plugin Manager (TPM) which install from source but manage themselves and have a dedicated installation location.
  • Setup
    • Setup everything possible to setup for a command-line environment
    • Don't setup anything which is not command-line (such as GUI programs, etc.). However, accomidating these if they exist is fine.
  • Local Configuration
    • Provide local, machine-dependent configuration where necessary.
    • Local configuration should only be used in the situation where a certain configuration is short-lived, or machine-dependent (applies to a single machine, not a single operating system)
    • Local configuration should allow for these situations without the need to modify source-controlled files, so the repository can be kept clean and updated on a machine without affecting local configuration.

Additional Files and Linking

Most symlinks are automatically setup in the setup script. However, non-cross-platform utilities are not, and can be handled as shown below.

  • hyper/hyper.js -- Hyper Terminal configuration
    • ln -s $PWD/hyper/hyper.js ~/.config/hyper/hyper.js