mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-13 18:28:50 +01:00
bug test
This commit is contained in:
parent
2436543ddb
commit
3a1104434b
@ -33,6 +33,17 @@ class CounterScreen(FullScreen):
|
|||||||
def GObjectInterval(self):
|
def GObjectInterval(self):
|
||||||
|
|
||||||
self._inter_counter+=1
|
self._inter_counter+=1
|
||||||
|
|
||||||
|
if self._Number == 0:
|
||||||
|
self._Counting = False
|
||||||
|
print("do the real shutdown")
|
||||||
|
if config.CurKeySet != "PC":
|
||||||
|
cmdpath = "feh --bg-center gameshell/wallpaper/seeyou.png;"
|
||||||
|
cmdpath += "sleep 3;"
|
||||||
|
cmdpath += "sudo halt -p"
|
||||||
|
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
|
||||||
|
return False
|
||||||
|
|
||||||
if self._inter_counter >= 10:
|
if self._inter_counter >= 10:
|
||||||
self._Number -= 1
|
self._Number -= 1
|
||||||
if self._Number < 0:
|
if self._Number < 0:
|
||||||
@ -52,23 +63,13 @@ class CounterScreen(FullScreen):
|
|||||||
commands.getstatusoutput("echo 1 > /proc/driver/led1")
|
commands.getstatusoutput("echo 1 > /proc/driver/led1")
|
||||||
#turn on
|
#turn on
|
||||||
|
|
||||||
if self._Number == 0:
|
|
||||||
self._Counting = False
|
|
||||||
|
|
||||||
print("do the real shutdown")
|
|
||||||
|
|
||||||
if config.CurKeySet != "PC":
|
|
||||||
cmdpath = "feh --bg-center gameshell/wallpaper/seeyou.png;"
|
|
||||||
cmdpath += "sleep 3;"
|
|
||||||
cmdpath += "sudo halt -p"
|
|
||||||
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
|
|
||||||
|
|
||||||
return self._Counting
|
return self._Counting
|
||||||
|
|
||||||
def StartCounter(self):
|
def StartCounter(self):
|
||||||
if self._Counting == True:
|
if self._Counting == True:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
self._Number = 10
|
||||||
self._Counting = True
|
self._Counting = True
|
||||||
|
|
||||||
self._GobjectIntervalId = gobject.timeout_add(100,self.GObjectInterval)
|
self._GobjectIntervalId = gobject.timeout_add(100,self.GObjectInterval)
|
||||||
|
|||||||
@ -19,7 +19,7 @@ SKIN="default"
|
|||||||
## three timer values in seconds: dim screen, close screen,PowerOff
|
## three timer values in seconds: dim screen, close screen,PowerOff
|
||||||
## zero means no action
|
## zero means no action
|
||||||
PowerLevels = {}
|
PowerLevels = {}
|
||||||
PowerLevels["supersaving"] = [10,30,100]
|
PowerLevels["supersaving"] = [10,15,20]
|
||||||
PowerLevels["powersaving"] = [40,120,300]
|
PowerLevels["powersaving"] = [40,120,300]
|
||||||
PowerLevels["balance_saving"] = [40,0,0]
|
PowerLevels["balance_saving"] = [40,0,0]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user