feat: improved setup script
This commit is contained in:
@@ -13,6 +13,9 @@ echo "
|
||||
-> WARNING: This will remove the old configurations from the system
|
||||
"
|
||||
|
||||
# ┌ ┐
|
||||
# │ Platform setup │
|
||||
# └ ┘
|
||||
if ! [[ -f ~/.config/janishutz/platform ]]; then
|
||||
platform=""
|
||||
read -p "Choose on the platform (l/D): " platform
|
||||
@@ -24,16 +27,23 @@ if ! [[ -f ~/.config/janishutz/platform ]]; then
|
||||
echo "n" >~/.config/janishutz/docked
|
||||
fi
|
||||
|
||||
# ┌ ┐
|
||||
# │ System config file │
|
||||
# └ ┘
|
||||
# (currently only env)
|
||||
confirmation=""
|
||||
read -p "Also install the system-wide environment file? (y/N) " confirmation
|
||||
if [[ "$confirmation" == "y" ]]; then
|
||||
sudo cp ./system/environment /etc/environment
|
||||
fi
|
||||
|
||||
# ┌ ┐
|
||||
# │ Install configs │
|
||||
# └ ┘
|
||||
rm -rf ~/.config/hypr/*.conf
|
||||
rm ~/.config/platform || true
|
||||
rm -rf ~/.config/ags || true
|
||||
rm -rf ~/.config/astal || true
|
||||
rm ~/.config/platform &> /dev/null || true
|
||||
rm -rf ~/.config/ags &> /dev/null || true
|
||||
rm -rf ~/.config/astal &> /dev/null || true
|
||||
|
||||
cp -r ./config/* ~/.config
|
||||
|
||||
@@ -42,4 +52,28 @@ cp ./config/zsh/.zshrc ~/.zshrc
|
||||
rm ~/.config/kitty/current-theme.conf
|
||||
cp ./linters/indentconfig_import.yaml ~/.indentconfig.yaml
|
||||
|
||||
# ┌ ┐
|
||||
# │ Theming │
|
||||
# └ ┘
|
||||
# Picker works via argument and open bind in Yazi (set image via Ctrl + W)
|
||||
# If no image is specified, then the previous one is used
|
||||
# If no image was used previously and none is specified, an error is raised
|
||||
if [[ -n $1 ]]; then
|
||||
matugen image --prefer value $1
|
||||
mkdir ~/.local/state/janishutz &> /dev/null || true
|
||||
echo "$1" >~/.local/state/janishutz/imgcache
|
||||
else
|
||||
if ! [[ -f ~/.local/state/janishutz/imgcache ]]; then
|
||||
echo "No image to use for theme generation specified, aborting"
|
||||
exit 1
|
||||
else
|
||||
echo "Falling back to previous image"
|
||||
matugen image --prefer value $(cat ~/.local/state/janishutz/imgcache)
|
||||
fi
|
||||
fi
|
||||
|
||||
killall hyprpaper &>/dev/null
|
||||
hyprpaper &>/dev/null &
|
||||
disown
|
||||
|
||||
hyprctl reload
|
||||
|
||||
Reference in New Issue
Block a user