AlynxZhou / showmethekey

Show keys you typed on screen.
https://showmethekey.alynx.one/
Apache License 2.0
351 stars 28 forks source link

Hide "clickable" #44

Closed 10b14224cc closed 6 months ago

10b14224cc commented 6 months ago

I use a tiling window manager (hyprland).

The size and position and all other parameters that the show key window needs are set at the compositor level.

I don't need the "Clickable" bar at the top, and in fact it is clogging screen space.

Is there an option to remove it?

Would you consider an option in the config window that draws the show key window without it?

AlynxZhou commented 6 months ago

No, it is actually window title bar, and removing window title bar is not helpful for most users who do not use tilling window manager, most users need it. The title bar is already slim enough so you could ignore it.

Duplicated with https://github.com/AlynxZhou/showmethekey/issues/18.

raffaem commented 6 months ago

Here is a patch to remove the header bar:

diff --git a/showmethekey-gtk/smtk-keys-win.c b/showmethekey-gtk/smtk-keys-win.c
index 4c9cfb8..af32da7 100644
--- a/showmethekey-gtk/smtk-keys-win.c
+++ b/showmethekey-gtk/smtk-keys-win.c
@@ -306,6 +306,7 @@ static void smtk_keys_win_constructed(GObject *object)
    adw_window_set_content(ADW_WINDOW(win), win->box);

    // Allow user to choose position by drag this.
+        /*
    win->header_bar = adw_header_bar_new();
    adw_header_bar_set_show_start_title_buttons(
        ADW_HEADER_BAR(win->header_bar), false);
@@ -315,6 +316,7 @@ static void smtk_keys_win_constructed(GObject *object)
    adw_header_bar_set_title_widget(ADW_HEADER_BAR(win->header_bar),
                    win->handle);
    gtk_box_append(GTK_BOX(win->box), win->header_bar);
+        */

    win->emitter = smtk_keys_emitter_new(win->show_shift, win->show_mouse,
                         win->mode, win->layout,
raffaem commented 6 months ago

I made a fork here: https://github.com/raffaem/showmethekey-tiling