-
Notifications
You must be signed in to change notification settings - Fork 0
/
WindowSettings.py
29 lines (23 loc) · 961 Bytes
/
WindowSettings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- encoding: utf-8 -*-
import sublime_plugin
class WindowSetting(sublime_plugin.EventListener):
def on_activated(self, view):
window = view.window()
settings = view.settings()
if settings.get('is_widget'):
return
show_tabs = settings.get('show_tabs')
show_minimap = settings.get('show_minimap')
show_status_bar = settings.get('show_status_bar')
show_sidebar = settings.get('show_sidebar')
show_menus = settings.get('show_menus')
if show_tabs is not None:
window.set_tabs_visible(show_tabs)
if show_minimap is not None:
window.set_minimap_visible(show_minimap)
if show_status_bar is not None:
window.set_status_bar_visible(show_status_bar)
if show_sidebar is not None:
window.set_sidebar_visible(show_sidebar)
if show_menus is not None:
window.set_menu_visible(show_menus)