Skip to content

Commit 70222e3

Browse files
committed
add color scheme setting
1 parent 43f8165 commit 70222e3

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Comparing to rsub, the followings are enhanced:
1313
- resume previous connection when it was lost.
1414
- better status bar messages when saving file and when encountering errors.
1515
- bring up Sublime Text on different platforms.
16+
- ability to set a custom color scheme.
1617

1718
Why a new fork? It seems that the author of rsub is not actively maintaining
1819
that package.

remote_subl.py

+7
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ def open(self):
146146

147147
# Bring sublime to front by running `subl --command ""`
148148
subl("--command", "")
149+
150+
# Optionally set the color scheme
151+
settings = sublime.load_settings("remote_subl.sublime-settings")
152+
color_scheme = settings.get("color_scheme", None)
153+
if color_scheme is not None:
154+
subl("--command", 'set_setting {{"setting":"color_scheme","value":"{}"}}'.format(color_scheme))
155+
149156
view.run_command("remote_subl_update_status_bar")
150157

151158

remote_subl.sublime-settings

+10-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,14 @@
1515
/*
1616
display a dialog when connection is lost
1717
*/
18-
"pop_up_when_connection_lost": true
18+
"pop_up_when_connection_lost": true,
19+
20+
/*
21+
color scheme to use for remote windows
22+
23+
examples:
24+
- null (use the default color scheme)
25+
- "Packages/Color Scheme - Default/Monokai.tmTheme"
26+
*/
27+
"color_scheme": null
1928
}

0 commit comments

Comments
 (0)