Giter VIP home page Giter VIP logo

.files's Introduction

.files

Using GNU Stow to manage dotfiles

  • Create a ~/.dotfiles directory and move all the dotfiles you want to have in that file and craete symlinks for.

    mkdir ~/.dotfiles
  • Use stow to create symlinks for the files using the following command:

    stow .
    • NOTE: the above command create symlinks in the parent directory of the directory it's ran in.
    • If you have the .dotfiles directory in some other folder use the following command as such
    stow --dir=~/.dotfiles --target=~/
    # OR
    stow -d ~/.dotfiles -t ~/
    • NOTE: stow create symlinks in the exact same manner as it's stored in the source directory. e.g if you have a file as ./config/myconfig it will create symlink in the target directory in the config folder.
    • Also make sure before running the command for the first time you don't have the exact same name in the target, on preceding iterations stow will not throw any error and continue to work.
  • To remove all the symlinks create by stow use the following command:

    # within the source dotfiles directory
    stow -D .

For more info visit this article.

Important things to change on new os setup ๐Ÿ’ป

  • Run the command below to enable autocd i.e you won't have to prepend the directory name with cd when you want to chage to that direcotry.
    shopt -s autocd
  • Add aliases for remove rm and move mv and the copy command cp command that prompts us with a conformation before performing the action.
    alias rm="rm -i"
    alias mv="mv -i"
    alias cp="cp -i"
  • Ignore duplicates when using history command to view bash history
    export HISTCONTROL=ignoreboth
  • Remove that user and host crap from the PS1 prompt but keeping that when the propmt is not a color_propmpt.
    if [ "$color_prompt" = yes ]; then
      PS1='${debian_chroot:+($debian_chroot)}[\033[92m\w\033[0m]$ '
    else
        PS1='${debian_chroot:+($debian_chroot)}\u@\h:[\w]$ '
    fi

.files's People

Contributors

celeroncoder avatar

Watchers

 avatar

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.