Skip to content

dannywolfmx/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install

Dotfiles

Intro

To generate the install.sh file or update it you can use this org file using the “config (install.sh)” section.

Run the next command to create/update the config in the install.sh file using the org-babel-tangle in your emacs running C-c C-c into this block or run in your emacs M-x org-babel-tangle

(org-babel-tangle)

After update you will need to run the next command on the install file to make it executable

chmod +x install.sh

config (install.sh)

Function

Link the files to the specific path example: “link -f $PWD/test.txt $FILE “test.txt file”

link (){
    #echo $1 $2 $3 $4

    # Check if the file or dir already exist
    if test $1 $3; then
         echo -n "🚨 A $4 detected, do you want to overwrite it? [Y/n] "
         read answer
         if [ "$answer" != "${answer#[Nn]}" ]; then
           echo "⏩ Skipped"
           echo ""
           return 0
         fi
    fi

    #Link the profile
    rm $3 -rf
    echo -n "🟢 Linking the $4 \n"
    echo ""
    ln -s $2 $3
    return 0
}

Sysfiles

Profile (.profile file)

PROFILE_FILE=$HOME/.profile
link -f $PWD/.profile $PROFILE_FILE ".profile file"

Bash (.bashrc file)

BASHFILE=$HOME/.bashrc
link -f $PWD/.bash $BASHFILE ".bashrc file"

ZSH (.zshrc file)

ZSHRC_FILE=$HOME/.zshrc
link -f $PWD/.zshrc $ZSHRC_FILE ".zshrc file"

Tools

Doom-emacs

DOOM_DIR=$HOME/.doom.d
link -d $PWD/emacs/.doom.d $DOOM_DIR ".doom.d DIR"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published