#NEWLINE# def run( self , cmd ) : #NEWLINE# #INDENT# rainmeter_exe = rainmeter . program_path ( ) #NEWLINE# if ( not rainmeter_exe ) : #NEWLINE# #INDENT# sublime . error_message ( ( ( ( 'Error while trying to refresh Rainmeter' + ' skin: The Rainmeter executable could not be found.' ) + ' Please check the value of your "rainmeter_path"' ) + ' setting.' ) ) #NEWLINE# return #NEWLINE# #UNINDENT# rainmeter_exe = os . path . join ( rainmeter_exe , 'Rainmeter.exe' ) #NEWLINE# if ( not cmd ) : #NEWLINE# #INDENT# sublime . status_message ( 'Refreshing Rainmeter' ) #NEWLINE# sublime . active_window ( ) . run_command ( 'exec' , { #NEWLINE# #INDENT# 'cmd' : [ rainmeter_exe , '!RefreshApp' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# config = rainmeter . get_current_config ( cmd [ 0 ] ) #NEWLINE# fil = rainmeter . get_current_file ( cmd [ 0 ] ) #NEWLINE# if ( not fil ) : #NEWLINE# #INDENT# fil = '' #NEWLINE# #UNINDENT# if ( not config ) : #NEWLINE# #INDENT# sublime . error_message ( ( ( ( 'Error while trying to refresh Rainmeter skin:' + ' The config could not be found. Please check the' ) + ' path of the config and your' ) + ' "rainmeter_skins_path" setting.' ) ) #NEWLINE# #UNINDENT# sublime . status_message ( ( 'Refreshing config: ' + config ) ) #NEWLINE# settings = sublime . load_settings ( 'Rainmeter.sublime-settings' ) #NEWLINE# activate = settings . get ( 'rainmeter_refresh_and_activate' , True ) #NEWLINE# if activate : #NEWLINE# #INDENT# sublime . active_window ( ) . run_command ( 'exec' , { #NEWLINE# #INDENT# 'cmd' : [ self , '!ActivateConfig' , config , fil , '&&' , rainmeter_exe , '!Refresh' , config ] , #NEWLINE# 'shell' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sublime . active_window ( ) . run_command ( 'exec' , { #NEWLINE# #INDENT# 'cmd' : [ rainmeter_exe , '!Refresh' , config ] , #NEWLINE# #UNINDENT# } )