Remove orphan shortcuts for desktop grid and expose effects
BUG:487974
This commit is contained in:
parent
eea79bddd8
commit
a56b16e2ff
3 changed files with 44 additions and 0 deletions
|
@ -16,5 +16,10 @@ target_sources(kwin-6.0-remove-breeze-tabbox-default PRIVATE kwin-6.0-remove-bre
|
|||
target_link_libraries(kwin-6.0-remove-breeze-tabbox-default PRIVATE KF6::ConfigCore)
|
||||
install(TARGETS kwin-6.0-remove-breeze-tabbox-default DESTINATION ${KDE_INSTALL_LIBDIR}/kconf_update_bin/)
|
||||
|
||||
add_executable(kwin-6.1-remove-gridview-expose-shortcuts)
|
||||
target_sources(kwin-6.1-remove-gridview-expose-shortcuts PRIVATE kwin-6.1-remove-gridview-expose-shortcuts.cpp)
|
||||
target_link_libraries(kwin-6.1-remove-gridview-expose-shortcuts PRIVATE KF6::GlobalAccel)
|
||||
install(TARGETS kwin-6.1-remove-gridview-expose-shortcuts DESTINATION ${KDE_INSTALL_LIBDIR}/kconf_update_bin/)
|
||||
|
||||
install(FILES kwin.upd
|
||||
DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
|
||||
|
|
35
kconf_update/kwin-6.1-remove-gridview-expose-shortcuts.cpp
Normal file
35
kconf_update/kwin-6.1-remove-gridview-expose-shortcuts.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
SPDX-FileCopyrightText: 2023 Marco Martin <mart@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include <KGlobalAccel>
|
||||
|
||||
#include <QAction>
|
||||
#include <QGuiApplication>
|
||||
#include <QStandardPaths>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
const QStringList actionNames{
|
||||
QStringLiteral("ShowDesktopGrid"),
|
||||
QStringLiteral("Expose"),
|
||||
QStringLiteral("ExposeAll"),
|
||||
QStringLiteral("ExposeClass"),
|
||||
QStringLiteral("ExposeClassCurrentDesktop"),
|
||||
};
|
||||
|
||||
for (const QString &actionName : actionNames) {
|
||||
QAction action;
|
||||
action.setObjectName(actionName);
|
||||
action.setProperty("componentName", QStringLiteral("kwin"));
|
||||
action.setProperty("componentDisplayName", QStringLiteral("KWin"));
|
||||
KGlobalAccel::self()->setShortcut(&action, {QKeySequence()}, KGlobalAccel::NoAutoloading);
|
||||
KGlobalAccel::self()->removeAllShortcuts(&action);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -14,3 +14,7 @@ Script=kwin-6.0-delete-desktop-switching-shortcuts
|
|||
# Delete old tabbox defaults
|
||||
Id=kwin-6.0-remove-breeze-tabbox-default
|
||||
Script=kwin-6.0-remove-breeze-tabbox-default
|
||||
|
||||
# Delete old gridview and expose defaults
|
||||
Id=kwin-6.1-remove-gridview-expose-shortcuts
|
||||
Script=kwin-6.1-remove-gridview-expose-shortcuts
|
||||
|
|
Loading…
Reference in a new issue