mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 23: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:
@@ -186,7 +186,13 @@ exec = sh -c "$QS_CMD; hyprctl dispatch exit"
|
|||||||
HYPRLAND_EOF
|
HYPRLAND_EOF
|
||||||
COMPOSITOR_CONFIG="$TEMP_CONFIG"
|
COMPOSITOR_CONFIG="$TEMP_CONFIG"
|
||||||
fi
|
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)
|
sway)
|
||||||
|
|||||||
@@ -4,5 +4,12 @@ export XDG_SESSION_TYPE=wayland
|
|||||||
export QT_QPA_PLATFORM=wayland
|
export QT_QPA_PLATFORM=wayland
|
||||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||||
export EGL_PLATFORM=gbm
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user