Configure oh-my-posh on Linux

This commit is contained in:
Manuel Thalmann 2024-09-19 21:58:30 +02:00
parent b1b067bdb6
commit c90e7faf11
4 changed files with 55 additions and 4 deletions

View file

@ -21,7 +21,8 @@ begin
and yayinst \ and yayinst \
linux-headers \ linux-headers \
pacman-contrib pacman-contrib \
yq
end end
source "$dir/../../Common/OS/install.fish" source "$dir/../../Common/OS/install.fish"

View file

@ -21,7 +21,6 @@ function deploySoftware -d "Deploys a the specified software action" -a action
neofetch \ neofetch \
bash-completion \ bash-completion \
wget \ wget \
oh-my-posh-bin \
screen \ screen \
tmux \ tmux \
htop \ htop \
@ -37,6 +36,8 @@ function deploySoftware -d "Deploys a the specified software action" -a action
and source "$dir/../../Common/Software/bash/main.fish" $argv and source "$dir/../../Common/Software/bash/main.fish" $argv
and source "$dir/../Software/sudo/main.fish" $argv and source "$dir/../Software/sudo/main.fish" $argv
and source "$dir/../Software/aliae/main.fish" $argv
and source "$dir/../Software/Oh My Posh/main.fish" $argv
and source "$dir/../Software/openssh/main.fish" $argv and source "$dir/../Software/openssh/main.fish" $argv
and source "$dir/../Software/vim/main.fish" $argv and source "$dir/../Software/vim/main.fish" $argv
and source "$dir/../Software/git/main.fish" $argv and source "$dir/../Software/git/main.fish" $argv
@ -54,8 +55,6 @@ function deploySoftware -d "Deploys a the specified software action" -a action
btop \ btop \
terminal-parrot terminal-parrot
end end
and source "$dir/../Software/aliae/main.fish" $argv
end end
and if collectionActive desktopExperience and if collectionActive desktopExperience

View file

@ -0,0 +1,20 @@
#!/bin/env fish
begin
set -l dir (status dirname)
set -l base "$dir/../../../Common/Software/Oh My Posh/main.fish"
source "$dir/../../Scripts/software.fish"
function installSW
yayinst oh-my-posh-bin
end
function configureSW -V base
fish "$base" configure
end
function userConfig -S -V base -a name
fish "$base" userConfig $argv
end
runInstaller $argv
end

View file

@ -0,0 +1,31 @@
#!/bin/env fish
begin
set -l dir (status dirname)
source "$dir/../../Scripts/software.fish"
function configureSW -V dir
source "$dir/../bash/profile.fish"
source "$dir/../fish/profile.fish"
begin
printf %s\n \
'set -x POSH_THEME $POSH_THEME' \
"oh-my-posh init fish | source" \
"oh-my-posh completion fish | source"
end | installFishProfile "oh-my-posh"
begin
printf %s\n \
'eval "$(oh-my-posh init bash)"' \
'eval "$(oh-my-posh completion bash)"'
end | installBashProfile "oh-my-posh"
sudo -HE pwsh "$dir/Manage.ps1" Configure
end
function userConfig -S -V dir -a name
pwsh -CommandWithArgs '& $args[0] ConfigureUser @{ name=$args[1]; }' "$dir/Manage.ps1" $name
end
runInstaller $argv
end