Add new install symlinks
This commit is contained in:
parent
953a05d6ba
commit
b7a1fe9f58
1 changed files with 38 additions and 16 deletions
54
install.fish
54
install.fish
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
argparse -n 'install.fish' -X 0 \
|
||||
'h/help' \
|
||||
'noconfirm' \
|
||||
'spotify' \
|
||||
h/help \
|
||||
noconfirm \
|
||||
spotify \
|
||||
'vscode=?!contains -- "$_flag_value" codium code' \
|
||||
'discord' \
|
||||
'zen' \
|
||||
discord \
|
||||
zen \
|
||||
'aur-helper=!contains -- "$_flag_value" yay paru' \
|
||||
-- $argv
|
||||
or exit
|
||||
|
|
@ -27,7 +27,6 @@ if set -q _flag_h
|
|||
exit
|
||||
end
|
||||
|
||||
|
||||
# Helper funcs
|
||||
function _out -a colour text
|
||||
set_color $colour
|
||||
|
|
@ -60,7 +59,7 @@ function confirm-overwrite -a path
|
|||
input "$path already exists. Overwrite? [Y/n] " -n
|
||||
set -l confirm (sh-read)
|
||||
|
||||
if test "$confirm" = 'n' -o "$confirm" = 'N'
|
||||
if test "$confirm" = n -o "$confirm" = N
|
||||
log 'Skipping...'
|
||||
return 1
|
||||
else
|
||||
|
|
@ -73,9 +72,8 @@ function confirm-overwrite -a path
|
|||
return 0
|
||||
end
|
||||
|
||||
|
||||
# Variables
|
||||
set -q _flag_noconfirm && set noconfirm '--noconfirm'
|
||||
set -q _flag_noconfirm && set noconfirm --noconfirm
|
||||
set -q _flag_aur_helper && set -l aur_helper $_flag_aur_helper || set -l aur_helper paru
|
||||
set -q XDG_CONFIG_HOME && set -l config $XDG_CONFIG_HOME || set -l config $HOME/.config
|
||||
set -q XDG_STATE_HOME && set -l state $XDG_STATE_HOME || set -l state $HOME/.local/state
|
||||
|
|
@ -108,7 +106,7 @@ if ! set -q _flag_noconfirm
|
|||
input 'Backup already exists. Overwrite? [Y/n] ' -n
|
||||
set -l overwrite (sh-read)
|
||||
|
||||
if test "$overwrite" = 'n' -o "$overwrite" = 'N'
|
||||
if test "$overwrite" = n -o "$overwrite" = N
|
||||
log 'Skipping...'
|
||||
else
|
||||
rm -rf $config.bak
|
||||
|
|
@ -134,7 +132,7 @@ if test $aur_helper = yay
|
|||
else
|
||||
$aur_helper -Ui $noconfirm
|
||||
end
|
||||
fish -c 'rm -f caelestia-meta-*.pkg.tar.zst' 2> /dev/null
|
||||
fish -c 'rm -f caelestia-meta-*.pkg.tar.zst' 2>/dev/null
|
||||
|
||||
# Install hypr* configs
|
||||
if confirm-overwrite $config/hypr
|
||||
|
|
@ -179,6 +177,30 @@ if confirm-overwrite $config/btop
|
|||
ln -s (realpath btop) $config/btop
|
||||
end
|
||||
|
||||
# Glafetch
|
||||
if confirm-overwrite $config/glafetch
|
||||
log 'Installing glafetch config...'
|
||||
ln -s (realpath glafetch) $config/glafetch
|
||||
end
|
||||
|
||||
# Ghostty
|
||||
if confirm-overwrite $config/ghostty
|
||||
log 'Installing ghostty config...'
|
||||
ln -s (realpath ghostty) $config/ghostty
|
||||
end
|
||||
|
||||
# Helix
|
||||
if confirm-overwrite $config/helix
|
||||
log 'Installing btop config...'
|
||||
ln -s (realpath helix) $config/helix
|
||||
end
|
||||
|
||||
# Yazi
|
||||
if confirm-overwrite $config/yazi
|
||||
log 'Installing yazi config...'
|
||||
ln -s (realpath yazi) $config/yazi
|
||||
end
|
||||
|
||||
# Install spicetify
|
||||
if set -q _flag_spotify
|
||||
log 'Installing spotify (spicetify)...'
|
||||
|
|
@ -199,16 +221,16 @@ if set -q _flag_spotify
|
|||
ln -s (realpath spicetify) $config/spicetify
|
||||
|
||||
# Set spicetify configs
|
||||
spicetify config current_theme caelestia color_scheme caelestia custom_apps marketplace 2> /dev/null
|
||||
spicetify config current_theme caelestia color_scheme caelestia custom_apps marketplace 2>/dev/null
|
||||
spicetify apply
|
||||
end
|
||||
end
|
||||
|
||||
# Install vscode
|
||||
if set -q _flag_vscode
|
||||
test "$_flag_vscode" = 'code' && set -l prog 'code' || set -l prog 'codium'
|
||||
test "$_flag_vscode" = 'code' && set -l packages 'code' || set -l packages 'vscodium-bin' 'vscodium-bin-marketplace'
|
||||
test "$_flag_vscode" = 'code' && set -l folder 'Code' || set -l folder 'VSCodium'
|
||||
test "$_flag_vscode" = code && set -l prog code || set -l prog codium
|
||||
test "$_flag_vscode" = code && set -l packages code || set -l packages vscodium-bin vscodium-bin-marketplace
|
||||
test "$_flag_vscode" = code && set -l folder Code || set -l folder VSCodium
|
||||
set -l folder $config/$folder/User
|
||||
|
||||
log "Installing vs$prog..."
|
||||
|
|
@ -280,6 +302,6 @@ if ! test -f $state/caelestia/scheme.json
|
|||
end
|
||||
|
||||
# Start the shell
|
||||
caelestia shell -d > /dev/null
|
||||
caelestia shell -d >/dev/null
|
||||
|
||||
log 'Done!'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue