Add scripts for oh-my-posh and logo-ls

This commit is contained in:
Manuel Thalmann 2022-11-12 14:42:41 +01:00
parent 61e42b1e62
commit fb81be882c
4 changed files with 47 additions and 16 deletions

View file

@ -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/

View file

@ -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"

View file

@ -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

View file

@ -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