Giter VIP home page Giter VIP logo

mallowigi / mtslack Goto Github PK

View Code? Open in Web Editor NEW
495.0 6.0 23.0 101.76 MB

Customize your Slack experience with tweaks and themes. Includes the famous Material Themes as well as other popular themes such as Monokai Pro, Dracula, Atom One, GitHub, Solarized, Night Owl...

Home Page: https://mallowigi.github.io/mtslack/

License: Apache License 2.0

JavaScript 1.32% SCSS 98.68%
slack theme material-theme-ui material-theme-ui-plugin dracula night-owl material atom-one github

mtslack's Introduction

mtslack (Material Themed Slack)

All Contributors

Beautify your Slack application from a list of popular themes!!!

IMPORTANT NOTICE

Since version 4.22.0, there is no longer a way to patch the Slack application as Slack has patched the option to add custom code.

This makes sense, as doing so would potentially allow people to inject malicious code into the application (this plugin isn't, of course).

Therefore, this great plugin will no longer patch the Slack application; instead, it will generate a code snippet that can be pasted into the Slack application to inject the themes manually.

Currently works only for Mac OS and Linux, as it uses pbcopy to handle the copy to clipboard. Contributions for Windows are welcome.

Theme List:

  • Material Oceanic oceanic.png
  • Material Darker darker.png
  • Material Palenight palenight.png
  • Material Lighter lighter.png
  • Material DeepOcean deepocean.png
  • Material Forest
  • Material Sky Blue
  • Material Sandy Beach
  • Material Volcano
  • Monokai Pro monokai.png
  • Arc Dark arcdark.png
  • Dracula dracula.png
  • GitHub github.png
  • GitHub Dark github_dark.png
  • Atom One Dark onedark.png
  • Atom One Light onelight.png
  • Solarized Dark solardark.png
  • Solarized Light solarlight.png
  • Night Owl nightowl.png
  • Light Owl lightowl.png
  • Moonlight moonlight.png
  • SynthWave '84

Pledge

If you like this plugin, you can buy me a beer (or a coffee, or something else) using PayPal

You can also support this theme by subscribing to the OpenCollective. [Become a sponsor]

Backers

Thank you to all our backers! 🙏 [Become a backer]

Check also : https://www.material-theme.com/docs/support-us/

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Installation

Global installation (only for Unix based systems)

You will need node > 16 to use it.

  1. Run npm install -g mtslack in a terminal (or run npx mtslack if you don't want to install it globally)

  2. Run the command mtslack

  3. You will be prompted with a menu the following options:

    • Copy code to clipboard
    • Show plugin version
  4. Select Copy to clipboard to copy the code snippet to your clipboard.

  5. Slack will open in dev mode: export SLACK_DEVELOPER_MENU=true; open -a /Applications/Slack.app

  6. Go to View -> Developer -> Toggle Dev Tools

  7. In the Dev Tools Console tab, paste the code snippet

  8. ?????

  9. PROFIT!!!!!!!


Troubleshooting

  • I'm getting the following error after updating to version v25+:
internal/modules/run_main.js:54
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '/usr/local/lib/node_modules/mtslack/node_modules/chalk/source/node_modules/' imported from /usr/local/lib/node_modules/mtslack/node_modules/chalk/source/index.js
    at packageMainResolve (internal/modules/esm/resolve.js:465:9)
    at packageResolve (internal/modules/esm/resolve.js:607:14)
    at moduleResolve (internal/modules/esm/resolve.js:659:14)
    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:752:11)
    at Loader.resolve (internal/modules/esm/loader.js:97:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:50:40)
    at link (internal/modules/esm/module_job.js:49:36) {
  code: 'ERR_MODULE_NOT_FOUND'

-> That means you are using an older version of node. The plugin is now only compatible with ESM Modules, therefore older versions are not supported.

Please update to node v16 and reinstall mtslack.


Slack Tweaks

Since version 2.0 you can also profit from a bunch of Slack Tweaks to make the application more enjoyable. You can find a button to open the Slack Tweaks on the channels sidebar.

Slack Tweak Control Panel

Slack Tweaks

This panel controls which tweak toggles are available. This doesn't actually toggle the tweaks themselves!.

Once you've enabled a tweak, a new toggle button will appear on the Channel Header. Pressing on these buttons will activate the tweak.

You can also activate the toggle using a shortcut.

Tweaks

These settings are saved in the application's Local Storage.

Highlight Code [NEW!] (Ctrl+Alt+H)

Automatically detects code blocks and highlight then using highlight.js. You can annotate the code blocks by setting the language name as the first line.

Example: to annotate the code as a javascript code, write:

javascript
function foo() {
}

Modal Overlays (Ctrl+Alt+O)

This button will toggle an overlay to display whenever settings are open.

Dim Absent People (Ctrl+Alt+D)

This button will dim absent people from the sidebar, making the present ones more prominent.

Loop Over selected themes (Ctrl+Alt+T)

This button will loop over the available themes, allowing you to choose a theme in realtime.

Toggle Custom Font (Ctrl+Alt+F)

Switch the fonts used in the app with the font you've defined in the Slack Tweak Settings.

Toggle Custom Monospace Font (Ctrl+Alt+M)

Switch the monospace font size and family used in the app with the font you've defined in the Slack Tweak Settings.

Accent Color (Ctrl+Alt+A)

Switch the current theme's accent color with the one of your choice. You can set the desired color in the Slack Tweak Settings.

Links Color (Ctrl+Alt+L)

Switch the current theme's links color with the one of your choice. You can set the desired color in the Slack Tweak Settings.

Click to Edit

Double click on your messages to edit it. If you double click on other people's messages, it will copy it to clipboard.

Animations

Add animations to your Slack window.


Development

Building styles

This project consists in two parts:

  • The CLI, used for applying the styles
  • The Styles, written with Sass (Node-sass)

The cli is found in the lib directory while the styles are found in the styles directory.

Then run npm run styles or npm run debugStyles to compile the scss files in dist/slack.min.css or dist/slack.css

Apply the styles

Using the WebApp

Open Slack on the browser. It has the useful Developer Tools available to them so you can debug with ease.

To test your CSS, install a Stylish-like extension (https://chrome.google.com/webstore/detail/stylish-custom-themes-for/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en) then create a new style for slack and paste the CSS inside and save.

You should already see all your styles applied. Please note that there are some differences between the web app and the native app.

Using the Electron app

  1. Run npm run server to run a local server
  2. Run watchStyles or watchScripts to watch for changes in styles or code
  3. Run npm run local to run apply with the styles pointing to localhost
  4. Run npm run debug

IMPORTANT: Please make sure to have enabled "Disable cache when devtools is open" in Chrome Settings.

Also don't forget to re-apply the production styles before quitting :)


Instead of launching Slack normally, you'll need to enable developer mode to be able to inspect things.

  • Mac: export SLACK_DEVELOPER_MENU=true; open -a /Applications/Slack.app

  • Windows: export SLACK_DEVELOPER_MENU=true; ~/AppData/Local/slack.exe

  • Linux: Same as the others, but for Linux (depends whether installed from the Marketplace or from the Web)

License

Apache 2.0

Acknowledgements

Thanks to https://github.com/widget-/slack-black-theme for the idea!

License

Apache 2.0

Contributors ✨

Thanks goes to these wonderful people (emoji key):

``

Saghen

🐛🚇🎨

Danilo Resende

🐛

jlevier

🐛

Siddhesh Mhadnak

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

mtslack's People

Contributors

allcontributors[bot] avatar daniloisr avatar dependabot[bot] avatar driver733 avatar dschinkel avatar jasverix avatar jlevier-ae avatar kellerbr-ibm avatar lustyn avatar mallowigi avatar ngriffin7a avatar renovate-bot avatar renovate[bot] avatar saghen avatar sid-maddy avatar stacksharebot avatar widget- avatar zackhsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mtslack's Issues

Unhandled promise rejection on macOS with Slack 4.12

Describe the bug
Unhandled promise rejection error when running sudo mtslack on macOS 10.15.7 after updating to Slack 4.12

To Reproduce
Steps to reproduce the behavior:

  1. Update to Slack v4.12 via the mac app store, on macOS v10.15.7
  2. Run sudo mtslack (v15.0.0) from a command line
  3. Select "Apply Tweaks"
  4. Observe the unhandled promise rejection error

Expected behavior
The sudo mtslack command runs successfully and exits without any errors.

Screenshots
Full mtslack output, including the reported error:

Checking for updates...
Finished checking for updates!
                               d8b                   d8b
                 d8P           88P                   ?88
              d888888P        d88                     88b
  88bd8b,d88b   ?88'   .d888b,888   d888b8b   d8888b  888  d88'
  88P'`?8P'?8b  88P    ?8b,   ?88  d8P' ?88  d8P' `P  888bd8P'
 d88  d88  88P  88b      `?8b  88b 88b  ,88b 88b     d88888b
d88' d88'  88b  `?8b  `?888P'   88b`?88P'`88b`?888P'd88' `?88b,



version 15.0.0 by @mallowigi
Welcome to the mtslack CLI!

? Please select an command Apply tweaks
Removing tweaks...

Successfully removed!

Adding Tweaks Code to Slack...

(node:7833) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Applications/Slack.app/Contents/Resources/app.asar.unpacked/dist/preload.bundle.js'
    at Object.openSync (fs.js:476:3)
    at Object.writeFileSync (fs.js:1467:35)
    at Object.appendFileSync (fs.js:1506:6)
    at Object.exports.apply (/Users/{{ user directory }}/.volta/tools/image/packages/mtslack/lib/node_modules/mtslack/lib/command.js:176:6)
    at Object.exports.selectTheme (/Users/{{ user directory }}/.volta/tools/image/packages/mtslack/lib/node_modules/mtslack/lib/command.js:210:8)
    at Object.exports.change (/Users/{{ user directory }}/.volta/tools/image/packages/mtslack/lib/node_modules/mtslack/lib/command.js:201:8)
    at exports.execute (/Users/{{ user directory }}/.volta/tools/image/packages/mtslack/lib/node_modules/mtslack/lib/command.js:216:12)
    at run (/Users/{{ user directory }}/.volta/tools/image/packages/mtslack/lib/node_modules/mtslack/main.js:32:3)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async AutoUpdate.<anonymous> (/Users/{{ user directory }}/.volta/tools/image/packages/mtslack/lib/node_modules/mtslack/main.js:60:7)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:7833) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7833) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Desktop (please complete the following information):

  • OS: macOS 10.15.7
  • Browser: Firefox
  • Version: mtslack 15.0.0

Can't choose slack theme via "Apply Theme"

Hey Team,

I recently found that mtslack never allowed me to choose a slack theme when I selected "Apply Theme" option, instead, it always set Material Oceanic. Is this a known issue? Or is there anything I missed? Thank you!

Screen Shot 2020-07-08 at 3 15 18 PM

Themes aren't applied to code snippet

Code snippet is still using a white background on a few themes that I tried. Not sure if this is intentional.

Tested themes:

  • Material Palenight
  • Material Dark Ocean
  • Arc Dark

Slack version: 4.0.1

Can not install on Mac - Slack v4.0.3

I tired installing both ways and different themes, installation says it was successful, but theme is not applied.
Mac - Mojave v10.14.6
Slack v4.0.3

current theme is now Material Oceanic
Checking for updates...
Finished checking for updates!
  ____  _            _      _____ _                              _                _ _
 / ___|| | __ _  ___| | __ |_   _| |__   ___ _ __ ___   ___     / \   _ __  _ __ | (_) ___ _ __
 \___ \| |/ _` |/ __| |/ /   | | | '_ \ / _ \ '_ ` _ \ / _ \   / _ \ | '_ \| '_ \| | |/ _ \ '__|
  ___) | | (_| | (__|   <    | | | | | |  __/ | | | | |  __/  / ___ \| |_) | |_) | | |  __/ |
 |____/|_|\__,_|\___|_|\_\   |_| |_| |_|\___|_| |_| |_|\___| /_/   \_\ .__/| .__/|_|_|\___|_|
                                                                     |_|   |_|
version 7.2.0 by @mallowigi
Welcome to the Slack Theme Applier CLI!

Please note that this is still experimental and can ruin your Slack application! In the case of a problem, please reinstall Slack.

? Please select an command Apply theme
Removing theme...

Successfully removed!

? Select a theme Dracula
Selected: dracula
current theme is now Dracula
Adding Dracula Theme Code to Slack...

Slack successfully themed. Please restart Slack to apply the theme.

Theme isn't applied

First at all, good job! It's look really well.
I'm trying to apply the theme in a MacOS and I can't. I didn't receive any error message, I just open Slack after apply the theme and it isn't have any change.
Is there any logs folder where I can check for error messages?
Thanks!

Theme stuck?

Mac OS Catalina 10.15.4 (19E287). I seem to be stuck on the first theme I selected (Material Oceanic) even after removing the theme, restarting slack and confirming default coloring, and then installing a new theme.

`mtslack` command continuously finds available updates

Describe the bug
With an update available, executing sudo mtslack appears to install the update, but subsequent runs of the command continue to find an available update.

To Reproduce
Steps to reproduce the behavior:

  1. Run sudo mtslack, when an update is available
  2. Observe that the update is found and installed, and the command exits without errors
  3. Execute sudo mtslack again
  4. Observe that the update is found and installed again, and the command exits without errors

Expected behavior
After installing an update, the mtslack command should not continue to find an available update, and should instead execute as normal.

Screenshots

$ sudo mtslack
Checking for updates...
A new update is available! Starting autoupdate...
Finished checking for updates!
Update finished. Please rerun the command.

~
$ sudo mtslack
Checking for updates...
A new update is available! Starting autoupdate...
Finished checking for updates!
Update finished. Please rerun the command.

~

Desktop (please complete the following information):

  • OS: macOS 10.15.7
  • Version 15.0.0

Additional context
As a workaround, you can npm install -g mtslack again. For me, this installed v16.0.0. Then, running sudo mtslack works as expected.

Lots of deprecated libraries

I don't see any tests in the source. If there were, I could bring in the new versions of the dependencies and run the tests. I can still do the former, but don't know how to test that everything works other than just applying each theme and look for visible errors being thrown.

What do you suggest I do that will be of use to you?

Did not work

I applied by cloning the repo and running ./main. It says that Slack successfully themed. Please restart Slack to apply the theme. but nothing happens.

Slack version: 4.2.0
Commit sha: 41d0f81

I have rerun it several times now. no effect

Can't install any theme

OS: Windows 10

? Select a theme Material Palenight
Selected: palenight
current theme is now Material Palenight
Adding Material Palenight Theme Code to Slack...

(node:9864) UnhandledPromiseRejectionWarning: Error: EBUSY: resource busy or locked, open 'C:\Users\lilianaiturribarria\AppData\Local\slack\app-4.3.4\resources\app.asar.unpacked\node_modules\@nodert-win10-au\windows.data.xml.dom\build\Release\binding.node'
    at Object.openSync (fs.js:443:3)
    at Object.writeFileSync (fs.js:1194:35)
    at Object.module.exports.extractAll (C:\Users\lilianaiturribarria\AppData\Roaming\npm\node_modules\@mallowigi\slack-themes\node_modules\asar\lib\asar.js:201:10)
    at Object.exports.apply (C:\Users\lilianaiturribarria\AppData\Roaming\npm\node_modules\@mallowigi\slack-themes\lib\command.js:75:8)
    at Object.exports.selectTheme (C:\Users\lilianaiturribarria\AppData\Roaming\npm\node_modules\@mallowigi\slack-themes\lib\command.js:105:8)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9864) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9864) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Cannot install on Windows

Consistently getting permission issue, and telling me to run with sudo command, even when i'm on windows using elevated privileges

image

If this is not supported on Windows, should probably remove that from the README.

Background Color in Threads isn't applied

redacted-thread-slack

The background color on thread messages is always white and is hard to read for darker themes. I've tried all of the darker themes. The black boxes in my screen shot are redacted info.

Slack Version: 4.0.3
Git Master Branch Commit Hash: e265371

Exception in Material Theme UI (3.10.0) - Using Webstorm - Fatal Error

failed to init toolwindow io.loli.browserfx.BrowserWindowFactory

java.lang.IllegalArgumentException: window with id="Embedded Web Browser" is already registered
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow(ToolWindowManagerImpl.java:1039)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.initToolWindow(ToolWindowManagerImpl.java:458)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl$5.run(ToolWindowManagerImpl.java:437)
at com.intellij.openapi.wm.impl.CommandProcessor.runNext(CommandProcessor.java:78)
at com.intellij.openapi.wm.impl.CommandProcessor.run(CommandProcessor.java:59)
at com.intellij.openapi.wm.impl.commands.FinalizableCommand.finish(FinalizableCommand.java:36)
at com.intellij.openapi.wm.impl.ToolWindowsPane$AddToolStripeButtonCmd.run(ToolWindowsPane.java:984)
at com.intellij.openapi.wm.impl.CommandProcessor.runNext(CommandProcessor.java:78)
at com.intellij.openapi.wm.impl.CommandProcessor.run(CommandProcessor.java:59)
at com.intellij.openapi.wm.impl.CommandProcessor.flush(CommandProcessor.java:32)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.flushCommands(ToolWindowManagerImpl.java:568)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.access$3100(ToolWindowManagerImpl.java:70)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl$InitToolWindowsActivity.lambda$runActivity$0(ToolWindowManagerImpl.java:2273)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:729)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:678)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:373)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.awt.Dialog.show(Dialog.java:1077)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:706)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:437)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1682)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1631)
at com.intellij.openapi.progress.util.ProgressDialog.show(ProgressDialog.java:266)
at com.intellij.openapi.progress.util.ProgressWindow.showDialog(ProgressWindow.java:235)
at com.intellij.openapi.progress.util.ProgressWindow.lambda$null$1(ProgressWindow.java:168)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:729)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:678)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:373)
at com.intellij.ide.IdeEventQueue.pumpEventsForHierarchy(IdeEventQueue.java:786)
at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:210)
at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:196)
at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:608)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:454)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:109)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:251)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:205)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadProjectUnderProgress(ProjectManagerImpl.java:446)
at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(ProjectManagerImpl.java:421)
at com.intellij.platform.PlatformProjectOpenProcessor.doOpenProject(PlatformProjectOpenProcessor.java:260)
at com.intellij.ide.util.projectWizard.AbstractNewProjectStep.doGenerateProject(AbstractNewProjectStep.java:207)
at com.intellij.ide.util.projectWizard.AbstractNewProjectStep$AbstractCallback.consume(AbstractNewProjectStep.java:161)
at com.intellij.ide.util.projectWizard.ProjectSettingsStepBase$1.actionPerformed(ProjectSettingsStepBase.java:135)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at com.chrisrm.idea.ui.MTButtonUI$ButtonHighlighter.mouseReleased(MTButtonUI.java:383)
at java.awt.Component.processMouseEvent(Component.java:6550)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at java.awt.Component.processEvent(Component.java:6315)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4899)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:739)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:729)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:674)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:373)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Invisible System Tray Icon

Describe the bug
System Tray icon is now invisible after installing mtslack.

To Reproduce

  1. Install Slack Production 4.12.0 64-bit
  2. Install mtslack
  3. Launch Slack
  4. Observe system Tray icon

Expected behavior
System Tray icon should be the same as default slack. The slack logo should be present, along with indicators of unread messages and mentions.

Screenshots
Gif

Desktop (please complete the following information):

  • OS: Windows 10, 64 bit
  • Browser: Chrome
  • Version 87.0.4280.88 (Official Build) (64-bit)
  • Slack Version 4.12.0 Production (3b5e52a-s@1609637775)

Additional context
Slack works and looks wonderful during this issue, however as I often have Slack minimized the system tray icon is my only way to know if I have unread messages without tabbing back to Slack. Prior to installation, the system tray icon was visible and worked as expected. I've fresh installed Slack prior to installation of mtslack, however it doesn't appear that any system file locations have been changed.

As I had the same issue per #45 I had to alter the installation script slightly. The script was detecting my archtype being 64 bit and therefore looking for app64.asr where I only had app.asr. To make the installation run, I simply deleted the ARCH variable here: https://github.com/mallowigi/mtslack/blob/master/lib/consts.js#L6

Run Time error

When I try to install these either by building or by globally installing I was getting the following error

current theme is now Material Oceanic (node:55261) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token = in JSON at position 1 at JSON.parse (<anonymous>) at exports.parse (/Users/pchandra/OpenSourceProjects/slack-themes/node_modules/rc/lib/utils.js:15:17) at addConfigFile (/Users/pchandra/OpenSourceProjects/slack-themes/node_modules/rc/index.js:30:20) at Array.forEach (<anonymous>) at module.exports (/Users/pchandra/OpenSourceProjects/slack-themes/node_modules/rc/index.js:43:36) at module.exports (/Users/pchandra/OpenSourceProjects/slack-themes/node_modules/registry-url/index.js:3:24) at module.exports (/Users/pchandra/OpenSourceProjects/slack-themes/node_modules/package-json/index.js:22:12) at module.exports (/Users/pchandra/OpenSourceProjects/slack-themes/node_modules/latest-version/index.js:5:2) at UpdateNotifier.checkNpm (/Users/pchandra/OpenSourceProjects/slack-themes/node_modules/update-notifier/index.js:71:2) at UpdateNotifier.check (/Users/pchandra/OpenSourceProjects/slack-themes/node_modules/update-notifier/index.js:45:15) (node:55261) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:55261) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Linux source location

Spotted that linux paths are in lib/consts.js and wanted to give my scenario

The current full path to ssb-interop.js for linux is in consts.js as: /usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js.

On my machine the file was located at /usr/lib/slack/resources/app.asar.unpacked/dist/ssb-interop.bundle.js

$ find . -name ssb-interop.js
$ find . -name ssb-interop.bundle.js              
./app.asar.unpacked/dist/ssb-interop.bundle.js

Pointing to this directory in consts.js got things working for me 😄

For added info, I'm running on arch linux with slack installed from AUR (https://aur.archlinux.org/packages/slack-desktop/)

Add ability to override monospaced font

Today I set my font to a monospaced font, and found some code snippets in our Slack, and I found that that is monospaced, but uses a different font. Would love to override that as well. Of course with a separate setting. Thanks for considering adding this.

install issue on ubuntu 20.04

Describe the bug
version 15.0.0 doesn't run on ubuntu 20.04

Checking for updates...
Finished checking for updates!
(node:190919) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/usr/local/lib/node_modules/mtslack/node_modules/figlet/fonts/whimsy.flf'
    at Object.openSync (fs.js:443:3)
    at Object.readFileSync (fs.js:343:35)
    at Function.figlet.loadFontSync (/usr/local/lib/node_modules/mtslack/node_modules/figlet/lib/node-figlet.js:48:23)
    at Function.me.textSync (/usr/local/lib/node_modules/mtslack/node_modules/figlet/lib/figlet.js:879:43)
    at run (/usr/local/lib/node_modules/mtslack/main.js:12:35)
    at AutoUpdate.update.on (/usr/local/lib/node_modules/mtslack/main.js:60:13)
    at AutoUpdate.emit (events.js:198:13)
    at AutoUpdate.onCheck (/usr/local/lib/node_modules/mtslack/node_modules/cli-autoupdate/index.js:31:12)
    at callback (/usr/local/lib/node_modules/mtslack/node_modules/cli-autoupdate/index.js:18:37)
    at UpdateNotifier.<anonymous> (/usr/local/lib/node_modules/mtslack/node_modules/update-notifier/index.js:76:3)
(node:190919) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:190919) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

When checking the file is actually there.
When i specifically install 14.2.0 it updates first and that throws the same error.

To Reproduce
Steps to reproduce the behavior:

  1. follow install steps
  2. see issue on step sudo mtslack

Expected behavior
launch the app

Desktop (please complete the following information):

  • OS: ubuntu
  • Browser: /
  • Version 20.04

Additional context
node -v
v10.19.0
npm -v
6.14.4

default apt node and npm

Can't apply themes

Hi there,
when I'm tryinf to execute npm install -g mtslack
I have the following error:

npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/mallowigi/asar.git
npm ERR! Host key verification failed.

OS: Ubuntu 18.04.4 LTS
Version of Slack: Snap 4.4.2 64-bit

Can't apply themes on new Slack version on MacOS and Linux

Hi,

Slack transitioned to the new layout on my computer, and now I cannot apply the themes anymore. I installed Slack using brew on MacOS and yay on Linux. mtslack can find Slack on both, says theme is applied successfully, but the themes are not visible when running Slack anymore. Of course I reapplied them many times, restarted Slack many times, didn't work :(

Text formatting toolbar background colour mismatch

When the input is selected:
image

When it isn't selected, it is the correct colour:
image

I am using Atom One Dark, but this occurs on other themes also. Thanks!

Edit:

Also this similarly occurs on the options hover for messages
image

UnhandledPromiseRejectionWarning Error on Windows 10

Hi,

I can't make it work on Windows 10, I get this error message when I try to select Apply and hit enter:

? Please select an command Apply theme
Removing theme...

Successfully removed!

current theme is now Material Oceanic
Adding Theme Code to Slack...

(node:31252) UnhandledPromiseRejectionWarning: Error: EBUSY: resource busy or locked, open 'C:\Users\Charlie\AppData\Local\slack\app-4.6.0\resources\app.asar.unpacked\node_modules\@marshallofsound\native-keymap\build\Release\keymapping.node'
    at Object.openSync (fs.js:450:3)
    at Object.writeFileSync (fs.js:1212:35)
    at Object.module.exports.extractAll (C:\Users\Charlie\AppData\Roaming\npm\node_modules\mtslack\node_modules\@mallowigi\asar\lib\asar.js:201:10)
    at Object.exports.apply (C:\Users\Charlie\AppData\Roaming\npm\node_modules\mtslack\lib\command.js:91:8)
    at Object.exports.selectTheme (C:\Users\Charlie\AppData\Roaming\npm\node_modules\mtslack\lib\command.js:126:8)
    at Object.exports.change (C:\Users\Charlie\AppData\Roaming\npm\node_modules\mtslack\lib\command.js:117:8)
    at exports.execute.answer (C:\Users\Charlie\AppData\Roaming\npm\node_modules\mtslack\lib\command.js:132:12)
    at run (C:\Users\Charlie\AppData\Roaming\npm\node_modules\mtslack\main.js:27:3)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
(node:31252) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:31252) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Allow enabling tweaks without themes

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
I would like the ability to customize the fonts used by slack (including the monospace font) in a persistent way, without also applying the larger color theme. All of the tweaks seem to have toggles except for this one. The /slackfont command does not support this ask, since the font is reset on app restart.

Describe alternatives you've considered
If theming cannot be totally disabled, it would be satisfactory to include the default theme (or the ability to allow changes made by the built-in theme preferences), as part of the "loop over installed themes" cycle.

mtslack Apply Theme permission denied

Describe the bug
Installed no problem, but running the mtslack command and choosing "Apply Theme" produces Error: EACCES: permission denied error

To Reproduce
Steps to reproduce the behavior:

  1. npm install -g mtslack
  2. run mtslack, choose Apply Theme
  3. See error

Expected behavior
Process should continue without error

Desktop (please complete the following information):

  • OS: Ubuntu 20
  • Node version 12.16.2

Additional context
The error stacktrace:

 UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, copyfile '/usr/lib/slack/resources/app.asar' -> '/usr/lib/slack/resources/app.asar.backup'
    at Object.copyFileSync (fs.js:1808:3)
    at Object.exports.apply (/home/will/.nvm/versions/node/v12.16.2/lib/node_modules/mtslack/lib/command.js:166:6)
    at Object.exports.selectTheme (/home/will/.nvm/versions/node/v12.16.2/lib/node_modules/mtslack/lib/command.js:204:8)
    at Object.exports.change (/home/will/.nvm/versions/node/v12.16.2/lib/node_modules/mtslack/lib/command.js:195:8)
    at exports.execute (/home/will/.nvm/versions/node/v12.16.2/lib/node_modules/mtslack/lib/command.js:210:12)
    at run (/home/will/.nvm/versions/node/v12.16.2/lib/node_modules/mtslack/main.js:27:3)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async AutoUpdate.<anonymous> (/home/will/.nvm/versions/node/v12.16.2/lib/node_modules/mtslack/main.js:55:7)
(node:26553) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:26553) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Support for Linux Snap

I am having issues to install this on the snap version of slack (which happened to be more stable in general than from the source).

Changing the location to /snap/slack/current/usr/lib/slack/resources within lib/consts.js returned these logs:

(node:24742) UnhandledPromiseRejectionWarning: Error: EROFS: read-only file system, copyfile '/snap/slack/current/usr/lib/slack/resources/app.asar' -> '/snap/slack/current/usr/lib/slack/resources/app.asar.backup'
    at Object.copyFileSync (fs.js:1724:3)
    at Object.exports.apply (/home/z/tmp/slack-themes/lib/command.js:65:6)
    at Object.exports.selectTheme (/home/z/tmp/slack-themes/lib/command.js:97:8)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:24742) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:24742) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Tried with sudo as well, but I guess the directories are protected from write.

What else could I try here? 🤔

Wrong path to Slack on Ubuntu

Current Behavior 🐞

Wrong path when trying to apply theme on Ubuntu
image

Expected Behavior 🧐

Change path to /snap/slack/23/usr/lib/slack/resources for slack, installed from Market

Environment 🎮

Tech Version
MTSLACK v7.4.0
Ubuntu v18.04.4 LTS

Readme incorrect?

Why does it start off saying only works for Mac if that's not the case? That line should probably be updated to be accurate, or removed. Confusing people.

Linux installation fails

Linux installation fails with following error:

bash: ./main: cannot execute binary file: Exec format error

if I do sudo ./main


./main: 1: �����8: not found
./main: 2: -__ustring__TEXTp*: not found
./main: 2: �: not found
./main: 3: Syntax error: ";" unexpected
./main: 2: ���H__PAGEZERO__TEXT�[�[: not found

Also I get error that node 10 is not supported and that is version available on debian testing. I might need to downgrade or there is some other better way to install themes on linux.

error for the npm run main.js

npm WARN npm npm does not support Node.js v10.16.3
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! missing script: main.js

Details about backing up original Slack?

Is there a more detailed guide on “backing up the original Slack app”? I’m a little confused. Should I just go to the Application folder and copy a full version of Slack.app and rename it to something else? Or is there some other way?

Sent from PPHub For GitHub

Installation error on windows

I'm getting this error when running on windows:

`(node:3812) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, copyfile 'null/app.asar' -> 'null/app.asar.backup'
    at Object.copyFileSync (fs.js:1941:3)
    at Object.exports.apply (C:\Users\Administrator\AppData\Roaming\npm\node_modules\mtslack\lib\command.js:89:6)
    at Object.exports.selectTheme (C:\Users\Administrator\AppData\Roaming\npm\node_modules\mtslack\lib\command.js:126:8)
    at Object.exports.change (C:\Users\Administrator\AppData\Roaming\npm\node_modules\mtslack\lib\command.js:117:8)
    at exports.execute (C:\Users\Administrator\AppData\Roaming\npm\node_modules\mtslack\lib\command.js:132:12)
    at run (C:\Users\Administrator\AppData\Roaming\npm\node_modules\mtslack\main.js:27:3)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async AutoUpdate.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\mtslack\main.js:55:7)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3812) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3812) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.`

Ability to hide opaque bar at top of chats

First off, nice project! Really appreciate how easy it is to apply themes.

My only quibble is this bar that shows at the top of chats, where the date label floats. See screenshot. There's the gap which is a bit distracting.

Screen Shot 2019-08-12 at 3 19 01 PM

I wouldn't mind knowing what CSS to add to hide this bar, but barring that moving this element up by a few pixels to eliminate the gap is good too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.