Davide-sd / shutdown_or_switch

Plasma 5 widget to quickly access the shutdown options or switch user.
GNU General Public License v2.0
10 stars 10 forks source link

[Request] Reboot option #1

Closed NayamAmarshe closed 3 years ago

NayamAmarshe commented 3 years ago

Hi! Would it be possible to add a Reboot option besides the default options of New Session, Shutdown and Lockscreen? The widget is perfect, just needs a reboot option that's all :D

Davide-sd commented 3 years ago

Hello. Honestly, I have no idea. It's something I looked for when I created the plugin but I was unable to find help (not in the forum nor in the documentation). I doubt things have improved on both side so I'm not going to invest time in it. If you'd like to take a shot at it, by any mean, go ahead! I moved on to use Lock/Logout (which should come standard with KDE) just because of the missing reboot.

NayamAmarshe commented 3 years ago

Hello. Honestly, I have no idea. It's something I looked for when I created the plugin but I was unable to find help (not in the forum nor in the documentation). I doubt things have improved on both side so I'm not going to invest time in it. If you'd like to take a shot at it, by any mean, go ahead! I moved on to use Lock/Logout (which should come standard with KDE) just because of the missing reboot.

I can try but I'm no Qt developer. I saw the code of the Kpple Menu though, it seems like the dev was using actual unix commands for reboot, shutdown rather than the ones provided by the API.

NayamAmarshe commented 3 years ago

@Davide-sd I was able to add it. Please check the pull request :) https://github.com/Davide-sd/shutdown_or_switch/pull/2

Davide-sd commented 3 years ago

Thanks @NayamAmarshe for the taking the time to add it. After your PR, I was able to add a few more buttons (Suspend, Hybernate) as well a few configuration options to only show the interested buttons. Thank you!

I'm closing this issue!