Browse Source

initial boot script to for pywal & wallpaper set

pull/10/head
JaKooLit 2 years ago
parent
commit
8f2b0a6d74
  1. 4
      config/hypr/configs/Execs.conf
  2. 27
      config/hypr/initial-boot.sh
  3. 20
      copy.sh

4
config/hypr/configs/Execs.conf

@ -3,10 +3,12 @@ $scriptsDir = $HOME/.config/hypr/scripts
$themes = $HOME/.config/hypr/themes
$lock = $scriptsDir/LockScreen.sh
# Initial boot script to start Pywal and Set wallpaper. This line and corresponding script can be safely deleted once logged in
exec-once = $HOME/.config/hypr/initial-boot.sh
# wallpaper stuff
exec-once = swww query || swww init
#exec-once = swww query || swww init && swww img $HOME/Pictures/wallpapers/mecha-nostalgia.png #using swww utility
#exec-once = swaybg -m fill -i $HOME/Pictures/wallpapers/mecha-nostalgia.png #using swaybg
# Startup
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

27
config/hypr/initial-boot.sh

@ -0,0 +1,27 @@
#!/bin/bash
# THIS SCRIPT CAN BE DELETED ONCE BOOTED!!
# A bash script designed to ran it only once dotfiles installed
# Check if a marker file exists.
if [ ! -f ~/.hyprland_startup_done ]; then
# Check if the ~/.cache/wal directory exists
if [ ! -d ~/.cache/wal ]; then
printf " Initializing pywal........\n\n"
# Check if the ~/Pictures/wallpapers directory exists
if [ -d ~/Pictures/wallpapers ]; then
# Run wal with random wallpapers from ~/Pictures/wallpapers
wal -i ~/Pictures/wallpapers/*
echo "Pywal initialized"
fi
fi
# Initializing the initial wallpaper and wal
exec ~/.config/hypr/scripts/Wallpaper.sh
# Create a marker file to indicate that the script has been executed.
touch ~/.hyprland_startup_done
fi

20
copy.sh

@ -126,24 +126,8 @@ ln -sf "$HOME/.config/dunst/styles/dunstrc-dark" "$HOME/.config/dunst/dunstrc" &
# Set some files as executable
chmod +x ~/.config/hypr/scripts/* 2>&1 | tee -a "$LOG"
# Check if the ~/.cache/wal directory exists
if [ ! -d ~/.cache/wal ]; then
printf "${NOTE} Initializing pywal........\n\n"
# Check if the ~/Pictures/wallpapers directory exists
if [ -d ~/Pictures/wallpapers ]; then
# Run wal with random wallpapers from ~/Pictures/wallpapers
wal -i ~/Pictures/wallpapers/*
echo "${OK} Pywal initialized"
else
echo "${ERROR} ~/Pictures/wallpapers directory not found."
echo "${WARN} Please make sure to have wallpapers in ~/Pictures/wallpapers."
fi
else
echo "${OK} ~/.cache/wal directory found. No action required."
fi
# Initializing the initial wallpaper and wal
~/.config/hypr/scripts/Wallpaper.sh 2>&1 | tee -a "$LOG"
# Set executable for initial-boot.sh
chmod +x ~/.config/hypr/initial-boot.sh 2>&1 | tee -a "$LOG"
printf "\n${OK} Copy Completed!\n\n"
printf "${NOTE} Highly recommended to logout and re-login\n\n"

Loading…
Cancel
Save