keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.29k stars 1.48k forks source link

Different window class for the unlocking window #5377

Open fabianski7 opened 4 years ago

fabianski7 commented 4 years ago

Summary

Most of the tiling-scripts for the desktop environment (like Kde plasma) use the window class to create exclusion lists, so it is possible to apply specific rules for each program.

keepass-xc uses the same class for all windows, so any rules that are created for it will be applied throughout the program.

Examples

The calibre (editor and ebook reader) has windows with different classes, so it is possible to apply different rules from some tiling-script. For example, always open the read window as a "popup" while all the others will be organized by the window manager.

Main Window

$  xprop | grep WM_CLASS
WM_CLASS(STRING) = "calibre-gui", "calibre"

Read Window

$  xprop | grep WM_CLASS
WM_CLASS(STRING) = "calibre-ebook-viewer", "calibre"

Context

When I am in the browser and access the extension to unlock the database, the screen is split in half (if the browser is the only active window) just so that the unlock window is displayed. If the unlock window had a different class than the main one, then it would be possible to add it to the exclude list and everything would be perfect xD It's just a matter of organization.

droidmonkey commented 4 years ago

What does WM_CLASS return for KeePassXC?

fabianski7 commented 4 years ago

What does WM_CLASS return for KeePassXC?

WM_CLASS(STRING) = "keepassxc", "KeePassXC"

You can also use the WM_TRANSIENT_FOR property, like qownnotes does.

$ xprop | grep WM_TRANSIENT_FOR
WM_TRANSIENT_FOR(WINDOW): window id # 0x5c00006
$ xprop -id 0x5c00006 | grep WM_CLASS
WM_CLASS(STRING) = "QOwnNotes", "QOwnNotes"