Home Download Buy Blog Forum Support

Detect if ST is on "distraction free" mode

Detect if ST is on "distraction free" mode

Postby maliayas on Fri Nov 01, 2013 3:09 pm

Hi,

Is there a way to know programmatically if ST is running in distraction free mode? I wasn't able to find a way in API docs and internet. So I've written a dummy plugin to help with this. Then I just though I could have asked it here.

My dummy plugin is here: https://github.com/maliayas/SublimeText ... reenStatus

Thanks.
maliayas
 
Posts: 3
Joined: Fri Aug 16, 2013 1:35 am

Re: Detect if ST is on "distraction free" mode

Postby bizoo on Fri Nov 01, 2013 4:43 pm

Why not using:
Code: Select all
window.settings().set('full-screen', True)
window.settings().get('full-screen')
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Detect if ST is on "distraction free" mode

Postby maliayas on Fri Nov 01, 2013 4:52 pm

bizoo wrote:Why not using:
Code: Select all
window.settings().set('full-screen', True)
window.settings().get('full-screen')


Thanks. I am a python newbie. Your approach is better than temp files. If I've to go with the plugin, I'll use it.
maliayas
 
Posts: 3
Joined: Fri Aug 16, 2013 1:35 am


Return to Plugin Development

Who is online

Users browsing this forum: Alexa [Bot] and 8 guests