Coder Social home page Coder Social logo

dotfiles's Introduction

Dotfiles

This repository contains my personal dotfiles and configurations for various tools and applications.

Contents

  • apt-get: List of package dependencies.
  • git: Git configuration files and hooks.
  • tmux: TMUX configuration files.
  • vim: Vim configuration files.
  • zsh: Z shell configuration files.

Installation

To install these dotfiles, clone the repository and run:

DIR=$HOME/code && \
mkdir -p $DIR && \
cd $DIR && \
git clone --recursive [email protected]:stoooops/dotfiles.git && \
yarn install && \
yarn setup

This will install dependencies and create symlinks for the dotfiles in the repository, linking them to the appropriate locations in your home directory.

One-liner

(
    DIR=$HOME/code && \
    [ -d "$DIR/dotfiles" ] && echo -e "\x1b[32m$DIR/dotfiles already exists\x1b[0m" && exit 0 || true;
    prompt() {
        echo -e "\x1b[32m$1\x1b[0m"
        sleep 1; echo -n "."; sleep 1; echo -n "."; sleep 1; echo -n "."; sleep 1; echo
    };
    sudo apt-get update && \
    prompt "Installing curl, git, zsh" && \
    sudo apt-get install -y curl git zsh && \
    curl --version && \
    git --version && \
    zsh --version && \
    NODE_VERSION=18 && \
    prompt "Installing nodejs v${NODE_VERSION}" && \
    (test -x "$(command -v npm)" && node -v | grep -q "v${NODE_VERSION}" && exit 0) || \
    (
        (
            (test -x "$(command -v npm)" && sudo apt-get remove nodejs) || true
        ) && \
        curl -s "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | sudo bash && \
        sudo apt install $Y nodejs
    ) && \
    echo "npm  $(npm --version)" && \
    echo "node $(node --version)" && \
    prompt "Installing yarn" && \
    sudo npm install -g yarn && \
    prompt "Cloning dotfiles" && \
    mkdir -p $DIR && \
    cd $DIR && \
    git clone --recursive [email protected]:stoooops/dotfiles.git && \
    cd dotfiles && \
    prompt "Installing dependencies" && \
    yarn install && \
    prompt "Running setup" && \
    yarn setup && \
    prompt "Setting zsh as default shell" && \
    chsh -s $(which zsh) && \
    echo -e "\x1b[32mDone\x1b[0m"
)

Fresh install

From a new computer:

  • install curl

    sudo apt-get install -y curl
  • install git

    sudo apt-get install -y git
  • install zsh

    sudo apt-get install -y zsh
  • install node v18

    1. if npm is installed && nodejs == v18 then do nothing
    2. else if npm is installed && nodejs != v18 then remove it and install nodejs 16
    3. else npm is not installed, install nodejs 18
    NODE_VERSION=18 && \
    prompt "Installing nodejs v${NODE_VERSION}" && \
    (test -x "$(command -v npm)" && node -v | grep -q "v${NODE_VERSION}" && exit 0) || \
    (
        (
            (test -x "$(command -v npm)" && sudo apt-get remove nodejs) || true
        ) && \
        curl -s "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | sudo bash && \
        sudo apt install $Y nodejs
    ) && \
    npm --version && \
    node --version
  • install yarn

    sudo npm install -g yarn
  • Install dotfiles

    1. clone repo
    2. install dependencies
    3. run setup
    4. set zsh as default shell
    DIR=$HOME/code &&
    mkdir -p $DIR && \
    cd $DIR && \
    git clone --recursive [email protected]:stoooops/dotfiles.git && \
    cd dotfiles && \
    yarn install && \
    yarn setup && \
    chsh -s $(which zsh)

dotfiles's People

Contributors

stoooops avatar

Stargazers

Roman avatar

Watchers

 avatar  avatar

dotfiles's Issues

stps

Create stps command that function like git 1.5+. So, stps-command is the same as stps command

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.