How To Add Dark Mode For Slack Desktop on Mac
Save Your Eyes, Love Your CodeWhy is there no Dark Mode For Slack Desktop on Mac
There is some dispute as to why it has taken Slack so long to add this option. Since the beginning you could add a dark side bar theme, but your messages remain black text on white background. Forum posts indicated that Slack developers have been working on this but nothing has been released. It may be that they are unable to decide which shade(s) are the perfect background and text combinations. Or there may be pushback from management that are not fans of dark themes. Whichever the reason it is about time that you got your hands on some Dark Mode for Slack Desktop.
Dark Mode, New or Old Idea?
Dark Mode has become all the rage in recent years. Rather than being something new it is actually a return to the origins of computing. In the early days of modern computers monitors displayed a single color on a black background. withe the advent of the GUI that changed to white backgrounds and black text.
Developers have been switching to dark backgrounds for their coding environments for a while now. But with the advent of Dark Mode in Mac OS 10.14 Mojave the game has changed.
Virtually all applications have a Dark Mode variant which is used when you turn on Dark Mode for the OS. One application that has received a lot of criticism for not providing a Dark Mode option in Slack. Even before Mac introduced OS wide Dark Mode, Slack was getting harassed by users for this missing feature.
Add Dark Mode to Slack for Mac
The simplest way I have found to add dark mode is to copy the code below and paste it in your terminal. This will add a dark theme that will take over by default the next time you restart Slack.
sed -i.bak '/darkmode BEGIN/,/darkmode END/d' /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js && echo -e '//darkmode BEGIN\ndocument.addEventListener("DOMContentLoaded", function() {\n $.ajax({\n url: "https://cdn.jsdelivr.net/gh/laCour/slack-night-mode/css/raw/black.css",\n success: function(css) {\n let overrides = `\n code, pre { background-color: #535353; color: #ffffff; }\n .c-mrkdwn__pre, .c-mrkdwn__quote, pre { background: #535353 !important; background-color: #535353 !important; }\n #client_body:not(.onboarding):not(.feature_global_nav_layout):before {display: none;}\n `\n $("<style></style>").appendTo("head").html(css + overrides);\n }\n })});\n//darkmode END' >> /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
This basic method will give you Dark Mode for Slack, but will be removed each time Slack updates. To get around this you can add an Automator action to add Dark Mode on each boot. This will make sure that Dark Mode is available after each Slack update. Until Slack gets their act together.
Make It Permanent
Follow these quick steps to make sure Dark Mode is always enabled in Slack.
1: Open Automator and select Application for the type of document.
2: Use the Search box to search for “Run Shell Script” .
3: Drag the “Run Shell Script” Action into the Workflow.
4: Copy the code above and paste it into the “Run Sell Script” text box.
5: Select “Save” from the “File” menu.
6: Save the file in the location of your choice.
7: Select “Apple Menu” -> “System Preferences”.
8: Select “Users and Groups”.
9: Your username should be selected by default, click the lock at the bottom of the window to make changes.
10: Click the “Login Items” tab.
11: Click the “+” box and browse to the location that you saved your new automator workflow.
12: Select your workflow, and click the “Add” button.
You have created your new Automator Workflow and added it to your Login Items list. Now each time you login to your computer it will automatically add Dark Mode to Slack. So whenever Slack updates itself you will be one step ahead and keeping Dark Mode on top.
With the addition of Dark Mode for iOS 13 there have been rumblings that Slack might finally add Dark Mode. Those are still rumors, and it may only be added to it’s iOS or mobile versions initially. If Slack finally gets Dark Mode enabled for their Desktop app, you can disable the login item to use the built in Dark Mode. Have fun with your new Slack design.