add ignoreFile for screens
This commit is contained in:
parent
2493761bc7
commit
9978f6dcee
@ -122,6 +122,7 @@ driver=vcsaDriver
|
||||
encoding=auto
|
||||
screenUpdateDelay=0.05
|
||||
suspendingScreen=
|
||||
suspendingScreenFile=/tmp/fenrirSuspend
|
||||
autodetectSuspendingScreen=True
|
||||
|
||||
[keyboard]
|
||||
|
@ -124,6 +124,7 @@ driver=vcsaDriver
|
||||
encoding=auto
|
||||
screenUpdateDelay=0.05
|
||||
suspendingScreen=
|
||||
suspendingScreenFile=/tmp/fenrirSuspend
|
||||
autodetectSuspendingScreen=True
|
||||
|
||||
[keyboard]
|
||||
|
@ -125,6 +125,7 @@ driver=vcsaDriver
|
||||
encoding=auto
|
||||
screenUpdateDelay=0.05
|
||||
suspendingScreen=
|
||||
suspendingScreenFile=/tmp/fenrirSuspend
|
||||
autodetectSuspendingScreen=True
|
||||
|
||||
[keyboard]
|
||||
|
@ -79,6 +79,7 @@ driver=vcsaDriver
|
||||
encoding=auto
|
||||
screenUpdateDelay=0.05
|
||||
suspendingScreen=
|
||||
suspendingScreenFile=/tmp/fenrirSuspend
|
||||
autodetectSuspendingScreen=True
|
||||
|
||||
[keyboard]
|
||||
|
@ -124,6 +124,7 @@ driver=vcsaDriver
|
||||
encoding=auto
|
||||
screenUpdateDelay=0.05
|
||||
suspendingScreen=
|
||||
suspendingScreenFile=/tmp/fenrirSuspend
|
||||
autodetectSuspendingScreen=True
|
||||
|
||||
[keyboard]
|
||||
|
@ -5,7 +5,7 @@
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from core import debug
|
||||
import time
|
||||
import time, os
|
||||
|
||||
class screenManager():
|
||||
def __init__(self):
|
||||
@ -60,6 +60,14 @@ class screenManager():
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('screen', 'autodetectSuspendingScreen'):
|
||||
ignoreScreens.extend(self.env['screen']['autoIgnoreScreens'])
|
||||
self.env['runtime']['debug'].writeDebugOut('screenManager:isSuspendingScreen ' + str(ignoreScreens) + ' '+ str(self.env['screen']['newTTY']),debug.debugLevel.INFO)
|
||||
try:
|
||||
ignoreFileName = self.env['runtime']['settingsManager'].getSetting('screen', 'suspendingScreenFile')
|
||||
if ignoreFileName != '':
|
||||
if os.access(ignoreFileName, os.R_OK):
|
||||
with open(ignoreFileName) as fp:
|
||||
ignoreScreens.extend(fp.read().replace('\n','').split(','))
|
||||
except:
|
||||
pass
|
||||
return (screen in ignoreScreens)
|
||||
|
||||
def isScreenChange(self):
|
||||
|
@ -51,6 +51,7 @@ settingsData = {
|
||||
'encoding': 'auto',
|
||||
'screenUpdateDelay': 0.1,
|
||||
'suspendingScreen': '',
|
||||
'suspendingScreenFile': '/tmp/fenrirSuspend',
|
||||
'autodetectSuspendingScreen': False,
|
||||
},
|
||||
'general':{
|
||||
|
Loading…
Reference in New Issue
Block a user