Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:seral79
como
remove-breeze-tabbox.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File remove-breeze-tabbox.patch of Package como
diff --git a/como/desktop/kconf_update/CMakeLists.txt b/como/desktop/kconf_update/CMakeLists.txt index a43f96f79..e81deed1d 100644 --- a/como/desktop/kconf_update/CMakeLists.txt +++ b/como/desktop/kconf_update/CMakeLists.txt @@ -11,5 +11,10 @@ target_sources(kwin-6.0-reset-active-mouse-screen PRIVATE kwin-6.0-reset-active- target_link_libraries(kwin-6.0-reset-active-mouse-screen PRIVATE KF6::ConfigCore) install(TARGETS kwin-6.0-reset-active-mouse-screen DESTINATION ${KDE_INSTALL_LIBDIR}/kconf_update_bin/) +add_executable(kwin-6.0-remove-breeze-tabbox-default) +target_sources(kwin-6.0-remove-breeze-tabbox-default PRIVATE kwin-6.0-remove-breeze-tabbox-default.cpp) +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/) + install(FILES kwin.upd DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR}) diff --git a/como/desktop/kconf_update/kwin-6.0-remove-breeze-tabbox-default.cpp b/como/desktop/kconf_update/kwin-6.0-remove-breeze-tabbox-default.cpp new file mode 100644 index 000000000..dd536ab0b --- /dev/null +++ b/como/desktop/kconf_update/kwin-6.0-remove-breeze-tabbox-default.cpp @@ -0,0 +1,40 @@ +/* + SPDX-FileCopyrightText: 2024 Vlad Zahorodnii <vlad.zahorodnii@kde.org> + + SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include <KConfigGroup> +#include <KSharedConfig> + +int main() +{ + KConfig config(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1String("/kdedefaults/kwinrc"), KConfig::SimpleConfig); + + KConfigGroup windows = config.group(QStringLiteral("TabBox")); + bool needsSync = false; + + if (!windows.exists()) { + return EXIT_SUCCESS; + } + + if (windows.hasKey(QStringLiteral("LayoutName")) && windows.readEntry(QStringLiteral("LayoutName"), QString()) == QString("org.kde.breeze.desktop")) { + windows.deleteEntry(QStringLiteral("LayoutName")); + needsSync = true; + } + + if (windows.hasKey(QStringLiteral("DesktopListLayout"))) { + windows.deleteEntry(QStringLiteral("DesktopListLayout")); + needsSync = true; + } + if (windows.hasKey(QStringLiteral("DesktopLayout"))) { + windows.deleteEntry(QStringLiteral("DesktopLayout")); + needsSync = true; + } + + if (needsSync) { + return windows.sync() ? EXIT_SUCCESS : EXIT_FAILURE; + } else { + return EXIT_SUCCESS; + } +} diff --git a/como/desktop/kconf_update/kwin.upd b/como/desktop/kconf_update/kwin.upd index d3ef84271..b1433e9fa 100644 --- a/como/desktop/kconf_update/kwin.upd +++ b/como/desktop/kconf_update/kwin.upd @@ -10,3 +10,7 @@ Script=kwin-6.0-reset-active-mouse-screen # Delete old desktop switching shortcuts. Id=kwin-6.0-delete-desktop-switching-shortcuts 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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor