aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/initial-boot.sh
blob: 797f49cbca2012232dca387e9a97b299b42b9138 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash

# A bash script designed to run only once dotfiles installed

# THIS SCRIPT CAN BE DELETED ONCE SUCCESSFULLY BOOTED!! And also, edit ~/.config/hypr/configs/Execs.conf
# not necessary to do since this script is only designed to run only once as long as the marker exists

# Variables
scriptsDir=$HOME/.config/hypr/scripts
wallpaper=$HOME/Pictures/wallpapers/anime-girl-abyss.png

swww="swww img"
effect="--transition-bezier .43,1.19,1,.4 --transition-fps 60 --transition-type grow --transition-pos 0.925,0.977 --transition-duration 2"

# Check if a marker file exists.
if [ ! -f ~/.config/hypr/.initial_startup_done ]; then

    # Initialize pywal
    printf " Initializing pywal........\n\n"
    wal -i "$wallpaper"

    # Initial symlink for Pywal Dark and Light for Rofi Themes
    ln -sf "$HOME/.cache/wal/colors-rofi-dark.rasi" "$HOME/.config/rofi/pywal-color/pywal-theme.rasi"

    # Initial scripts to load in order to have a proper wallpaper waybar and pywal themes
    pkill swww && swww init || swww query && $swww "$wallpaper" $effect

    # Refreshing waybar, dunst, rofi etc. 
    "$scriptsDir/PywalSwww.sh" > /dev/null 2>&1 &
    "$scriptsDir/Refresh.sh" > /dev/null 2>&1 &
    
    # initiate the kb_layout (for some reason) waybar cant launch it
    "$scriptsDir/SwitchKeyboardLayout.sh" > /dev/null 2>&1 &

    # Create a marker file to indicate that the script has been executed.
    touch ~/.config/hypr/.initial_startup_done

    exit
fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage