diff --git a/config-files/config.fish b/config-files/config.fish new file mode 100644 index 0000000..16304a7 --- /dev/null +++ b/config-files/config.fish @@ -0,0 +1,15 @@ +if status is-interactive + # Commands to run in interactive sessions can go here +end + +set -U fish_greeting "" + +source ~/.asdf/asdf.fish + +# pyenv init +if command -v pyenv 1>/dev/null 2>&1 + pyenv init - | source +end + +starship init fish | source +neofetch diff --git a/config-files/starship.toml b/config-files/starship.toml new file mode 100644 index 0000000..3b09b3d --- /dev/null +++ b/config-files/starship.toml @@ -0,0 +1,7 @@ +add_newline=true +[directory] +home_symbol='🐟  ~' +[line_break] +disabled=true +[cmd_duration] +format='[$duration]($style)' diff --git a/izebra-linux-oneshot.sh b/izebra-linux-oneshot.sh new file mode 100644 index 0000000..877e500 --- /dev/null +++ b/izebra-linux-oneshot.sh @@ -0,0 +1,38 @@ +#!/bin/bash +#Linux Onboarding Oneshot script for izebra networks. +#Installs fish, starship, and sets up some shell tweaks that are nice to have. +#Check script is running as root +if (whoami != root) + then echo "Please run as Root" + exit 1 +fi + +#define variables +$fishconfig="https://git.izebra.net/izebra_projects/rmm-scripts/raw/branch/main/config-files/config.fish" +$starshipconfig="https://git.izebra.net/izebra_projects/rmm-scripts/raw/branch/main/config-files/starship.toml" + +#Check for updates +sudo apt update + +#install fish and copy config file to root and all users under /home/ +sudo apt install fish -y +wget $fishconfig -P "$HOME/.config/fish/config.fish" +for homedir in /home/*; do + sudo cp $HOME/.config/fish/config.fish "$homedir/.config/fish/config.fish"; +done + +#install pyenv +curl https://pyenv.run | bash + +#Download starship and copy config file to root and all users under /home/ +curl -sS https://starship.rs/install.sh | sh +wget $starshipconfig -P "$HOME/.config/starship.toml" +for homedir in /home/*; do + sudo cp $HOME/.config/starship.toml "$homedir/.config/starship.toml"; +done + + +#Change default shell to fish +chsh -s /usr/bin/fish + +