1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

feat: implement smart compositor entry point (start-hyprland vs Hyprland) (#1211)

* Adding a way to use the start-hyprland wrapper when it's needed from Hyprland 0.53 it's recommended because offers more security if happens a fail

* Deleting unnecessary things and doing verifications

* fix pre-commit

---------

Co-authored-by: bbedward <bbedward@gmail.com>
This commit is contained in:
Oscar R.
2025-12-30 17:20:33 +01:00
committed by GitHub
parent d95d516d64
commit 18f095cb23
2 changed files with 15 additions and 2 deletions

View File

@@ -186,7 +186,13 @@ exec = sh -c "$QS_CMD; hyprctl dispatch exit"
HYPRLAND_EOF
COMPOSITOR_CONFIG="$TEMP_CONFIG"
fi
exec Hyprland -c "$COMPOSITOR_CONFIG"
CURRENT_VERSION=$(hyprctl version | grep "Tag:" | awk '{print $2}' | tr -d 'v,')
MINIMUM_VERSION="0.53.0"
if [ "$(printf '%s\n%s' "$MINIMUM_VERSION" "$CURRENT_VERSION" | sort -V | head -n1)" = "$MINIMUM_VERSION" ]; then
exec start-hyprland -- --config "$COMPOSITOR_CONFIG"
else
exec Hyprland -c "$COMPOSITOR_CONFIG"
fi
;;
sway)

View File

@@ -4,5 +4,12 @@ export XDG_SESSION_TYPE=wayland
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export EGL_PLATFORM=gbm
CURRENT_VERSION=$(hyprctl version | grep "Tag:" | awk '{print $2}' | tr -d 'v,')
exec Hyprland -c /etc/greetd/dms-hypr.conf
MINIMUM_VERSION="0.53.0"
if [ "$(printf '%s\n%s' "$MINIMUM_VERSION" "$CURRENT_VERSION" | sort -V | head -n1)" = "$MINIMUM_VERSION" ]; then
exec start-hyprland -- -c /etc/greetd/dms-hypr.conf
else
exec Hyprland -c /etc/greetd/dms-hypr.conf
fi