Skip to content

Sync Slack's native theme with Omarchy - #17113

Merged
ryanrhughes merged 13 commits into
omacom:quattrofrom
acrogenesis:acrogenesis/slack-live-theme
Nov 1, 2026
Merged

ryanrhughes merged 13 commits into
omacom:quattrofrom
acrogenesis:acrogenesis/slack-live-theme

Conversation

@acrogenesis

@acrogenesis acrogenesis commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Slack Desktop now follows Omarchy theme changes live. The standard template renderer stages slack.json, and the normal app retint batch publishes it with the existing generation and ordering guards.

Pass the theme's background, accent, green and red hex colors into Slack's native custom-theme fields, along with light/dark mode. Slack derives its shades and text contrast. Its standard light/dark surfaces keep their native styling; this does not replace the full Slack palette with Omarchy CSS.

Setup and removal use the existing Bash commands and package helpers. The packaged desktop entry retains its flags and URL handler. A system Python/Gio helper launches /usr/bin/slack over inherited debugging pipes and watches theme files through filesystem events; a small renderer adapter applies local native preference actions. It handles startup, open windows and reloads, and exits with Slack. Existing installations activate with omarchy setup slack and fully reopen Slack once.

Validation: focused Slack tests cover staged-theme publication, invalid-input preservation, inherited-pipe/file-event updates (including the startup race, new windows and reload), packaged-launcher fallback and cancellation-safe cleanup. Shared template, staging and launcher-removal suites cover the existing integration paths; all pass. Live packaged Slack was exercised across ten themes with the same renderer, and reload persistence was verified. Normal-interface frames were inspected, including readable light-theme headers. Executable/archive hashes remained unchanged during live testing, and no account preference API writes were observed. The demo video has been refreshed.

The native preference bridge uses internal Slack client actions rather than a public automation API, so Slack client changes may require an adapter update.

@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Slack follows Omarchy themes through generated colors, inherited debugging pipes, and local native preference actions.

  • Open Slack windows follow Omarchy theme changes.
  • Slack installs and uninstalls through its theme-aware launcher.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Omarchy theme] --> B[Generate Slack colors]
  B --> C[Publish theme file]
  C --> D[Python file watcher]
  D --> E[Inherited debugging pipes]
  E --> F[Slack native preferences]
Loading

Reviews (11) · Last reviewed commit: "Look for Slack's actions again when the ..." · Reviewed by Greptile

Comment thread default/slack/integration.py Resolved
Comment thread default/slack/integration.py Resolved
Comment thread test/shell.d/slack-theme-test.sh Resolved
@acrogenesis acrogenesis changed the title Sync Slack Desktop with Omarchy themes live Theme packaged Slack Desktop live with Omarchy Oct 31, 2026
Comment thread default/slack/launcher.py Resolved
@acrogenesis acrogenesis changed the title Theme packaged Slack Desktop live with Omarchy Sync Slack's native theme with Omarchy Oct 31, 2026
Comment thread bin/omarchy-theme-set-slack Resolved
acrogenesis and others added 4 commits October 31, 2026 11:01
When Slack ships a build without the actions theme.js looks for, the
observer stayed connected and walked all ~83,000 module exports on every
DOM change, about 22 ms each time, for the life of the window. Measured
on a signed-in Slack 4.52.182: 331 ms of main-thread time per 20 idle
seconds, with nothing to stop it.

Find the actions once and reuse them on theme changes, look at most once
a second, and stop watching after a minute when they never turn up.
Slack's Clear Cache and Restart, Reset App Data and hardware acceleration
toggle call app.relaunch(), which starts the original command line again
without descriptors 3 and 4. Electron quits when --remote-debugging-pipe
has no pipe behind it, so Slack closed about 10 seconds after the restart
instead of coming back.

Start Slack under omarchy-launch-slack's name so those restarts come back
through it. The launcher drops the stale pipe flag and the theme launcher
adds it again with a fresh pipe. Checked on Slack 4.52.182: the
restarted Slack opens, has its pipe, and follows a live theme switch.

Restarts that pass their own arguments (debug logs, net logs) still use
Slack's binary path and still quit.

Co-Authored-By: GPT-6.1 Sol <[email protected]>
Comment thread default/slack/theme.js Resolved
@ryanrhughes

Copy link
Copy Markdown
Collaborator

Pushed two fixes on top of this after running it against a real, signed-in Slack 4.52.182. Theming and live switching work as described; these are the two problems that showed up.

Slack's own restarts closed Slack (5a0787a)

Clear Cache and Restart, Reset App Data and the hardware acceleration toggle call app.relaunch(), which runs the original command line again. That includes --remote-debugging-pipe but not fds 3/4, and Electron quits when the pipe flag has no pipe behind it. In practice Slack closed about 10 seconds after the restart and never came back.

Slack now starts under omarchy-launch-slack's name (exec -a), so those restarts come back through it. omarchy-launch-slack drops the stale flag and the launcher adds it again with a fresh pipe. Checked live: the restarted Slack opens, has its pipe on 3/4, and follows a live theme switch.

Still open: "Restart with debug logs" and the net-log restart pass their own args, so Electron starts them from Slack's binary path and they still quit. Those are troubleshooting-only, and fixing them would need a different way to hand Slack its pipe.

theme.js could scan forever (f97706c)

If a Slack update renames any of the four actions theme.js looks for, apply() never succeeds and the observer stays on, walking every module export on each DOM change. On a signed-in client that's 13,110 modules and 83,186 exports, about 22 ms per change (longer than a frame), with nothing to stop it.

It now finds the actions once and reuses them on theme changes, looks at most once a second, and stops watching after a minute if they never show up. The new test in slack-theme-test.sh fails on the original theme.js (101 scans instead of 1).

Not changed, worth a look

  • Runtime.enable stays on for every page, so every Slack console message goes through the pipe into Python: about 7 MB at startup, then roughly 1 message and 4 KB a second. received() also stops reading after one error. Page.enable with Page.domContentEventFired would cover reloads without the console stream.
  • Add Slack web app with protocol link handling #10764 adds the same omarchy-install-service-slack / omarchy-remove-service-slack names and the same menu row for a Slack web app, so whichever lands second needs reworking.
  • I watched users.prefs.set for about 3.5 minutes across two theme switches and saw no ia_theme write, so the "stays local" claim held up while I watched.

🤖 Reviewed by Claude Opus 5.5 in T3 Code, second opinion GPT-6.1 Sol xhigh.

Runtime.enable sent every Slack console message through the pipe into
the launcher: about 7 MB at startup, then a message a second. Page
events mark each new document without that, and the first apply runs on
attach. A message the launcher can't handle no longer stops it reading,
which left Slack queueing everything after it.

Checked on Slack 4.52.182: 98 KB in the first 40 s and nothing while
idle, the theme comes back after a reload, and a live switch to light
still applies.
@ryanrhughes

Copy link
Copy Markdown
Collaborator

Pushed one more fix (fdf7ddc) for the console stream I flagged last time, so the only open item is now a product call, not code.

The launcher no longer streams Slack's console

Runtime.enable was only there for executionContextCreated, but it also sends every Slack console message through the pipe into Python. The launcher now uses Page.enable and applies on attach and on Page.domContentEventFired. A message it can't handle is logged and skipped instead of stopping the read loop; stopping left Slack queueing everything after it.

Checked on a signed-in Slack 4.52.182:

  • 98 KB through the pipe in the first 40 s, and 0 bytes while idle (it was ~7 MB at startup, then ~4 KB a second)
  • the theme comes back after a page reload (DCL at 40.3 s, applied in the same tick)
  • a live switch to light still applies

Restarts that pass their own args

"Restart with debug logs" and the net-log restart still close Slack instead of restarting it. I'm calling that a known limitation, not a blocker. Both are troubleshooting-only, reopening Slack from the launcher works, and the only fixes are scraping /proc for Electron's relauncher or swapping the pipe for a debugging port any local user could reach.

Still not changed

  • The override .desktop is a one-time copy, so a future Slack package change to its desktop file won't show up until omarchy setup slack runs again. A custom override gets replaced, with a .before-omarchy backup.
  • Add Slack web app with protocol link handling #10764 still claims the same omarchy-install-service-slack / omarchy-remove-service-slack names and menu row for a Slack web app.

🤖 Fixed and checked by Claude Opus 5.5 in T3 Code; no second-opinion round on this commit.

The one-second guard skipped DOM changes without scheduling another
look, so a Slack that finished loading inside that second and then went
quiet kept its old colors. A skipped call now schedules one look for
when the second is up.
@ryanrhughes
ryanrhughes merged commit 175e63b into omacom:quattro Nov 1, 2026
3 checks passed
@emirb emirb added this to the 4.6.0 milestone Nov 5, 2026
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 5, 2026
* Sync Slack Desktop with Omarchy themes live

* Fix Slack header contrast across themes

* Fix Slack install and uninstall lifecycle and cover live updates

* Theme packaged Slack over inherited pipes

* Remove Slack-specific theming documentation

* Use native Slack theme colors

* Read Slack theme after connecting the watcher

* Trim redundant Slack theme tests

* Normalize RGBA colors for Slack

* Stop Slack's theme lookup from scanning on every DOM change

When Slack ships a build without the actions theme.js looks for, the
observer stayed connected and walked all ~83,000 module exports on every
DOM change, about 22 ms each time, for the life of the window. Measured
on a signed-in Slack 4.52.182: 331 ms of main-thread time per 20 idle
seconds, with nothing to stop it.

Find the actions once and reuse them on theme changes, look at most once
a second, and stop watching after a minute when they never turn up.

* Bring Slack's restarts back through the theme launcher

Slack's Clear Cache and Restart, Reset App Data and hardware acceleration
toggle call app.relaunch(), which starts the original command line again
without descriptors 3 and 4. Electron quits when --remote-debugging-pipe
has no pipe behind it, so Slack closed about 10 seconds after the restart
instead of coming back.

Start Slack under omarchy-launch-slack's name so those restarts come back
through it. The launcher drops the stale pipe flag and the theme launcher
adds it again with a fresh pipe. Checked on Slack 4.52.182: the
restarted Slack opens, has its pipe, and follows a live theme switch.

Restarts that pass their own arguments (debug logs, net logs) still use
Slack's binary path and still quit.

Co-Authored-By: GPT-6.1 Sol <[email protected]>

* Follow Slack's page loads without streaming its console

Runtime.enable sent every Slack console message through the pipe into
the launcher: about 7 MB at startup, then a message a second. Page
events mark each new document without that, and the first apply runs on
attach. A message the launcher can't handle no longer stops it reading,
which left Slack queueing everything after it.

Checked on Slack 4.52.182: 98 KB in the first 40 s and nothing while
idle, the theme comes back after a reload, and a live switch to light
still applies.

* Look for Slack's actions again when the page goes quiet

The one-second guard skipped DOM changes without scheduling another
look, so a Slack that finished loading inside that second and then went
quiet kept its old colors. A skipped call now schedules one look for
when the second is up.

---------

Co-authored-by: Ryan Hughes <[email protected]>
Co-authored-by: GPT-6.1 Sol <[email protected]>
sogamoso added a commit to sogamoso/dotfiles that referenced this pull request Nov 10, 2026
Omarchy now themes Slack through Slack's own theme store instead of a
pasted string (omacom/omarchy#17113): background, accent, green and red
as the four colours Slack's redesign takes. Slack keeps a custom theme in
the account, so the manual carries those four for the one paste, in
place of the ten colour string of the old Themes tab, which Slack now
reduces to four anyway. The launcher that applies them live drives Slack
over its debugging pipe from a Linux Python, so default/slack is set
aside in the Omarchy classification.
dhh added a commit that referenced this pull request Nov 14, 2026
Slack 4.53 refuses the debugging pipe the theme launcher starts it with, so
themed Slack no longer opens. This reverts #17113 and returns existing
installs to Slack's own launcher.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@dhh dhh mentioned this pull request Nov 14, 2026
dhh added a commit that referenced this pull request Nov 14, 2026
* Give themed Slack a profile of its own

Slack 4.53 refuses a debugging pipe on its default profile, so the themed
launcher's Slack exited before opening a window.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

* Revert "Give themed Slack a profile of its own"

This reverts commit 54be7a5.

* Remove Slack theme sync

Slack 4.53 refuses the debugging pipe the theme launcher starts it with, so
themed Slack no longer opens. This reverts #17113 and returns existing
installs to Slack's own launcher.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

---------

Co-authored-by: Claude Fable 5.2 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants