https://github.com/4strodev/dotger
A dotfiles manager inspired by stow
https://github.com/4strodev/dotger
Last synced: about 2 months ago
JSON representation
A dotfiles manager inspired by stow
- Host: GitHub
- URL: https://github.com/4strodev/dotger
- Owner: 4strodev
- Created: 2023-10-27T16:07:13.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-04T10:04:02.000Z (almost 2 years ago)
- Last Synced: 2025-01-28T01:44:14.569Z (over 1 year ago)
- Language: Go
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dotger
Dotger is a dotfiles manager inspired by stow.
## Why?
Since I started managging my dotfiles I used different methods. I discovered stow and it works but
I found it unintuitive.
## Usage (under development)
### Assumptions
- I asume that you are working on a linux workstation.
- To make the examples easier take the username of your username as `user`.
Put your dotfiles in a monorepo organized as you want.
Lets take a look to my neovim files.
Create a folder named `.dotfiles` in your home path. If you dont know what is your home path put this in a terminal.
```sh
echo $HOME
```
### Config file
Inside this folder I will create another folder named `neovim`.
In this folder I will move all my neovim files under a `nvim` folder. Now create a file named `.dotger.toml`
```toml
# .dotger.toml
[destination]
path = "/home/user/.config"
mkdir = true # create destination folder if not exists
```
Dotger will take all the files and folders of this *entry* and move it to the destination folder using a symlink.
After linking the config entry in your `/home/user/.config/` will be a symblink named nvim pointing to
`$HOME/.dotfiles/neovim/nvim`
###
```sh
# link entry
# under $HOME/.dotfiles
dotger link neovim
```
### Environment variables
Dotger is able to parse the config files as go text templates. For the moment you have a helper function
to get environment variables. Look this example
```toml
# .dotger.toml
[destination]
path = '{{ getenv "HOME" }}/.config' # this will result on /home/user/.config
mkdir = true # create destination folder if not exists
```