Code Monkey home page Code Monkey logo

gtkdarkthemevariantsetter's Introduction

Make Sublime Text Dark and Beautiful on GTK+ 3

This Sublime Text 2/3 plugin sets the dark theme variant for Sublime's windows on GTK+ 3-based systems that support it, such as recent GNOME distributions.

The result is a much more beautiful Sublime when using dark UI themes because the distracting contrast between title bar and chrome is eliminated. The window border also becomes dark, making the window blend into the desktop better.

Before (Sublime Text 3 on Fedora 20)

Before

After

After

Installation

Through Package Control (recommended)

  1. Run "Package Control: Install Package" from the Sublime Text Command Palette (Shift+Ctrl+P)
  2. In the list, select "GTKDarkThemeVariantSetter" and press Return

Manually

  1. cd into your Sublime Text packages directory (e.g. .config/sublime-text-2/Packages)
  2. Run git clone https://github.com/p-e-w/GTKDarkThemeVariantSetter.git

How it works

Sublime Text (like most other extensible applications) does not provide hooks into its low-level windowing logic. This plugin demonstrates a technique that nevertheless allows for fine-grained control over windows, provided that standard Linux and X.Org tools are present on the system:

  1. Find the application's process ID by name with pidof [NAME]
  2. Find all top-level windows (and their IDs) with xprop -root _NET_CLIENT_LIST
  3. For each window ID thus found, get the associated process ID with xprop -id [ID] _NET_WM_PID
  4. If the process ID thus obtained matches the application's process ID, set the dark theme variant for the window with xprop -id [ID] -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark (some background on this very poorly documented property can be found here and here)

License

Copyright © 2014 Philipp Emanuel Weidmann ([email protected])

Released under the terms of the MIT License

gtkdarkthemevariantsetter's People

Contributors

p-e-w avatar

Watchers

 avatar  avatar

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.