Sunday, July 7, 2019

[SPYDER] Dark theme

0
If you can't wait for Spyder 4 - this is what does it for Spyder 3.3.2 in Windows, using Anaconda3.
  1. Exit Spyder
  2. Open command prompt or Anaconda prompt
  3. Run pip install qdarkstyle and exit the prompt
  4. Go to ...\Anaconda3\Lib\site-packages\spyder\utils and open qhelpers.py
  5. Add import qdarkstyle to the top of that file
  6. Replace the qapplication function definition with below code (only two added lines)
  7. Save and close the file
  8. Open Spyder and enjoy your dark theme
    def qapplication(translate=True, test_time=3):
        """
        Return QApplication instance
        Creates it if it doesn't already exist
    
        test_time: Time to maintain open the application when testing. It's given
        in seconds
        """
        if running_in_mac_app():
            SpyderApplication = MacApplication
        else:
            SpyderApplication = QApplication
    
        app = SpyderApplication.instance()
        if app is None:
            # Set Application name for Gnome 3
            # https://groups.google.com/forum/#!topic/pyside/24qxvwfrRDs
            app = SpyderApplication(['Spyder'])
            # Set application name for KDE (See issue 2207)
            app.setApplicationName('Spyder')
            app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
        if translate:
            install_translator(app)
    
        test_ci = os.environ.get('TEST_CI_WIDGETS', None)
        if test_ci is not None:
            timer_shutdown = QTimer(app)
            timer_shutdown.timeout.connect(app.quit)
            timer_shutdown.start(test_time*1000)
        return app
  9. Go to Tools -> Preferences ->Syntax coloring
  10. Choose 'Zenburn' scheme
  11. Click edit selected
  12. Change background color using screen color picker

No comments:

Post a Comment

Loud fan of desktop

 Upon restart the fan of the desktop got loud again. I cleaned the desktop from the dust but it was still loud (Lower than the first sound) ...