mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 18:42:15 +00:00
67 lines
2.1 KiB
Diff
67 lines
2.1 KiB
Diff
diff --git a/data/oblogout b/data/oblogout
|
|
index 8058c4a..dfe5285 100755
|
|
--- a/data/oblogout
|
|
+++ b/data/oblogout
|
|
@@ -77,8 +77,10 @@ def main(argv = None):
|
|
config = 'data/oblogout.conf'
|
|
elif os.path.isfile('%s/.config/oblogout.conf' % os.getenv("HOME")):
|
|
config = '%s/.config/oblogout.conf' % os.getenv("HOME")
|
|
- else:
|
|
+ elif os.path.isfile('/etc/oblogout.conf'):
|
|
config = '/etc/oblogout.conf'
|
|
+ else:
|
|
+ config = sys.prefix + '/etc/oblogout.conf'
|
|
|
|
# Check config in local path, if it exists pass it on
|
|
if not os.path.isfile(config):
|
|
diff --git a/data/oblogout.conf b/data/oblogout.conf
|
|
index 810872c..b1c1009 100644
|
|
--- a/data/oblogout.conf
|
|
+++ b/data/oblogout.conf
|
|
@@ -1,11 +1,11 @@
|
|
[settings]
|
|
-usehal = true
|
|
+usehal = false
|
|
|
|
[looks]
|
|
opacity = 70
|
|
bgcolor = black
|
|
buttontheme = simplistic
|
|
-buttons = cancel, logout, restart, shutdown, suspend, lock
|
|
+buttons = cancel, logout, restart, shutdown, suspend
|
|
|
|
[shortcuts]
|
|
cancel = Escape
|
|
@@ -17,11 +17,11 @@ lock = K
|
|
hibernate = H
|
|
|
|
[commands]
|
|
-shutdown = shutdown -h now
|
|
-restart = reboot
|
|
-suspend = pmi action suspend
|
|
-hibernate = pmi action hibernate
|
|
-safesuspend = safesuspend
|
|
-lock = gnome-screensaver-command -l
|
|
-switchuser = gdm-control --switch-user
|
|
+shutdown = systemctl poweroff
|
|
+restart = systemctl reboot
|
|
+suspend = systemctl suspend
|
|
+hibernate = systemctl hibernate
|
|
+# safesuspend = safesuspend
|
|
+# lock = gnome-screensaver-command -l
|
|
+# switchuser = gdm-control --switch-user
|
|
logout = openbox --exit
|
|
diff --git a/oblogout/__init__.py b/oblogout/__init__.py
|
|
index b9e4e01..12f521f 100644
|
|
--- a/oblogout/__init__.py
|
|
+++ b/oblogout/__init__.py
|
|
@@ -138,7 +138,7 @@ class OpenboxLogout():
|
|
self.logger.debug("Rendering Fade")
|
|
# Convert Pixbuf to PIL Image
|
|
wh = (pb.get_width(),pb.get_height())
|
|
- pilimg = Image.fromstring("RGB", wh, pb.get_pixels())
|
|
+ pilimg = Image.frombytes("RGB", wh, pb.get_pixels())
|
|
|
|
pilimg = pilimg.point(lambda p: (p * self.opacity) / 255 )
|
|
|