Sublime Forum

New Plugin: Themr

#1

Announcing the first public release of Themr b0.3!

Download: github.com/skt84/Themr

Notes:

  • The menu is hardcoded until I make it check the packages folder for new themes. Having only Default and Soda themes made this pretty easy.
  • Tabs render incorrectly if you have files open during a theme switch. Restart ST2 to fix. There is possibly an issue while loading the new theme settings.

I’ve always wanted to give something back to the Sublime community. You guys are one of the most helpful and supportive groups around and I’ve felt like a bit of a chump just lurking here for months and months. Well I took it upon myself to learn some Python this week in order to add a feature which I’ve felt was desperately needed: a Theme Manager!

It’s not very complicated and it doesn’t do a couple of things I’d like to do yet, but I’ve only spent a couple of hours on it and I’ll be improving it as quickly as I can based on community feedback. There’s a short TODO on Github so let me know if there’s anything else you’d like to see included.

0 Likes

#2

Nice! Now let’s hope that more themes start popping up.

0 Likes

#3

I have pushed the latest additions to Themr which include:

  • Scans the Packages folder for theme folders/files
  • Creates command palette options for each discovered theme (I’m not entirely happy with how I did it but it was a relatively simple implementation so this’ll stay unless I find a better method)

Notes:

  • If you install a theme package after Themr, please restart ST2 to perform a fresh Package scan (looking for ways to automate this otherwise I’ll add a rescan command)
  • The menu option under Preferences is still hardcoded until I find a better method of building the menus

If Jon is reading this then I’d really appreciate exposing more API functions, specifically the ability to programmatically build menus as well as hooks into Sublime’s filesystem monitor (if this exists already then excuse my nubness!). I may just end up adding an additional os.listdir call every few seconds but I’d rather not place any more impact on performance than is necessary.

0 Likes

#4

Updated Themr for compatibility with dev build 2174 Preferences.sublime-settings file. Previous builds will continue to use Global.sublime-settings file.

Now includes a “reload_themes” command to scan theme folders and create command palette options. Will add support for ignored packages in the next version.

0 Likes

#5

I don’t see too many major updates for Themr in the future. It’s rather feature-complete as a theme switcher. If there’s something you’d like it to do in particular then please let me know. I will continue to maintain it for bug fixes and compatibility.

Latest changes include:

  • A major restructuring of the main menu file. Preferences -> Themr is no longer used to select theme. Instead, type “themr” into the command palette and select your desired theme. The new Themr key-map files can be found in Preferences -> Package Settings -> Themr.

  • Added a cycle_themes command (default bound to ctrl+alt+c, ctrl+alt+t/super+alt+c, super+alt+t) which will accept a positive or negative integer arg for cycling forward of backward through themes

  • reload_themes command now bound to ctrl+alt+r, ctrl+alt+t/super+alt+r, super+alt+t

  • Now includes a binding to reset the default theme (ctrl+alt+t, ctrl+alt+0/super+alt+t, super+alt+0). I briefly thought about adding [ctrl+alt+t, ctrl+alt+#] keybinds to select themes based on their index within the themes list but decided against it. The default theme should always be bound to t+0 and the themes list is built alphabetically by folder name, which would lead to inconsistent theme numbering if someone ever made an “Awesomo” theme. I feel that the consistent user experience of [ctrl+alt+t, ctrl+alt+0] should always come out on top.

0 Likes