Enable DMS dock via IPC -- it defaults off and was never turned on

DMS's dock (showDock/dockAutoHide/dockUseOverlayLayer) defaults to off in
its own settings; nothing in the installer ever enabled it, so the panel
bar could come up fine with no dock visible at all. Added
configure_dms_dock(), which enables it via `dms ipc call settings set` when
DMS is reachable, and prints a clear manual fallback + skips quietly
(doesn't fail the install) if DMS isn't running yet -- e.g. a first-ever
install before the user has logged into Hyprland even once.
This commit is contained in:
edemilov committed 2026-08-29 16:36:47 +03:00
1 parent 6c6258af9e
commit 75d031e222
2 files changed
+64

No files matched your search

+17
View File
@@ -220,6 +220,22 @@ EOF
systemctl --user add-wants hyprland-session.target dms.service
}
configure_dms_dock() {
if ! command -v dms >/dev/null 2>&1; then
echo "hyprevo: dms not on PATH yet, skipping dock settings -- log into Hyprland once, then re-run hyprevo (or run manually: dms ipc call settings set showDock true)"
return 0
fi
if ! dms ipc call settings get showDock >/dev/null 2>&1; then
echo "hyprevo: DMS not running yet, skipping dock settings -- log into Hyprland once, then re-run hyprevo (or run manually: dms ipc call settings set showDock true / dockAutoHide true / dockUseOverlayLayer true)"
return 0
fi
dms ipc call settings set showDock true
dms ipc call settings set dockAutoHide true
dms ipc call settings set dockUseOverlayLayer true
}
backup_if_exists() {
local target="$1"
[[ -e "$target" ]] || return 0
@@ -257,6 +273,7 @@ apply() {
terminal_desktop_id "$PICK_TERMINAL" > "$CONFIG_HOME/xdg-terminals.list"
install_session_target
configure_dms_dock
if [[ " ${PICK_TOGGLES[*]} " == *" ScreenCapture "* ]]; then
mkdir -p "$LOCAL_BIN"
+47
View File
@@ -252,6 +252,53 @@ EOF
rm -rf "$tmp_home" "$stub_bin"
}
@test "configure_dms_dock skips quietly when dms is not on PATH" {
source "${BATS_TEST_DIRNAME}/../install.sh"
local stub_bin
stub_bin="$(mktemp -d)"
PATH="$stub_bin" run configure_dms_dock
[ "$status" -eq 0 ]
[[ "$output" == *"skipping dock settings"* ]]
rm -rf "$stub_bin"
}
@test "configure_dms_dock skips quietly when dms is on PATH but not reachable (not logged in yet)" {
source "${BATS_TEST_DIRNAME}/../install.sh"
local stub_bin
stub_bin="$(mktemp -d)"
cat > "$stub_bin/dms" <<'EOF'
#!/usr/bin/env bash
exit 1
EOF
chmod +x "$stub_bin/dms"
PATH="$stub_bin" run configure_dms_dock
[ "$status" -eq 0 ]
[[ "$output" == *"skipping dock settings"* ]]
rm -rf "$stub_bin"
}
@test "configure_dms_dock enables the dock when dms is reachable" {
source "${BATS_TEST_DIRNAME}/../install.sh"
local tmp_home
tmp_home="$(mktemp -d)"
local stub_bin
stub_bin="$(mktemp -d)"
cat > "$stub_bin/dms" <<'EOF'
#!/usr/bin/env bash
echo "dms $*" >> "$HYPREVO_TEST_LOG"
exit 0
EOF
chmod +x "$stub_bin/dms"
HYPREVO_TEST_LOG="$tmp_home/log" PATH="$stub_bin:$PATH" configure_dms_dock
grep -q 'ipc call settings set showDock true' "$tmp_home/log"
grep -q 'ipc call settings set dockAutoHide true' "$tmp_home/log"
grep -q 'ipc call settings set dockUseOverlayLayer true' "$tmp_home/log"
rm -rf "$tmp_home" "$stub_bin"
}
@test "build_package_list combines core, slot, and toggle packages with no duplicates" {
source "${BATS_TEST_DIRNAME}/../install.sh"
PICK_TERMINAL=Konsole PICK_FILEMANAGER=Dolphin PICK_MAIL=Thunderbird PICK_CLOUDSYNC=Nextcloud