diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 2ecec7d..7ad7556 100755 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -53,29 +53,7 @@ $fileManager = dolphin $menu = wofi --show drun $browser = zen-browser -################# -### AUTOSTART ### -################# - -# Autostart necessary processes (like notifications daemons, status bars, etc.) -# Or execute your favorite apps at launch like this: - -# exec-once = $terminal -# exec-once = nm-applet & -# exec-once = waybar & hyprpaper & firefox -exec-once = ssh-agent & kdeconnect-indicator -exec-once = waybar & hyprpaper & hypridle -exec-once = systemctl --user start hyprpolkitagent -exec-once = copyq -############################# -### ENVIRONMENT VARIABLES ### -############################# - -# See https://wiki.hyprland.org/Configuring/Environment-variables/ - -env = XCURSOR_SIZE,24 -env = HYPRCURSOR_SIZE,24 - +exec-once = ~/.config/hypr/start.sh ##################### ### LOOK AND FEEL ### @@ -101,7 +79,6 @@ general { allow_tearing = false layout = dwindle - } cursor { diff --git a/.config/hypr/start.sh b/.config/hypr/start.sh new file mode 100755 index 0000000..c467732 --- /dev/null +++ b/.config/hypr/start.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# Redirect all output to start.log (overwriting previous logs) +exec > "$HOME/start.log" 2>&1 + +# Function to log and time each command +run_and_time() { + echo "[$(date +'%H:%M:%S')] Starting: $1" + # /usr/bin/time -f "Took: %E" $1 & + # Note: Since most of these are backgrounded (&), + # we use a subshell to capture the duration of the launch itself. + start_time=$(date +%s%N) + "$@" & + end_time=$(date +%s%N) + + # Calculate duration in milliseconds (simple shell math) + duration=$(( (end_time - start_time) / 1000000 )) + echo " -> Launched in ${duration}ms" +} + +echo "--- Hyprland Startup: $(date) ---" + +run_and_time qs -c nucleus-shell +# run_and_time systemctl --user start hyprpaper +# run_and_time systemctl --user start hypridle +# run_and_time systemctl --user start hyprpolkitagent +run_and_time ssh-agent +run_and_time copyq +run_and_time kdeconnect-indicator +run_and_time dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP + +echo "--- All processes dispatched ---"