diff --git a/ManuSurface/ManuSurfaceSetup.md b/ManuSurface/ManuSurfaceSetup.md index 3c77a25c..4ab40dd2 100644 --- a/ManuSurface/ManuSurfaceSetup.md +++ b/ManuSurface/ManuSurfaceSetup.md @@ -28,22 +28,10 @@ The steps described here allow the creation of a linux system on a Surface Book - Using [installer script](../scripts/PopOS/software/rclone/install.sh) - Sync NextCloud - Using [script](../scripts/PopOS/cloud-sync/nextcloud.sh) - - Install `oh-my-posh` - ```bash - sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh - sudo chmod +x /usr/local/bin/oh-my-posh - echo 'eval "$(oh-my-posh init bash --config ~/Nextcloud/.omp/manuel.omp.json)"' >> ~/.bashrc - ``` - - Install `logo-ls` - ```bash - sudo wget https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_amd64.deb -O logo-ls.deb - sudo dpkg -i logo-ls.deb - { - echo "alias ls='logo-ls -D'" - echo "alias ll='ls -al'" - echo "alias l='ls'" - } >> ~/.bashrc - ``` + - Install `oh-my-posh` + - Using [installer script](../scripts/PopOS/software/oh-my-posh.sh) + - Install `logo-ls` + - Using [installer script](../scripts/PopOS/software/logo-ls.sh) - Improve audio quality ```bash cp ./equalizer/Default.json ~/.var/app/com.github.wwmm.easyeffects/config/easyeffects/output/ diff --git a/ManuSurface/setup.sh b/ManuSurface/setup.sh index 8b0a98f4..a8406ac2 100644 --- a/ManuSurface/setup.sh +++ b/ManuSurface/setup.sh @@ -29,6 +29,8 @@ source "$softwareRoot/brave-beta.sh" source "$softwareRoot/brave-nightly.sh" # Install further software +source "$softwareRoot/oh-my-posh.sh" +source "$softwareRoot/logo-ls.sh" source "$softwareRoot/codium.sh" source "$softwareRoot/code.sh" source "$softwareRoot/tea.sh" diff --git a/scripts/PopOS/software/logo-ls.sh b/scripts/PopOS/software/logo-ls.sh new file mode 100644 index 00000000..6a61fdbb --- /dev/null +++ b/scripts/PopOS/software/logo-ls.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Elevate script +if [ ! "$UID" -eq 0 ] +then + exec sudo bash "$0" "$USER" +fi + +package=$(mktemp) +wget https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_amd64.deb -O $package +dpkg -i $package +rm -f $package + +homeDir=$(sudo -u $1 bash -c 'realpath ~') + +{ + echo "alias ls='logo-ls -D'" + echo "alias ll='ls -al'" + echo "alias l='ls'" +} | sudo -u $1 tee $homeDir/.bashrc diff --git a/scripts/PopOS/software/oh-my-posh.sh b/scripts/PopOS/software/oh-my-posh.sh new file mode 100644 index 00000000..c01279eb --- /dev/null +++ b/scripts/PopOS/software/oh-my-posh.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Elevate script +if [ ! "$UID" -eq 0 ] +then + exec sudo bash "$0" "$USER" +fi + +bin=oh-my-posh +workingDirectory=$(pwd) +contextRoot=$(mktemp -d) +cd $contextRoot + +wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O $bin +install $bin /usr/local/bin + +cd $workingDirectory +rm -rf $contextRoot + +homeDir=$(sudo -u $1 bash -c 'realpath ~') + +echo 'eval "$(oh-my-posh init bash --config ~/Nextcloud/.omp/manuel.omp.json)' \ + | sudo -u $1 tee $homeDir/.bashrc