snakeware

Python-based Linux distro for x86-64 and RPi
git clone git://squid-tech.com/snakeware.git
Log | Files | Refs | README

commit 78cfdb9f75e53abdb772bb5b26e7863ff9fe6157
parent 5097db78f0638469ae79a9e74b292f8a0e752f73
Author: Josh Moore <jxm5210@g.rit.edu>
Date:   Tue,  9 Jun 2020 17:27:53 -0400

Merge pull request #102 from joshiemoore/rm-shutdown

Remove shutdown and reboot apps
Diffstat:
Dsnakewm/apps/system/reboot/__init__.py | 11-----------
Dsnakewm/apps/system/reboot/confirm.py | 24------------------------
Dsnakewm/apps/system/shutdown/__init__.py | 11-----------
Dsnakewm/apps/system/shutdown/confirm.py | 24------------------------
4 files changed, 0 insertions(+), 70 deletions(-)

diff --git a/snakewm/apps/system/reboot/__init__.py b/snakewm/apps/system/reboot/__init__.py @@ -1,11 +0,0 @@ -from .confirm import RebootConfirmationDialog - - -def load(manager, params): - """Launch reboot confirmation dialog""" - pos = (100, 100) - - if params and len(params) > 0: - pos = params[0] - - RebootConfirmationDialog(pos, manager) diff --git a/snakewm/apps/system/reboot/confirm.py b/snakewm/apps/system/reboot/confirm.py @@ -1,24 +0,0 @@ -import pygame -import pygame_gui -import os - - -class RebootConfirmationDialog(pygame_gui.windows.UIConfirmationDialog): - def __init__(self, pos, manager): - super().__init__( - pygame.Rect(pos, (300, 160)), - manager=manager, - window_title="Reboot?", - action_long_desc="Are you sure you want to reboot the system?", - action_short_name="Reboot", - blocking=False, - object_id="#reboot", - ) - - def process_event(self, event): - super().process_event(event) - - if event.type == pygame_gui.UI_CONFIRMATION_DIALOG_CONFIRMED: - os.system("/sbin/reboot -f") - return True - return False diff --git a/snakewm/apps/system/shutdown/__init__.py b/snakewm/apps/system/shutdown/__init__.py @@ -1,11 +0,0 @@ -from .confirm import ShutdownConfirmationDialog - - -def load(manager, params): - """Launch shutdown confirmation manager""" - pos = (100, 100) - - if params and len(params) > 0: - pos = params[0] - - ShutdownConfirmationDialog(pos, manager) diff --git a/snakewm/apps/system/shutdown/confirm.py b/snakewm/apps/system/shutdown/confirm.py @@ -1,24 +0,0 @@ -import pygame -import pygame_gui -import os - - -class ShutdownConfirmationDialog(pygame_gui.windows.UIConfirmationDialog): - def __init__(self, pos, manager): - super().__init__( - pygame.Rect(pos, (300, 160)), - manager=manager, - window_title="Shutdown?", - action_long_desc="Are you sure you want to shut down the system?", - action_short_name="Shut down", - blocking=False, - object_id="#shutdown", - ) - - def process_event(self, event): - super().process_event(event) - - if event.type == pygame_gui.UI_CONFIRMATION_DIALOG_CONFIRMED: - os.system("/sbin/poweroff -f") - return True - return False