To activate the dark theme, open the Slack preferences, go to Themes and select the Dark theme.
Now that slack has a built-in dark theme, there will not be any further updates to this project. To uninstall this theme, you can either re-install Slack, or run the following command to uninstall
curl -s https://raw.githubusercontent.com/MashupMill/slack-themes/master/uninstall.sh | sudo bash
Run the following command...
curl -s https://raw.githubusercontent.com/MashupMill/slack-themes/master/install.sh | sudo bash
Note: Currently this script is written for macOS (basically its just the path to slack that is specific to macOS). Though it may work on other systems if you take the
install.sh
script and run it likesudo ./install.sh /path/to/Slack
Add the contents of snippet.js
to your ssb-interop.js
(typically found at /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
)
Remove the entire snippet of code in ssb-interop.js
between (inclusively) // START MASHUPMILL/SLACK-THEMES -- DO NOT MODIFY
and // END MASHUPMILL/SLACK-THEMES -- DO NOT MODIFY
Dev mode will install the script but changes the url where the css files are loaded from to be http://localhost:8164/
and then it starts up a mini http server to serve up the files in this repo. From there you can just start modifying the css files and hit CMD+R
in slack to refresh.
You can run the installer in dev mode by running with the environment variable DEV_MODE=true
. For example:
sudo DEV_MODE=true ./install.sh
You will also very likely want to run slack in dev mode as well, which gives you access to the developer tools to inspect elements, view network traffic, etc. This can be done by first closing your existing slack window and then running this in your terminal:
SLACK_DEVELOPER_MENU=true open -a /Applications/Slack.app
In version 4.0.0 Slack moved the ssb-interop
into the electron archive and it is now minified and obfuscated. Fortunately it appears patching the JS file can largely remain the same. The main difference now, is we need to:
- Unpack the
app.asar
(the electron archive) - Patch the
ssb-interop.bundle.js
file ... just append same old snippet to the end of the file - Re-pack the
app.asar
- Restart Slack ... initial testing, I saw some wonkyness trying to just refresh after that change
I've made some updates to the installer to now check for this new file structure and added an attempt to patch the file. So far it looks good in the 2 minutes I've had it up.