├── LICENSE ├── README.md ├── configs ├── tilix │ └── tilix.dconf ├── vscode │ ├── extensions.txt │ └── settings.json └── zsh │ └── .zshrc ├── install.sh └── wallpapers ├── eva01.png ├── eva02.jpg └── totoro.jpg /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Adelson Júnior 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # post-install-script 2 | 3 | ## Prepare Workstation 4 | 5 | 1. Install Git 6 | 7 | ~~~bash 8 | sudo apt install git curl -y 9 | ~~~ 10 | 11 | 2. Clone this repository 12 | 13 | ~~~bash 14 | git clone https://github.com/adelsonsljunior/post-install-script.git 15 | ~~~ 16 | 17 | 3. Run the script 18 | 19 | ~~~bash 20 | cd post-install-script && ./install.sh 21 | ~~~ 22 | 23 | ## Or run with curl 24 | 25 | ~~~bash 26 | curl -s https://raw.githubusercontent.com/adelsonsljunior/post-install-script/main/install.sh | bash 27 | ~~~ 28 | 29 | -------------------------------------------------------------------------------- /configs/tilix/tilix.dconf: -------------------------------------------------------------------------------- 1 | [/] 2 | prompt-on-close=true 3 | prompt-on-delete-profile=true 4 | window-style='normal' 5 | 6 | [keybindings] 7 | session-add-down='f' 8 | session-add-right='r' 9 | session-resize-terminal-down='Down' 10 | session-resize-terminal-left='Left' 11 | session-resize-terminal-right='Right' 12 | session-resize-terminal-up='Up' 13 | session-switch-to-terminal-down='Down' 14 | session-switch-to-terminal-left='Left' 15 | session-switch-to-terminal-right='Right' 16 | session-switch-to-terminal-up='Up' 17 | session-synchronize-input='a' 18 | win-switch-to-session-1='1' 19 | win-switch-to-session-2='2' 20 | 21 | [profiles] 22 | default='25ffcb09-be00-47c0-871d-7258e89acec1' 23 | list=['2b7c4080-0ddd-46c5-8f23-563fd3ba789d', '25ffcb09-be00-47c0-871d-7258e89acec1'] 24 | 25 | [profiles/25ffcb09-be00-47c0-871d-7258e89acec1] 26 | background-transparency-percent=10 27 | default-size-columns=85 28 | font='MesloLGS NF 15' 29 | use-system-font=false 30 | visible-name='eu' 31 | 32 | [profiles/2b7c4080-0ddd-46c5-8f23-563fd3ba789d] 33 | visible-name='Padrão' 34 | -------------------------------------------------------------------------------- /configs/vscode/extensions.txt: -------------------------------------------------------------------------------- 1 | arcticicestudio.nord-visual-studio-code 2 | PKief.material-icon-theme 3 | eamodio.gitlens 4 | github.copilot 5 | github.copilot-chat 6 | ms-azuretools.vscode-docker 7 | ms-vscode-remote.remote-containers 8 | ms-vscode-remote.remote-ssh 9 | ms-vscode-remote.remote-ssh-edit 10 | ms-vscode-remote.remote-wsl 11 | ms-vscode-remote.vscode-remote-extensionpack 12 | ms-vscode.remote-explorer 13 | ms-vscode.remote-server 14 | visualstudioexptteam.intellicode-api-usage-examples 15 | visualstudioexptteam.vscodeintellicode -------------------------------------------------------------------------------- /configs/vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | // Appearance 3 | "workbench.colorTheme": "Nord", 4 | "workbench.iconTheme": "material-icon-theme", 5 | "editor.fontSize": 15, 6 | "terminal.integrated.fontSize": 14, 7 | // Configs 8 | "files.autoSave": "afterDelay", 9 | "workbench.layoutControl.enabled": false, 10 | "chat.commandCenter.enabled": false, 11 | "window.commandCenter": false, 12 | "github.copilot.enable": { 13 | "*": true, 14 | "markdown": false, 15 | "go": false, 16 | "c": true, 17 | "python": false, 18 | "github-actions-workflow": false 19 | }, 20 | "[python]": { 21 | "editor.defaultFormatter": "charliermarsh.ruff" 22 | } 23 | } -------------------------------------------------------------------------------- /configs/zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # If you come from bash you might have to change your $PATH. 2 | # export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH 3 | 4 | # Path to your Oh My Zsh installation. 5 | export ZSH="$HOME/.oh-my-zsh" 6 | 7 | # Set name of the theme to load --- if set to "random", it will 8 | # load a random theme each time Oh My Zsh is loaded, in which case, 9 | # to know which specific one was loaded, run: echo $RANDOM_THEME 10 | # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes 11 | 12 | ZSH_THEME="cloud" 13 | 14 | # Set list of themes to pick from when loading at random 15 | # Setting this variable when ZSH_THEME=random will cause zsh to load 16 | # a theme from this variable instead of looking in $ZSH/themes/ 17 | # If set to an empty array, this variable will have no effect. 18 | # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) 19 | 20 | # Uncomment the following line to use case-sensitive completion. 21 | # CASE_SENSITIVE="true" 22 | 23 | # Uncomment the following line to use hyphen-insensitive completion. 24 | # Case-sensitive completion must be off. _ and - will be interchangeable. 25 | # HYPHEN_INSENSITIVE="true" 26 | 27 | # Uncomment one of the following lines to change the auto-update behavior 28 | # zstyle ':omz:update' mode disabled # disable automatic updates 29 | # zstyle ':omz:update' mode auto # update automatically without asking 30 | # zstyle ':omz:update' mode reminder # just remind me to update when it's time 31 | 32 | # Uncomment the following line to change how often to auto-update (in days). 33 | # zstyle ':omz:update' frequency 13 34 | 35 | # Uncomment the following line if pasting URLs and other text is messed up. 36 | # DISABLE_MAGIC_FUNCTIONS="true" 37 | 38 | # Uncomment the following line to disable colors in ls. 39 | # DISABLE_LS_COLORS="true" 40 | 41 | # Uncomment the following line to disable auto-setting terminal title. 42 | # DISABLE_AUTO_TITLE="true" 43 | 44 | # Uncomment the following line to enable command auto-correction. 45 | # ENABLE_CORRECTION="true" 46 | 47 | # Uncomment the following line to display red dots whilst waiting for completion. 48 | # You can also set it to another string to have that shown instead of the default red dots. 49 | # e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" 50 | # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) 51 | # COMPLETION_WAITING_DOTS="true" 52 | 53 | # Uncomment the following line if you want to disable marking untracked files 54 | # under VCS as dirty. This makes repository status check for large repositories 55 | # much, much faster. 56 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 57 | 58 | # Uncomment the following line if you want to change the command execution time 59 | # stamp shown in the history command output. 60 | # You can set one of the optional three formats: 61 | # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 62 | # or set a custom format using the strftime function format specifications, 63 | # see 'man strftime' for details. 64 | # HIST_STAMPS="mm/dd/yyyy" 65 | 66 | # Would you like to use another custom folder than $ZSH/custom? 67 | # ZSH_CUSTOM=/path/to/new-custom-folder 68 | 69 | # Which plugins would you like to load? 70 | # Standard plugins can be found in $ZSH/plugins/ 71 | # Custom plugins may be added to $ZSH_CUSTOM/plugins/ 72 | # Example format: plugins=(rails git textmate ruby lighthouse) 73 | # Add wisely, as too many plugins slow down shell startup. 74 | plugins=( 75 | git 76 | zsh-syntax-highlighting 77 | zsh-autosuggestions 78 | z 79 | ) 80 | 81 | source $ZSH/oh-my-zsh.sh 82 | 83 | # User configuration 84 | 85 | # export MANPATH="/usr/local/man:$MANPATH" 86 | 87 | # You may need to manually set your language environment 88 | # export LANG=en_US.UTF-8 89 | 90 | # Preferred editor for local and remote sessions 91 | # if [[ -n $SSH_CONNECTION ]]; then 92 | # export EDITOR='vim' 93 | # else 94 | # export EDITOR='nvim' 95 | # fi 96 | 97 | # Compilation flags 98 | # export ARCHFLAGS="-arch $(uname -m)" 99 | 100 | # Set personal aliases, overriding those provided by Oh My Zsh libs, 101 | # plugins, and themes. Aliases can be placed here, though Oh My Zsh 102 | # users are encouraged to define aliases within a top-level file in 103 | # the $ZSH_CUSTOM folder, with .zsh extension. Examples: 104 | # - $ZSH_CUSTOM/aliases.zsh 105 | # - $ZSH_CUSTOM/macos.zsh 106 | # For a full list of active aliases, run `alias`. 107 | # 108 | # Example aliases 109 | # alias zshconfig="mate ~/.zshrc" 110 | # alias ohmyzsh="mate ~/.oh-my-zsh" 111 | 112 | #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! 113 | export SDKMAN_DIR="$HOME/.sdkman" 114 | [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" 115 | 116 | . "$HOME/.asdf/asdf.sh" 117 | . "/home/adelson/.local/bin" 118 | 119 | export PATH=$PATH:$(go env GOPATH)/bin 120 | export PATH=/home/adelson/.local/bin:$PATH 121 | 122 | ## ALIAS 123 | alias upup="sudo apt update -y && sudo apt upgrade -y" 124 | alias up="sudo apt update -y" 125 | alias ips="ip -c -br a" 126 | 127 | alias c="clear" 128 | alias k="kubectl" 129 | alias v="vagrant" 130 | 131 | pyclean () { 132 | find . -regex '^.*\(__pycache__\|\.py[co]\)$' -delete 133 | } -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## VARIÁVEIS 4 | DOWNLOADS_DIRECTORY="/tmp/programas" 5 | VSCODE_CONFIGS_DIRECTORY="$HOME/.config/Code/User" 6 | WALLPAPER_DIRECTORY="$HOME/Imagens/wallpapers" 7 | FONTS_DIRECTORY="$HOME/.local/share/fonts" 8 | 9 | DEP_PACKAGES=( 10 | "https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64" 11 | https://download.virtualbox.org/virtualbox/7.1.6/virtualbox-7.1_7.1.6-167084~Ubuntu~jammy_amd64.deb 12 | https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 13 | https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb 14 | ) 15 | 16 | APT_PROGRAMS=( 17 | vim 18 | htop 19 | tree 20 | build-essential 21 | code 22 | vagrant 23 | zsh 24 | tilix 25 | ) 26 | 27 | FLATPAK_PROGRAMS=( 28 | com.obsproject.Studio 29 | org.telegram.desktop 30 | dev.vencord.Vesktop 31 | ) 32 | 33 | DEPENDENCIES=( 34 | software-properties-common 35 | apt-transport-https 36 | zip 37 | unzip 38 | dconf-cli 39 | ) 40 | 41 | GREEN='\e[0;32m' 42 | DEFAULT='\e[0m' 43 | 44 | ## RESOLVENDO DEPENDÊNCIAS 45 | for dependence in ${DEPENDENCIES[@]}; do 46 | echo -e "${GREEN}[INFO] - Instalando ${dependence}.${DEFAULT}" 47 | sudo apt-get install $dependence -y > /dev/null 48 | done 49 | 50 | ## FUNÇÕES 51 | REMOVE_LOCKS() { 52 | sudo rm /var/lib/dpkg/lock-frontend 53 | sudo rm /var/cache/apt/archives/lock 54 | } 55 | 56 | INSTALL_DEB_PROGRAMS() { 57 | echo -e "${GREEN}[INFO] - Instalando pacotes .deb.${DEFAULT}" 58 | [[ ! -d "$DOWNLOADS_DIRECTORY" ]] && mkdir -p "$DOWNLOADS_DIRECTORY" 59 | 60 | for url in "${DEP_PACKAGES[@]}"; do 61 | if [[ "$url" == *"code.visualstudio.com"* ]]; then 62 | filename="vscode_latest_amd64.deb" # Nome personalizado para o VS Code 63 | filepath="$DOWNLOADS_DIRECTORY/$filename" 64 | echo -e "${GREEN}[INFO] - Baixando VS Code...${DEFAULT}" 65 | curl -sSL --progress-bar -o "$filepath" -J "$url" # -J para pegar o nome real do arquivo 66 | else 67 | filename=$(basename "$url") 68 | filepath="$DOWNLOADS_DIRECTORY/$filename" 69 | echo -e "${GREEN}[INFO] - Baixando $filename...${DEFAULT}" 70 | curl -sSL --progress-bar -o "$filepath" "$url" 71 | fi 72 | 73 | echo -e "${GREEN}[INFO] - Instalando $filename...${DEFAULT}" 74 | sudo dpkg -i "$filepath" > /dev/null 75 | sudo apt-get install -f -y > /dev/null # Corrige dependências 76 | done 77 | } 78 | 79 | APT_UPDATE() { 80 | sudo apt-get update -y 81 | } 82 | 83 | INSTALL_APT_PROGRAMS() { 84 | for program in ${APT_PROGRAMS[@]}; do 85 | echo -e "${GREEN}[INFO] - Instalando $program.${DEFAULT}" 86 | sudo apt-get install $program -y > /dev/null 87 | done 88 | } 89 | 90 | ADD_EXTERN_REPOS() { 91 | #VAGRANT 92 | echo -e "${GREEN}[INFO] - Adicionando repositório do Vagrant.${DEFAULT}" 93 | curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg 94 | echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list 95 | } 96 | 97 | VSCODE_INSTALL_EXTENSIONS() { 98 | echo -e "${GREEN}[INFO] - Instalando extensões do vscode.${DEFAULT}" 99 | cat ./configs/vscode/extensions.txt | xargs -L 1 code --install-extension 100 | } 101 | 102 | VSCODE_CONFIG() { 103 | [[ ! -d "$VSCODE_CONFIGS_DIRECTORY" ]] && mkdir -p "$VSCODE_CONFIGS_DIRECTORY" 104 | echo -e "${GREEN}[INFO] - Copiando configurações do vscode.${DEFAULT}" 105 | cp ./configs/vscode/settings.json $HOME/.config/Code/User 106 | } 107 | 108 | INSTALL_FLATPAK_PROGRAMS() { 109 | for program in ${FLATPAK_PROGRAMS[@]}; do 110 | echo -e "${GREEN}[INFO] - Instalando $program." 111 | sudo flatpak install flathub $program -y > /dev/null 112 | done 113 | } 114 | 115 | INSTALL_DOCKER() { 116 | echo -e "${GREEN}[INFO] - Instalando Docker.${DEFAULT}" 117 | curl -fsSL https://get.docker.com | sudo bash > /dev/null 118 | sudo groupadd docker 119 | sudo usermod -aG docker $USER 120 | } 121 | 122 | UP_PORTAINER() { 123 | echo -e "${GREEN}[INFO] - Subindo Portainer.${DEFAULT}" 124 | sudo docker volume create portainer_data 125 | sudo docker run -d -p 8000:8000 -p 9000:9000 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:lts > /dev/null 126 | } 127 | 128 | INSTALL_ASDF() { 129 | echo -e "${GREEN}[INFO] - Instalando asdf.${DEFAULT}" 130 | git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.18.0 > /dev/null 131 | . "$HOME/.asdf/asdf.sh" 132 | echo '\n. $HOME/.asdf/asdf.sh' >>~/.bashrc 133 | echo '\n. $HOME/.asdf/completions/asdf.bash' >>~/.bashrc 134 | } 135 | 136 | INSTALL_SDKMAN_JAVA() { 137 | echo -e "${GREEN}[INFO] - Instalando sdkman.${DEFAULT}" 138 | curl -s "https://get.sdkman.io" | bash > /dev/null 139 | source "$HOME/.sdkman/bin/sdkman-init.sh" 140 | 141 | echo "[INFO] - Instalando Java.${DEFAULT}" 142 | sdk install java > /dev/null 143 | } 144 | 145 | INSTALL_UV(){ 146 | echo -e "${GREEN}[INFO] - Instalando uv.${DEFAULT}" 147 | curl -LsSf https://astral.sh/uv/install.sh | sh > /dev/null 148 | } 149 | 150 | INSTALL_OH_MY_ZSH() { 151 | echo -e "${GREEN}[INFO] - Instalando oh-my-zsh.${DEFAULT}" 152 | yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" > /dev/null 153 | } 154 | 155 | INSTALL_OH_MY_ZSH_PLUGINS() { 156 | echo -e "${GREEN}[INFO] - Instalando plugins do oh-my-zsh.${DEFAULT}" 157 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting > /dev/null 158 | git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions > /dev/null 159 | } 160 | 161 | ZSH_CONFIG() { 162 | echo -e "${GREEN}[INFO] - Copiando configurações do zsh.${DEFAULT}" 163 | cp ./configs/zsh/.zshrc $HOME/.zshrc 164 | } 165 | 166 | GIT_CHANGE_DEFAULT_BRANCH_NAME() { 167 | echo -e "${GREEN}[INFO] - Alterando nome da branch padrão do git.${DEFAULT}" 168 | git config --global init.defaultBranch main 169 | } 170 | 171 | TILIX_CONFIG() { 172 | echo -e "${GREEN}[INFO] - Copiando configurações do Tilix.${DEFAULT}" 173 | dconf load /com/gexperts/Tilix/ < ./configs/tilix/tilix.dconf 174 | } 175 | 176 | COPY_WALLPAPERS() { 177 | echo -e "${GREEN}[INFO] - Copiando wallpapers.${DEFAULT}" 178 | [[ ! -d "$WALLPAPER_DIRECTORY" ]] && mkdir -p "$WALLPAPER_DIRECTORY" 179 | cp ./configs/wallpapers/* $WALLPAPER_DIRECTORY 180 | } 181 | 182 | SET_WALLPAPER() { 183 | echo -e "${GREEN}[INFO] - Definindo wallpaper.${DEFAULT}" 184 | gsettings set org.gnome.desktop.background picture-uri "file://$WALLPAPER_DIRECTORY/eva01.png" 185 | gsettings set org.gnome.desktop.background picture-uri-dark "file://$WALLPAPER_DIRECTORY/eva01.png" 186 | } 187 | 188 | SET_DEFAULT_TERMINAL() { 189 | echo -e "${GREEN}[INFO] - Definindo terminal padrão.${DEFAULT}" 190 | echo "2" | sudo update-alternatives --config x-terminal-emulator > /dev/null 191 | } 192 | 193 | INSTALL_MESLO_NF(){ 194 | echo -e "${GREEN}[INFO] - Instalando fonte Meslo NF.${DEFAULT}" 195 | [[ ! -d "$FONTS_DIRECTORY" ]] && mkdir -p "$FONTS_DIRECTORY" 196 | curl -L "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/Meslo.zip" -o /tmp/Meslo.zip 197 | unzip -o /tmp/Meslo.zip -d "$FONTS_DIRECTORY" > /dev/null 198 | fc-cache -fv > /dev/null 199 | } 200 | 201 | UPDATE_AND_CLEAR_SYSTEM() { 202 | sudo apt update -y && sudo apt upgrade -y 203 | sudo apt-get autoclean -y 204 | sudo apt-get autoremove -y 205 | } 206 | 207 | ## EXECUÇÃO 208 | REMOVE_LOCKS 209 | INSTALL_DEB_PROGRAMS 210 | ADD_EXTERN_REPOS 211 | APT_UPDATE 212 | INSTALL_APT_PROGRAMS 213 | INSTALL_FLATPAK_PROGRAMS 214 | VSCODE_INSTALL_EXTENSIONS 215 | VSCODE_CONFIG 216 | TILIX_CONFIG 217 | INSTALL_DOCKER 218 | UP_PORTAINER 219 | INSTALL_ASDF 220 | INSTALL_SDKMAN_JAVA 221 | INSTALL_UV 222 | INSTALL_OH_MY_ZSH 223 | INSTALL_OH_MY_ZSH_PLUGINS 224 | ZSH_CONFIG 225 | GIT_CHANGE_DEFAULT_BRANCH_NAME 226 | COPY_WALLPAPERS 227 | SET_WALLPAPER 228 | INSTALL_MESLO_NF 229 | SET_DEFAULT_TERMINAL 230 | UPDATE_AND_CLEAR_SYSTEM 231 | -------------------------------------------------------------------------------- /wallpapers/eva01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adelsonsljunior/post-install-script/08513a4f9ea08368d0e14d5938dfd93a56485784/wallpapers/eva01.png -------------------------------------------------------------------------------- /wallpapers/eva02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adelsonsljunior/post-install-script/08513a4f9ea08368d0e14d5938dfd93a56485784/wallpapers/eva02.jpg -------------------------------------------------------------------------------- /wallpapers/totoro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adelsonsljunior/post-install-script/08513a4f9ea08368d0e14d5938dfd93a56485784/wallpapers/totoro.jpg --------------------------------------------------------------------------------