You are not logged in.

#1 2020-08-19 17:14:42

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 297
Website

[SOLVED] reverting to the old shutdown/reboot popup?

Hi there everyone!

Is there a way to revert the "exit" popup to the older style?  I remember having this discussed before but I'm having a problem finding the info.  If possible, I'd love to revert then change the color of it.

Thanks!

Last edited by schwim (2020-08-20 01:21:43)


Schw.im! A social site with an identity crisis.

Offline

#2 2020-08-19 18:35:53

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,277

Re: [SOLVED] reverting to the old shutdown/reboot popup?

If you have the old script, you can copy it to a location on your $PATH - I believe you will need to change the name of the old script first.

Make sure it's executable and change the keybindings and menu entries to point to the script.


You must unlearn what you have learned.
    -- yoda

Offline

#3 2020-08-19 18:51:39

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,401

Re: [SOLVED] reverting to the old shutdown/reboot popup?

I keep mine, in my $PATH and executable, as:

/home/sector11/bin/s11-exit

and in Openbox "execute" s11-exit <- image

It's an old BL script modified to my liking (for aircraft):

#!/usr/bin/python2
# Script modified from cb_exit
# An early BunsenLabs script (bl_exit) edited for use by Sector11
# -*- coding: utf-8 -*-

import pygtk
pygtk.require('2.0')
import gtk
import os
import getpass

dbus_send = "dbus-send --print-reply --system --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.{} boolean:true"

class s11_exit:
    def disable_buttons(self):
        self.cancel.set_sensitive(False)
#        self.suspend.set_sensitive(False)
        self.logout.set_sensitive(False)
        self.reboot.set_sensitive(False)
        self.shutdown.set_sensitive(False)

    def cancel_action(self,btn):
        self.disable_buttons()
        gtk.main_quit()

#    def suspend_action(self,btn):
#        self.disable_buttons()
#        self.status.set_label("Suspending, please standby...")
#        os.system("bl-lock")
#        os.system(dbus_send.format("Suspend"))
#        gtk.main_quit()

    def logout_action(self,btn):
        self.disable_buttons()
        self.status.set_label("Exiting Openbox, please standby...")
        os.system("openbox --exit")

    def reboot_action(self,btn):
        self.disable_buttons()
        self.status.set_label("Rebooting, please standby...")
        os.system(dbus_send.format("Reboot"))

    def shutdown_action(self,btn):
        self.disable_buttons()
        self.status.set_label("Shutting down, please standby...")
        os.system(dbus_send.format("PowerOff"))

    def create_window(self):
        self.window = gtk.Window()
#        title = "Mission over " + getpass.getuser() + ", your debrief options are:"
        title = "Mission over.  Your debrief options are:"
        self.window.set_title(title)
        self.window.set_border_width(5)
        self.window.set_size_request(500, 80)
        self.window.set_resizable(False)
        self.window.set_keep_above(True)
        self.window.stick
        self.window.set_position(1)
        self.window.connect("delete_event", gtk.main_quit)
        windowicon = self.window.render_icon(gtk.STOCK_QUIT, gtk.ICON_SIZE_MENU)
        self.window.set_icon(windowicon)


        #Create HBox for buttons
        self.button_box = gtk.HBox()
        self.button_box.show()

        #Cancel button
        self.cancel = gtk.Button(stock = gtk.STOCK_CANCEL)
        self.cancel.set_border_width(4)
        self.cancel.connect("clicked", self.cancel_action)
        self.button_box.pack_start(self.cancel)
        self.cancel.show()

        #Cancel key (Escape)
        accelgroup = gtk.AccelGroup()
        self.key, self.mod = gtk.accelerator_parse('Escape')
        accelgroup.connect_group(self.key, self.mod, gtk.ACCEL_VISIBLE, gtk.main_quit)
        self.window.add_accel_group(accelgroup)

        #Suspend button
#        self.suspend = gtk.Button("_Suspend")
#        self.suspend.set_border_width(4)
#        self.suspend.connect("clicked", self.suspend_action)
#        self.button_box.pack_start(self.suspend)
#        self.suspend.show()

        #Logout button
        self.logout = gtk.Button("_Punch Out")
        self.logout.set_border_width(4)
        self.logout.connect("clicked", self.logout_action)
        self.button_box.pack_start(self.logout)
        self.logout.show()

        #Reboot button
        self.reboot = gtk.Button("_Restart Engines")
        self.reboot.set_border_width(4)
        self.reboot.connect("clicked", self.reboot_action)
        self.button_box.pack_start(self.reboot)
        self.reboot.show()

        #Shutdown button
        self.shutdown = gtk.Button("_Cut Engines")
        self.shutdown.set_border_width(4)
        self.shutdown.connect("clicked", self.shutdown_action)
        self.button_box.pack_start(self.shutdown)
        self.shutdown.show()

        #Create HBox for status label
        self.label_box = gtk.HBox()
        self.label_box.show()
        self.status = gtk.Label()
        self.status.show()
        self.label_box.pack_start(self.status)

        #Create VBox and pack the above HBox's
        self.vbox = gtk.VBox()
        self.vbox.pack_start(self.button_box)
        self.vbox.pack_start(self.label_box)
        self.vbox.show()

        self.window.add(self.vbox)
        self.window.show()

    def __init__(self):
        self.create_window()

def main():
    gtk.main()

if __name__ == "__main__":
    go = s11_exit()
    main()

You'd probably want to tweak it to your liking.  big_smile


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#4 2020-08-19 19:32:25

damo
....moderator....
Registered: 2015-08-20
Posts: 6,271

Re: [SOLVED] reverting to the old shutdown/reboot popup?

On Lithium you can install the package bunsen-exit-python to get the Helium-style python app. Installing it will automatically remove the yad version.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#5 2020-08-19 20:25:31

ohnonot
...again
Registered: 2015-09-29
Posts: 4,882
Website

Re: [SOLVED] reverting to the old shutdown/reboot popup?

schwim wrote:

If possible, I'd love to revert then change the color of it.

IIRC the old bl-exit follows the GTK theme, changing the color to something else would require hacking the python code some more.


BL quote proposals to this thread please.
my repos / my repos
---
Thank you for posting direct image links!

Offline

#6 2020-08-19 20:44:10

damo
....moderator....
Registered: 2015-08-20
Posts: 6,271

Re: [SOLVED] reverting to the old shutdown/reboot popup?

ohnonot wrote:
schwim wrote:

If possible, I'd love to revert then change the color of it.

IIRC the old bl-exit follows the GTK theme, changing the color to something else would require hacking the python code some more.

No, it uses ~/.config/bl-exit/bl-exitrc to set the style, and ~/.config/bl-exit/styles/ contains the style.rc files referred to.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#7 2020-08-19 22:30:43

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 297
Website

Re: [SOLVED] reverting to the old shutdown/reboot popup?

Sector11 wrote:

I keep mine, in my $PATH and executable, as:

/home/sector11/bin/s11-exit

and in Openbox "execute" s11-exit <- image

It's an old BL script modified to my liking (for aircraft):

Thanks very much for this!  I've been playing with it for a while now, I've never really worked in a script like this.

damo wrote:

On Lithium you can install the package bunsen-exit-python to get the Helium-style python app. Installing it will automatically remove the yad version.

Thank you so much!

damo wrote:

No, it uses ~/.config/bl-exit/bl-exitrc to set the style, and ~/.config/bl-exit/styles/ contains the style.rc files referred to.

I notice that starting the script doesn't create these files in my .config directory. Is there a spot on the github or in my file system somewhere that I could use as a starting point for customization?


Schw.im! A social site with an identity crisis.

Offline

#8 2020-08-19 23:40:04

damo
....moderator....
Registered: 2015-08-20
Posts: 6,271

Re: [SOLVED] reverting to the old shutdown/reboot popup?

schwim wrote:

...

damo wrote:

No, it uses ~/.config/bl-exit/bl-exitrc to set the style, and ~/.config/bl-exit/styles/ contains the style.rc files referred to.

I notice that starting the script doesn't create these files in my .config directory. Is there a spot on the github or in my file system somewhere that I could use as a starting point for customization?

Once again I will point you at Bunsenlabs github, where all our configs are kept hmm

bunsen-exit > helium branch

Documentation is described in the comments section in bl-exitrc


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#9 2020-08-19 23:53:12

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,308
Website

Re: [SOLVED] reverting to the old shutdown/reboot popup?

schwim wrote:
damo wrote:

No, it uses ~/.config/bl-exit/bl-exitrc to set the style, and ~/.config/bl-exit/styles/ contains the style.rc files referred to.

I notice that starting the script doesn't create these files in my .config directory. Is there a spot on the github or in my file system somewhere that I could use as a starting point for customization?

As damo said, you can find them on github, but also after installing bunsen-exit-python you'll find bl-exitrc and styles/ in /etc/bl-exit and you can copy them from there to ~/.config/bl-exit/


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#10 2020-08-20 01:21:25

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 297
Website

Re: [SOLVED] reverting to the old shutdown/reboot popup?

Like a glove folks, thanks so much for the awesome help!


Schw.im! A social site with an identity crisis.

Offline

#11 2020-08-22 07:06:40

ohnonot
...again
Registered: 2015-09-29
Posts: 4,882
Website

Re: [SOLVED] reverting to the old shutdown/reboot popup?

damo wrote:
ohnonot wrote:
schwim wrote:

If possible, I'd love to revert then change the color of it.

IIRC the old bl-exit follows the GTK theme, changing the color to something else would require hacking the python code some more.

No, it uses ~/.config/bl-exit/bl-exitrc to set the style, and ~/.config/bl-exit/styles/ contains the style.rc files referred to.

OK, sorry about that.
It's been a while since I actually used BL.
I will try to shut up about BL-specific problems even more.


BL quote proposals to this thread please.
my repos / my repos
---
Thank you for posting direct image links!

Offline

Board footer

Powered by FluxBB