Permalink
Browse files

Changed to Colorsublime

  • Loading branch information...
1 parent 6ef8f85 commit bd5ecac739417848a7c127b79ba8ed501df22144 @blopker blopker committed Feb 27, 2014
File renamed without changes.
@@ -1,6 +1,6 @@
[
{
- "caption": "Color Switch: Install Scheme",
- "command": "color_switch_install_scheme"
+ "caption": "Colorsublime: Install Theme",
+ "command": "colorsublime_install_theme"
}
]
View
@@ -12,20 +12,20 @@
"children":
[
{
- "caption": "Color Switch",
+ "caption": "Colorsublime",
"children":
[
{
"command": "open_file", "args":
{
- "file": "${packages}/ColorSwitch/ColorSwitch.sublime-settings"
+ "file": "${packages}/Colorsublime/Colorsublime.sublime-settings"
},
"caption": "Settings – Default"
},
{
"command": "open_file", "args":
{
- "file": "${packages}/User/ColorSwitch.sublime-settings"
+ "file": "${packages}/User/Colorsublime.sublime-settings"
},
"caption": "Settings – User"
}
View
@@ -1,10 +1,10 @@
Colorsublime Plugin
===================
-Plugin for [Color Sublime](http://colorsublime.com/)
-
Change themes quickly and easily, right from Sublime Text.
+Official [Colorsublime](http://colorsublime.com/) plugin.
+
Dedicated to [Kim](https://github.com/kimeberz) :heart:
Requirements
@@ -13,7 +13,7 @@ Requirements
Installing
----------
-### With Package Control
+### With Package Control (recommended)
1. Install [Package Control](https://sublime.wbond.net/installation)
2. Run “Package Control: Install Package” command
3. Find and install the `Colorsublime` plugin.
View
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# set -e
killall sublime_text
-PKG="ColorSwitch"
-DIR="/home/ninj0x/.config/sublime-text-3/Packages"
+PKG="Colorsublime-Plugin"
+DIR="$HOME/.config/sublime-text-3/Packages"
# zip -r $PKG *
rm -fr "$DIR"/"$PKG"
cp -r ../"$PKG" "$DIR"
@@ -1,23 +1,23 @@
-from .colorswitch import commands
-from .colorswitch import status
-from . import colorswitch
+from .colorsublime import commands
+from .colorsublime import status
+from . import colorsublime
import sublime_plugin
NO_SELECTION = -1
-class ColorSwitchInstallSchemeCommand(sublime_plugin.WindowCommand):
+class ColorsublimeInstallThemeCommand(sublime_plugin.WindowCommand):
def run(self):
print('Running install command.')
self.theme_status = {}
- self.status = status.loading('Getting scheme list')
+ self.status = status.loading('Getting Theme list')
self.original_theme = commands.get_current_theme()
commands.fetch_theme_list(self.display_list)
def display_list(self, themes):
self.status.stop()
if not themes:
- status.error('Scheme list not found. Please check internet ' +
+ status.error('Theme list not found. Please check internet ' +
'connection or enable debug in the settings and ' +
'report the stack traces.')
return
@@ -28,40 +28,40 @@ def display_list(self, themes):
def on_highlighted(self, theme_index):
theme = self.themes[theme_index]
- self.theme_status[theme.name] = status.loading('Downloading scheme %s' % theme.name)
+ self.theme_status[theme.name] = status.loading('Downloading Theme %s' % theme.name)
self.current_theme = theme
commands.get_theme(self.themes[theme_index], self.on_get)
def on_get(self, theme):
self.theme_status[theme.name].stop()
if not theme.file_path:
- status.error('Scheme %s download failed.' % theme.name)
+ status.error('Theme %s download failed.' % theme.name)
return
# Don't set if user has moved on already
if theme.file_name == self.current_theme.file_name:
- status.message('Showing scheme %s.' % theme.name)
+ status.message('Showing Theme %s.' % theme.name)
commands.set_theme(theme)
def on_select(self, theme_index):
if theme_index is NO_SELECTION:
commands.set_theme(self.original_theme)
- status.message('Scheme install canceled.')
+ status.message('Theme install canceled.')
return
theme = self.themes[theme_index]
- status.message('Installing scheme %s' % theme.name)
+ status.message('Installing Theme %s' % theme.name)
commands.install_theme(theme, self.install_done)
def install_done(self, theme):
self.status.stop()
if theme is None:
commands.set_theme(self.original_theme)
- status.error('Scheme install was unsuccessful. Please check console.')
+ status.error('Theme install was unsuccessful. Please check console.')
return
commands.set_theme(theme)
- status.message('Scheme installed successfully!')
+ status.message('Theme installed successfully!')
def plugin_loaded():
- colorswitch.init()
+ colorsublime.init()
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
'''
-Abstraction for the HTTP layer.
+Public API for the HTTP layer.
By @blopker
'''
from .cache import cache
@@ -3,7 +3,8 @@
def cache(fn):
- ''' A decorator to cache method invocation.
+ '''
+ A decorator to cache method invocation.
Cache expires after a set time.
'''
cacheDB = {}
File renamed without changes.
File renamed without changes.
@@ -1,17 +1,17 @@
'''
-Global settings module for Color Switch
+Global settings module
By @blopker
'''
import sublime
import os
-plugin_name = 'ColorSwitch'
+plugin_name = 'Colorsublime'
FOLDER_REL = 'Packages/User/' + plugin_name
FOLDER_THEMES_REL = FOLDER_REL + '/themes'
FOLDER_ABS = None
FOLDER_THEMES_ABS = None
-PLUGIN_PREF = 'ColorSwitch.sublime-settings'
+PLUGIN_PREF = plugin_name + '.sublime-settings'
SUBLIME_PREF = 'Preferences.sublime-settings'
pluginObj = {}
@@ -5,12 +5,13 @@
from .lib.concurrent import futures
from . import logger
+from . import settings
log = logger.get(__name__)
import time
import sublime
statusPool = futures.ThreadPoolExecutor(max_workers=1)
-PLUGIN_NAME = 'Color Switch'
+PLUGIN_NAME = settings.plugin_name
# Default status display time in seconds
TIMEOUT = 10
current_message = None
@@ -36,7 +37,7 @@ def error(msg, seconds=TIMEOUT):
def loading(msg, seconds=TIMEOUT):
# longer time out for loading cus it could be a while.
- return Loader(msg, seconds*2)
+ return Loader(msg, seconds * 2)
class Message(object):

0 comments on commit bd5ecac

Please sign in to comment.