diff --git a/rofi.py b/rofi.py index 86feb01..5592ea3 100644 --- a/rofi.py +++ b/rofi.py @@ -84,6 +84,8 @@ class Rofi(object): rofi_args=None, theme_str=None, config_file=None, + active=None, + insensitive=False, ): """ Parameters @@ -125,12 +127,14 @@ class Rofi(object): # Save parameters. self.theme_str = theme_str self.config_file = config_file + self.insensitive = insensitive self.lines = lines self.fixed_lines = fixed_lines self.width = width self.fullscreen = fullscreen self.location = location self.exit_hotkeys = exit_hotkeys + self.active = active self.rofi_args = rofi_args or [] # Don't want a window left on the screen if we exit unexpectedly @@ -282,10 +286,15 @@ class Rofi(object): ) args.extend(["-config", str(config_file.expanduser())]) + # case insensitivity + insensitive = kwargs.get("insensitive", self.insensitive) + if insensitive: + args.append("-i") + # Number of lines. lines = kwargs.get("lines", self.lines) if lines: - args.extend(["-lines", str(lines)]) + args.extend(["-l", str(lines)]) fixed_lines = kwargs.get("fixed_lines", self.fixed_lines) if fixed_lines: args.extend(["-fixed-num-lines", str(fixed_lines)]) @@ -293,7 +302,7 @@ class Rofi(object): # Width. width = kwargs.get("width", self.width) if width is not None: - args.extend(["-width", str(width)]) + args.extend(["-theme-str", f"window {{ width: {width}; }}"]) # Fullscreen mode? fullscreen = kwargs.get("fullscreen", self.fullscreen)