Add popup command parameter to the system module
This commit is contained in:
parent
2e8495d5ff
commit
91b1b5e037
2 changed files with 6 additions and 0 deletions
|
@ -72,6 +72,11 @@ class Module(core.module.Module):
|
||||||
util.cli.execute(command)
|
util.cli.execute(command)
|
||||||
|
|
||||||
def popup(self, widget):
|
def popup(self, widget):
|
||||||
|
popupcmd = self.parameter("popupcmd", "");
|
||||||
|
if (popupcmd != ""):
|
||||||
|
util.cli.execute(popupcmd)
|
||||||
|
return
|
||||||
|
|
||||||
menu = util.popup.menu()
|
menu = util.popup.menu()
|
||||||
reboot_cmd = self.parameter("reboot", "reboot")
|
reboot_cmd = self.parameter("reboot", "reboot")
|
||||||
shutdown_cmd = self.parameter("shutdown", "shutdown -h now")
|
shutdown_cmd = self.parameter("shutdown", "shutdown -h now")
|
||||||
|
|
|
@ -1413,6 +1413,7 @@ Parameters:
|
||||||
* system.lock: specify a command for locking the screen (defaults to 'i3exit lock')
|
* system.lock: specify a command for locking the screen (defaults to 'i3exit lock')
|
||||||
* system.suspend: specify a command for suspending (defaults to 'i3exit suspend')
|
* system.suspend: specify a command for suspending (defaults to 'i3exit suspend')
|
||||||
* system.hibernate: specify a command for hibernating (defaults to 'i3exit hibernate')
|
* system.hibernate: specify a command for hibernating (defaults to 'i3exit hibernate')
|
||||||
|
* system.popupcmd: specify a command to run instead of opening the default menu
|
||||||
|
|
||||||
Requirements:
|
Requirements:
|
||||||
tkinter (python3-tk package on debian based systems either you can install it as python package)
|
tkinter (python3-tk package on debian based systems either you can install it as python package)
|
||||||
|
|
Loading…
Reference in a new issue