irongit
dotfiles/hypr/initial-boot.sh
66 lines3.0 KBBourne Again Shell (bash)
1#!/bin/bash
2# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
3# A bash script designed to run only once dotfiles installed
4
5# THIS SCRIPT CAN BE DELETED ONCE SUCCESSFULLY BOOTED!! And also, edit ~/.config/hypr/configs/Settings.conf
6# NOT necessary to do since this script is only designed to run only once as long as the marker exists
7# marker file is located at ~/.config/hypr/.initial_startup_done
8# However, I do highly suggest not to touch it since again, as long as the marker exist, script wont run
9
10# Variables
11scriptsDir=$HOME/.config/hypr/scripts
12wallpaper=$HOME/.config/hypr/wallpaper_effects/.wallpaper_current
13waybar_style="$HOME/.config/waybar/style/[Extra] Modern-Combined - Transparent.css"
14kvantum_theme="catppuccin-mocha-blue"
15color_scheme="prefer-dark"
16gtk_theme="Flat-Remix-GTK-Blue-Dark"
17icon_theme="Flat-Remix-Blue-Dark"
18cursor_theme="Bibata-Modern-Ice"
19
20swww="swww img"
21effect="--transition-bezier .43,1.19,1,.4 --transition-fps 30 --transition-type grow --transition-pos 0.925,0.977 --transition-duration 2"
22
23# Check if a marker file exists.
24if [ ! -f "$HOME/.config/hypr/.initial_startup_done" ]; then
25 sleep 1
26 # Initialize wallust and wallpaper
27 if [ -f "$wallpaper" ]; then
28 wallust run -s $wallpaper > /dev/null
29 swww query || swww-daemon && $swww $wallpaper $effect
30 "$scriptsDir/WallustSwww.sh" > /dev/null 2>&1 &
31 fi
32
33 # initiate GTK dark mode and apply icon and cursor theme
34 gsettings set org.gnome.desktop.interface color-scheme $color_scheme > /dev/null 2>&1 &
35 gsettings set org.gnome.desktop.interface gtk-theme $gtk_theme > /dev/null 2>&1 &
36 gsettings set org.gnome.desktop.interface icon-theme $icon_theme > /dev/null 2>&1 &
37 gsettings set org.gnome.desktop.interface cursor-theme $cursor_theme > /dev/null 2>&1 &
38 gsettings set org.gnome.desktop.interface cursor-size 24 > /dev/null 2>&1 &
39
40 # NIXOS initiate GTK dark mode and apply icon and cursor theme
41 if [ -n "$(grep -i nixos < /etc/os-release)" ]; then
42 gsettings set org.gnome.desktop.interface color-scheme "'$color_scheme'" > /dev/null 2>&1 &
43 dconf write /org/gnome/desktop/interface/gtk-theme "'$gtk_theme'" > /dev/null 2>&1 &
44 dconf write /org/gnome/desktop/interface/icon-theme "'$icon_theme'" > /dev/null 2>&1 &
45 dconf write /org/gnome/desktop/interface/cursor-theme "'$cursor_theme'" > /dev/null 2>&1 &
46 dconf write /org/gnome/desktop/interface/cursor-size "24" > /dev/null 2>&1 &
47 fi
48
49 # initiate kvantum theme
50 kvantummanager --set "$kvantum_theme" > /dev/null 2>&1 &
51
52 # initiate the kb_layout (for some reason) waybar cant launch it
53 "$scriptsDir/SwitchKeyboardLayout.sh" > /dev/null 2>&1 &
54
55 # waybar style
56 #if [ -L "$HOME/.config/waybar/config" ]; then
57 ## ln -sf "$waybar_style" "$HOME/.config/waybar/style.css"
58 # "$scriptsDir/Refresh.sh" > /dev/null 2>&1 &
59 #fi
60
61
62 # Create a marker file to indicate that the script has been executed.
63 touch "$HOME/.config/hypr/.initial_startup_done"
64
65 exit
66fi