Skip to content

Instantly share code, notes, and snippets.

@kmwalsh
Last active February 26, 2024 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmwalsh/72e28aee51062dd6481594188201eb47 to your computer and use it in GitHub Desktop.
Save kmwalsh/72e28aee51062dd6481594188201eb47 to your computer and use it in GitHub Desktop.
Make Slack less painful.
/* ==UserStyle==
@name slack.com - 6/6/2023, 6:08:37 PM
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A Slack in-browser customization style
@author github.com/kmwalsh
==/UserStyle== */
@-moz-document domain("app.slack.com") {
* {
font-family: 'Ubuntu';
}
/*
* ================================================
* DEGAMIFY SLACK <3
* ================================================
*/
/*
hides sidebar notifications for channels you do not wish to receive notifications about
makes it look like a normal channel with no unreads
get the channel ID from the URL
*/
.p-channel_sidebar__name, /* all channels */
/* "Later" - to test, send yourself a reminder in your self-DM and make adjustments accordingly */
#Plater .p-channel_sidebar__link--unread .p-channel_sidebar__name,
/*channel-specific notifications, replace #CHANNEL-ID-HERE with channel IDs*/
#CHANNEL-ID-HERE .p-channel_sidebar__link--unread .p-channel_sidebar__name
{
font-weight: normal !important;
}
.p-channel_sidebar__banner--unreads, /* "more unreads" floaty banner */
* .p-channel_sidebar__badge, /* all red unread count badges */
/* specific channel red unread count badges */
#Plater .p-channel_sidebar__badge,
#CHANNEL-ID-HERE .p-channel_sidebar__badge
{
display: none !important;
}
/* go away slackbot */
div.c-virtual_list__item:has(.c-message__sender[data-stringify-text="Slackbot"]) {
display: none;
height: 0;
max-height: 0;
}
/* make everyone the same color, grayscale */
.c-link--button.c-message__sender_button,
.c-message__sender.c-message_kit__sender {
color: #fff !important;
}
}

How

  • Made for a dark mode Slack. Some text is set to white here, so if you use Slack in light mode, update the CSS colors.
  • Use Slack in your browser. Slack (typically) performs better here anyway and is (generally) less laggy than the Desktop app.
  • Install Stylus browser extension. It lets you write user styles.
  • Create a new style. Paste the style below into it.
  • Set Stylus rule "URLs on the domain" to "app.slack.com"
  • Enjoy.

What

  • Turns all usernames the same color.
  • Hides Slackbot messages.
  • Hides "more unreads" floating banner, sidebar notification badges, etc.
  • Lets you set a persistent custom font, which is neat for accessibility. This exists but the change doesn't persist when you reload the app, last I checked.

Why

Default Slack settings weren't doing it for me. Didn't have enough control, still got pinged and got notification badges for muted channels, and Slackbot is generally not useful to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment