From 95d71015923e28ad6d67c1a01c7e32f9d7ded7cf Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Sun, 11 Feb 2018 11:16:48 +0100 Subject: [PATCH] Fish bootstrapping --- .config/fish/fishfile | 1 - .config/omf/bundle | 2 ++ .config/omf/channel | 1 + .config/{fish/config.fish => omf/init.fish} | 0 .config/omf/theme | 1 + .yadm/bootstrap | 39 +++++++++++++++++++++ 6 files changed, 43 insertions(+), 1 deletion(-) delete mode 100644 .config/fish/fishfile create mode 100644 .config/omf/bundle create mode 100644 .config/omf/channel rename .config/{fish/config.fish => omf/init.fish} (100%) create mode 100644 .config/omf/theme create mode 100755 .yadm/bootstrap diff --git a/.config/fish/fishfile b/.config/fish/fishfile deleted file mode 100644 index a912a84..0000000 --- a/.config/fish/fishfile +++ /dev/null @@ -1 +0,0 @@ -oh-my-fish/theme-bobthefish diff --git a/.config/omf/bundle b/.config/omf/bundle new file mode 100644 index 0000000..abef50c --- /dev/null +++ b/.config/omf/bundle @@ -0,0 +1,2 @@ +theme bobthefish +theme default diff --git a/.config/omf/channel b/.config/omf/channel new file mode 100644 index 0000000..2bf5ad0 --- /dev/null +++ b/.config/omf/channel @@ -0,0 +1 @@ +stable diff --git a/.config/fish/config.fish b/.config/omf/init.fish similarity index 100% rename from .config/fish/config.fish rename to .config/omf/init.fish diff --git a/.config/omf/theme b/.config/omf/theme new file mode 100644 index 0000000..ff8a58d --- /dev/null +++ b/.config/omf/theme @@ -0,0 +1 @@ +bobthefish diff --git a/.yadm/bootstrap b/.yadm/bootstrap new file mode 100755 index 0000000..420c683 --- /dev/null +++ b/.yadm/bootstrap @@ -0,0 +1,39 @@ +#!/bin/sh + +RED='\033[0;31m' +GREEN='\033[0;32m' +CYAN='\033[0;36m' +NC='\033[0m' + +info() { + echo -e "${CYAN}$1${NC}" +} + +error() { + echo -e "${RED}$1${NC}" + exit 1 +} + +success() { + echo -e "${RED}$1${NC}" +} + +# Fish configuration +info "Checking for fish shell..." +which fish 2> /dev/null +fish_found=$? +if [ $fish_found -eq 0 ]; +then + success "Fish shell found." + info " -> Installing virtualfish..." + pip install --user virtualfish || error "!! Failed to install virtualfish" + info " -> Installing oh-my-fish..." + curl -L https://get.oh-my.fish > install || error "!! Failed to download oh-my-fish installer" + curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install.sha256 > install.sha256 || error "!! Failed to download oh-my-fish checksum" + sha256sum -c install.sha256 || error "!! Checksum failed for oh-my-fish." + fish install --noninteractive || error "!! Install failed for oh-my-fish." + fish -c 'omf install' || error "!! Oh-my-fish failed to install some packages" + success "Successfully configured fish" +else + info "No fish shell available, skipping." +fi