The Computer Oracle

Slack app on Linux: How to disable the "blue circle" icon on channel activity?

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Ominous Technology Looping

--

Chapters
00:00 Slack App On Linux: How To Disable The &Quot;Blue Circle&Quot; Icon On Channel Activity?
00:26 Accepted Answer Score 25
01:08 Answer 2 Score 2
01:35 Answer 3 Score 6
02:07 Answer 4 Score 8
03:17 Thank you

--

Full question
https://superuser.com/questions/1211975/...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#linux #slack

#avk47



ACCEPTED ANSWER

Score 25


I don't seem to have the setting that Shawn mentions, but i was able to make this work by opening up the /usr/lib/slack/resources/app.asar.unpacked/src/static directory, making a copy of the slack-taskbar-rest.png file and renaming it to slack-taskbar-unread.png to overwrite the version with the blue dot.

of course, that gets rid of the blue dot for all teams, but that's what i wanted.

Edit (2019-05-28): Idea is still correct, but for the newest Slack version (3.4.2) on Ubuntu, two more files have to be replaced. The following worked for me:

cd /usr/lib/slack/resources/app.asar.unpacked/src/static
sudo cp slack-taskbar-rest.ico slack-taskbar-unread.ico
sudo cp slack-taskbar-rest.png slack-taskbar-unread.png
sudo cp slack-taskbar-rest-linux.png slack-taskbar-unread-linux.png



ANSWER 2

Score 8


The short answer is: You can't, without hacking slack.

The long answer is that exactly how to hack it will differ from one version to the next, as they update the source code. We should all team up and submit a feature request (or maybe this could even be considered a bug – it's clearly bugging people).

Until then, this should be a community wiki, to prevent a new answer from being generated for each new slack version. Add your scripts here, and clearly state the latest version on which it works, newest on top.


4.7.0

This is an improvement on Dmitry S.'s answer.

  • unreads>0 is replaced with false, so slack should always think there are no unread messages.
  • Replacement is done in all .js files, since the code seems to have been split up in the latest version.
  • asar is not run with super user privileges, which is useful for people using npm-g_nosudo.

Prerequisites:

  • asar installed globally through npm: npm install -g asar

Script:

#!/usr/bin/env sh

set -eu

# Clean up previous failed attempts
rm -rf ~/tmp/slack
rm -rf ~/tmp/app.asar

# Unpack
mkdir -p ~/tmp/slack
asar extract /usr/lib/slack/resources/app.asar ~/tmp/slack

# Modify
sed -i 's/unreads>0/false/g' ~/tmp/slack/dist/*.js

# Replace
sudo rm /usr/lib/slack/resources/app.asar
sudo rm -rf /usr/lib/slack/resources/app.asar.unpacked
asar pack ~/tmp/slack ~/tmp/app.asar
sudo cp ~/tmp/app.asar /usr/lib/slack/resources/app.asar
sudo cp -r ~/tmp/slack /usr/lib/slack/resources/app.asar.unpacked

echo "Enjoy your productivity"




ANSWER 3

Score 6


The newest version 4.1.2 doesn't read the .ico file on Linux, and changes src to dist. Instead it builds a badge + base. Luckily unread>0 is the check responsible for the badge and only appears once in the minified JS, so it's easy to patch. You'll need the ASAR tool to modify the Electron archive (npm install -g asar):

mkdir -p ~/tmp/slack
asar extract /usr/lib/slack/resources/app.asar ~/tmp/slack
sed -i 's/unreads>0/unreads<0/g' ~/tmp/slack/dist/main.1.*.js
sudo rm /usr/lib/slack/resources/app.asar
sudo rm -rf /usr/lib/slack/resources/app.asar.unpacked
sudo asar pack ~/tmp/slack /usr/lib/slack/resources/app.asar
sudo mv ~/tmp/slack /usr/lib/slack/resources/app.asar.unpacked



ANSWER 4

Score 2


Same idea as notatoad, but with the newest Slack version (3.4.2) on Linux, there are two more files which have to be overwritten to replace the "blue dot" icon by the "rest" icon. I did the following:

cd /usr/lib/slack/resources/app.asar.unpacked/src/static
sudo cp slack-taskbar-rest.ico slack-taskbar-unread.ico
sudo cp slack-taskbar-rest.png slack-taskbar-unread.png
sudo cp slack-taskbar-rest-linux.png slack-taskbar-unread-linux.png

After a restart of Slack, we are rid of the blue dot.