├── bin ├── autoload ├── colors ├── system-settings │ ├── .gitconfig │ ├── add-repositoryes │ ├── .vimrc │ └── .bashrc ├── functions └── messages ├── img └── magic.gif ├── .editorconfig ├── README.md └── install /bin/autoload: -------------------------------------------------------------------------------- 1 | . bin/colors 2 | . bin/messages 3 | . bin/functions -------------------------------------------------------------------------------- /img/magic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woliveiras/dotfiles/HEAD/img/magic.gif -------------------------------------------------------------------------------- /bin/colors: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | RED='\033[0;31m' 4 | BLUE='\033[1;34m' 5 | NC='\033[0m' # No Color 6 | -------------------------------------------------------------------------------- /bin/system-settings/.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = woliveiras 3 | email = w.oliveira542@gmail.com 4 | [color] 5 | ui = auto 6 | -------------------------------------------------------------------------------- /bin/functions: -------------------------------------------------------------------------------- 1 | UpdateSystem () { 2 | sudo apt update 3 | sudo apt upgrade -y 4 | } 5 | 6 | Install () { 7 | sudo apt install $1 -y --force-yes 8 | sudo apt autoremove 9 | } 10 | -------------------------------------------------------------------------------- /bin/messages: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | Warning ( ) { 4 | printf "\n${RED}$1${NC}\n------- \n" 5 | } 6 | 7 | Alert ( ) { 8 | printf "\n ---- \n\n${NC}$1\n${BLUE}$2${NC}\n\n ---- \n" 9 | } 10 | -------------------------------------------------------------------------------- /bin/system-settings/add-repositoryes: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # VIM 4 | sudo add-apt-repository ppa:jonathonf/vim -y 5 | # TLP 6 | sudo add-apt-repository ppa:linrunner/tlp -y 7 | # Caps indicator 8 | sudo add-apt-repository ppa:tsbarnes/indicator-keylock -y 9 | # UNetbootin 10 | sudo add-apt-repository ppa:gezakovacs/ppa -y 11 | # Shutter 12 | sudo add-apt-repository ppa:shutter/ppa -y 13 | # FFMPEG 14 | add-apt-repository ppa:kirillshkrogalev/ffmpeg-next -y 15 | # OBS Studio 16 | sudo add-apt-repository ppa:obsproject/obs-studio -y 17 | # SimpleScreenRecorder 18 | sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder -y 19 | # RVM 20 | sudo apt-add-repository ppa:rael-gc/rvm -y 21 | # Docker 22 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 23 | sudo apt-key fingerprint 0EBFCD88 24 | sudo add-apt-repository \ 25 | "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ 26 | xenial \ 27 | stable" 28 | # Java 29 | sudo add-apt-repository ppa:webupd8team/java -y 30 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | # Plugin to sublime-text: https://github.com/sindresorhus/editorconfig-sublime 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | #Identation 12 | [*.{css,html,json,py,styl}] 13 | indent_style = space 14 | indent_size = 4 15 | 16 | #Markdown 17 | [*.md] 18 | trim_trailing_whitespace = false 19 | 20 | #JS 21 | [*.{js, json}] 22 | indent_style = tab 23 | indent_size = 2 24 | 25 | # Minified JavaScript files shouldn't be changed 26 | # https://github.com/django/django/blob/master/.editorconfig#L26 27 | [**.{min.js, min.css}] 28 | indent_style = ignore 29 | insert_final_newline = ignore 30 | 31 | 32 | # https://github.com/h5bp/html5-boilerplate/blob/master/.editorconfig 33 | [{.travis.yml,package.json}] 34 | # The indent size used in the `package.json` file cannot be changed 35 | # https://github.com/npm/npm/pull/3180#issuecomment-16336516 36 | indent_size = 2 37 | indent_style = space 38 | -------------------------------------------------------------------------------- /bin/system-settings/.vimrc: -------------------------------------------------------------------------------- 1 | " Cute ;D 2 | syntax on 3 | set encoding=utf8 nobomb 4 | set number 5 | set tabstop=2 6 | set softtabstop=2 7 | set shiftwidth=2 8 | set expandtab 9 | set eb 10 | set hlsearch incsearch smartcase 11 | set ignorecase 12 | set showcmd 13 | set showmatch 14 | set textwidth=90 15 | set cursorline 16 | filetype plugin indent on 17 | set ruler 18 | set hidden 19 | set colorcolumn=80 20 | set history=5000 21 | set scrolloff=10 22 | set wildmenu 23 | 24 | " Use system clipboard 25 | set clipboard=unnamed 26 | 27 | if has('unnamedplus') 28 | set clipboard+=unnamedplus 29 | endif 30 | 31 | " Smart way to move between windows 32 | map j 33 | map k 34 | map h 35 | map l 36 | 37 | " space open/closes folds 38 | nnoremap za 39 | 40 | " Vundle config 41 | set nocompatible 42 | set rtp+=~/.vim/bundle/Vundle.vim 43 | call vundle#begin() 44 | 45 | " Vundle <3 46 | Plugin 'gmarik/Vundle.vim' 47 | 48 | " ---- Plugins ---- 49 | 50 | " ---- End Plugins ---- 51 | 52 | call vundle#end() 53 | " End Vundle configuration 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dotfiles 2 | 3 | Repo to host my configurations for developer tools 4 | 5 | *P.S.: This script and tools is optimized for Ubuntu and Linux Mint* 6 | 7 | ## Softwares to be install 8 | 9 | List of software to be installed with the scripts: 10 | 11 | ### Developer tools 12 | 13 | - Git 14 | - NodeJS 15 | - VIM 16 | - NVM 17 | - RVM 18 | - Node.js (stable and 0.12) 19 | - Java 20 | - ZSH 21 | 22 | ### Others 23 | 24 | - Build Essentials 25 | - Codecs 26 | - Gimp 27 | - Inkscape 28 | - VLC and browser-plugin-vlc 29 | - Spotify 30 | - Shutter 31 | - UNetbootin 32 | - Shotwell 33 | - Audacity 34 | - Kdenlive 35 | - Pitivi 36 | - ffmpeg 37 | - SimpleScreenRecorder 38 | - OBS Studio 39 | - TLP 40 | 41 | ## What is not installed 42 | 43 | - Chrome browser 44 | - Slack 45 | 46 | ## Installing 47 | 48 | Run following commands: 49 | 50 | Install unzip 51 | 52 | ```bash 53 | sudo apt install unzip 54 | ``` 55 | 56 | Download this repo 57 | 58 | ```bash 59 | wget https://github.com/woliveiras/dotfiles/archive/master.zip 60 | ``` 61 | 62 | Unzip the scripts 63 | 64 | ```bash 65 | unzip master.zip 66 | ``` 67 | 68 | Access scripts folder 69 | 70 | ```bash 71 | cd dotfiles-master 72 | ``` 73 | 74 | Run `sh install` on your Terminal and observe the Magic! 75 | 76 | **Before running `install` script change the configuration for `gitconfig`**. 77 | 78 |

79 |    Magic Gif 80 |

81 | 82 | Shell is :heart:. 83 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## utils 4 | 5 | . bin/autoload 6 | 7 | ## Apps used on System 8 | 9 | ## Update System 10 | 11 | Warning "Adding PPAs" 12 | 13 | . bin/system-settings/add-repositoryes 14 | 15 | Warning "Updating System" 16 | 17 | UpdateSystem 18 | 19 | ## Essential packages 20 | 21 | Warning "Install essentials" 22 | 23 | Install "build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext p7zip p7zip-full p7zip-rar lzma lzma-dev ubuntu-restricted-extras apt-transport-https ca-certificates software-properties-common terminator gnupg snapd advancecomp jhead jpegoptim libjpeg-turbo-progs optipng" 24 | 25 | ## Dev essentials 26 | 27 | Warning "Dev essentials" 28 | 29 | Install "git vim zsh" 30 | 31 | ## Vundle (VIM Package Manager) 32 | 33 | git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim 34 | 35 | sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 36 | 37 | ## Copy configs to home 38 | 39 | cp -v bin/system-settings/.bashrc bin/system-settings/.gitconfig bin/system-settings/.vimrc $HOME 40 | 41 | ## Install NVM 42 | 43 | Warning "Install and Configure NVM and NodeJS (stable and 0.12)" 44 | 45 | curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash 46 | 47 | mkdir ~/.nvm 48 | nvm install stable 49 | nvm install 0.12 50 | nvm use stable 51 | npm install svgo -g 52 | 53 | ## Install RVM 54 | 55 | sudo apt-get install rvm 56 | 57 | ## Install Docker 58 | 59 | sudo apt-get install docker-ce 60 | sudo groupadd docker 61 | sudo usermod -aG docker $USER 62 | 63 | ## Utils 64 | 65 | Warning "Install utils" 66 | 67 | Install "gimp inkscape vlc browser-plugin-vlc shutter unetbootin shotwell" 68 | 69 | ## Video utils 70 | 71 | Warning "Install video utils" 72 | 73 | Install "ffmpeg mint-meta-codecs pitivi kdenlive obs-studio audacity simplescreenrecorder" 74 | 75 | ## Optimize Ubuntu 76 | 77 | Warning "Optimize Ubuntu" 78 | 79 | Install "ubuntu-tweak compizconfig-settings-manager preload indicator-keylock gir1.2-gtop-2.0" 80 | 81 | ## Optimize battery management 82 | 83 | Warning "Optimize battery management" 84 | 85 | sudo apt-get remove laptop-mode-tools 86 | 87 | Install "tlp tlp-rdw" 88 | 89 | sudo tlp start 90 | 91 | ## Install Spotify 92 | sudo snap install spotify 93 | 94 | ## Install Java 95 | 96 | sudo apt-get install oracle-java8-installer 97 | 98 | ## Remember 99 | 100 | Alert 101 | " 102 | ############################## \n \n 103 | Remember to install later: \n 104 | - Chrome \n 105 | - Slack \n 106 | You need logout to make changes in RVM \n 107 | And look this link to run RVM on all Terminals: \n 108 | https://github.com/rvm/ubuntu_rvm#2-change-your-terminal-window" 109 | -------------------------------------------------------------------------------- /bin/system-settings/.bashrc: -------------------------------------------------------------------------------- 1 | # ~/.bashrc: executed by bash(1) for non-login shells. 2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 3 | # for examples 4 | 5 | # If not running interactively, don't do anything 6 | case $- in 7 | *i*) ;; 8 | *) return;; 9 | esac 10 | 11 | # don't put duplicate lines or lines starting with space in the history. 12 | # See bash(1) for more options 13 | HISTCONTROL=ignoreboth 14 | 15 | # append to the history file, don't overwrite it 16 | shopt -s histappend 17 | 18 | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 19 | HISTSIZE=1000 20 | HISTFILESIZE=2000 21 | 22 | # check the window size after each command and, if necessary, 23 | # update the values of LINES and COLUMNS. 24 | shopt -s checkwinsize 25 | 26 | # If set, the pattern "**" used in a pathname expansion context will 27 | # match all files and zero or more directories and subdirectories. 28 | #shopt -s globstar 29 | 30 | # make less more friendly for non-text input files, see lesspipe(1) 31 | [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" 32 | 33 | # set variable identifying the chroot you work in (used in the prompt below) 34 | if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then 35 | debian_chroot=$(cat /etc/debian_chroot) 36 | fi 37 | 38 | # set a fancy prompt (non-color, unless we know we "want" color) 39 | case "$TERM" in 40 | xterm-color) color_prompt=yes;; 41 | esac 42 | 43 | # uncomment for a colored prompt, if the terminal has the capability; turned 44 | # off by default to not distract the user: the focus in a terminal window 45 | # should be on the output of commands, not on the prompt 46 | #force_color_prompt=yes 47 | 48 | if [ -n "$force_color_prompt" ]; then 49 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 50 | # We have color support; assume it's compliant with Ecma-48 51 | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 52 | # a case would tend to support setf rather than setaf.) 53 | color_prompt=yes 54 | else 55 | color_prompt= 56 | fi 57 | fi 58 | 59 | if [ "$color_prompt" = yes ]; then 60 | PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 61 | else 62 | PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 63 | fi 64 | unset color_prompt force_color_prompt 65 | 66 | # If this is an xterm set the title to user@host:dir 67 | case "$TERM" in 68 | xterm*|rxvt*) 69 | PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" 70 | ;; 71 | *) 72 | ;; 73 | esac 74 | 75 | # enable color support of ls and also add handy aliases 76 | if [ -x /usr/bin/dircolors ]; then 77 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 78 | alias ls='ls --color=auto' 79 | #alias dir='dir --color=auto' 80 | #alias vdir='vdir --color=auto' 81 | 82 | alias grep='grep --color=auto' 83 | alias fgrep='fgrep --color=auto' 84 | alias egrep='egrep --color=auto' 85 | fi 86 | 87 | # some more aliases 88 | alias ll='ls -alF' 89 | alias la='ls -A' 90 | alias l='ls -CF' 91 | alias ..='cd ..' 92 | alias pyserver='python -m SimpleHTTPServer 8000' 93 | 94 | # Docker aliases 95 | alias stopallcontainers='docker stop $(docker ps -qa)' 96 | alias rmallcontainers='docker rm $(docker ps -qa)' 97 | 98 | # Add an "alert" alias for long running commands. Use like so: 99 | # sleep 10; alert 100 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' 101 | 102 | # Alias definitions. 103 | # You may want to put all your additions into a separate file like 104 | # ~/.bash_aliases, instead of adding them here directly. 105 | # See /usr/share/doc/bash-doc/examples in the bash-doc package. 106 | 107 | if [ -f ~/.bash_aliases ]; then 108 | . ~/.bash_aliases 109 | fi 110 | 111 | # enable programmable completion features (you don't need to enable 112 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile 113 | # sources /etc/bash.bashrc). 114 | if ! shopt -oq posix; then 115 | if [ -f /usr/share/bash-completion/bash_completion ]; then 116 | . /usr/share/bash-completion/bash_completion 117 | elif [ -f /etc/bash_completion ]; then 118 | . /etc/bash_completion 119 | fi 120 | fi 121 | 122 | # Colorize branch in Terminal 123 | # export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " 124 | export PS1="\[\033[1;30m\][\[\033[1;34m\]\u@\H\[\033[1;30m\]:\[\033[0;37m\]${SSH_TTY:-o} \ 125 | \[\033[0;32m\]+${SHLVL}\[\033[1;30m\]] \[\033[1;37m\]\w\[\033[0;37m\]\[\033[1;34m\]\$(__git_ps1 \" (%s)\") \[\033[0;37m\] \n\$ " --------------------------------------------------------------------------------