松弛變量可以為負嗎_如何為松弛安裝(非官方)暗模式

松弛變量可以為負嗎

松弛變量可以為負嗎

Slack still doesn’t have a dark mode. They have dark themes, but those only let you customize the sidebar colors, leaving the main window white. With the release of system-wide dark modes on macOS Mojave and Windows 10, Slack feels very out of place.

Slack仍然沒有暗模式。 它們具有深色主題,但這些主題僅允許您自定義側邊欄顏色,而使主窗口保持白色。 隨著在macOS Mojave和Windows 10上發布的系統范圍內的暗模式,Slack感覺很不合適。

This method is unofficial and involves digging around in the source files for Slack. It’s fairly easy to do, but since it will be overwritten every time you update, you will have to do this multiple times.

此方法是非官方的,涉及在Slack的源文件中進行挖掘。 這很容易做到,但是由于每次更新都會被覆蓋,因此您必須多次執行此操作。

下載主題 (Downloading a Theme)

Since Slack runs on Electron, a framework for developing desktop Node.js apps, you can edit the styles for it like you’d edit the CSS of a website. But the CSS files for Slack are buried in the source, so you’ll have to load your own themes.

由于Slack在Electron(用于開發桌面Node.js應用程序的框架)上運行,因此您可以像編輯網站CSS一樣為其編輯樣式。 但是SlackCSS文件被隱藏在源代碼中,因此您必須加載自己的主題。

The most popular true dark mode theme is slack-black-theme by Widget. And since Electron shares code across platforms, this theme will work on Windows and Linux as well. We found there were some issues with the theme on macOS Mojave though, so if it doesn’t work then you can try this fork, which says it works on macOS only but may work for Windows users as well.

最受歡迎的真正黑暗模式主題是Widget的“ slack-black-theme” 。 由于Electron跨平臺共享代碼,因此該主題也將在Windows和Linux上運行。 我們發現macOS Mojave上的主題存在一些問題,因此,如果該主題不起作用,則可以嘗試使用fork ,它說它僅適用于macOS,但也可能適用于Windows用戶。

修補松弛 (Patching Slack)

This part, you’ll have to do again every time Slack updates. On macOS, you can get to Slack’s source directory by right-clicking on the app itself and selecting “Show Package Contents”. On Windows, you’ll find it at?~\AppData\Local\slack\ .

這部分,每次Slack更新時,您都必須再次執行。 在macOS上,您可以通過右鍵單擊應用程序本身并選擇“顯示軟件包內容”來進入Slack的源目錄。 在Windows上,您可以在~\AppData\Local\slack\找到它。

Then, navigate a few folders down to resources/app.asar.unpacked/src/static/ . You’re going to want to find the ssb-interop.js file, where you’ll edit the code. Make sure Slack is closed, open that file in your favorite text editor, and scroll to the bottom:

然后,將幾個文件夾導航到resources/app.asar.unpacked/src/static/ 。 您將要找到ssb-interop.js文件,您將在其中編輯代碼。 確保關閉了Slack,在您喜歡的文本編輯器中打開該文件,然后滾動到底部:

Copy and paste the following code at the very end of the ssb-interop.js file:

將以下代碼復制并粘貼到ssb-interop.js文件的末尾:

// First make sure the wrapper app is loaded
document.addEventListener("DOMContentLoaded", function() {
// Then get its webviews
let webviews = document.querySelectorAll(".TeamView webview");
// Fetch our CSS in parallel ahead of time
const cssPath = 'https://cdn.rawgit.com/widget-/slack-black-theme/master/custom.css';
let cssPromise = fetch(cssPath).then(response => response.text());
let customCustomCSS = `
:root {
/* Modify these to change your theme colors: */
--primary: #09F;
--text: #CCC;
--background: #080808;
--background-elevated: #222;
}
`
// Insert a style tag into the wrapper view
cssPromise.then(css => {
let s = document.createElement('style');
s.type = 'text/css';
s.innerHTML = css + customCustomCSS;
document.head.appendChild(s);
});
// Wait for each webview to load
webviews.forEach(webview => {
webview.addEventListener('ipc-message', message => {
if (message.channel == 'didFinishLoading')
// Finally add the CSS into the webview
cssPromise.then(css => {
let script = `
let s = document.createElement('style');
s.type = 'text/css';
s.id = 'slack-custom-css';
s.innerHTML = \`${css + customCustomCSS}\`;
document.head.appendChild(s);
`
webview.executeJavaScript(script);
})
});
});
});

You’ll probably want to duplicate this file and save it in a different location, so you don’t have to edit the code every time. This way, you can just drag it into the directory to overwrite the newest version:

您可能需要復制此文件并將其保存在其他位置,因此您不必每次都編輯代碼。 這樣,您可以將其拖到目錄中以覆蓋最新版本:

After you’re done, reopen Slack, and after a few seconds the dark mode should kick in. The loading screen will still be white, but the main app window will blend in much better with the rest of your system:

完成后,重新打開Slack,幾秒鐘后,將進入黑暗模式。加載屏幕仍為白色,但主應用程序窗口將與系統的其余部分更好地融合在一起:

添加自己的主題 (Adding Your Own Themes)

If you don’t like the look of it, you can edit the CSS with any styles you want. All this code does is load custom styles from?https://cdn.rawgit.com/widget-/slack-black-theme/master/custom.css; you can download that file, edit it with your changes, and replace the URL with your own code. Save, relaunch Slack, and your changes will be visible. If you don’t know CSS, or just want to make a minor change, there are four color variables defined before loading the CSS, so you can just edit those with your own colors.

如果您不喜歡它的外觀,則可以使用所需的任何樣式來編輯CSS。 這些代碼所做的只是從https://cdn.rawgit.com/widget-/slack-black-theme/master/custom.css加載自定義樣式; 您可以下載該文件,進行更改后進行編輯,然后將URL替換為自己的代碼。 保存并重新啟動Slack,您的更改將可見。 如果您不了解CSS,或者只是想作一些小的更改,則在加載CSS之前定義了四個顏色變量,因此您可以使用自己的顏色進行編輯。

翻譯自: https://www.howtogeek.com/368976/how-to-install-the-unofficial-dark-mode-for-slack/

松弛變量可以為負嗎

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/279138.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/279138.shtml
英文地址,請注明出處:http://en.pswp.cn/news/279138.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

如何使用系統自帶的日志轉儲功能logroate.存放應用日志

Linux日志服務介紹 1. 在Linux系統,大部分日志都是由syslog日志服務驅動和管理的 syslog服務由兩個重要的配置文件控制管理,分別是/etc/syslog.conf主配置文件和/etc/sysconfig/syslog輔助 配置文件, /etc/init.d/syslog是啟動腳本…

shell 多行注釋

:<<BLOCK 中間為要注釋的內容 BLOCK轉載于:https://www.cnblogs.com/S--S/p/9817660.html

natcat for mysql_用Navicat for mysql連接mysql報錯1251-解決辦法

TP框架連接mongodb報錯及解決辦法mongodb版本3.4.7 1.認證錯誤:Failed to connect to: localhost:27017: Authentication failed on database test ...Loadrunner參數化連接oracle、mysql數據源報錯及解決辦法Loadrunner參數化連接oracle.mysql數據源報錯及解決辦法 (本人系統是…

如何在Mac上設置FaceTime

FaceTime is Apple’s built-in video and audio calling app. It pairs with your iPhone and allows you to make phone calls on macOS. FaceTime是Apple的內置視頻和音頻通話應用程序。 它可以與iPhone配對使用&#xff0c;并允許您在macOS上撥打電話。 You don’t need an…

移動視頻技術

在語音通信已得到教育、醫療、社交、電子商務等多個領域的移動應用和充分發展的今天&#xff0c;人們已不滿足于僅依靠語音電話來傳達信息。開發者都需要結合自身業務場景在其產品中嵌入語音聊天、視頻通話、語音對講等實時通話功能。但較高的技術門檻和開發成本成為普通開發者…

hashlib 模塊用來進行hash

hashlib的基本概述&#xff1a; python中的 hashlib 模塊用來進行hash 或者md5加密&#xff0c;而且這種加密是不可逆的&#xff0c;所以這種算法又被稱為摘要算法&#xff0c; 其支持Opennssl庫提供的所有算法&#xff0c;包括 md5、sha1、sha224、sha256、sha512 等。 hash是…

在Ubuntu 11.10中將窗口按鈕移回右側

As of Ubuntu 10.04, the minimize, maximize, and close buttons on all windows were moved to the left side and the system menu was removed. Prior to version 11.10, you could use several methods to restore the original button arrangement. 從Ubuntu 10.04開始&a…

java測試開發_測試開發系類之Java常用知識點

測試需要的兩門語言&#xff1a;Java&#xff0c;Python測試開發&#xff1a;開發測試腳本->開發測試框架Java需要掌握內容&#xff1a;基礎語法、Java面向對象相關概念、Java常用類、基礎測試框架Java常用類&#xff1a;IO相關類&#xff0c;包括&#xff1a;字節流InputSt…

kafka 服務端消費者和生產者的配置

在kafka的安裝目錄下&#xff0c;config目錄下有個名字叫做producer.properties的配置文件 #指定kafka節點列表&#xff0c;用于獲取metadata&#xff0c;不必全部指定 #需要kafka的服務器地址&#xff0c;來獲取每一個topic的分片數等元數據信息。 metadata.broker.listkafka0…

如何在Windows 10上使用觸摸板手勢

If you’ve used a touchpad in Windows 10, you’re no doubt aware of the basic single-finger tapping and two-finger scrolling gestures. Windows 10 also packs in some additional gestures you might not have tried. 如果您在Windows 10中使用了觸摸板&#xff0c;那…

java全棧開發工程師_談談我對Java(J2EE)全棧工程師的理解

很多剛從事Java開發的同學都有一個疑問&#xff0c;到底是向全棧式程序員方向發展還是做精通某種技術的專才&#xff1f;對于這個問題也是見仁見智。 在給出我的觀點之前&#xff0c;我們先來分析一下全棧工程師的種類和專才的種類 &#xff0c;之后關于這個問題的答案就很清楚…

多網卡命名規則

使用iptables做nat路由&#xff0c;需要幾張網卡&#xff0c;以下命令很有用 1.首先你要先確認你系統加載的網卡&#xff0c;lspci|grep -i eth,如果出現unknow情況或者未識別&#xff0c;最好換網卡&#xff0c;或者是驅動沒有加載&#xff0c;需要到/lib/modules的子目錄driv…

相機模擬光圈_我的相機應該使用什么光圈?

相機模擬光圈Aperture, along with shutter speed and ISO, is one of the three most important settings you control when you take a photo. It affects both the amount of light that hits your camera sensor and the depth of field of your images. Let’s look at ho…

2018-2019-1 20165234 《信息安全系統設計基礎》第四周學習總結

一、學習目標 了解ISA抽象的作用 掌握ISA&#xff0c;并能舉一反三學習其他體系結構 了解流水線和實現方式二、學習內容 Y86-64指令 movq指令 irmovq rrmovq mrmovq rmmovq四個整數操指令 addq,subq,andq,xorq只對寄存器數據進行操作7個跳轉指令 cmovle cmovl cmove cmovne cmo…

python數據庫實例_Python3.6簡單的操作Mysql數據庫的三個實例

安裝pymysql參考&#xff1a;https://github.com/PyMySQL/PyMySQL/pip install pymsql實例一import pymysql# 創建連接# 參數依次對應服務器地址&#xff0c;用戶名&#xff0c;密碼&#xff0c;數據庫conn pymysql.connect(host127.0.0.1, userroot, passwd123456, dbdemo)# …

Python之釘釘機器人推送天氣預報

通過Python腳本結合釘釘機器人&#xff0c;定時向釘釘群推送天氣預報 #!/usr/bin/python # -*- coding: utf-8 -*- # Author: aikergdedu.ml # My blog http://m51cto.51cto.blog.com import requests import re import urllib2 import json import sys import osheaders {Co…

google +按鈕_如何禁用或改善Google的Google+集成

google 按鈕If you’ve used Google lately, you’ve probably seen Google taking over Google’s search results. You don’t have to put up with it — you can disable the integration, show better social-networking pages or hide those pesky Google notifications.…

P2680 運輸計劃

傳送門 十分顯然完成工作的時間和航耗時最長的運輸計劃有關 所以題目意思就是要求最大值最小 所以可以想到二分 把所有大于mid時間的航線打上標記&#xff0c;顯然刪邊只能在所有這些航線的公共路徑上 要如何快速打標記是個問題 二分已經有一個log&#xff0c;所以只能承受O(n)…

java 集合讀寫同步_JAVA多線程學習十六 - 同步集合類的應用

1.引言在多線程的環境中&#xff0c;如果想要使用容器類&#xff0c;就需要注意所使用的容器類是否是線程安全的。在最早開始&#xff0c;人們一般都在使用同步容器(Vector,HashTable),其基本的原理&#xff0c;就是針對容器的每一個操作&#xff0c;都添加synchronized來進行同…

Linux下的parted工具的使用 GPT分區安裝系統

安裝系統是安裝前時候ctrlatlF2 fdisk -l parted select /dev/sdb mklabel msdos # 將GPT磁盤格式化為MBR磁盤 對大硬盤進行分區 xfs 和 ntfs Linux下的parted工具的使用也很簡單&#xff0c;具體操作如下&#xff1a; rootme:/mnt# parted /dev/sda Using /dev/sda Welcome to…