mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 22:20:51 +00:00
slack: Add dark-mode version
This commit is contained in:
parent
5198a4c3d4
commit
ee1f6e20b2
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, dpkg, makeWrapper
|
||||
{ darkMode ? false, stdenv, fetchurl, dpkg, makeWrapper
|
||||
, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib
|
||||
, gnome2, gtk3, gdk_pixbuf, libnotify, libxcb, nspr, nss, pango
|
||||
, systemd, xorg }:
|
||||
|
@ -88,6 +88,21 @@ in stdenv.mkDerivation {
|
|||
substituteInPlace $out/share/applications/slack.desktop \
|
||||
--replace /usr/bin/ $out/bin/ \
|
||||
--replace /usr/share/ $out/share/
|
||||
'' + stdenv.lib.optionalString darkMode ''
|
||||
cat <<EOF >> $out/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
let tt__customCss = ".menu ul li a:not(.inline_menu_link) {color: #fff !important;}"
|
||||
$.ajax({
|
||||
url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
|
||||
success: function(css) {
|
||||
\$("<style></style>").appendTo('head').html(css + tt__customCss);
|
||||
\$("<style></style>").appendTo('head').html('#reply_container.upload_in_threads .inline_message_input_container {background: padding-box #545454}');
|
||||
\$("<style></style>").appendTo('head').html('.p-channel_sidebar {background: #363636 !important}');
|
||||
\$("<style></style>").appendTo('head').html('#client_body:not(.onboarding):not(.feature_global_nav_layout):before {background: inherit;}');
|
||||
}
|
||||
});
|
||||
});
|
||||
EOF
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -17350,6 +17350,7 @@ with pkgs;
|
|||
jackline = callPackage ../applications/networking/instant-messengers/jackline { };
|
||||
|
||||
slack = callPackage ../applications/networking/instant-messengers/slack { };
|
||||
slack-dark = self.slack.override { darkMode = true; };
|
||||
|
||||
slack-cli = callPackage ../tools/networking/slack-cli { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue