#!/bin/sh # ─────────────────────────────────────────────────────────────────── # ╭────────────────────────────────────────────────╮ # │ Setup Script for janishutz Hyprland │ # ╰────────────────────────────────────────────────╯ # ─────────────────────────────────────────────────────────────────── echo " _ _ _ _ _ _ _ _ ( ) ( )_ ( ) ( ) (_ ) ( ) (_) _ _ ___ (_) ___| |__ _ _| _)____ | |_| |_ _ _ _ _ __ | | _ _ ___ _| | | |/ _ ) _ \ | __) _ \ ) ( ) | (_ ) | _ | ) ( ) _ \( __)| | / _ ) _ \/ _ | | | (_| | ( ) | |__ \ | | | (_) | |_ / /_ | | | | (_) | (_) ) | | |( (_| | ( ) | (_| | _ | |\__ _)_) (_)_)____/_) (_)\___/ \__)____) (_) (_)\__ | __/(_) (___)\__ _)_) (_)\__ _) ( )_| | ( )_| | | \___/ \___/(_) => Setup script. This script is used to: -> Set up configs initially -> Regenerate the themes -> Install new versions " trap 'echo -e "\nCaught Ctrl+C, exiting..."; exit 1' SIGINT # Read platform to install on (only if no platform file present in ~/.config/) platform="" if [[ -f ~/.config/platform ]]; then echo "Config type already selected, skipping" platform=$(cat ~/.config/platform) else read -p "Choose the configs to install, Laptop or Desktop (l/D): " platform echo "$platform" > ~/.config/platform fi platform=$(echo "$platform" | tr '[:upper:]' '[:lower:]') # Get user preference for regenerating the styling regen="" read -p "Would you like to regenerate styling? (y/N) " regen if [ $regen == "y" ]; then cd build node build.js if [ $? -ne 0 ]; then echo -e "\nExit signal received, exiting...." exit 130 fi cd .. fi echo "=> Moving configs to correct destinations" killall swaybg cp -r ./config/fish ~/.config/ cp -r ./config/hypr ~/.config/ rm -rf ~/.config/rofi/ cp -r ./config/rofi ~/.config/ # Depending on platform, remove one or the other config and rename remaining one if [[ "$platform" == "d" ]]; then echo "Running on desktop" mv ~/.config/hypr/hyprland_desktop.conf ~/.config/hypr/hyprland.conf rm ~/.config/hypr/hyprland_* mv ~/.config/rofi/config_desktop.rasi ~/.config/rofi/config.rasi rm ~/.config/rofi/config_* else echo "Running on laptop" mv ~/.config/hypr/hyprland_laptop.conf ~/.config/hypr/hyprland.conf rm ~/.config/hypr/hyprland_* mv ~/.config/rofi/config_laptop.rasi ~/.config/rofi/config.rasi rm ~/.config/rofi/config_* fi cp -r ./config/kitty ~/.config/ cp -r ./config/fastfetch ~/.config/ cp -r ./config/lazygit ~/.config/ cp -r ./config/mpv ~/.config/ cp -r ./config/Thunar ~/.config/ cp -r ./config/wlogout/ ~/.config/ cp -r ./config/yazi ~/.config/ cp -r ./config/zathura ~/.config/ echo " => Installing yazi plugins " ya pack -i echo " => Installing GTK Theme " sudo rm -rf /usr/share/themes/Adaptive-Theme/ sudo mkdir /usr/share/themes/Adaptive-Theme/ sudo cp -r ./gtk-theme/dist/* /usr/share/themes/Adaptive-Theme/ echo " => Installing System Configs " sudo cp ./system/environment /etc/environment sudo cp -r ./system/greetd/* /etc/greetd/ hyprctl reload echo " => Restarting bars, etc -> This will take a couple of seconds to ensure them quitting properly " killall gjs killall ags sleep 5 ags run -d ~/projects/active/dotfiles/config/astal --gtk4 & disown sleep 2 ags run -d ~/projects/active/dotfiles/config/ags/notifications & disown echo " ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ██░▄▄▀██░▄▄▄░██░▀██░██░▄▄▄ ██░██░██░███░██░█░█░██░▄▄▄ ██░▀▀░██░▀▀▀░██░██▄░██░▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ => All configs installed. Reboot for them to apply properly "