Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikeslattery/dotfiles
My personal dotfiles and dotfiles installer project
https://github.com/mikeslattery/dotfiles
dotfiles linux neovim tmux vim zsh
Last synced: about 1 month ago
JSON representation
My personal dotfiles and dotfiles installer project
- Host: GitHub
- URL: https://github.com/mikeslattery/dotfiles
- Owner: mikeslattery
- Created: 2016-05-11T03:15:41.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-06T18:11:11.000Z (4 months ago)
- Last Synced: 2024-09-06T21:28:14.889Z (4 months ago)
- Topics: dotfiles, linux, neovim, tmux, vim, zsh
- Language: Shell
- Homepage:
- Size: 36.8 MB
- Stars: 18
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dotfiles project
[This](https://github.com/mikeslattery/dotfiles) is my personal dotfiles
and dotfiles installer project on github.![](https://i.imgur.com/1FlkC12.png)
The first section is about the dot files themselves.
See ["Getting Started"](#getting-started) to read about the install script.## Supported Environment
This describes the configuration dotfiles and the environments supported.
Some of the following may not be fully supported at any time as I change tools.
### Software
* Neovim, Vim, IDEAVim
* Zsh, Oh-My-Zsh
* Tmux, Alacritty
* npm, yarn, node
* i3, sway
* `fzf`, `rg`, `fd`, `bat`, `exa`
* Podman### Operating Environments
Environments I've successfully used with these dot files.
* Linux distros. Fedora, Ubuntu, Alpine, Arch.
* Docker containers: alpine, ubuntu, fedora, debian
* Termux Android app
* Remote RHEL servers over ssh (w/o git installed)
* WSL 1 (WSL 2 not tested)
* Cygwin, Msys2
* Git for Windows (stripped down Msys2)### Notable Features of my configuration
* Auto-install of plugin managers for Neovim, Tmux, Zsh, on first use
* Dracula theme for Neovim, Tmux, Alacritty, i3/sway, Gtk, Slack, but with darker background
* [True color](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6) support across alacritty, tmux, Neovim
* `.zshrc` also serves as a `.bashrc`
* `init.vim` also serves as a `.vimrc`
* Powerline fonts across alacritty, tmux, neovim
* Mouseless usage as a goal, with vi keybindings when possible
* Similar keybindings for tmux, i3, neovim
* Global git pre-commit hook to run editorconfig checker
* Integration between Jetbrains IDEs and Neovim
* Supplies files for `/etc`### Notable individual files and directories
* [.vimrc](.vimrc) implements Neovim defaults and then sources [.config/nvim/init.vim](.config/nvim/init.vim)
* [.config/dotfiles](.config/dotfiles) location for support files for this dotfiles project.### Various high level To-Dos
* Folder, files, and repos
* Git submodules for OMZ, tmux tpm, qt, my neovim.
* Some kind of google sync/UI for drive and photos
* Separate repo for Neovim configuration
* Private encrypted github repo for /etc and home secrets
* netlify, stripe
* `.config/git/config`, `.ssh`, `.pgpass`, `.pki`, `.npmrc`, `.gnupg`, `.gptshrc`
* `.config/keepassxc/keepassxc.ini`
* dconf as a text file
* Keep `passwords.kdbx` in Google drive.
* Move personal scripts from `~/.local/bin` to `~/bin`
* Other data integrations
* GSConnect
* Configure firefox with sync
* Mappings and configuration
* Better integrate i3/sway, Neovim, tmux, firefox, zathura, tuir, vifm, jetbrains.
* Switch to Neovim native LSP. Fallback to ALE
* Installs and scripts
* Install script for packages, including Google Drive and Keepass
* [Gnome CPU usage](https://github.com/corecoding/Vitals)## Getting started
This describes how to install the dotfiles from this project.
The script will backup your existing files to a branch.### To install
```sh
sh -c "$(curl https://git.io/msdot -L)"
```or, if you don't have `curl`, and don't want a prompt
```sh
sh -c "$(wget https://git.io/msdot -O -)" -- i
```or, if you don't want to use the install script, you can install manually:
(This will overwrite existing files, without backup.)```sh
cd ~
curl -sO https://raw.githubusercontent.com/mikeslattery/dotfiles/master/.zshrc
sh .zshrc install
source .zshrc
git clone --bare https://github.com/mikeslattery/dotfiles .dotfiles
config config --local status.showUntrackedFiles no
config config --local core.excludesFile ~/.config/dotfiles/gitignore
config config --local submodule.recurse true
config reset --hard
config pull
```### Requirements
- for install: `git` or `unzip`, `curl` or `wget`
- for pushes: `git`, `openssh`, and keys registered with github
- In [.zshrc](.zshrc): `alias config="git -C $HOME --git-dir=$HOME/.dotfiles --work-tree=$HOME"`
- In .zshrc: `export "PATH=$PATH:$HOME/.local/bin:$HOME/bin"`### What install does
- Create a bare git repo at `~/.dotfiles`
- Checkout files to `$HOME`.
- Git is configured to not show untracked files
- Backup original files to a branch, `backup-master-$HOSTNAME`. (requires `git` be installed beforehand)
- if git user.email isn't set, download `.gitconfig` or input interactively.
- if git+ssh isn't set up or installed, fall back to https
- if `git` isn't installed, fall back to download files
- if `curl` isn't installed, fall back to `wget`So, basically `$HOME` is a Git repo, but `.git` is renamed `.dotfiles` to avoid conflicts with other tools.
The script handles a lot of use cases to ensure success in all environments.For more information see the [.local/bin/dotfiles](.local/bin/dotfiles) script.
### Managing the dot files
After installation, the `config` alias will act like `git`
but only for your dot files in `$HOME`.### Advice and pitfalls
- Never run: `config add `, `config add -A`, or `config commit -a -m `.
Instead use: `config add -u` or `config add `
- Dot files will not be backed up if you don't have `git` installed at time of install.
- If you installed without `git` and then decide to install `git` later,
you can then run `dotfiles install` to create the `~/.dotfiles` bare repo.
- `config` works best if run from home directory.
- `uninstall` may remove some git submodule directories
which may break original functionality (e.g. OMZ, tpm, .themes)## Install Script Details
This is additional information about the install script.
It is located at [.local/bin/dotfiles](.local/bin/dotfiles).### Usage: (after install)
```
config ... - git subcommand. Requires alias in .zshrc
dotfiles help - Usage.
dotfiles etc - Copy ~/.config/dotfiles/etc to /etc
dotfiles ssh - Install to ssh host
dotfiles tar - Copy to ssh host w/o github access
dotfiles docker - Install into a running docker container
dotfiles uninstall - Revert to config as before install.
dotfiles docker - Install into a running docker container
dotfiles curl|wget - Print out install command, for copy-paste purposes.
dotfiles ... - git subcommand. (in case `config` alias not set)
```### To make your own
To incorporate a customized copy of the `dotfiles` script into your dotfiles repo:
1. Match the requirements section.
2. Create an empty dotfiles repo on
3. Run: `DOTFILES_NAME=/dotfiles sh -c "$(curl https://git.io/msdot -L)"`The only file from this repo you'll inherit is `dotfiles`,
but it will be modified with your defaults.### Environmental override variables
```
DOTFILES_NAME - github owner/project.
DOTFILES_BRANCH - default is master
DOTFILES_DIR - default is ~/.dotfiles
```### More Information
*
* Read the [.local/bin/dotfiles](.local/bin/dotfiles) script
* Other files in [.config/dotfiles](.config/dotfiles)## FAQ
Q: Why not use one of the other dotfiles managers or `stow`?
A: I wanted something as simple as plain `git`, but no simpler.
Q: But isn't your script also complicated?
A: The script is optional and only for initial install.
The core of what it does is simple,
but it handles several special cases.Q: Why not use symlinks to all the files, instead of a bare repo?
A: I used to, but they don't track with file deletions or moves,
adding a file required more steps,
and uninstalling or moving the repo was a mess.Q: How did you create the shortened vanity URL? Is it safe?
A: [git.io](https://git.io) is [run by github](https://github.blog/2011-11-10-git-io-github-url-shortener/).
This command allocated the URL:
```sh
url="https://raw.githubusercontent.com/mikeslattery/dotfiles/master/.local/bin/dotfiles"
curl https://git.io/ -i -F "url=$url" -F "code=msdot"
```