diff --git a/Preferences.sublime-settings b/Preferences.sublime-settings deleted file mode 100644 index 6f908c4..0000000 --- a/Preferences.sublime-settings +++ /dev/null @@ -1,3 +0,0 @@ -{ - "gitblame.scheme": "dark" -} diff --git a/README.md b/README.md index aedd264..623a661 100644 --- a/README.md +++ b/README.md @@ -16,17 +16,6 @@ View on [packagecontrol.io](https://packagecontrol.io/packages/Git%20blame) > Right click > Git blame +## Example -## Examples - - -### Light scheme -![image](https://cloud.githubusercontent.com/assets/1134201/23709870/bcde89cc-0412-11e7-9464-3f97713bf747.png) - -Light: (with a light theme) - -![image](https://cloud.githubusercontent.com/assets/1134201/23709882/ce0c2ea2-0412-11e7-9bac-e5297629a15a.png) - - -### Dark scheme -![image](https://cloud.githubusercontent.com/assets/1134201/23709854/acfe8ed0-0412-11e7-8329-3aa51e530d19.png) + ![image](https://user-images.githubusercontent.com/2543659/28410198-331b1ec8-6d3d-11e7-9ac1-57d43fb6ab60.png) diff --git a/git-blame.py b/git-blame.py index d17539a..ac3a937 100644 --- a/git-blame.py +++ b/git-blame.py @@ -5,41 +5,57 @@ import subprocess from subprocess import check_output as shell - -template_scheme = {} -template_scheme['light'] = ''' - -''' -template_scheme['dark'] = ''' - +stylesheet = ''' + ''' template = ''' - -{scheme} - Git Blame: ({user}) + +{stylesheet} +
+
+ +Git Blame: ({user}) Updated: {date} {time} | {sha} [Copy] [Show] -[X]  +''' + chr(0x00D7) + ''' +
+ ''' # Sometimes this fails on other OS, just error silently @@ -130,11 +146,7 @@ def run(self, edit): sha, user, date, time = self.parse_blame(result) - settings = sublime.load_settings('Preferences.sublime-settings') - scheme_color = settings.get('gitblame.scheme') or 'dark' - - body = template.format(sha=sha, user=user, date=date, time=time, - scheme=template_scheme.get(scheme_color, '')) + body = template.format(sha=sha, user=user, date=date, time=time, stylesheet=stylesheet) phantom = sublime.Phantom(line, body, sublime.LAYOUT_BLOCK, self.on_phantom_close) phantoms.append(phantom)