Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mgedmin/dotfiles
My personal Linux shell settings
https://github.com/mgedmin/dotfiles
Last synced: about 2 months ago
JSON representation
My personal Linux shell settings
- Host: GitHub
- URL: https://github.com/mgedmin/dotfiles
- Owner: mgedmin
- Created: 2012-05-14T14:53:11.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-10-17T10:55:35.000Z (2 months ago)
- Last Synced: 2024-10-19T14:35:55.455Z (2 months ago)
- Language: Shell
- Size: 406 KB
- Stars: 15
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Marius's dotfiles
=================Usage
-----To start using on a new machine::
git clone https://github.com/mgedmin/dotfiles
. dotfiles/install.shTo pull in new updates::
. dotfiles/update.sh
To add a new dotfile to version control::
~/dotfiles/grab.sh ~/.dotfilename
cd ~/dotfiles && git commit -avTo stop versioning a dotfile (if you accidentally added the wrong one)::
~/dotfiles/ungrab.sh ~/.dotfilename
cd ~/dotfiles && git commit -avHow it works
------------The scripts will replace ``~/.randomdotfile`` with symlinks to
``~/dotfiles/randomdotfile``, *safely*. If you have a conflict (``~/.foo``
exists and differs in content from ``~/dotfiles/foo``), the install script will
print a warning and keep your current ``~/.foo``, so you don't have to worry
about accidentally losing data.You need to re-run the install script every time you pull in *new* dotfiles (as
opposed to new versions of already symlinked dotfiles) from a remote
repository. Running ``~/dotfiles/update.sh`` does that.There's currently no provision for dealing with removed dotfiles -- you'll have
to clean up dangling symlinks manually.Why I wrote my own scripts for this
-----------------------------------I'm paranoid of losing data so I want to fully understand the code that's going
to be managing my dotfiles. And the best way to understand code is to write
it.Features
--------Files in dot directories are supported now (e.g.
``dotfiles/grab.sh ~/.config/yamllint/config``).You can have dotfiles specific to one machine, distinguished by the hostname.
This is automatic: when a dotfile is named ``~/.something.local``, it'll be
symlinked to ``~/dotfiles/something.local.$HOSTNAME``. Usually this requires
you to have a shared ``~/.something`` that includes ``~/.something.local``.
There's one exception, ``~/.mailcheckrc``, which is treated as local even if it
doesn't have the ``.local`` suffix (because mailcheck doesn't support
includes).You can source the install and update scripts instead of running, and that will
automaticall refresh your current bash session (source the updated .profile and
reload the updated .inputrc)::. ~/dotfiles/install.sh
. ~/dotfiles/update.shYou can preview what the scripts will do by passing command-line options ::
-n don't update anything, just say what would be done
-v be verbose
-vv be very verboseYou can force overwriting of existing dotfiles if you know they're worthless ::
-f force install even if files already exist (will rename to .old)
Shortcomings
------------- The location of ``~/dotfiles`` is hardcoded in the scripts.
- You cannot version entire dot directories, just individual files inside
them.