Giter Site home page Giter Site logo

dotfiles's Introduction

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.

cd /usr/local/etc
git clone https://github.com/ansemjo/dotfiles
cd dotfiles/
./install.sh -B -abgtv

bash

dotfiles-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/. Additional configuration files and the prompt builder are in 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.

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

dotfiles-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.

ln -svb $dotfiles/git/gitconfig /etc/gitconfig

vim

dotfiles-vim

There 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/vimrc

tmux

dotfiles-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.

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.

dotfiles's People

Contributors

ansemjo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dotfiles's Issues

Create a separate config for public computers

Other users do not know of my personal choices and are confused when the standard button mappings etc. don't work.

Create a separate set of files, which removes any unusual key mappings for public machines.

pictures

This is not an issue per-se. It is used to upload pictures for the readme.

screenshot from 2018-05-24 20-47-26

screenshot from 2018-05-24 20-53-26

screenshot from 2018-05-24 20-55-05

screenshot from 2018-05-24 20-56-36

prompt line wrap

Currently, when your prompt gets very long (e.g. you are in a deep subdirectory or enter a very long command) and your prompt eventually wraps it starts on the same line and overwrites the existing chars.

This causes very awkward effects when deleting chars with backspace again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.