#NEWLINE# def dropbox( self , i3s_output_list , i3s_config ) : #NEWLINE# #INDENT# response = { #NEWLINE# #INDENT# 'cached_until' : ( time ( ) + self . cache_timeout ) , #NEWLINE# #UNINDENT# } #NEWLINE# lines = subprocess . check_output ( shlex . split ( 'dropbox-cli status' ) ) . decode ( 'utf-8' ) . split ( '\n' ) #NEWLINE# status = lines [ 0 ] #NEWLINE# full_text = self . format . format ( str ( status ) ) #NEWLINE# response [ 'full_text' ] = full_text #NEWLINE# if ( status == "Dropbox isn't running!" ) : #NEWLINE# #INDENT# response [ 'color' ] = i3s_config [ 'color_bad' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( lines == 'Up to date' ) : #NEWLINE# #INDENT# response [ 'color' ] = i3s_config [ 'color_good' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# response [ 'color' ] = i3s_config [ 'color_degraded' ] #NEWLINE# #UNINDENT# #UNINDENT# return response