1
0
Fork 1
mirror of https://github.com/Zerodya/hyprfreeze.git synced 2024-11-10 01:18:49 +01:00

fix: move session info debug output to detectEnvironment()

This commit is contained in:
alterNERDtive 2024-02-17 14:45:14 +01:00
parent c894c76305
commit f0328d81b2
Signed by: alterNERDtive
GPG key ID: 547787A4FE6533F1

View file

@ -135,14 +135,11 @@ function detectEnvironment() {
debugPrint "Could not determine desktop environment via \`loginctl\`, and `$XDG_DESKTOP_SESSION` is not set. Assuming Hyprland." debugPrint "Could not determine desktop environment via \`loginctl\`, and `$XDG_DESKTOP_SESSION` is not set. Assuming Hyprland."
DESKTOP="hyprland" DESKTOP="hyprland"
fi fi
debugPrint "Desktop: $DESKTOP"
} }
function printInfo() { function printInfo() {
debugPrint "Printing environment info..."
echo -e "$(tput bold)Session type:$(tput sgr0) $SESSION"
echo -e "$(tput bold)Desktop:$(tput sgr0) $DESKTOP"
echo ""
debugPrint "Printing process info..." debugPrint "Printing process info..."
echo -e "$(tput bold)Process tree:$(tput sgr0)" echo -e "$(tput bold)Process tree:$(tput sgr0)"
ps -p "$PID" 2>/dev/null && pstree -p "$PID" ps -p "$PID" 2>/dev/null && pstree -p "$PID"