Skip to content

armgit / kwant

Public Imported from GitHub
0

Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.

Mac: light install-window background; pin hidden files outside the window

Pixel (kwant bot)34d763dba918
diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml
index 2769278a..d6afeb47 100644
--- a/.github/workflows/mac.yml
+++ b/.github/workflows/mac.yml
@@ -88,6 +88,14 @@ jobs:
- name: Install-window background
working-directory: apps/mac/dmg
run: tiffutil -cathidpicheck background.png [email protected] -out background.tiff
+ # Finder's "every item" skips invisible files, so with hidden files off the layout script
+ # leaves .VolumeIcon.icns and .background unplaced and Finder may drop them into the window
+ # for anyone who shows hidden files. With them visible, the script moves them out of view.
+ - name: Show hidden files in Finder while the .dmg is laid out
+ run: |
+ defaults write com.apple.finder AppleShowAllFiles -bool true
+ killall Finder || true
+ sleep 3
- name: Build the universal app and .dmg
working-directory: apps/mac
timeout-minutes: 30
@@ -172,17 +180,17 @@ jobs:
print("window", bounds)
assert entries[("kwant.app", b"Iloc")] == (180, 170)
assert entries[("Applications", b"Iloc")] == (480, 170)
- for name, code in entries:
- if code == b"Iloc" and name.startswith("."):
- x, _ = entries[(name, code)]
- assert x > 660, f"{name} is inside the window at x={x}"
+ for name in (".VolumeIcon.icns", ".background"):
+ x, y = entries[(name, b"Iloc")]
+ assert x > 660 or y > 400, f"{name} is inside the window at {x},{y}"
+ for (name, code), (x, y) in [(k, v) for k, v in entries.items() if k[1] == b"Iloc"]:
+ if name.startswith("."):
+ assert x > 660 or y > 400, f"{name} is inside the window at {x},{y}"
print("layout OK")
PY
hdiutil detach "$vol" || hdiutil detach -force "$vol"
(
set +e
- defaults write com.apple.finder AppleShowAllFiles -bool true
- killall Finder; sleep 3
for mode in light dark; do
if [ "$mode" = dark ]; then v=true; else v=false; fi
osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to $v"
diff --git a/apps/mac/dmg/background.png b/apps/mac/dmg/background.png
index 67dbc76d..1f580063 100644
Binary files a/apps/mac/dmg/background.png and b/apps/mac/dmg/background.png differ
diff --git a/apps/mac/dmg/[email protected] b/apps/mac/dmg/[email protected]
index 978f307c..c40b482b 100644
Binary files a/apps/mac/dmg/[email protected] and b/apps/mac/dmg/[email protected] differ
diff --git a/apps/mac/dmg/make-background.py b/apps/mac/dmg/make-background.py
index b88b8802..75ac7141 100644
--- a/apps/mac/dmg/make-background.py
+++ b/apps/mac/dmg/make-background.py
@@ -13,9 +13,11 @@ W, H = 660, 400
APP_X, APPS_X, ICON_Y = 180, 480, 170
SS = 4 # supersampling for the 2x image
-TOP = (24, 22, 34)
-BOTTOM = (14, 15, 21)
-ARROW = (150, 154, 180, 255)
+# Light on purpose: over a background picture Finder draws icon labels black in light and dark
+# mode alike, so a dark background makes "kwant" and "Applications" unreadable.
+TOP = (246, 244, 251)
+BOTTOM = (231, 228, 240)
+ARROW = (112, 104, 150, 255)
def draw(scale):
@@ -29,11 +31,11 @@ def draw(scale):
img = grad.resize((w, h)).convert("RGBA")
# soft glow behind each icon slot
- glow = Image.new("RGBA", (w, h), (0, 0, 0, 0))
+ glow = Image.new("RGBA", (w, h), (255, 255, 255, 0))
g = ImageDraw.Draw(glow)
r = 92 * s
for cx in (APP_X, APPS_X):
- g.ellipse((cx * s - r, ICON_Y * s - r, cx * s + r, ICON_Y * s + r), fill=(120, 110, 200, 34))
+ g.ellipse((cx * s - r, ICON_Y * s - r, cx * s + r, ICON_Y * s + r), fill=(255, 255, 255, 150))
glow = glow.filter(ImageFilter.GaussianBlur(40 * s))
img = Image.alpha_composite(img, glow)