Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ertgl/dotfiles

My personal setup: A minimal design with a botanical-inspired theme.
https://github.com/ertgl/dotfiles

alacritty asdf bash brewfile dotfiles fish jankyborders neovim sketchybar skhd tmux vscode yabai

Last synced: 5 days ago
JSON representation

My personal setup: A minimal design with a botanical-inspired theme.

Awesome Lists containing this project

README

        

# dotfiles

![Terminal](./screenshots/terminal/1.png)

___

This repository contains the configurations for various tools and applications
I use on a daily basis. It also contains a setup automation that can be used
for both fresh installations and subsequent updates, either for all tools or
specific ones.

## Features

Key features of this setup include:

- **[Bash](https://www.gnu.org/software/bash/)-powered**: The setup is entirely
automated using Bash scripts, ensuring a dependency-free start.
- **[Idempotence](https://en.wikipedia.org/wiki/Idempotence)**: Running the
setup multiple times only installs or applies available updates.
- **[Symbolic links](https://en.wikipedia.org/wiki/Symbolic_link)**: By
creating symbolic links, the dotfiles repository serves as the
[single source of truth](https://en.wikipedia.org/wiki/Single_source_of_truth)
for all configurations.
- **Automatic cleanup**: When a configuration is removed from the repository,
the setup automatically deletes the corresponding symbolic link, keeping the
system clean and error-free.
- **Exclusion of ephemeral/sensitive config and data**: If a file in the
configuration directory is not a symbolic link, it remains untouched during
cleanup. This allows maintaining files that are not tracked by
[version control](https://en.wikipedia.org/wiki/Version_control).
- **[XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec)**:
Configurations and data are stored consistently and predictably according to
this standard, where applicable.
- **[GOPATH](https://go.dev/wiki/GOPATH#gopath-variable)**: `GOPATH` is used as
the base directory for all projects, even non-Go ones, to keep the
development environment well organized and ensure easy interoperability.
- **[Homebrew Bundle](https://github.com/Homebrew/homebrew-bundle)**: Manage
system-wide packages using a single file.
- **[asdf](https://asdf-vm.com/)**: Handle multiple runtime versions with one
tool.
- **[fish](https://fishshell.com/)**: The shell used for everyday tasks.
- **[Starship](https://starship.rs/presets/#plain-text-symbols)**: A prompt
for the shell, configured to use plain texts instead of icons.
- **[tmux](https://github.com/tmux/tmux/wiki)**: Provides terminal multiplexing
and persistent session management.
- **[Alacritty](https://alacritty.org/)**: The terminal emulator, whose icon
is replaced with the default terminal icon in this setup, to keep the visual
consistency.
- **Native input-style terminal key-bindings and navigation**: Effective
navigation and editing in the terminal with key bindings similar to those
found in normal text inputs (e.g., CMD/Option + Arrow/Backspace/Delete).
- **Automatic dark/light mode for terminal applications**: The terminal
appearance adapts automatically based on the system's current theme.
- **GNU [gls](https://github.com/coreutils/coreutils)**: A replacement for `ls`
for consistent outputs across different systems.
- **[Neovim](https://neovim.io/)**: A lightweight code editor that supports
[LSP](https://en.wikipedia.org/wiki/Language_Server_Protocol) for static
analysis and code navigation, allowing me to avoid resource-heavy
[Electron](https://www.electronjs.org/) apps. I have a great respect for
[Emacs](https://www.gnu.org/software/emacs/) and a kind of sympathy for
[Helix](https://helix-editor.com/) as well.
- **[Visual Studio Code](https://code.visualstudio.com/)**: Occasionally used
with Neovim integration and
[zen mode](https://code.visualstudio.com/docs/getstarted/userinterface#_zen-mode).
- **[Zen Browser](https://zen-browser.app/)**: Offers a calmer web experience
with scalable vertical tabs instead of horizontal ones.
- **[Jetbrains Mono](https://www.jetbrains.com/lp/mono/)**: The chosen font for
the terminal and development tools, with ligatures disabled for improved
readability.
- **[Gruvbox](https://github.com/morhetz/gruvbox)-based color scheme**:
Although I once favored a monochrome look
(similar to [Apex UI](https://github.com/apex/apex-ui)), I switched to a
solarized palette to ease eye strain. Blending it within a botanical-inspired
theme, Gruvbox's natural colors makes me feel comfortable.
- **[yabai](https://github.com/koekeishiya/yabai)**: A tiling window manager
for macOS, similar to [i3](https://i3wm.org/) on Linux.
- **[skhd](https://github.com/koekeishiya/skhd)**: Provides effective hotkey
management.
- **[JankyBorders](https://github.com/FelixKratz/JankyBorders)**: Adds window
borders to yabai. Configured for enhancing the botanical feel.
- **[SketchyBar](https://github.com/FelixKratz/SketchyBar)**: A customizable
status bar for macOS. In this setup, it is designed to be a minimal menu bar
that stays hidden until activated via a key binding.
- **No Spotlight**: Spotlight indexing is disabled due to privacy concerns, as
it wasn't clear for me whether data would be uploaded to the cloud even with
Siri turned off (which is the case).
- **[AltTab](https://alt-tab-macos.netlify.app)**: A vertically arranged
application switcher that is more scalable than the default horizontal layout
and supports multiple windows of the same application.
- A wild, yet, elegant wallpaper from
[Unsplash](https://unsplash.com/photos/14baodaJBb8?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash).

Additional screenshots can be found in the
[`screenshots`](./screenshots) directory.

## Scripts

The [`scripts`](./scripts) directory contains all the setup scripts, organized
by the tools they correspond to. The execution process is as follows:

1. Loop through numbers 0 to 100, which allows for easy prioritization of
scripts.
2. For each number, iterate over the subdirectories within the `scripts` folder.
3. Check if a subdirectory within a `script` folder matches the current iteration number.
4. If a subdirectory matches the current number, check for and execute the
following scripts in order (if they exist):
* `prepare.sh`
* `pre-configure.sh`
* `configure.sh`
* `post-configure.sh`
5. After completing the iterations from 0 to 100, repeat the process by
iterating over the `script` subdirectories again and executing any of the
above scripts that remain.

## Running the setup

The setup will install or update the necessary tools and applications as
needed. No manual intervention is required, except for entering the password
when prompted (e.g., changing the default shell on fresh installations).

The following command will run the full setup:

```bash
bash entrypoint.sh
```

After the setup completes, a shortcut is created to run the command from any
directory:

```bash
dotfiles_reload
```

### Partial setup

It is also possible to run the setup for specific tools by passing their names
as arguments to the entrypoint script. This is especially useful for updating
only certain tools or configurations:

```bash
bash entrypoint.sh fish tmux
```

Alternatively, the shortcut command can be used for this purpose as well:

```bash
dotfiles_reload fish tmux
```

## Commands

After setup, several commands become available. Some of the most frequently
used ones are:

- `brew_bundle`: Install packages listed in the [`Brewfile`](./Brewfile).
- `brew_update`: Update all installed packages, including those in the
`Brewfile`.
- `dotfiles_reload`: Reload the dotfiles configurations.

## Environment variables

Running the setup sets many environment variables. The full list can be
viewed in the [`config/fish/conf.d`](./config/fish/conf.d) directory. The most
relevant ones are:

- `DOTFILES`: The path to the dotfiles repository.
- `PREFERS_COLOR_SCHEME`: The user's preferred color scheme (dark or light),
which is automatically updated based on the system appearance.

## Resources

- [ANSI escape code - Wikipedia](https://en.wikipedia.org/wiki/ANSI_escape_code)
- [Alacritty integration with Tmux](https://arslan.io/2018/02/05/gpu-accelerated-terminal-alacritty)
- [Automatic dark mode for terminal applications](https://arslan.io/2021/02/15/automatic-dark-mode-for-terminal-applications)