diff --git a/blivet-gui b/blivet-gui index 09cbd534..7ac513ae 100755 --- a/blivet-gui +++ b/blivet-gui @@ -73,6 +73,8 @@ def parse_options(): parser = argparse.ArgumentParser(description="blivet-gui") parser.add_argument("-v", "--version", action="store_true", dest="version", default=False, help=_("show version information")) + parser.add_argument("--keep-above", action="store_true", dest="keep_above", default=False, + help=_("keep blivet-gui window above other windows")) parser.add_argument("disks", metavar="disk", type=str, nargs="*", help="run blivet-gui only on specified disk(s) (optional)") @@ -106,7 +108,7 @@ def main(): sockfile = output.split()[0] client = BlivetGUIClient(server_socket=sockfile) - BlivetGUI(client, exclusive_disks=options.disks) + BlivetGUI(client, exclusive_disks=options.disks, keep_above=options.keep_above) if __name__ == '__main__': diff --git a/blivetgui/blivetgui.py b/blivetgui/blivetgui.py index 5e611868..9322398b 100644 --- a/blivetgui/blivetgui.py +++ b/blivetgui/blivetgui.py @@ -67,7 +67,7 @@ class BlivetGUI(object): installer_mode = False - def __init__(self, client, exclusive_disks=None): + def __init__(self, client, exclusive_disks=None, keep_above=False): self.client = client @@ -103,6 +103,8 @@ def __init__(self, client, exclusive_disks=None): # MainWindow self.main_window = self.builder.get_object("main_window") self.main_window.connect("delete-event", self.quit) + if keep_above: + self.main_window.set_keep_above(True) # Exception handling self.exc = BlivetGUIExceptionHandler(self.main_window, sys.excepthook) diff --git a/man/blivet-gui.1 b/man/blivet-gui.1 index 043a0f89..d24886c0 100644 --- a/man/blivet-gui.1 +++ b/man/blivet-gui.1 @@ -16,6 +16,9 @@ show this help information and exit .TP .BR \-v ", " \-\-version show version information and exit +.TP +.BR \-\-keep\-above +keep the blivet-gui window above other windows .SH EXAMPLES You can run blivet-gui from a command line and specify one or more disks. @@ -28,4 +31,4 @@ blivet-gui /dev/sda /dev/sdb Vojtech Trefny .SH COPYRIGHT -2020, Red Hat, Licensed under GPLv2+ +2023, Red Hat, Licensed under GPLv2+