mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 09:36:46 +00:00
34 lines
1.1 KiB
Bash
Executable File
34 lines
1.1 KiB
Bash
Executable File
#!/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 caelestia
|
|
# run_and_time systemctl --user start hyprpaper
|
|
# run_and_time systemctl --user start hypridle
|
|
# run_and_time systemctl --user start hyprpolkitagent
|
|
run_and_time systemctl --user start xdg-desktop-portal-hyprland
|
|
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 ---"
|