https://github.com/ansemjo/dotfiles
collection of settings and bash aliases
https://github.com/ansemjo/dotfiles
bash-aliases bashrc dotfiles gitconfig vimrc
Last synced: 2 months ago
JSON representation
collection of settings and bash aliases
- Host: GitHub
- URL: https://github.com/ansemjo/dotfiles
- Owner: ansemjo
- Created: 2015-11-26T23:34:34.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2025-12-13T14:05:40.000Z (4 months ago)
- Last Synced: 2025-12-15T06:27:30.809Z (3 months ago)
- Topics: bash-aliases, bashrc, dotfiles, gitconfig, vimrc
- Language: Shell
- Homepage:
- Size: 404 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dotfiles
This repository contains various configuration files which you can use in place
of your system's default ones. To apply these settings systemwide start by
cloning the repository into `/usr/local/etc/` and then symlink the desired
configurations in `/etc` appropriately.
You can use the `install.sh` script to create the symlinks aswell.
```bash
cd /usr/local/etc
git clone https://github.com/ansemjo/dotfiles
cd dotfiles/
./install.sh -B -abgtv
```
## bash

This bashrc mainly gives you a nice and colourful prompt and a good amount of
aliases. The aliases are individually split into seperate files in
[`bash/aliases.d/`](bash/aliases.d/). Additional configuration files and the
prompt builder are in [`bash/conf.d/`](bash/conf.d/). Some highlights:
* `ll`, `lla`, `lll` - `ls` aliases to display long, all and recursively
* `tmp` - create a temporary playground in `/tmp` and remove it upon exit
* `bak` - quickly create a backup of a file or dir with `.bak` suffix
* `cb` - read or write system clipboard with xclip, e.g. `date | cb` or `var=$(cb)`
* `sd` - use `pushd` to cycle through or add directories on stack
* `hh`, `ff` - bash history and find-filename grep-ing
* `suu` - `sudo su`
* `tm` - attach to or start a new named tmux session
* `timestampfn` - output current date in iso-like format for filenames
* `docker-ssh-socket` - forward and use a Docker socket from a remote machine via an ssh tunnel
* `ffmpeg-*` - some convenience functions for ffmpeg
* `haveibeenpwned` - check piped-in passwords against leaked databases
* `ìpaddr` - parse `ip addr` output to cleanly display only addresses
* `wtfismyip` - contact `wtfismyip.com` to get public addresses
* `markman` - read a markdown file with `man`
* `nuke` - delete all files with `shred` and remove directory
* `openssl-*` - convenience functions for openssl to display certificate info etc.
* `ports` - show listening ports in reduced tabular output
* `qrclip` - display clipboard contents as qr code in terminal
* `randomname` - Docker's random naming function converted for bash
* `random{char,hex,mac,ip,key,words,star}` - various randomness functions
* `rosenbridge`, `rbsend` - pipe data back from a host through a temporary ssh tunnel
The path where bash looks for the global configuration file may differ but
it should be included in `/etc/profile`. Usually it is `/etc/bashrc` or
`/etc/bash.bashrc`.
```bash
ln -svb $dotfiles/bash/bashrc /etc/bashrc
ln -svb $dotfiles/bash/dot-bashrc /etc/skel/.bashrc
```
The `dot-bashrc` that is symlinked into the skel directory contains options
to customize the commandline prompt, so you might want to copy it to your own home, too.
## git

You can set some default behaviour and command aliases in git. This config sets
things like pushing new tags and using a colorful interface by default, defines
a new pretty format and sets some useful aliases:
* `ll` - log last ten commits
* `st` - short status output
* `co`, `br`, `re` - aliases for `checkout`, `branch` and `remote`
* `cc` - quickly clean files
* `hash` - print current HEAD hash
* `upstream` - push to a remote and mark it as upstream
* `cl` - show a changelog, overview of commits since last tag
* `nv` - parse previous annotated tags and create a new semver-incremented
tag (`patch`, `minor` or `major`)
* `patch` - begin adding changes with the `--patch` flag
* `rinse` - deep scrub clean up: expire reflog, gc, prune and fsck
* `output ref path/to/file` - output a specific version of a file to stdout
* `download` - save current HEAD archive as gzipped tar to stdout, as if it
was a download from GitHub etc.
The system configuration should be at `/etc/gitconfig`. The global (per-user)
one is at `~/.gitconfig`.
```bash
ln -svb $dotfiles/git/gitconfig /etc/gitconfig
```
## vim

There are too many settings in that vimrc to list them all. I do, however,
suggest that you install [`vim-pathogen`](https://github.com/tpope/vim-pathogen)
and [`vim-airline`](https://github.com/vim-airline/vim-airline).
Your global vimrc should be either at `/etc/vimrc` or `/etc/vim/vimrc`.
```bash
ln -svb $dotfiles/vim/vimrc /etc/vimrc
```
## tmux

After a while of constantly forgetting common `tmux` keys, I spent an evening
customizing my configuration to make it usable and more intuitive to me.
Highlights include:
* prefix key on ctrl-a
* switch panes with alt-arrows
* split panes with prefix-\\ (horizontally) and
prefix-- (vertically)
* switch windows with prefix-left (previous) and
prefix-right (next)
* distinctive status line that should be compatible with older versions
There is also a bash alias `tm` to attach to an existing session or create
a new one if none exists.
```bash
ln -svb $dotfiles/tmux/tmux.conf /etc/tmux.conf
```
## others
Additionally there are currently some semi-maintained files for Ansible, i3 and an inputrc.
## colors
The colorscheme used above is [Base 16 Bright Dark](https://github.com/aaron-williamson/base16-gnome-terminal).