diff --git a/keyhint/__main__.py b/keyhint/__main__.py index d231851..98c5f5d 100644 --- a/keyhint/__main__.py +++ b/keyhint/__main__.py @@ -1,4 +1,5 @@ """Package entry for keyhint.""" + from keyhint import app if __name__ == "__main__": diff --git a/keyhint/app.py b/keyhint/app.py index 50b4567..41d04d9 100644 --- a/keyhint/app.py +++ b/keyhint/app.py @@ -5,15 +5,13 @@ import logging import sys -from collections.abc import Mapping -from typing import Any import gi gi.require_version("Gtk", "4.0") gi.require_version("Adw", "1") -from gi.repository import Adw, Gio, GLib, Gtk # noqa: E402 +from gi.repository import Adw, Gio, GLib # noqa: E402 from keyhint.window import KeyhintWindow # noqa: E402 @@ -36,10 +34,12 @@ class Application(Adw.Application): def __init__(self, *args, **kwargs) -> None: # noqa: ANN002, ANN003 """Initialize application with command line options.""" - super().__init__( - *args, + kwargs.update( application_id="eu.dynobo.keyhint", flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE, + ) + super().__init__( + *args, **kwargs, ) self.options: dict = {} @@ -67,7 +67,7 @@ def do_activate(self, *_, **__) -> None: # noqa: ANN002, ANN003 window.set_application(self) window.present() - def do_command_line(self, cli: Gtk, **__: Mapping[Any, Any]) -> int: + def do_command_line(self, cli: Gio.ApplicationCommandLine) -> int: """Store command line options in class attribute for later usage.""" self.options = cli.get_options_dict().end().unpack() diff --git a/keyhint/config/cli.toml b/keyhint/config/cli.toml index d485c4b..5b6170c 100644 --- a/keyhint/config/cli.toml +++ b/keyhint/config/cli.toml @@ -36,6 +36,7 @@ eza = "ls clone with coloring" duf = "Basic disk usage" ncdu = "Recursive disk usage analyzer" s-tui = "Stress test and monitor" +btm = "System resources dashboard" [section.Navigating] pwd = "Print working dir" diff --git a/keyhint/resources/headerbar.ui b/keyhint/resources/headerbar.ui index c620b51..9b7cce7 100644 --- a/keyhint/resources/headerbar.ui +++ b/keyhint/resources/headerbar.ui @@ -215,41 +215,37 @@ -