1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

greeter: allow mangowc as compositor

This commit is contained in:
bbedward
2025-11-14 14:51:28 -05:00
parent fd08ae18ab
commit 1c5e31fea9
2 changed files with 19 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ A greeter for [greetd](https://github.com/kennylevinsen/greetd) that follows the
- **Multi user**: Login with any system user
- **dms sync**: Sync settings with dms for consistent styling between shell and greeter
- **niri or Hyprland**: Use either niri or Hyprland for the greeter's compositor.
- **Multiple compositors**: Supports niri, Hyprland, Sway, or mangowc.
- **Custom PAM**: Supports custom PAM configuration in `/etc/pam.d/dankshell`
- **Session Memory**: Remembers last selected session and user
@@ -152,7 +152,7 @@ vt = 1
[default_session]
user = "greeter"
# Change compositor to sway or hyprland if preferred
# Change compositor to sway, hyprland, or mangowc if preferred
command = "/usr/local/bin/dms-greeter --command niri"
```
@@ -200,6 +200,7 @@ The `dms-greeter` wrapper simplifies running the greeter with any compositor:
dms-greeter --command niri
dms-greeter --command hyprland
dms-greeter --command sway
dms-greeter --command mangowc
dms-greeter --command niri -C /path/to/custom-niri.kdl
```

View File

@@ -2,6 +2,8 @@
set -e
export WLR_DRM_DEVICES=/dev/dri/card1
COMPOSITOR=""
COMPOSITOR_CONFIG=""
DMS_PATH="dms-greeter"
@@ -14,7 +16,7 @@ dms-greeter - DankMaterialShell greeter launcher
Usage: dms-greeter --command COMPOSITOR [OPTIONS]
Required:
--command COMPOSITOR Compositor to use (niri, hyprland, or sway)
--command COMPOSITOR Compositor to use (niri, hyprland, sway, or mangowc)
Options:
-C, --config PATH Custom compositor config file
@@ -29,6 +31,7 @@ Examples:
dms-greeter --command hyprland -C /etc/greetd/custom-hypr.conf
dms-greeter --command sway -p /home/user/.config/quickshell/custom-dms
dms-greeter --command niri --cache-dir /tmp/dmsgreeter
dms-greeter --command mangowc
EOF
}
@@ -204,9 +207,20 @@ SWAY_EOF
exec sway -c "$COMPOSITOR_CONFIG"
;;
mangowc)
TEMP_DIR=$(mktemp -d)
if [[ -n "$COMPOSITOR_CONFIG" ]]; then
cp "$COMPOSITOR_CONFIG" "$TEMP_DIR/config.conf"
else
touch "$TEMP_DIR/config.conf"
fi
export MANGOCONFIG="$TEMP_DIR"
exec mango -s "$QS_CMD && mmsg -d quit"
;;
*)
echo "Error: Unsupported compositor: $COMPOSITOR" >&2
echo "Supported compositors: niri, hyprland, sway" >&2
echo "Supported compositors: niri, hyprland, sway, mangowc" >&2
exit 1
;;
esac