Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alrra/dotfiles
π» macOS / Ubuntu dotfiles
https://github.com/alrra/dotfiles
bash dotfiles git macos shell snippets tmux ubuntu vim
Last synced: 2 days ago
JSON representation
π» macOS / Ubuntu dotfiles
- Host: GitHub
- URL: https://github.com/alrra/dotfiles
- Owner: alrra
- License: mit
- Created: 2011-11-27T18:30:28.000Z (about 13 years ago)
- Default Branch: main
- Last Pushed: 2024-10-26T04:27:58.000Z (about 2 months ago)
- Last Synced: 2024-10-29T15:35:56.658Z (about 2 months ago)
- Topics: bash, dotfiles, git, macos, shell, snippets, tmux, ubuntu, vim
- Language: Shell
- Homepage:
- Size: 1.69 MB
- Stars: 1,458
- Watchers: 49
- Forks: 298
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-starred-test - alrra/dotfiles - π» macOS / Ubuntu dotfiles (Shell)
README
# [CΔtΔlin][repo]βs dotfiles
[![CI status for macOS][ci badge macos]][ci link macos]
[![CI status for Ubuntu][ci badge ubuntu]][ci link ubuntu]These are the base dotfiles that I start with when I set up
a new environment (for more specific local needs I use the
[`*.local`](#local-settings) files).## Table of Contents
* [π§ Setup](#setup)
* [πΈ Screenshots](#screenshots)
* [π Git](#git)
* [β¨οΈ Vim](#vim)
* [π Customize](#customize)
* [π Forks](#forks)
* [π Local Settings](#local-settings)
* [π `~/.bash.local`](#bashlocal)
* [π `~/.gitconfig.local`](#gitconfiglocal)
* [β¨οΈ `~/.vimrc.local`](#vimrclocal)
* [βοΈ Update](#update)
* [π License](#license)## Setup
To set up the dotfiles run the appropriate snippet in the terminal:
> [!CAUTION]
> __DO NOT__ run the setup script if you do not fully understand
> [what it does][setup]. Seriously, __DON'T__!| OS | Snippet |
|:---|:---|
| macOS | `bash -c "$(curl -LsS https://raw.github.com/alrra/dotfiles/main/src/os/setup.sh)"` |
| Ubuntu | `bash -c "$(wget -qO - https://raw.github.com/alrra/dotfiles/main/src/os/setup.sh)"` |That's it! β¨
The setup process will:
* Download the dotfiles on your computer
(by default it will suggest `~/projects/dotfiles`).
* [Symlink][symlink] the [Git], [shell], [tmux],
and [Vim] related files.
* Install applications / command-line tools for
[macOS][install macos] / [Ubuntu][install ubuntu].
* Set custom [macOS][preferences macos] /
[Ubuntu][preferences ubuntu] preferences.
* Install the [Vim][vim plugins] and
[VS Code][vscode plugins] plugins.Setup process in action:
| | |
|:---:|:---:|## Screenshots
### Git
Output for `git status`:
| ![Output for Git status on macOS][git output macos] | ![Output for Git status on Ubuntu][git output ubuntu] |
|:---:|:---:|
| macOS | Ubuntu |Output for `git log`:
| ![Output for Git log on macOS][git log macos] | ![Output for Git log on Ubuntu][git log ubuntu] |
|:---:|:---:|
| macOS | Ubuntu |### Vim
| ![Vim on macOS][vim macos] | ![Vim on Ubuntu][vim ubuntu] |
|:---:|:---:|
| macOS | Ubuntu |## Customize
### Local Settings
The dotfiles can be easily extended to suit additional local
requirements by using the following files:#### `~/.bash.local`
The `~/.bash.local` file will be automatically sourced after all
the other [Bash related files][shell], thus, allowing its content
to add to or overwrite the existing aliases, settings, `PATH`, etc.Here is an example:
```shell
#!/bin/bash# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set PATH additions.
PATH="/Users/alrra/projects/dotfiles/src/bin/:$PATH"
export PATH
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set local aliases.
alias g="git"
```#### `~/.gitconfig.local`
The `~/.gitconfig.local` file will be automatically included after
the configurations from `~/.gitconfig`, thus, allowing its content
to overwrite or add to the existing Git configurations.__Note:__ Use `~/.gitconfig.local` to store sensitive information
such as the Git user credentials, e.g.:```gitconfig
[commit]# Sign commits using GPG.
# https://help.github.com/articles/signing-commits-using-gpg/gpgSign = true
[user]
name = Your Name
email = [email protected]
signingKey = XXXXXXXX
```#### `~/.vimrc.local`
The `~/.vimrc.local` file will be automatically sourced after
`~/.vimrc`, thus, allowing its content to add or overwrite the
settings from `~/.vimrc`.Here is an example:
```vim
" Disable arrow keys in insert mode.inoremap :echoe "Use j"
inoremap :echoe "Use h"
inoremap :echoe "Use l"
inoremap :echoe "Use k"" Disable arrow keys in normal mode.
nnoremap :echoe "Use j"
nnoremap :echoe "Use h"
nnoremap :echoe "Use l"
nnoremap :echoe "Use k"
```### Forks
If you decide to [fork] this project, do not forget to substitute
my username with your own in the [setup snippets](#setup) and [in
the setup script][setup script].## Update
To update the dotfiles you can either run the [setup script][setup]
or, if you want to update one particular part, run the appropriate
[os script](src/os).## License
The code is available under the [MIT license][license].
[ci badge macos]: https://github.com/alrra/dotfiles/workflows/macOS/badge.svg
[ci badge ubuntu]: https://github.com/alrra/dotfiles/workflows/Ubuntu/badge.svg
[ci link macos]: https://github.com/alrra/dotfiles/actions?query=workflow%3AmacOS
[ci link ubuntu]: https://github.com/alrra/dotfiles/actions?query=workflow%3AUbuntu
[fork]: https://help.github.com/en/github/getting-started-with-github/fork-a-repo
[git log macos]: https://user-images.githubusercontent.com/1223565/101947422-519fc580-3ba5-11eb-90bc-1438072a45e1.png
[git log ubuntu]: https://user-images.githubusercontent.com/1223565/101947420-51072f00-3ba5-11eb-9061-efb30ace1c21.png
[git output macos]: https://user-images.githubusercontent.com/1223565/101947419-51072f00-3ba5-11eb-9e8e-fea987ac97c2.png
[git output ubuntu]: https://user-images.githubusercontent.com/1223565/101947417-506e9880-3ba5-11eb-805c-0732602c34b3.png
[Git]: src/git
[install macos]: src/os/installs/macos
[install ubuntu]: src/os/installs/ubuntu
[license]: LICENSE.txt
[preferences macos]: src/os/preferences/macos
[preferences ubuntu]: src/os/preferences/ubuntu
[repo]: https://github.com/alrra
[setup script]: https://github.com/alrra/dotfiles/blob/main/src/os/setup.sh#L3
[setup]: src/os/setup.sh
[shell]: src/shell
[symlink]: src/os/create_symbolic_links.sh
[tmux]: src/tmux
[vim macos]: https://user-images.githubusercontent.com/1223565/101947425-52385c00-3ba5-11eb-9a2a-13e7910d3673.png
[vim plugins]: src/vim/vim/pack/minpac/start
[vim ubuntu]: https://user-images.githubusercontent.com/1223565/101947424-519fc580-3ba5-11eb-83b1-e4c3573315a3.png
[Vim]: src/vim
[vscode plugins]: src/os/installs/macos/vscode.sh