ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

GTKDark​Theme​Variant​Setter

by p-e-w Linux ALL

Make Sublime Text use the dark GTK+ theme variant (NO LONGER MAINTAINED)

Details

  • 2017.09.30.05.14.48
  • github.​com
  • github.​com
  • 7 years ago
  • 2 hours ago
  • 10 years ago

Installs

  • Total 4K
  • Win 1
  • Mac 0
  • Linux 4K
May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

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 (pew@worldwidemann.com)

Released under the terms of the MIT License