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.
cd /usr/local/etc
git clone https://github.com/ansemjo/dotfiles
cd dotfiles/
./install.sh -B -abgtvThis 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/. Additional configuration files and the
prompt builder are in bash/conf.d/. Some highlights:
ll,lla,lll-lsaliases to display long, all and recursivelytmp- create a temporary playground in/tmpand remove it upon exitbak- quickly create a backup of a file or dir with.baksuffixcb- read or write system clipboard with xclip, e.g.date | cborvar=$(cb)sd- usepushdto cycle through or add directories on stackhh,ff- bash history and find-filename grep-ingsuu-sudo sutm- attach to or start a new named tmux sessiontimestampfn- output current date in iso-like format for filenamesdocker-ssh-socket- forward and use a Docker socket from a remote machine via an ssh tunnelffmpeg-*- some convenience functions for ffmpeghaveibeenpwned- check piped-in passwords against leaked databasesìpaddr- parseip addroutput to cleanly display only addresseswtfismyip- contactwtfismyip.comto get public addressesmarkman- read a markdown file withmannuke- delete all files withshredand remove directoryopenssl-*- convenience functions for openssl to display certificate info etc.ports- show listening ports in reduced tabular outputqrclip- display clipboard contents as qr code in terminalrandomname- Docker's random naming function converted for bashrandom{char,hex,mac,ip,key,words,star}- various randomness functionsrosenbridge,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.
ln -svb $dotfiles/bash/bashrc /etc/bashrc
ln -svb $dotfiles/bash/dot-bashrc /etc/skel/.bashrcThe 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.
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 commitsst- short status outputco,br,re- aliases forcheckout,branchandremotecc- quickly clean fileshash- print current HEAD hashupstream- push to a remote and mark it as upstreamcl- show a changelog, overview of commits since last tagnv- parse previous annotated tags and create a new semver-incremented tag (patch,minorormajor)patch- begin adding changes with the--patchflagrinse- deep scrub clean up: expire reflog, gc, prune and fsckoutput ref path/to/file- output a specific version of a file to stdoutdownload- 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.
ln -svb $dotfiles/git/gitconfig /etc/gitconfigThere are too many settings in that vimrc to list them all. I do, however,
suggest that you install vim-pathogen
and vim-airline.
Your global vimrc should be either at /etc/vimrc or /etc/vim/vimrc.
ln -svb $dotfiles/vim/vimrc /etc/vimrcAfter 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.
ln -svb $dotfiles/tmux/tmux.conf /etc/tmux.confAdditionally there are currently some semi-maintained files for Ansible, i3 and an inputrc.
The colorscheme used above is Base 16 Bright Dark.