BunsenLabs / bunsen-utilities

https://pkg.bunsenlabs.org/debian/pool/main/b/bunsen-utilities/
GNU General Public License v3.0
31 stars 21 forks source link

Bl exit args #23

Closed Hjdskes closed 9 years ago

Hjdskes commented 9 years ago

As discussed on the forums.

I have also changed the bl-exit class to "properly" subclass gtk.Window. Imo this is the proper way to do it, and it cleans up the code a bit as well. A downside, however, is that xaos' conditional import can not be applied anymore.

Maybe xaos himself can chime in here?

xaosfiftytwo commented 9 years ago

Never mind the conditional import. I guess there is something wrong with that timing-test, though I don't know what. Still gives me almost 1.7 s for the imports, but running the script I get the screen quasi immediately.

xaosfiftytwo commented 9 years ago

There are 2 errors left after applying your patches. Here is a diff (with line-numbers applying to the already patched version:

me@medion:~/tmp/today$ diff -u bl-exit bl-exit-new
--- bl-exit 2015-10-08 18:43:29.791995436 +0200
+++ bl-exit-new 2015-10-08 18:46:46.026278164 +0200
@@ -102,7 +102,7 @@
     call(dbus_send.format(string))

 def logout():
-    call("openbox --logout")
+    call("openbox --exit")

 def suspend():
     call("bl-lock")
@@ -112,7 +112,7 @@
     send_dbus("Reboot")

 def poweroff():
-    send_dbus("Poweroff")
+    send_dbus("PowerOff")

 def print_usage(status):
     print ("bl-exit: usage:\n" \
me@medion:~/tmp/today$ 
Hjdskes commented 9 years ago

Whoops! Will fix it!

Hjdskes commented 9 years ago

^ Fixed.

ghost commented 9 years ago

Is this mergeable?

Hjdskes commented 9 years ago

Yes, in the way that it works and implements the command line arguments @johnraff wanted. See issue #105, however. I guess we can go ahead and merge this for the time being.

ghost commented 9 years ago

After reading #105, for the time being I'll merge this since it improves the current bl-exit. If it gets converted to a Bash script later, that's just another change.