summaryrefslogtreecommitdiff
path: root/.config/niri/mako-start.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/niri/mako-start.sh')
-rwxr-xr-x.config/niri/mako-start.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/.config/niri/mako-start.sh b/.config/niri/mako-start.sh
new file mode 100755
index 0000000..aceaa3b
--- /dev/null
+++ b/.config/niri/mako-start.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Start mako after making sure the wallust-generated color file exists.
+# mako's config uses `include=~/.cache/wallust/mako`; if that file is missing
+# (e.g. on first login before wallust has run) mako would fail to start, so we
+# seed a neutral default here. apply-colors.sh regenerates it and runs
+# `makoctl reload` once the real palette is ready.
+set -e
+
+CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/wallust/mako"
+if [ ! -f "$CACHE" ]; then
+ mkdir -p "$(dirname "$CACHE")"
+ cat > "$CACHE" <<'EOF'
+background-color=#1e1e1e
+text-color=#e0e0e0
+border-color=#3a3a3a
+progress-color=over #4f4f4f
+EOF
+fi
+
+exec mako "$@"