Compare commits
2 Commits
e82a644e99
...
226ce4eec4
| Author | SHA1 | Date | |
|---|---|---|---|
| 226ce4eec4 | |||
| 61ad1bb003 |
33
main.sh
33
main.sh
@@ -14,9 +14,10 @@ sudo apt-get update
|
|||||||
## ESSENTIAL TOOLS ##
|
## ESSENTIAL TOOLS ##
|
||||||
#######################
|
#######################
|
||||||
echo "## dev/programming & essential tools/programs" | tee todo.md -a
|
echo "## dev/programming & essential tools/programs" | tee todo.md -a
|
||||||
|
echo "* install drivers & such" | tee todo.md -a
|
||||||
|
|
||||||
# Install some apt packages
|
# Install some apt packages
|
||||||
sudo apt-get upgrade
|
sudo apt-get upgrade -y
|
||||||
sudo apt-get install -y curl git jq build-essentials unzip # for development
|
sudo apt-get install -y curl git jq build-essentials unzip # for development
|
||||||
sudo apt-get install -y ripgrep # I honestly don't remember why I installed these
|
sudo apt-get install -y ripgrep # I honestly don't remember why I installed these
|
||||||
echo "* globstar?" | tee todo.md -a
|
echo "* globstar?" | tee todo.md -a
|
||||||
@@ -32,21 +33,22 @@ uv python install --default
|
|||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash
|
||||||
\. "$HOME/.nvm/nvm.sh" # in lieu of restarting the shell
|
\. "$HOME/.nvm/nvm.sh" # in lieu of restarting the shell
|
||||||
nvm install 24
|
nvm install 24
|
||||||
echo "* verify nvm stuff added to correct bashrc" | tee todo.md -a
|
|
||||||
|
|
||||||
# install a nerd font (provides special symbols for zsh/starship)
|
# install a nerd font (provides special symbols for zsh/starship)
|
||||||
mkdir -p /usr/share/fonts/truetype/DejaVuSansMono/
|
sudo mkdir -p /usr/share/fonts/truetype/DejaVuSansMono/
|
||||||
unzip ./utils/DejaVuSansMono.zip /usr/share/fonts/truetype/DejaVuSansMono/
|
sudo unzip ./utils/DejaVuSansMono.zip /usr/share/fonts/truetype/DejaVuSansMono/
|
||||||
|
|
||||||
# zsh (better shell)
|
# zsh (better shell)
|
||||||
echo "* add zsh and starship, etc. + nerd font" | tee todo.md -a
|
echo "* add zsh and starship, etc. + nerd font" | tee todo.md -a
|
||||||
sudo apt-get install -y zsh
|
sudo apt-get install -y zsh
|
||||||
|
sudo chsh $SUDO_USER -s /bin/zsh
|
||||||
|
cp ./utils/dotzshrc "$HOME/.zshrc"
|
||||||
|
|
||||||
# starship (shell prompt)
|
# starship (shell prompt)
|
||||||
curl -sS https://starship.rs/install.sh | sh
|
curl -sS https://starship.rs/install.sh | sudo sh
|
||||||
# echo 'eval "$(starship init zsh)"' | tee "#USER_DIR/.zshrc" -a # should already be in zshrc
|
# echo 'eval "$(starship init zsh)"' | tee "$HOME/.zshrc" -a # should already be in zshrc
|
||||||
mkdir -p "$USER_DIR/.config"
|
sudo -u $SUDO_USER mkdir -p "$HOME/.config"
|
||||||
cp ./utils/starship.toml "$USER_DIR/.config/starship.toml"
|
cp ./utils/starship.toml "$HOME/.config/starship.toml"
|
||||||
|
|
||||||
# Neovim
|
# Neovim
|
||||||
echo "* install neovim & clone config" | tee todo.md -a
|
echo "* install neovim & clone config" | tee todo.md -a
|
||||||
@@ -75,14 +77,14 @@ echo "## workflow helpers, small tools, and utilities" | tee todo.md -a
|
|||||||
|
|
||||||
# pbcopy/pbpaste (from macOS)
|
# pbcopy/pbpaste (from macOS)
|
||||||
sudo apt-get install -y xclip
|
sudo apt-get install -y xclip
|
||||||
printf '#!/bin/bash \nxclip -selection clipboard' | tee /usr/local/bin/pbcopy
|
printf '#!/bin/bash \nxclip -selection clipboard' | sudo -u $SUDO_USER tee /usr/local/bin/pbcopy
|
||||||
chmod 755 /usr/local/bin/pbcopy
|
chmod 755 /usr/local/bin/pbcopy
|
||||||
printf '#!/bin/bash \nxclip -selection clipboard -o' | tee /usr/local/bin/pbpaste
|
printf '#!/bin/bash \nxclip -selection clipboard -o' | sudo -u $SUDO_USER tee /usr/local/bin/pbpaste
|
||||||
chmod 755 /usr/local/bin/pbpaste
|
chmod 755 /usr/local/bin/pbpaste
|
||||||
|
|
||||||
# WordNet & def utility
|
# WordNet & def utility
|
||||||
sudo apt-get install -y wordnet
|
sudo apt-get install -y wordnet
|
||||||
printf '#!/bin/bash \nwn $1 -over' | tee /usr/local/bin/def
|
printf '#!/bin/bash \nwn $1 -over' | sudo -u $SUDO_USER tee /usr/local/bin/def
|
||||||
chmod 755 /usr/local/bin/def
|
chmod 755 /usr/local/bin/def
|
||||||
|
|
||||||
# Artha (WordNet dictionary)
|
# Artha (WordNet dictionary)
|
||||||
@@ -93,21 +95,20 @@ sudo apt-get install -y qpdf
|
|||||||
|
|
||||||
# rndrmarkdown markdown renderer
|
# rndrmarkdown markdown renderer
|
||||||
sudo apt-get install -y pandoc
|
sudo apt-get install -y pandoc
|
||||||
cp ./utils/rndrmarkdown /usr/local/bin/rndrmarkdown
|
sudo -u $SUDO_USER cp ./utils/rndrmarkdown /usr/local/bin/rndrmarkdown
|
||||||
chmod 755 /usr/local/bin/rndrmarkdown
|
sudo -u $SUDO_USER chmod 755 /usr/local/bin/rndrmarkdown
|
||||||
echo 'alias rmd="rndrmarkdown"' | tee ~/.bashrc -a
|
echo 'alias rmd="rndrmarkdown"' | tee ~/.bashrc -a
|
||||||
|
|
||||||
# readline (for piping 1 line into wc)
|
# readline (for piping 1 line into wc)
|
||||||
printf '#!/bin/bash \necho "$(head -n $1 $2 | tail -n 1)"' | tee /usr/local/bin/rline
|
printf '#!/bin/bash \necho "$(head -n $1 $2 | tail -n 1)"' | sudo -u $SUDO_USER tee /usr/local/bin/rline
|
||||||
chmod 755 /usr/local/bin/rline
|
chmod 755 /usr/local/bin/rline
|
||||||
echo "* verify rline formatted correctly"
|
echo "* verify rline formatted correctly"
|
||||||
|
|
||||||
# Calc (command-line calculator)
|
# Calc (command-line calculator)
|
||||||
sudo apt-get install -y calc
|
sudo apt-get install -y calc
|
||||||
|
|
||||||
# OpenSSH server (prob already has ssh client)
|
# OpenSSH server
|
||||||
sudo apt-get install -y openssh-server
|
sudo apt-get install -y openssh-server
|
||||||
echo "* verify has openSSH client" | tee todo.md -a
|
|
||||||
|
|
||||||
# Wine (run windoze apps)
|
# Wine (run windoze apps)
|
||||||
sudo apt-get install -y winehq
|
sudo apt-get install -y winehq
|
||||||
|
|||||||
34
utils/dotzshrc
Normal file
34
utils/dotzshrc
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# some handy ls aliases
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias ll='ls -alF'
|
||||||
|
alias la='ls -A'
|
||||||
|
alias l='ls -CF'
|
||||||
|
|
||||||
|
# some handy grep aliases
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
|
||||||
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
|
# sleep 10; alert
|
||||||
|
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$//'\'')"'
|
||||||
|
|
||||||
|
export PATH="/usr/local/texlive/2024/bin/x86_64-linux:$PATH"
|
||||||
|
export PATH="$PATH:/usr/local/go/bin"
|
||||||
|
export PATH="$PATH:/opt/mssql-tools18/bin"
|
||||||
|
export PATH="$PATH:/home/evan/go/bin"
|
||||||
|
|
||||||
|
alias open="xdg-open"
|
||||||
|
alias nv="nvim"
|
||||||
|
|
||||||
|
# colored GCC warnings and errors
|
||||||
|
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
|
|
||||||
|
|
||||||
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
|
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
||||||
|
export SDKMAN_DIR="$HOME/.sdkman"
|
||||||
|
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
29
utils/starship.toml
Normal file
29
utils/starship.toml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
"$schema" = 'https://starship.rs/config-schema.json'
|
||||||
|
|
||||||
|
add_newline = false
|
||||||
|
|
||||||
|
# $git_branch $git_status
|
||||||
|
format = '''
|
||||||
|
$username[@](bright-green)$hostname:$directory\$ '''
|
||||||
|
|
||||||
|
[username]
|
||||||
|
show_always = true
|
||||||
|
format = '[$user]($style)'
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
ssh_only = false
|
||||||
|
trim_at = ''
|
||||||
|
style = 'bold green'
|
||||||
|
format = '[$ssh_symbol$hostname]($style)'
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
truncation_length = 9999
|
||||||
|
style = 'bold blue'
|
||||||
|
format = '[$path]($style)[$read_only]($read_only_style)'
|
||||||
|
truncate_to_repo = false
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = '[\$](white)'
|
||||||
|
error_symbol = '[\$](red)'
|
||||||
|
|
||||||
|
# eval "$(starship init bash)"
|
||||||
Reference in New Issue
Block a user