From cde5ecc675fdffb0d57b84e2558e0f575228b6ce Mon Sep 17 00:00:00 2001 From: vtempest Date: Mon, 28 Oct 2024 13:37:58 -0700 Subject: [PATCH 1/5] updated installer - node volta, ensured shells work, and added one-line install command --- README.md | 14 +++++++++++--- install-shell.sh | 43 +++++++++++++++++++++++++++++-------------- systeminfo.sh | 3 +-- 3 files changed, 41 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index d8346f1..43acf46 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,19 @@ > If you hold a unix shell up to your ear, can you hear the C? -# The Devil Is In The Defaults +## The Devil Is In The Defaults -`vscode`, `nvim`, `nu`, `bun`, `node`, `helix`, `starship prompt` and other dev tools. +Setup server shell with `vscode`, `nvim`, `nu`, `bun`, `node`, `helix`, `starship prompt`, `pacstall installer`, and other dev tools. -## System Info When Opening Shell +## Bash Script to Setup Shell + +```bash +sudo bash -c "$( wget -q https://raw.githubusercontent.com/vtempest/server-shell-setup/refs/heads/master/install-shell.sh -O -)" +``` + +Note: Launch Ubuntu server instance, connect and on first time login run `sudo passwd $USER` to set password. You need to enter sudo password when running this setup + +## Example: System Info When Opening Shell 👤 user@XPS15 🔝 0% fish 📁 1% 🌎 130.212.146.39 👮 California State University 📈 Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz 💻 Debian GNU/Linux 12 (bookworm) 🔧 5.15.90.1-microsoft-standard-WSL2 🚀 apt docker git npm pip diff --git a/install-shell.sh b/install-shell.sh index 61b0c7e..24daca1 100644 --- a/install-shell.sh +++ b/install-shell.sh @@ -3,6 +3,7 @@ # setup shell with best dev tools on Ubuntu # fish, nushell, nvim, helix, node, bun, pacstall, docker +# sudo passwd ${USER} # set password for user setup_shell(){ #add fish nvim helix to ubuntu PPA @@ -13,38 +14,51 @@ setup_shell(){ sudo apt install -y fish neovim git wget curl helix - # fish plugins config - curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish - omf install fzf nvm #bun curl -fsSL https://bun.sh/install | bash - #node - wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash; - nvm install node - + #node with volta + curl https://get.volta.sh | bash + source ~/.bashrc + volta install node + #install nushell npm i -g pnpm nushell #nvim config git clone https://github.com/LazyVim/starter ~/.config/nvim - #clear default greeting - sudo rm /etc/motd; sudo rm -rf /etc/update-motd.d; touch ~/.hushlogin; - #starship prompt - curl -sS https://starship.rs/install.sh | sh + #starship prompt -- needs manual setup + sudo sh -c "$(curl -sS https://starship.rs/install.sh )" #install prompt into nu shell - echo "mkdir ~/.cache/starship; starship init nu | save -f ~/.cache/starship/init.nu" >> (/home/$USER/.config/nushell/env.nu) - echo "use ~/.cache/starship/init.nu" >> (/home/$USER/.config/nushell/config.nu) + echo "mkdir ~/.cache/starship; starship init nu | save -f ~/.cache/starship/init.nu" >> /home/$USER/.config/nushell/env.nu + echo "use ~/.cache/starship/init.nu" >> /home/$USER/.config/nushell/config.nu #install prompt into fish shell echo "starship init fish | source" >> ~/.config/fish/config.fish #pacstall - discover 3rd party deb packages - curl -fsSL https://pacstall.dev/q/install | bash + sudo bash -c "$(curl -fsSL https://pacstall.dev/q/install || wget -q https://pacstall.dev/q/install -O -)" + + #clear default greeting + sudo rm -f /etc/motd; sudo rm -rf /etc/update-motd.d; touch ~/.hushlogin; + fish -c "set -U fish_greeting \"\"" + + #install greeting + sudo wget https://raw.githubusercontent.com/vtempest/server-shell-setup/refs/heads/master/systeminfo.sh -O ~/.config/systeminfo.sh + sudo chmod +x ~/.config/systeminfo.sh + sudo echo "bash ~/.config/systeminfo.sh" >> ~/.bashrc + sudo echo "bash ~/.config/systeminfo.sh" >> ~/.config/fish/config.fish + + + # fish plugins config - goes into fish + curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish + fish -c "omf install fzf nvm" + bash + } @@ -73,3 +87,4 @@ setup_root(){ #run main setup_shell +setup_docker \ No newline at end of file diff --git a/systeminfo.sh b/systeminfo.sh index bb1a42f..fc11ec3 100644 --- a/systeminfo.sh +++ b/systeminfo.sh @@ -58,8 +58,7 @@ system_info(){ # package managers - system and languages # remove less common ones to save load time echo -ne "\e[31m 🚀" - for cmd in "apt" "npm" "pip" "docker"\ - \ "hx" "nvim" "bun" + for cmd in "apt" "npm" "pip" "docker" "hx" "nvim" "bun" \ # \ "pkg" "flatpak" "yum" "snap" "pacman"\ # \ "apk" "brew" "bun" do From 5a644855b172c53ca722667cf0b90a171fe6ae0a Mon Sep 17 00:00:00 2001 From: vtempest Date: Mon, 28 Oct 2024 14:01:05 -0700 Subject: [PATCH 2/5] system info emojis and no network msg --- README.md | 10 +++++----- systeminfo.sh | 31 +++++++++++++++++-------------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 43acf46..1d96d12 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,11 @@ Note: Launch Ubuntu server instance, connect and on first time login run `sudo p ## Example: System Info When Opening Shell - 👤 user@XPS15 🔝 0% fish 📁 1% 🌎 130.212.146.39 👮 California State University 📈 Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz 💻 Debian GNU/Linux 12 (bookworm) 🔧 5.15.90.1-microsoft-standard-WSL2 🚀 apt docker git npm pip - -`wget -qO- https://raw.githubusercontent.com/vtempest/server-shell-setup/master/systeminfo.sh | bash` - - +```bash +👤 user@XPS15 🔝 0% fish 📁 1% 🌎 130.212.146.39 👮 California State University +📈 Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz 💻 Debian GNU/Linux 12 (bookworm) +🔧 5.15.90.1-microsoft-standard-WSL2 🚀 apt docker git npm pip +``` ## Reference Docs - 🪄 Magic Spells for Open Sourcery - [nushell Docs](https://www.nushell.sh/book/) diff --git a/systeminfo.sh b/systeminfo.sh index fc11ec3..ad1c339 100644 --- a/systeminfo.sh +++ b/systeminfo.sh @@ -7,7 +7,10 @@ system_info(){ #user - echo -ne "\e[31m👤 $(whoami)\e[0m@\e[91m$(hostname)" + echo -ne "\e[31m👤 $(whoami)" + + #hostname + echo -ne "\e[91m🏠 $(hostname)" #top_process export TOP_PROC=$(ps -eo pcpu,comm --sort=-%cpu --no-headers \ @@ -18,18 +21,18 @@ system_info(){ export DISK_USED=$(df | grep '/$' | awk '{print $5}') echo -ne "\e[35m 📁 $DISK_USED" - #ip - INFO=$(wget -qO- -T1 ipinfo.io) - export IP=$(echo $INFO | grep -oP 'ip\": "\K[^"]+') - echo -ne "\e[32m 🌎 $IP" + # Get IP info or exit with error message + INFO=$(wget -qO- -T1 ipinfo.io 2>/dev/null) || { echo -e "\033[31m ❌ No internet connection"; exit 1; } - #city - export CITY=$(echo $INFO | grep -oP 'city\": "\K[^"]+') - echo -ne "\e[32m 🌎 $CITY" + # Extract info (IP and city will show regardless of domain presence) + IP=$(echo "$INFO" | grep -oP 'ip"\s*:\s*"\K[^"]+' 2>/dev/null) + CITY=$(echo "$INFO" | grep -oP 'city"\s*:\s*"\K[^"]+' 2>/dev/null) + DOMAIN=$(echo "$INFO" | grep -oP 'hostname"\s*:\s*"\K[^"]+' 2>/dev/null) - #domain (if available) - export DOMAIN=$(echo $INFO | grep -oP 'hostname\": "\K[^"]+') - if [ $DOMAIN ]; then echo -ne "\e[37m 🤖 $DOMAIN"; fi + # Display information + echo -ne "\033[32m 🌎 ${IP:-No IP}" + echo -ne "\033[32m 📍 ${CITY:-No City}" + [ -n "$DOMAIN" ] && echo -ne "\033[37m 🔗 $DOMAIN" || echo #isp export ISP=$(echo $INFO | grep -oP 'org\": "\K[^"]+' | cut -f 1 -d ' ' --complement) @@ -43,7 +46,7 @@ system_info(){ #os export OS=$([ -f /etc/os-release ] && grep -oP "^NAME=\"\K[^\"]+" /etc/os-release) - echo -ne "\e[34m 💻 $OS" + echo -ne "\e[34m ⚡ $OS" #device if test -f /sys/devices/virtual/dmi/id/product_name; then @@ -60,8 +63,8 @@ system_info(){ echo -ne "\e[31m 🚀" for cmd in "apt" "npm" "pip" "docker" "hx" "nvim" "bun" \ # \ "pkg" "flatpak" "yum" "snap" "pacman"\ - # \ "apk" "brew" "bun" - do + # \ "apk" "brew" "yarn" "pnpm" "cargo" "gem" "go" + do if [ -x "$(command -v $cmd)" ]; then echo -ne " "$cmd; fi From e54dc3aeafd41e716cbfc780090059c5114cd9c5 Mon Sep 17 00:00:00 2001 From: vtempest Date: Mon, 28 Oct 2024 14:23:12 -0700 Subject: [PATCH 3/5] readme added icon and badges --- README.md | 24 +++++++++++++++++++++--- systeminfo.sh | 12 ++++++------ 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1d96d12..56610e6 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,28 @@ -> If you hold a unix shell up to your ear, can you hear the C? +

+ +

+

+ GitHub Stars + + GitHub Discussions + + + PRs Welcome + + + + +

## The Devil Is In The Defaults +> If you hold a unix shell up to your ear, can you hear the C? + Setup server shell with `vscode`, `nvim`, `nu`, `bun`, `node`, `helix`, `starship prompt`, `pacstall installer`, and other dev tools. -## Bash Script to Setup Shell +## Install: Bash Script to Setup Shell ```bash sudo bash -c "$( wget -q https://raw.githubusercontent.com/vtempest/server-shell-setup/refs/heads/master/install-shell.sh -O -)" @@ -20,7 +37,8 @@ Note: Launch Ubuntu server instance, connect and on first time login run `sudo p 📈 Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz 💻 Debian GNU/Linux 12 (bookworm) 🔧 5.15.90.1-microsoft-standard-WSL2 🚀 apt docker git npm pip ``` -## Reference Docs - 🪄 Magic Spells for Open Sourcery + +## Reference Docs: 🪄 Magic Spells for Open Sourcery - [nushell Docs](https://www.nushell.sh/book/) - [Fish Features Overview](https://medium.com/the-glitcher/fish-shell-3ec1a6cc6128) diff --git a/systeminfo.sh b/systeminfo.sh index ad1c339..92f071b 100644 --- a/systeminfo.sh +++ b/systeminfo.sh @@ -7,10 +7,10 @@ system_info(){ #user - echo -ne "\e[31m👤 $(whoami)" + echo -ne "\e[31m👤$(whoami) " #hostname - echo -ne "\e[91m🏠 $(hostname)" + echo -ne "\e[91m🏠$(hostname)" #top_process export TOP_PROC=$(ps -eo pcpu,comm --sort=-%cpu --no-headers \ @@ -29,10 +29,10 @@ system_info(){ CITY=$(echo "$INFO" | grep -oP 'city"\s*:\s*"\K[^"]+' 2>/dev/null) DOMAIN=$(echo "$INFO" | grep -oP 'hostname"\s*:\s*"\K[^"]+' 2>/dev/null) - # Display information - echo -ne "\033[32m 🌎 ${IP:-No IP}" - echo -ne "\033[32m 📍 ${CITY:-No City}" - [ -n "$DOMAIN" ] && echo -ne "\033[37m 🔗 $DOMAIN" || echo + # network ip and external isp domain name + [ -n "$IP" ] && echo -ne "\033[32m 🌎 ${IP:-No IP}"|| echo -ne "\033[37m 🌎 No Network" + [ -n "$CITY" ] && echo -ne "\033[32m 📍 ${CITY:-No City}" + [ -n "$DOMAIN" ] && echo -ne "\033[37m 🔗 http://$DOMAIN" #isp export ISP=$(echo $INFO | grep -oP 'org\": "\K[^"]+' | cut -f 1 -d ' ' --complement) From 1debebdbb7258f385274f3cb6b9bbe1180a40f2b Mon Sep 17 00:00:00 2001 From: vtempest Date: Mon, 28 Oct 2024 14:35:31 -0700 Subject: [PATCH 4/5] reorder installer --- README.md | 2 +- install-shell.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 56610e6..b5ab587 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Note: Launch Ubuntu server instance, connect and on first time login run `sudo p - [Fish Playground](https://rootnroll.com/d/fish-shell/) - [Bun.js Runtime Docs](https://bun.sh/docs) - [Node.js Best Packages](https://github.com/sindresorhus/awesome-nodejs) -- [nvm Node Installer](https://github.com/nvm-sh/nvm) +- [Volta Node Installer](https://docs.volta.sh/guide/) - [pnpm Package Installer](https://pnpm.io/pnpm-cli) - [Starship Prompt](https://starship.rs/guide/#%F0%9F%9A%80-installation) - [VSCode Docs](https://code.visualstudio.com/docs) diff --git a/install-shell.sh b/install-shell.sh index 24daca1..186a24a 100644 --- a/install-shell.sh +++ b/install-shell.sh @@ -43,16 +43,16 @@ setup_shell(){ #pacstall - discover 3rd party deb packages sudo bash -c "$(curl -fsSL https://pacstall.dev/q/install || wget -q https://pacstall.dev/q/install -O -)" - #clear default greeting - sudo rm -f /etc/motd; sudo rm -rf /etc/update-motd.d; touch ~/.hushlogin; - fish -c "set -U fish_greeting \"\"" - - #install greeting + #install greeting sudo wget https://raw.githubusercontent.com/vtempest/server-shell-setup/refs/heads/master/systeminfo.sh -O ~/.config/systeminfo.sh sudo chmod +x ~/.config/systeminfo.sh sudo echo "bash ~/.config/systeminfo.sh" >> ~/.bashrc sudo echo "bash ~/.config/systeminfo.sh" >> ~/.config/fish/config.fish + #clear default greeting + fish -c "set -U fish_greeting \"\"" + sudo rm -f /etc/motd; sudo rm -rf /etc/update-motd.d; touch ~/.hushlogin; + # fish plugins config - goes into fish curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish From 3c7ab36d7ce40f98a57ecd4ec53799bdc793747c Mon Sep 17 00:00:00 2001 From: vtempest Date: Tue, 29 Oct 2024 12:02:29 -0700 Subject: [PATCH 5/5] automate yes press, add disk cleanup --- clean-server-disk.sh | 215 +++++++++++++++++++++++++++++++++++++++++++ install-shell.sh | 50 ++++++---- 2 files changed, 245 insertions(+), 20 deletions(-) create mode 100644 clean-server-disk.sh diff --git a/clean-server-disk.sh b/clean-server-disk.sh new file mode 100644 index 0000000..7619327 --- /dev/null +++ b/clean-server-disk.sh @@ -0,0 +1,215 @@ +#!/bin/bash + +# Comprehensive Disk Space Cleanup Script +# WARNING: This script performs aggressive cleanup. Review before running. +# Run with sudo privileges + +# Color definitions +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' + +# Check for root privileges +if [ "$EUID" -ne 0 ]; then + echo -e "${RED}Error: Please run as root (sudo)${NC}" + exit 1 +fi + +# Function to print section headers +print_header() { + echo -e "\n${BLUE}=== $1 ===${NC}" +} + +# Function to print success messages +print_success() { + echo -e "${GREEN}✓ $1${NC}" +} + +# Function to format sizes +format_size() { + local size=$1 + if [ $size -gt 1073741824 ]; then + echo "$(awk "BEGIN {printf \"%.2f\", $size/1024/1024/1024}") GB" + elif [ $size -gt 1048576 ]; then + echo "$(awk "BEGIN {printf \"%.2f\", $size/1024/1024}") MB" + elif [ $size -gt 1024 ]; then + echo "$(awk "BEGIN {printf \"%.2f\", $size/1024}") KB" + else + echo "${size} B" + fi +} + +# Get initial disk usage +initial_usage=$(df -B1 / | awk 'NR==2 {print $3}') + +print_header "Starting Aggressive Disk Cleanup" +echo -e "${YELLOW}⚠️ This will perform a thorough system cleanup${NC}" +sleep 2 + +# 1. Package Manager Cleanup +print_header "Package Manager Cleanup" + +if command -v apt-get &> /dev/null; then + # APT cleanup + apt-get clean -y + apt-get autoremove -y + apt-get autoclean -y + rm -rf /var/lib/apt/lists/* + print_success "APT cache and unused packages cleaned" + +elif command -v yum &> /dev/null; then + # YUM cleanup + yum clean all + yum autoremove -y + print_success "YUM cache and unused packages cleaned" + +elif command -v dnf &> /dev/null; then + # DNF cleanup + dnf clean all + dnf autoremove -y + print_success "DNF cache and unused packages cleaned" +fi + +# 2. Docker Cleanup (if installed) +print_header "Docker Resource Cleanup" + +if command -v docker &> /dev/null; then + docker system prune -af --volumes + docker builder prune -af + rm -rf ~/.docker/buildx + print_success "Docker resources cleaned" +fi + +# 3. Log File Cleanup +print_header "Log Cleanup" + +# System logs +find /var/log -type f -name "*.log" -exec truncate -s 0 {} \; +find /var/log -type f -name "*.gz" -delete +find /var/log -type f -name "*.old" -delete +find /var/log -type f -name "*.1" -delete +find /var/log -type f -name "*.2" -delete +find /var/log -type f -name "*.rotated" -delete + +# Journal logs +if command -v journalctl &> /dev/null; then + journalctl --vacuum-time=3d + journalctl --vacuum-size=100M +fi + +print_success "System logs cleaned" + +# 4. Cache Cleanup +print_header "Cache Cleanup" + +# Browser caches (for all users) +find /home -type f -path "*/cache/*" -delete +find /home -type f -path "*/.cache/*" -delete +find /root -type f -path "*/cache/*" -delete +find /root -type f -path "*/.cache/*" -delete + +# Thumbnail cache +find /home -type f -path "*/.thumbnails/*" -delete +rm -rf ~/.thumbnails/* + +# Font cache +fc-cache -f + +# Man page cache +if command -v mandb &> /dev/null; then + rm -rf /var/cache/man/* + mandb +fi + +print_success "System caches cleaned" + +# 5. Temp Files Cleanup +print_header "Temporary Files Cleanup" + +# System temp directories +rm -rf /tmp/* +rm -rf /var/tmp/* + +# User specific temp files +find /home -type f -name "*.tmp" -delete +find /home -type f -name "*.temp" -delete +find /home -type f -name "tmp.*" -delete + +# Crash reports and core dumps +rm -rf /var/crash/* +rm -rf /var/cores/* +echo "kernel.core_pattern=|/bin/false" > /etc/sysctl.d/50-coredump.conf +sysctl -p /etc/sysctl.d/50-coredump.conf + +print_success "Temporary files cleaned" + +# 6. Old Kernel Cleanup +print_header "Kernel Cleanup" + +# Keep only the current and one previous kernel version +if command -v dpkg &> /dev/null; then + current_kernel=$(uname -r | sed 's/-*[a-z].*//g' | sed 's/-$//') + dpkg -l 'linux-*' | sed '/^ii/!d;/'"${current_kernel}"'/d' | awk '{print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]' | xargs apt-get -y purge +fi + +print_success "Old kernels cleaned" + +# 7. Application Specific Cleanup +print_header "Application Specific Cleanup" + +# Clean pip cache +if command -v pip3 &> /dev/null; then + pip3 cache purge +fi + +# Clean npm cache +if command -v npm &> /dev/null; then + npm cache clean --force +fi + +# Clean yarn cache +if command -v yarn &> /dev/null; then + yarn cache clean +fi + +# Clean snapd cache +if command -v snap &> /dev/null; then + snap set system refresh.retain=2 + rm -rf /var/lib/snapd/cache/* +fi + +# Clean flatpak unused runtimes +if command -v flatpak &> /dev/null; then + flatpak uninstall --unused -y +fi + +print_success "Application caches cleaned" + +# 8. User Cleanup +print_header "User Directory Cleanup" + +# Clean user Downloads folders older than 30 days +find /home/*/Downloads -type f -atime +30 -delete 2>/dev/null + +# Remove old bash history +find /home -type f -name ".bash_history" -exec sh -c 'echo "" > {}' \; + +print_success "User directories cleaned" + +# Calculate space freed +final_usage=$(df -B1 / | awk 'NR==2 {print $3}') +space_freed=$((initial_usage - final_usage)) +formatted_space=$(format_size $space_freed) + +print_header "Cleanup Complete" +echo -e "${GREEN}Total space freed: $formatted_space${NC}" + +# Show current disk usage +echo -e "\n${YELLOW}Current Disk Usage:${NC}" +df -h / | awk 'NR==1{print} NR==2{print}' + +# Optional: Sync disks and clear RAM cache +sync +echo 3 > /proc/sys/vm/drop_caches diff --git a/install-shell.sh b/install-shell.sh index 186a24a..0b063f7 100644 --- a/install-shell.sh +++ b/install-shell.sh @@ -4,12 +4,15 @@ # fish, nushell, nvim, helix, node, bun, pacstall, docker # sudo passwd ${USER} # set password for user +# INSTALL: +# sudo bash -c "$( wget -q https://raw.githubusercontent.com/vtempest/server-shell-setup/refs/heads/master/install-shell.sh -O -)" + setup_shell(){ #add fish nvim helix to ubuntu PPA - sudo apt-add-repository ppa:fish-shell/release-3 - sudo add-apt-repository ppa:neovim-ppa/stable - sudo add-apt-repository ppa:maveonair/helix-editor + echo -e '\n' | sudo apt-add-repository ppa:fish-shell/release-3 + echo -e '\n' | sudo add-apt-repository ppa:neovim-ppa/stable + echo -e '\n' | sudo add-apt-repository ppa:maveonair/helix-editor sudo apt update sudo apt install -y fish neovim git wget curl helix @@ -19,9 +22,10 @@ setup_shell(){ curl -fsSL https://bun.sh/install | bash #node with volta - curl https://get.volta.sh | bash + bash -c "$(curl -sS https://get.volta.sh )" + source ~/.bashrc - volta install node + bash -c "volta install node" #install nushell npm i -g pnpm nushell @@ -30,34 +34,40 @@ setup_shell(){ git clone https://github.com/LazyVim/starter ~/.config/nvim - #starship prompt -- needs manual setup - sudo sh -c "$(curl -sS https://starship.rs/install.sh )" - - #install prompt into nu shell - echo "mkdir ~/.cache/starship; starship init nu | save -f ~/.cache/starship/init.nu" >> /home/$USER/.config/nushell/env.nu - echo "use ~/.cache/starship/init.nu" >> /home/$USER/.config/nushell/config.nu - - #install prompt into fish shell - echo "starship init fish | source" >> ~/.config/fish/config.fish - - #pacstall - discover 3rd party deb packages - sudo bash -c "$(curl -fsSL https://pacstall.dev/q/install || wget -q https://pacstall.dev/q/install -O -)" - #install greeting sudo wget https://raw.githubusercontent.com/vtempest/server-shell-setup/refs/heads/master/systeminfo.sh -O ~/.config/systeminfo.sh sudo chmod +x ~/.config/systeminfo.sh sudo echo "bash ~/.config/systeminfo.sh" >> ~/.bashrc sudo echo "bash ~/.config/systeminfo.sh" >> ~/.config/fish/config.fish + + #pacstall - discover 3rd party deb packages + yes | sudo bash -c "$(curl -fsSL https://pacstall.dev/q/install || wget -q https://pacstall.dev/q/install -O -)" + #clear default greeting fish -c "set -U fish_greeting \"\"" sudo rm -f /etc/motd; sudo rm -rf /etc/update-motd.d; touch ~/.hushlogin; # fish plugins config - goes into fish - curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish + curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > omf-install.sh + chmox +x omf-install.sh + fish -c "./omf-install.sh --path=~/.local/share/omf --config=~/.config/omf" fish -c "omf install fzf nvm" - bash + rm -f omf-install.sh + + + #starship prompt -- needs manual setup + sudo sh -c "$(curl -sS https://starship.rs/install.sh )" + + #install prompt into nu shell + echo "mkdir ~/.cache/starship; starship init nu | save -f ~/.cache/starship/init.nu" >> /home/$USER/.config/nushell/env.nu + echo "use ~/.cache/starship/init.nu" >> /home/$USER/.config/nushell/config.nu + + #install prompt into fish shell + echo "starship init fish | source" >> ~/.config/fish/config.fish + + }