Bug 429588 - Window rules kcm needs a duplicate button
Summary: Window rules kcm needs a duplicate button
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kwinrules (show other bugs)
Version: unspecified
Platform: Other Other
: NOR wishlist (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2020-11-24 12:46 UTC by Duncan
Modified: 2020-11-28 23:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.21
1i5t5.duncan: Usability+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2020-11-24 12:46:24 UTC
So the last couple weeks I've been switching to wayland.  As a result I've needed to create new window rules /almost/ duplicating many of my old X-based window rules, except of course with new wayland-style org.kde.whatever window classes.

Critically, while I've basically completed the switch now, wayland's now my default and I've deleted many of the old X-based rules, at first I didn't want to touch them as I wasn't yet sure qt/kde/plasma's wayland support was going to be mature enough yet to default to wayland, so I was duplicating rules left and right, adding wayland versions duplicating my X settings but with different class settings.

For such a use-case the window-rules kcm seriously needs a duplicate button!  With it, I'd have been able to press duplicate, load one of the copies, modify the name to reflect wayland, hit detect to get the new class settings and modify them a bit if necessary, and hit apply, all without losing and having to recreate what the rules actually /did/ or their position in the rule stack.

Because that duplicate button isn't there, I had to create a new rule, hit detect to get the new match settings, apply so as not to lose it, back out to the rule list and move the new rule from the bottom into its position next to the old rule, hit apply not to lose that, then repeatedly switch between the two rules copying the settings from the old one to the new one until they basically matched except for the differing class settings.

The lack of that duplicate button therefore made the process far more laborious than it should have been.

(Of course it was made even worse due to bugs such as bug #429586, as I hadn't yet discovered that there's a back button when the individual kcm is loaded with kcmshell5, so I was having to click out of the rules kcm and back to to get back to the rules list as I was doing it in kde system settings which doesn't have that back button, but that's a different bug.)
Comment 1 Bug Janitor Service 2020-11-27 21:22:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/499
Comment 2 Ismael Asensio 2020-11-28 23:21:32 UTC
Git commit a6c51c5445dd89cb09ea110674794a312e33eccc by Ismael Asensio.
Committed on 28/11/2020 at 23:16.
Pushed by iasensio into branch 'master'.

kcm/rules: Add a Duplicate action to rules list

Useful action, especially for heavy kwin rules users

As an example, this can help users to migrate their rules to Wayland
(where some matching properties such as window class may be different)
while keeping a version of the rule compatible with X11.
FIXED-IN: 5.21

M  +16   -0    kcmkwin/kwinrules/kcmrules.cpp
M  +1    -0    kcmkwin/kwinrules/kcmrules.h
M  +9    -0    kcmkwin/kwinrules/package/contents/ui/RulesList.qml

https://invent.kde.org/plasma/kwin/commit/a6c51c5445dd89cb09ea110674794a312e33eccc