#!/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 130' 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 restart="" if [[ "$regen" == "y" ]]; then restart="y" cd build node build.js if [ $? -ne 0 ]; then echo -e "\nExit signal received, exiting...." exit 130 fi cd .. else read -p "Apply full config? (y/N) " restart 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/ cp -r ./config/xdg-desktop-portal-termfilechooser/ ~/.config/ # Depending on platform, remove one or the other config and rename remaining one if [[ "$platform" == "d" ]]; then echo "Running on desktop" cp -f ~/.config/hypr/hyprland_desktop.conf ~/.config/hypr/hyprland.conf else echo "Running on laptop" cp -f ~/.config/hypr/hyprland_laptop.conf ~/.config/hypr/hyprland.conf 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/ cp ./config/lint/.indentconfig.yaml ~ echo " => Installing yazi plugins " ya pkg upgrade if [[ "$restart" == "y" ]]; then 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 ./system/greetd/pam /etc/pam.d/greetd if [[ "$platform" == "d" ]]; then sudo cp -r ./system/greetd/config.toml /etc/greetd/ else echo "Setting up autologin config for greetd" sudo cp -r ./system/greetd/config-autologin.toml /etc/greetd/config.toml fi hyprctl reload ./scripts/restart-bar fi echo " ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ██░▄▄▀██░▄▄▄░██░▀██░██░▄▄▄ ██░██░██░███░██░█░█░██░▄▄▄ ██░▀▀░██░▀▀▀░██░██▄░██░▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ => All configs installed. Reboot for them to apply properly "