diff --git a/.gitignore b/.gitignore
index e9935e2b..526a6a4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ misc/plymouth/plymouth-theme-smod/build
kwin/decoration/build
plasma/sddm/login-sessions/build
plasma/aerothemeplasma-kcmloader/build
+plasma/atpootb/build
plasma/plasmoids/src/systemtray_src/build
plasma/plasmoids/src/notifications_src/build
plasma/plasmoids/src/volume_src/build
@@ -25,3 +26,6 @@ kwin/effects_cpp/startupfeedback/build-wl
kwin/effects_cpp/minimize3d/build-wl
kwin/effects_cpp/minimize3d
experimental/
+build
+repos
+manifest
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..4abe8126
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,23 @@
+image: "archlinux:latest"
+
+stages:
+ - build
+
+build-linux-x64:
+ stage: build
+ before_script:
+ - pacman-key --init
+ - pacman -Syu --needed --noconfirm ninja pkgconf cmake gcc gcc-libs glibc kcoreaddons kcrash kdbusaddons ki18n kirigami knotifications kwindowsystem polkit-qt6 qt6-base qt6-declarative extra-cmake-modules libplasma plasma-pa plasma-nm plasma-workspace kdoctools qt6-virtualkeyboard qt6-multimedia qt6-5compat qt6-wayland plasma-wayland-protocols plasma5support knotifyconfig
+ - ln -s /usr/share/wayland/wayland.xml /wayland.xml # Ugly hack to make the xml file visible to cmake during the build process
+ script:
+ - cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBEXECDIR=lib -B build .
+ - cmake --build build
+ - DESTDIR=out cmake --install build
+ artifacts:
+ untracked: false
+ when: on_success
+ access: all
+ expire_in: 6 mos
+ paths:
+ - out/
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..38f1ac37
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,22 @@
+cmake_minimum_required(VERSION 3.16)
+project(aerothemeplasma-desktop)
+
+set(KF6_MIN_VERSION "6.0.0")
+find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
+
+set(PROJECT_VERSION "6.5.4")
+set(PROJECT_VERSION_MAJOR 6)
+
+include(KDEInstallDirs)
+include(KDECMakeSettings)
+include(KDECompilerSettings NO_POLICY_SCOPE)
+include(FeatureSummary)
+find_package(KF6Config)
+find_package(Plasma)
+
+add_subdirectory(plasma)
+add_subdirectory(misc)
+
+install()
+
diff --git a/INSTALL.md b/INSTALL.md
index 972d3b67..a37a101f 100755
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -3,14 +3,16 @@
## TABLE OF CONTENTS
1. [Prerequisites](#preq)
-2. [Getting started](#started)
-3. [Using install scripts](#scripts)
-4. [Manual installation](#manual)
-5. [Configuring AeroThemePlasma](#conf)
-6. [GTK](#gtk)
+2. [Migration notice](#migration)
+3. [Getting started](#started)
+4. [Optional](#optional)
+5. [GTK](#gtk)
+6. [Uninstalling AeroThemePlasma (old)](#uninstall_old)
## Prerequisites
+It's necessary to have KDE Plasma already installed on your system (plasma-workspace and plasma-desktop) in order to get all the Plasma-specific dependencies for AeroThemePlasma.
+
Before installing AeroThemePlasma, it's important to know which display server you're running on (Wayland or X11). This can be checked using Plasma's Info Center page in the settings. It's recommended to run AeroThemePlasma on X11 for now, as it's generally the more stable and feature rich experience (certain restrictions on the Wayland session make some effects and features impossible to achieve, this should hopefully be addressed in the future).
### Arch Linux
@@ -18,7 +20,7 @@ Before installing AeroThemePlasma, it's important to know which display server y
Required packages:
```bash
-pacman -S git cmake extra-cmake-modules ninja curl unzip qt6-virtualkeyboard qt6-multimedia qt6-5compat qt6-wayland plasma-wayland-protocols plasma5support kvantum sddm sddm-kcm base-devel
+pacman -S git cmake extra-cmake-modules ninja curl unzip qt6-virtualkeyboard qt6-multimedia qt6-5compat qt6-wayland plasma-wayland-protocols plasma5support kvantum sddm sddm-kcm base-devel plasma-nm plasma-pa plasma-workspace plasma-desktop kwin-x11 plasma-x11-session
```
Since Plasma 6.4, the X11 session has been separated from the main codebase. On Arch Linux, additional dependencies for X11 include:
@@ -35,7 +37,7 @@ KSysGuard has been officially deprecated by KDE, however an unofficial [port](ht
Required Packages:
```bash
-dnf install plasma-workspace-devel unzip kvantum qt6-qtmultimedia-devel qt6-qt5compat-devel libplasma-devel qt6-qtbase-devel qt6-qtwayland-devel plasma-activities-devel kf6-kpackage-devel kf6-kglobalaccel-devel qt6-qtsvg-devel wayland-devel plasma-wayland-protocols kf6-ksvg-devel kf6-kcrash-devel kf6-kguiaddons-devel kf6-kcmutils-devel kf6-kio-devel kdecoration-devel kf6-ki18n-devel kf6-knotifications-devel kf6-kirigami-devel kf6-kiconthemes-devel cmake gmp-ecm-devel kf5-plasma-devel libepoxy-devel kwin-devel kf6-karchive kf6-karchive-devel plasma-wayland-protocols-devel qt6-qtbase-private-devel qt6-qtbase-devel kf6-knewstuff-devel kf6-knotifyconfig-devel kf6-attica-devel kf6-krunner-devel kf6-kdbusaddons-devel kf6-sonnet-devel plasma5support-devel plasma-activities-stats-devel polkit-qt6-1-devel qt-devel libdrm-devel kf6-kitemmodels-devel kf6-kstatusnotifieritem-devel
+dnf install plasma-workspace-devel unzip kvantum qt6-qtmultimedia-devel qt6-qt5compat-devel libplasma-devel qt6-qtbase-devel qt6-qtwayland-devel plasma-activities-devel kf6-kpackage-devel kf6-kglobalaccel-devel qt6-qtsvg-devel wayland-devel plasma-wayland-protocols kf6-ksvg-devel kf6-kcrash-devel kf6-kguiaddons-devel kf6-kcmutils-devel kf6-kio-devel kdecoration-devel kf6-ki18n-devel kf6-knotifications-devel kf6-kirigami-devel kf6-kiconthemes-devel cmake gmp-ecm-devel kf5-plasma-devel libepoxy-devel kwin-devel kf6-karchive kf6-karchive-devel plasma-wayland-protocols-devel qt6-qtbase-private-devel qt6-qtbase-devel kf6-knewstuff-devel kf6-knotifyconfig-devel kf6-attica-devel kf6-krunner-devel kf6-kdbusaddons-devel kf6-sonnet-devel plasma5support-devel plasma-activities-stats-devel polkit-qt6-1-devel qt-devel libdrm-devel kf6-kitemmodels-devel kf6-kstatusnotifieritem-devel kf6-frameworkintegration-devel
```
On Fedora, additional dependencies for X11 include:
@@ -58,7 +60,7 @@ In openSUSE, additional dependencies for X11 include:
### Ubuntu 25.10
```bash
-apt install build-essential cmake ninja-build curl libqt6virtualkeyboard6 libqt6multimedia6 libqt6core5compat6 libplasma5support6 libkdecorations3-dev libkf6colorscheme-dev libkf6i18n-dev libkf6iconthemes-dev libkf6kcmutils-dev libkirigami-dev libkf6kio-dev libkf6notifications-dev libkf6svg-dev libkf6crash-dev libkf6globalaccel-dev libplasma-dev libplasmaactivities-dev libxcb-composite0-dev libxcb-randr0-dev libxcb-shm0-dev libxcb-damage0-dev libepoxy-dev libqt6svg6-dev kwin-dev plasma-wayland-protocols
+apt install build-essential cmake ninja-build curl libqt6virtualkeyboard6 libqt6multimedia6 libqt6core5compat6 libplasma5support6 libkdecorations3-dev libkf6colorscheme-dev libkf6i18n-dev libkf6iconthemes-dev libkf6kcmutils-dev libkirigami-dev libkf6kio-dev libkf6notifications-dev libkf6svg-dev libkf6crash-dev libkf6globalaccel-dev libplasma-dev libplasmaactivities-dev libxcb-composite0-dev libxcb-randr0-dev libxcb-shm0-dev libxcb-damage0-dev libepoxy-dev libqt6svg6-dev kwin-dev plasma-wayland-protocols libkf5qqc2desktopstyle-dev libkf6qqc2desktopstyle-dev libplasma5support-dev libkf6auth-dev libkf6newstuff-dev libkf6notifyconfig-dev libkf6attica-dev libkf6runner-dev libkf6dbusaddons-dev libkf6sonnet-dev libkf6xmlgui-dev libkf6coreaddons-dev libkf6widgetsaddons-dev libkf6guiaddons-dev qt6-base-dev qt6-5compat-dev qml-module-org-kde-qqc2desktopstyle libplasmaactivitiesstats-dev plasma-workspace-dev libkf6statusnotifieritem-dev qml-module-org-kde-kirigami-addons-sounds qml6-module-org-kde-kirigamiaddons-sounds
```
On Ubuntu, additional dependencies for X11 include:
@@ -66,8 +68,29 @@ On Ubuntu, additional dependencies for X11 include:
- `kwin-x11`
- `kwin-x11-dev`
+## Migration notice
+
+AeroThemePlasma has moved to an installation method based on CMake, meant to simplify the entire process, as well as make it easier for distro packaging in the future. The old install scripts are deprecated and no longer work. It's highly recommended to first uninstall the old instance of AeroThemePlasma following these steps:
+
+1. Run the uninstall script:
+
+```bash
+$ bash migration-uninstall.sh
+```
+
+2. To undo the font rendering modifications, delete the `~/.config/fontconfig/fonts.conf` file provided by the previous versions of ATP.
+3. Remove the line `QML_DISABLE_DISTANCEFIELD=1` from `/etc/environment`
+
+It's advisable to also consult [Uninstalling AeroThemePlasma (old)](#uninstall_old) for more details.
+
## Getting started
+### Arch Linux
+
+*AUR packages coming soon*
+
+### From source
+
To download this repository, clone it with `git`:
```bash
@@ -77,197 +100,68 @@ $ cd aerothemeplasma
It's highly recommended to use git for downloading AeroThemePlasma as updating becomes much easier.
-There are two ways to install AeroThemePlasma: Using the provided install scripts, and manual installation. In both cases, further configuration is required by the user.
-
-## Using install scripts
-
-This is the recommended way of installing ATP. The install scripts compile and deploy the components required for ATP to work. Run the install scripts in the terminal:
+Run the following script:
```sh
-$ sh compile.sh --ninja
-$ sh install_plasmoids.sh --ninja
-$ sh install_kwin_components.sh
-$ sh install_plasma_components.sh
-$ sh install_misc_components.sh
-```
+$ bash install.sh --ninja # Pass --ninja to reduce build times
+```
-During execution, some scripts may require admin privileges or other prompts from the user. Do **NOT** run any of the provided install scripts with sudo or as root.
+This will clone every repository needed for AeroThemePlasma and build everything from source.
-Wayland users need to additionally pass `--wayland` to `compile.sh`.
-
-### Install script details
-
-You can also run the install scripts like this:
+You can also run the install script like this:
```bash
-$ chmod +x compile.sh && ./compile.sh
+$ chmod +x install.sh && ./install.sh
```
-You can additionally pass `--ninja` to any of the following scripts in order to build using Ninja instead of GNU Make, which is recommended to reduce build times:
+## NOTE
-- `compile.sh`
-- `install_plasmoids.sh`
-- Any individual `install.sh` script
-
-### Note for Wayland users
-
-The compile script must be run while passing the `--wayland` argument for KWin effects:
+The script relies on `LIBEXEC_DIR` in order to determine the location of `/usr/$LIBEXEC_DIR/plasma-dbus-run-session-if-needed`, needed for the Wayland session to properly start. By default, this is set to `lib`. If you're installing ATP on a distribution where this is different, such as Fedora, this needs to be set to the appropriate value for your specific distribution. For example, on Fedora, `LIBEXEC_DIR` should be `libexec`:
```bash
-$ sh compile.sh --wayland --ninja
+$ LIBEXEC_DIR=libexec bash install.sh --ninja
```
-If compiling individual KWin effects by running their respective `install.sh` scripts, you can also pass the `--wayland` argument there:
+The script will ask for admin privileges for file installation. Do **NOT** run any of the provided install scripts with sudo/doas or as root.
-```bash
-$ sh install.sh --wayland --ninja
-```
+**It's highly recommended** to keep the generated build files, so uninstalling AeroThemePlasma and its dependencies can be done using `sudo make uninstall` or `sudo ninja uninstall` in each build directory. A backup of all `install_manifest.txt` files (that list all files that have been installed on the system) is stored in the `manifest` folder.
### Updating AeroThemePlasma
-Update the downloaded repository by pulling the new changes:
+Update and do `git pull` on the cloned repository to get new changes:
```bash
$ cd /path/to/aerothemeplasma
$ git pull
```
-and re-run the install scripts:
+Re-run the install script as described in [Getting started](#started). The script will automatically pull changes for all cloned repositories and rebuild them. In case something needs to be rebuilt completely, simply delete the repository folder causing the build error, and re-run the install script.
-```sh
-$ sh compile.sh
-$ sh install_plasmoids.sh
-$ sh install_plasmoids.sh --no-compile # If there's no need to recompile the C++ parts of the plasmoids, you can pass this argument to speed things up
-$ sh install_kwin_components.sh
-$ sh install_plasma_components.sh
-$ sh install_misc_components.sh # Usually not required to run again
-```
+When doing a full system upgrade, KWin effects and `libplasma` modifications tend to stop working. Re-running the install script after a full system upgrade is required for them to work again (assuming no breaking upstream changes happen).
-Typically it's enough to run the first four scripts after ATP has been updated. It's highly recommended to check for new commits and read the extended descriptions in order to see what has actually changed and what's required when updating.
+### Uninstalling AeroThemePlasma
-When doing a full system upgrade, KWin effects and `libplasma` modifications tend to stop working. Running `compile.sh` after a full system upgrade is required for them to work again (assuming no breaking upstream changes).
-
-## Manual installation
-
-If installing ATP manually, the only script that should be run is the compile script as described previously.
-
-After that, follow these steps:
-
-### Plasma components
-
-1. Move the folders `desktoptheme`, `look-and-feel`, `plasmoids`, `layout-templates`, `shells` into `~/.local/share/plasma`. If the folder doesn't exist, create it. These folders contain the following:
- - Plasma Style
- - Global Theme (more accurately, just the lock screen)
- - Plasmoids
- - Plasma shell
- - Preset panel layout that can be applied from Edit mode
-
-### Note for SevenTasks:
-
-SevenTasks relies on modifications found in `misc/libplasma` in order to work properly. Make sure that they're compiled and installed correctly before enabling SevenTasks.
-
-2. Compile all the C++ components found in the `plasmoids/src` directory like this for each source directory:
+Uninstalling AeroThemePlasma can be done by running the following script:
```bash
-$ sh install.sh --ninja
+$ bash uninstall.sh
```
-3. Move `sddm/sddm-theme-mod` to `/usr/share/sddm/themes`. Optionally, to enable the Vista start screen, set `enableStartup=true` in `theme.conf.user`
-4. Move `sddm/entries/aerothemeplasma.desktop` to `/usr/share/wayland-sessions`, and `sddm/entries/aerothemeplasmax11.desktop` to `/usr/share/xsessions`. This will install the SDDM entries required for ATP.
-5. Import and apply the color scheme through System Settings.
-
-### KWin components
-
-1. Move the `smod` folder to `~/.local/share`, and/or `/usr/share/` for a system-wide installation. This will install the resources required by many other components.
-2. Move `effects`, `tabbox`, `outline`, `scripts` to `~/.local/share/kwin`.
-3. Run the following inside `~/.local/share/`:
+This will go through almost every build directory and run `sudo make uninstall` or `sudo ninja uninstall` in those directories. After this, the `libplasma` package should be reinstalled using your distro's package manager.
```bash
-$ ln -s kwin kwin-x11
-$ ln -s kwin kwin-wayland
+# On Arch Linux
+$ sudo pacman -Sy libplasma
```
-### Miscellaneous components
+### Fonts
-1. Move the `Kvantum` folder (the one inside the `kvantum` folder) to `~/.config`, then in Kvantum Manager select the theme.
-2. Unpack the sound archive and move the folders to `~/.local/share/sounds`, then select the sound theme in System Settings.
-3. Unpack the icon archive and move the folder to `~/.local/share/icons`, then select the icon theme in System Settings.
-4. Unpack the cursor archive and move the folder to `/usr/share/icons`, then follow [this](https://www.youtube.com/watch?v=Dj7co2R7RKw) guide to install the cursor theme.
-5. Move the files located in `mimetype` into `~/.local/share/mime/packages` and then run `update-mime-database ~/.local/share/mime` to fix DLLs and EXE files sharing the same icons.
-6. Segoe UI, Segoe UI Bold, Segoe UI Semibold and Segoe UI Italic are required for this theme and they should be installed as system-wide fonts.
+On Arch Linux, use [this script](https://gitgud.io/aeroshell/aeroshell-workspace/-/blob/Plasma/6.6/scripts/install_fonts_arch.sh) to extract fonts and install them as an Arch package from a valid Windows 7 ISO. A 32-bit Windows 7 ISO is recommended for faster download speeds.
-If SDDM fails to pick up on the cursor theme, go to System Settings -> Startup and Shutdown -> Login Screen (SDDM), and click on Apply Plasma Settings to enforce your current cursor theme, and other relevant settings. Do this _after_ installing everything else. If even that fails, change the default cursor theme in `/usr/share/icons/default/index.theme` to say `aero-drop`.
+## Optional
-### Font configuration
-
-To enable full font hinting just for Segoe UI, move the `fontconfig` folder to `~/.config`. This will enable full font hinting for Segoe UI while keeping slight font hinting for other fonts. Additionally, append `QML_DISABLE_DISTANCEFIELD=1` into `/etc/environment` in order for this to be properly applied. _While full font hinting makes the font rendering look sharper and somewhat closer to Windows 7's ClearType, on Linux this option causes noticeably faulty kerning. This has been a [prominent](https://github.com/OpenTTD/OpenTTD/issues/11765) [issue](https://gitlab.gnome.org/GNOME/pango/-/issues/656) [for](https://gitlab.gnome.org/GNOME/pango/-/issues/463) [several](https://gitlab.gnome.org/GNOME/pango/-/issues/404) [years](https://github.com/harfbuzz/harfbuzz/issues/2394) [now](https://www.phoronix.com/news/HarfBuzz-Hinting-Woe) and while the situation has improved from being unreadable to just being ugly, a complete solution for this doesn't seem to be coming anytime soon._
-
-### Custom branding
-
-To install custom branding for the Info Center, move `kcm-about-distrorc` from the `branding` folder to `~/.config/kdedefaults/`, then edit the file's `LogoPath` entry to point to the absolute path of `kcminfo.png`.
-
-### Plymouth theme
-
-Optionally, install [PlymouthVista](https://github.com/furkrn/PlymouthVista) which supports Windows 7 boot animations, and features a more detailed setup guide.
-
-### Polkit User Account Control modification
-
-### WARNING:
-
-### Installing random modifications to programs that deal with privilege escalation (giving sudo or root access to users) from unknown or untrustworthy sources is reckless and a giant security risk. Even though this modification to KDE's polkit authentication UI is purely cosmetic, it's generally not recommended to modify sensitive applications such as this. If you don't know what you're doing, or do not trust the modified source code, do not install this particular component of AeroThemePlasma.
-
-1. Navigate to the `uac-polkitagent` folder, and run `install.sh`:
-
-```bash
-$ chmod +x install.sh && ./install.sh --ninja
-```
-
-2. To remove the minimize and maximize buttons from the window, run `add_rule.sh` which will generate the appropriate KWin rule:
-
-```bash
-$ chmod +x add_rule.sh && ./add_rule.sh
-```
-
-## Configuring AeroThemePlasma
-
-1. After installing everything, restart the computer. In SDDM, make sure to select the appropriate session (AeroThemePlasma (X11) or AeroThemePlasma (Wayland)).
-2. Apply the Global Theme after logging into the ATP session.
-3. Right click on the desktop and open "Desktop and Wallpaper", and select "Desktop (Win7)" under Layout, and apply the changes.
-4. In System Settings, apply the following settings:
-
-- In Window Behavior -> Titlebar Actions:
- - Mouse wheel: Do nothing
-- In Window Behavior -> Window Actions: (For Wayland users only)
- - Inactive Inner Window Actions, Left click: Activate, raise and pass click
-- In Window Behavior -> Task Switcher:
- - Main: Thumbnail Seven, Include "Show Desktop" entry
- - Alternative: Flip 3D, Forward shortcut: Meta+Tab
-- In Window Behavior -> KWin Scripts:
- - Enable Minimize All, SMOD Peek (**Wayland users should keep SMOD Peek disabled as it doesn't work and can cause freezing**)
-- In Window Behavior -> Desktop Effects, enable **all** effects in the AeroThemePlasma category. Additionally enable the "Desaturate Unresponsive Applications" effect.
-- In Window Behavior -> Desktop Effects, **disable** the following:
- - Background Contrast
- - Blur
- - Dialog Parent
- - Dim Inactive
- - Dim Screen for Administrator Mode (From Focus category)
-
-5. Configure KWin animations to the following:
-
-
-
-6. In System Settings -> Colors & Themes -> Colors, set "Accent color from color scheme"
-7. In System Settings -> Session -> Desktop Session, uncheck the "Ask for confirmation" option.
-8. In System Settings -> Keyboard -> Shortcuts, under KWin, disable the "Peek at Desktop" shortcut, and remap the "MinimizeAll" to Meta+D
-9. In System Settings -> Colors & Themes -> Cursors -> Configure Launch Feedback, set Cursor feedback to "None"
-10. In System Settings -> Fonts, configure the fonts as shown here:
-
-
-
-The following steps are optional:
-
-11. For Wine users it's recommended to install the [VistaVG Ultimate](https://www.deviantart.com/vishal-gupta/art/VistaVG-Ultimate-57715902) msstyles theme.
-12. Add the following to `~/.bashrc` to get bash to look more like the command prompt on Windows:
+1. For Wine users it's recommended to install the [VistaVG Ultimate](https://www.deviantart.com/vishal-gupta/art/VistaVG-Ultimate-57715902) msstyles theme.
+2. Add the following to `~/.bashrc` to get bash to look more like the command prompt on Windows:
```bash
PS1='C:${PWD//\//\\\\}> '
@@ -275,9 +169,161 @@ PS1='C:${PWD//\//\\\\}> '
echo -e "Microsoft Windows [Version 6.1.7600]\nCopyright (c) 2009 Microsoft Corporation. All rights reserved.\n"
```
-13. In the terminal emulator of your choice (e.g Konsole), set the font to [TerminalVector](https://www.yohng.com/software/terminalvector.html), size 9pt. Disable smooth font rendering and bold text, reduce the line spacing and margins to 0px, set the cursor shape to underline, and enable cursor blinking.
+3. In the terminal emulator of your choice (e.g Konsole), set the font to [TerminalVector](https://www.yohng.com/software/terminalvector.html), size 9pt. Disable smooth font rendering and bold text, reduce the line spacing and margins to 0px, set the cursor shape to underline, and enable cursor blinking.
+
+4. Install [PlymouthVista](https://github.com/furkrn/PlymouthVista) which supports Windows 7 boot animations, and features a more detailed setup guide.
## GTK
AeroThemePlasma officially doesn't have any kind of maintenance, development or support for GTK applications. Instead, check out
[Windows 7 Better](https://gitgud.io/Gamer95875/Windows-7-Better) by [Gamer95875](https://gitgud.io/Gamer95875), which is the recommended set of themes that works best with AeroThemePlasma.
+
+## Uninstalling AeroThemePlasma (old)
+
+### This section is meant for users migrating away from older versions of AeroThemePlasma (Before Plasma 6.6).
+
+AeroThemePlasma provides an uninstall script that undoes much of what's installed on the system. The script assumes that all of the CMake build files are still present in the repo, most importantly the `install_manifest.txt` files generated as a result of installing compiled parts of ATP. If these files are missing from the repo, they need to be regenerated by once again rerunning the necessary scripts like this:
+
+```bash
+$ bash compile.sh --skip-libplasma [--wayland] [--ninja]
+$ bash install_plasmoids.sh --skip-kpackages [--ninja]
+```
+
+Once this is done, the script is simply executed:
+
+```bash
+$ bash uninstall.sh
+```
+
+This should be run outside of the AeroThemePlasma session, preferrably in a regular Plasma session. The script will ask for confirmation to uninstall components of the system. **Please check that none of the locations are ill-formed before accepting each prompt, especially those that require additional privileges to uninstall. In case this happens to you, report it as an issue ASAP.**
+
+Afterwards, `libplasma` and `polkit-kde-agent` should be reinstalled using your distro's package manager. For example, on Arch Linux:
+
+```bash
+sudo pacman -Sy libplasma polkit-kde-agent
+```
+
+### Manual uninstallation
+
+The script performs the following steps in order to uninstall ATP. Uninstalling ATP should be done outside of the ATP session itself. Log into the Plasma session before performing any of these steps.
+
+### CMake
+
+- Perform `sudo make uninstall` or `sudo ninja uninstall` in the following directories if applicable:
+
+```
+kwin/decoration/build
+plasma/sddm/login-sessions/build
+plasma/aerothemeplasma-kcmloader/build
+plasma/plasmoids/src/systemtray_src/build
+plasma/plasmoids/src/notifications_src/build
+plasma/plasmoids/src/volume_src/build
+plasma/plasmoids/src/sevenstart_src/build
+plasma/plasmoids/src/seventasks_src/build
+plasma/plasmoids/src/desktopcontainment/build
+kwin/effects_cpp/kde-effects-aeroglassblur/build
+kwin/effects_cpp/kwin-effect-smodsnap-v2/build
+kwin/effects_cpp/smodglow/build
+kwin/effects_cpp/aeroglide/build
+kwin/effects_cpp/startupfeedback/build
+
+# For Wayland builds
+kwin/effects_cpp/kde-effects-aeroglassblur/build-wl
+kwin/effects_cpp/kwin-effect-smodsnap-v2/build-wl
+kwin/effects_cpp/smodglow/build-wl
+kwin/effects_cpp/aeroglide/build-wl
+kwin/effects_cpp/startupfeedback/build-wl
+```
+
+### Plasmoids
+
+- Perform `kpackagetool6 -t "Plasma/Applet" -r "plasmoid_id"` for each plasmoid, replacing `plasmoid_id` with the following:
+
+```
+io.gitgud.wackyideas.battery
+io.gitgud.wackyideas.desktopcontainment
+io.gitgud.wackyideas.digitalclocklite
+io.gitgud.wackyideas.keyboardlayout
+io.gitgud.wackyideas.networkmanagement
+io.gitgud.wackyideas.panel
+io.gitgud.wackyideas.SevenStart
+io.gitgud.wackyideas.seventasks
+io.gitgud.wackyideas.volume
+io.gitgud.wackyideas.win7showdesktop
+```
+
+### Plasma components
+
+- Perform the following commands:
+
+```bash
+kpackagetool6 -t "Plasma/LookAndFeel" -r "authui7"
+kpackagetool6 -t "Plasma/LayoutTemplate" -r "io.gitgud.wackyideas.taskbar"
+kpackagetool6 -t "Plasma/Theme" -r "Seven-Black"
+kpackagetool6 -t "Plasma/Shell" -r "io.gitgud.wackyideas.desktop"
+```
+
+- Delete `~/.local/share/color-schemes/Aero.colors`
+- Delete `~/.config/Kvantum/Windows7Aero`
+- Delete the sound themes from `~/.local/share/sounds`:
+
+```
+'Windows 7'
+'Windows 7 Afternoon'
+'Windows 7 Calligraphy'
+'Windows 7 Characters'
+'Windows 7 Cityscape'
+'Windows 7 Delta'
+'Windows 7 Festival'
+'Windows 7 Garden'
+'Windows 7 Heritage'
+'Windows 7 Landscape'
+'Windows 7 Quirky'
+'Windows 7 Raga'
+'Windows 7 Savanna'
+'Windows 7 Sonata'
+```
+
+- Delete the icon theme at `~/.local/share/icons/Windows 7 Aero`
+- Delete the following files at `~/.local/share/mime/packages`:
+
+```
+application-vnd.microsoft.portable-executable.xml
+application-x-ms-dll.xml
+application-x-msdownload.xml
+application-x-ms-ne-executable.xml
+```
+
+and run `update-mime-database ~/.local/share/mime` to refresh MIME associations
+
+### KWin components
+
+- Perform `kpackagetool6 -t "KWin/Effect" -r "effect_id"` for each effect, replacing `effect_id` with the following:
+
+```
+dimscreenaero
+fadingpopupsaero
+loginaero
+seventasks-thumbnails
+smodpeekeffect
+squashaero
+```
+
+- Perform the following:
+
+```bash
+kpackagetool6 -t "KWin/Script" -r "smodpeekscript"
+kpackagetool6 -t "KWin/WindowSwitcher" -r "flip3d"
+kpackagetool6 -t "KWin/WindowSwitcher" -r "thumbnail_seven"
+```
+
+- Delete the outline at `~/.local/share/kwin/outline`
+- Delete the symlinks `~/.local/share/kwin-x11` and `~/.local/share/kwin-wayland`
+- Delete the branding at `~/.config/kdedefaults/kcm-about-distrorc` and the logo (`~/.config/kdedefaults/kcminfo.png`)
+
+### Other components
+
+- Delete the cursor theme at `/usr/share/icons/aero-drop`
+- Delete the SDDM theme at `/usr/share/sddm/themes/sddm-theme-mod`
+- Delete the SMOD files at `/usr/share/smod` and `~/.local/share/smod`
+- Delete `/opt/aerothemeplasma`
diff --git a/README.md b/README.md
index 36992a25..7e619716 100644
--- a/README.md
+++ b/README.md
@@ -9,13 +9,13 @@ This is a project which aims to recreate the look and feel of Windows 7 as much
ATP is in constant development and testing, it has been tested on:
- Arch Linux x64 and other Arch derivatives
-- Plasma 6.5.0, KDE Frameworks 6.19.0, Qt 6.10.0
+- Plasma 6.6.0, KDE Frameworks 6.23.0, Qt 6.10.2
- 96 DPI scaling, multi monitor
- X11, Wayland*
*AeroThemePlasma currently lacks full Wayland support, which may result in Wayland-specific issues.
-## This project overwrites a small number of [system](https://gitgud.io/wackyideas/aerothemeplasma/-/tree/master/misc/libplasma) [files](https://gitgud.io/wackyideas/aerothemeplasma/-/tree/master/misc/uac-polkitagent), it's always recommended to make backups of your system just in case. I am not responsible for broken systems, please proceed with caution.
+## This software comes "as is" without warranty of any kind. It's always recommended to make backups of your system just in case. I am not responsible for broken systems, please proceed with caution.
The Plasma 5 version of ATP is available as a tag in this repository, however it is unmaintained and no longer supported.
@@ -59,6 +59,7 @@ Huge thanks to everyone who helped out along the way by contributing, testing, p
- [AngelBruni](https://github.com/angelbruni) for contributing several SVG textures, most notably the clock in DigitalClockLite Seven
- [ricewind012](https://github.com/ricewind012/) for .bashrc Microsoft Windows header
- [furkrn](https://gitgud.io/furkrn) for creating and maintaining the [Plymouth theme](https://github.com/furkrn/PlymouthVista)
+- [IcyGuidance](https://gitgud.io/IcyGuidance) for designing the notification badges in SevenTasks
### Special Thanks
diff --git a/compile.sh b/deprecated/compile.sh
similarity index 100%
rename from compile.sh
rename to deprecated/compile.sh
diff --git a/install_kwin_components.sh b/deprecated/install_kwin_components.sh
similarity index 100%
rename from install_kwin_components.sh
rename to deprecated/install_kwin_components.sh
diff --git a/install_misc_components.sh b/deprecated/install_misc_components.sh
similarity index 100%
rename from install_misc_components.sh
rename to deprecated/install_misc_components.sh
diff --git a/install_plasma_components.sh b/deprecated/install_plasma_components.sh
similarity index 100%
rename from install_plasma_components.sh
rename to deprecated/install_plasma_components.sh
diff --git a/install_plasmoids.sh b/deprecated/install_plasmoids.sh
similarity index 100%
rename from install_plasmoids.sh
rename to deprecated/install_plasmoids.sh
diff --git a/install.sh b/install.sh
new file mode 100644
index 00000000..9d9758a3
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,117 @@
+#!/bin/bash
+CUR_DIR=${PWD}
+
+SU_CMD=sudo
+USE_NINJA=
+NINJA_PARAM=
+if [[ "$*" == *"--ninja"* ]]
+then
+ if [[ -z "$(command -v ninja)" ]]; then
+ echo "Attempted to build using Ninja, but Ninja was not found on the system. Falling back to GNU Make."
+ else
+ echo "Compiling using Ninja"
+ USE_NINJA="-G Ninja"
+ NINJA_PARAM="--ninja"
+ fi
+fi
+
+if [[ -z "$(command -v $SU_CMD)" ]]; then
+ SU_CMD=doas
+ if [[ -z "$(command -v $SU_CMD)" ]]; then
+ echo "Neither sudo or doas were detected on the system."
+ exit
+ fi
+fi
+
+if [ -z $LIBEXEC_DIR ]; then
+ LIBEXEC_DIR=lib
+fi
+
+mkdir -p repos
+mkdir -p manifest
+cd repos
+
+# uac-polkit-agent
+git clone https://gitgud.io/aeroshell/uac-polkit-agent.git uac-polkit-agent
+cd uac-polkit-agent
+git pull
+cmake $USE_NINJA -DCMAKE_INSTALL_PREFIX=/usr -B build . || exit 1
+cmake --build build || exit 1
+$SU_CMD cmake --install build || exit 1
+cp build/install_manifest.txt "$CUR_DIR/manifest/uac-polkit-agent_install_manifest.txt"
+cd "$CUR_DIR/repos"
+
+# SMOD
+git clone https://gitgud.io/aeroshell/smod.git smod
+cd smod
+git pull
+bash install.sh $NINJA_PARAM
+cp build/install_manifest.txt "$CUR_DIR/manifest/smod_install_manifest.txt"
+cp smodglow/build/install_manifest.txt "$CUR_DIR/manifest/smodglow_install_manifest.txt"
+cp smodglow/build-wl/install_manifest.txt "$CUR_DIR/manifest/smodglow-x11_install_manifest.txt"
+cd "$CUR_DIR/repos"
+
+# Aeroshell Workspace
+git clone https://gitgud.io/aeroshell/aeroshell-workspace.git aeroshell-workspace
+cd aeroshell-workspace
+git pull
+cmake $USE_NINJA -DCMAKE_INSTALL_PREFIX=/usr -B build . || exit 1
+cmake --build build || exit 1
+$SU_CMD cmake --install build || exit 1
+$SU_CMD update-mime-database "/usr/local/share/mime"
+cp build/install_manifest.txt "$CUR_DIR/manifest/aeroshell-workspace_install_manifest.txt"
+cd "$CUR_DIR/repos"
+
+# Aeroshell KWin
+git clone https://gitgud.io/aeroshell/aeroshell-kwin-components.git aeroshell-kwin-components
+cd aeroshell-kwin-components
+git pull
+cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DKWIN_BUILD_WAYLAND=ON -B build . || exit 1
+cmake --build build || exit 1
+$SU_CMD cmake --install build || exit 1
+cp build/install_manifest.txt "$CUR_DIR/manifest/aeroshell-kwin-components_install_manifest.txt"
+cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DKWIN_BUILD_WAYLAND=OFF -DKWIN_INSTALL_MISC=OFF -B build_x11 . || exit 1
+cmake --build build_x11 || exit 1
+$SU_CMD cmake --install build_x11 || exit 1
+cp build_x11/install_manifest.txt "$CUR_DIR/manifest/aeroshell-kwin-components-x11_install_manifest.txt"
+cd "$CUR_DIR/repos"
+
+# Aerothemeplasma icons
+git clone https://gitgud.io/aeroshell/atp/aerothemeplasma-icons aerothemeplasma-icons
+cd aerothemeplasma-icons
+git pull
+cmake $USE_NINJA -DCMAKE_INSTALL_PREFIX=/usr -B build . || exit 1
+cmake --build build || exit 1
+$SU_CMD cmake --install build || exit 1
+cp build/install_manifest.txt "$CUR_DIR/manifest/icons_install_manifest.txt"
+cd "$CUR_DIR/repos"
+
+# Aerothemeplasma sounds
+git clone https://gitgud.io/aeroshell/atp/aerothemeplasma-icons aerothemeplasma-sounds
+cd aerothemeplasma-sounds
+git pull
+cmake $USE_NINJA -DCMAKE_INSTALL_PREFIX=/usr -B build . || exit 1
+cmake --build build || exit 1
+$SU_CMD cmake --install build || exit 1
+cp build/install_manifest.txt "$CUR_DIR/manifest/sounds_install_manifest.txt"
+cd "$CUR_DIR/repos"
+
+# Aerothemeplasma
+cd "$CUR_DIR"
+cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBEXECDIR=$LIBEXEC_DIR -B build . || exit 1
+cmake --build build || exit 1
+$SU_CMD cmake --install build || exit 1
+cp build/install_manifest.txt "$CUR_DIR/manifest/aerothemeplasma_install_manifest.txt"
+cd "$CUR_DIR/repos"
+
+# libplasma last
+git clone https://gitgud.io/aeroshell/libplasma.git libplasma
+cd libplasma
+git pull
+cmake $USE_NINJA -DCMAKE_INSTALL_PREFIX=/usr -B build . || exit 1
+cmake --build build || exit 1
+$SU_CMD cmake --install build || exit 1
+cp build/install_manifest.txt "$CUR_DIR/manifest/libplasma_install_manifest.txt"
+cd "$CUR_DIR/repos"
+
+echo "Done."
diff --git a/kwin/decoration/.git-blame-ignore-revs b/kwin/decoration/.git-blame-ignore-revs
deleted file mode 100644
index a0b83bef..00000000
--- a/kwin/decoration/.git-blame-ignore-revs
+++ /dev/null
@@ -1,2 +0,0 @@
-# clang-format
-32149dc002ae574ed41f111bf52712b1765b906b
diff --git a/kwin/decoration/.gitignore b/kwin/decoration/.gitignore
deleted file mode 100644
index 96d3dbbf..00000000
--- a/kwin/decoration/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-build
-.clang-format
-/compile_commands.json
-.clangd
-.idea
-/cmake-build*
-.cache
diff --git a/kwin/decoration/.gitlab-ci.yml b/kwin/decoration/.gitlab-ci.yml
deleted file mode 100644
index 457f5471..00000000
--- a/kwin/decoration/.gitlab-ci.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-# SPDX-FileCopyrightText: None
-# SPDX-License-Identifier: CC0-1.0
-
-include:
- - project: sysadmin/ci-utilities
- file:
- - /gitlab-templates/linux.yml
- - /gitlab-templates/freebsd.yml
- - /gitlab-templates/linux-qt6.yml
- - /gitlab-templates/windows.yml
- - /gitlab-templates/freebsd-qt6.yml
- - /gitlab-templates/windows-qt6.yml
diff --git a/kwin/decoration/.kde-ci.yml b/kwin/decoration/.kde-ci.yml
deleted file mode 100644
index 5e979da7..00000000
--- a/kwin/decoration/.kde-ci.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-# SPDX-FileCopyrightText: None
-# SPDX-License-Identifier: CC0-1.0
-
-Dependencies:
-- 'on': ['Linux/Qt5', 'FreeBSD/Qt5', 'Windows/Qt5']
- 'require':
- 'frameworks/extra-cmake-modules': '@latest'
- 'frameworks/kconfig': '@latest'
- 'frameworks/kconfigwidgets': '@latest'
- 'frameworks/kcoreaddons': '@latest'
- 'frameworks/kguiaddons': '@latest'
- 'frameworks/ki18n': '@latest'
- 'frameworks/kiconthemes': '@latest'
- 'frameworks/kirigami': '@latest'
- 'frameworks/kwindowsystem': '@latest'
-
-- 'on': ['Linux/Qt5', 'FreeBSD/Qt5']
- 'require':
- 'frameworks/frameworkintegration': '@latest'
- 'frameworks/kcmutils': '@latest'
-
-- 'on': ['Linux/Qt6', 'FreeBSD/Qt6', 'Windows/Qt6']
- 'require':
- 'frameworks/extra-cmake-modules': '@latest-kf6'
- 'frameworks/kconfig': '@latest-kf6'
- 'frameworks/kcoreaddons': '@latest-kf6'
- 'frameworks/kguiaddons': '@latest-kf6'
- 'frameworks/ki18n': '@latest-kf6'
- 'frameworks/kiconthemes': '@latest-kf6'
- 'frameworks/kirigami': '@latest-kf6'
- 'frameworks/kwindowsystem': '@latest-kf6'
- 'frameworks/kcolorscheme': '@latest-kf6'
-
-- 'on': ['Linux/Qt6', 'FreeBSD/Qt6']
- 'require':
- 'plasma/kdecoration': '@same'
- 'frameworks/frameworkintegration': '@latest-kf6'
- 'frameworks/kcmutils': '@latest-kf6'
-
-Options:
- require-passing-tests-on: [ 'Linux', 'FreeBSD']
diff --git a/kwin/decoration/AUTHORS b/kwin/decoration/AUTHORS
deleted file mode 100644
index 38e41513..00000000
--- a/kwin/decoration/AUTHORS
+++ /dev/null
@@ -1,6 +0,0 @@
-Cursors:
- Ken Vermette
-
-Kstyle:
- Hugo Pereira Da Costa - Developer
- Andrew Lake - Designer
diff --git a/kwin/decoration/BreezeConfig.cmake.in b/kwin/decoration/BreezeConfig.cmake.in
deleted file mode 100644
index 84d54bdc..00000000
--- a/kwin/decoration/BreezeConfig.cmake.in
+++ /dev/null
@@ -1,11 +0,0 @@
-@PACKAGE_INIT@
-
-set(BREEZE_WITH_KDECORATION @WITH_DECORATIONS@)
-if(${BREEZE_WITH_KDECORATION})
- set(BREEZE_KDECORATION_PLUGIN_ID "org.kde.breeze")
-else()
- set(BREEZE_KDECORATION_PLUGIN_ID "")
-endif()
-
-set(BREEZE_STYLE_NAME "breeze")
-set(BREEZE_COLOR_INSTALL_ROOT "@PACKAGE_KDE_INSTALL_FULL_DATADIR@/color-schemes/")
diff --git a/kwin/decoration/CMakeLists.txt b/kwin/decoration/CMakeLists.txt
deleted file mode 100644
index b017d36f..00000000
--- a/kwin/decoration/CMakeLists.txt
+++ /dev/null
@@ -1,173 +0,0 @@
-cmake_minimum_required(VERSION 3.16)
-project(breeze)
-set(PROJECT_VERSION "6.3.80")
-set(PROJECT_VERSION_MAJOR 6)
-
-set(KF5_MIN_VERSION "5.102.0")
-set(KF6_MIN_VERSION "6.10.0")
-set(KDE_COMPILERSETTINGS_LEVEL "5.82")
-set(QT5_MIN_VERSION "5.15.2")
-set(QT_MIN_VERSION "6.7.0")
-
-include(GenerateExportHeader)
-include(WriteBasicConfigVersionFile)
-include(FeatureSummary)
-include(GNUInstallDirs)
-
-find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
-
-set(CMAKE_CXX_STANDARD 20)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
-# We need this because we can't include KDECMakeSettings here, because that
-# would need KDEInstallDirs, which we can only include in the qt{5,6} builds
-# to get the correct installation dirs for each Qt version.
-option(BUILD_TESTING "Build the testing tree." ON)
-if(BUILD_TESTING)
- enable_testing()
-endif()
-
-include(CMakePackageConfigHelpers)
-include(ECMInstallIcons)
-include(ECMGenerateHeaders)
-include(ECMGeneratePkgConfigFile)
-include(KDECompilerSettings NO_POLICY_SCOPE)
-include(KDEClangFormat)
-include(KDEGitCommitHooks)
-include(GtkUpdateIconCache)
-
-option(BUILD_QT5 "Build Qt5 style" OFF)
-option(BUILD_QT6 "Build with Qt6" ON)
-
-set(QT_NO_CREATE_VERSIONLESS_TARGETS ON)
-set(QT_NO_CREATE_VERSIONLESS_FUNCTIONS ON)
-
-# For KDE CI only. As the current infrastructure doesn't allow us to set CMAKE options per build variant
-if($ENV{CI_JOB_NAME_SLUG} MATCHES "qt5")
- set(BUILD_QT5 ON)
- set(BUILD_QT6 OFF)
-elseif($ENV{CI_JOB_NAME_SLUG} MATCHES "qt6")
- set(BUILD_QT5 OFF)
- set(BUILD_QT6 ON)
-endif()
-
-if(WIN32 OR APPLE)
- set(WITH_DECORATIONS OFF)
-endif()
-
-function(build_Qt5)
- set(QT_MAJOR_VERSION 5)
- include(KDEInstallDirs5)
- include(KDECMakeSettings)
-
- find_package(Qt5 ${QT5_MIN_VERSION} REQUIRED CONFIG COMPONENTS Widgets DBus)
- find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
- CoreAddons
- Config
- ConfigWidgets
- GuiAddons
- IconThemes
- WindowSystem)
-
- find_package(Qt5 ${QT5_MIN_VERSION} OPTIONAL_COMPONENTS Quick)
- if(${Qt5Quick_FOUND})
- find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Kirigami2)
- endif()
-
- find_package(KF5FrameworkIntegration ${KF5_MIN_VERSION} CONFIG )
- set_package_properties(KF${QT_MAJOR_VERSION}FrameworkIntegration PROPERTIES
- DESCRIPTION "KF${QT_MAJOR_VERSION} Framework Integration"
- URL "https://projects.kde.org/projects/frameworks/frameworkintegration"
- TYPE OPTIONAL
- PURPOSE "Required to use KStyle convenience functionalities in style")
-
- find_package(Qt5 ${QT5_MIN_VERSION} OPTIONAL_COMPONENTS X11Extras)
- set_package_properties(KF${QT_MAJOR_VERSION}FrameworkIntegration PROPERTIES
- DESCRIPTION "KF${QT_MAJOR_VERSION} Framework Integration"
- URL "https://projects.kde.org/projects/frameworks/frameworkintegration"
- TYPE OPTIONAL
- PURPOSE "Required to use KStyle convenience functionalities in style")
-
- set(BREEZE_HAVE_KSTYLE ${KF5FrameworkIntegration_FOUND})
- set(BREEZE_HAVE_QTQUICK ${Qt5Quick_FOUND})
-
- add_subdirectory(kstyle kstyle5)
- add_subdirectory(libbreezecommon libbreezecommon5)
-
- unset(QUERY_EXECUTABLE CACHE)
-endfunction()
-if(BUILD_QT5)
- build_Qt5()
-endif()
-
-function(build_Qt6)
- set(QT_MAJOR_VERSION 6)
- include(KDEInstallDirs6)
- include(KDECMakeSettings)
-
- option(WITH_DECORATIONS "Build Breeze window decorations for KWin" ON)
- option(WITH_WALLPAPERS "Install Breeze default wallpapers" OFF)
-
- find_package(Qt6 ${QT_MIN_VERSION} REQUIRED CONFIG COMPONENTS Widgets DBus)
- find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
- CoreAddons
- ColorScheme
- Config
- GuiAddons
- I18n
- IconThemes
- WindowSystem)
- if(NOT WIN32 AND NOT APPLE)
- find_package(KF6KCMUtils ${KF6_MIN_VERSION})
- set_package_properties(KF6KCMUtils PROPERTIES
- TYPE REQUIRED
- DESCRIPTION "Helps create configuration modules"
- PURPOSE "KCMUtils used for the configuration modules or the decoration and Qt Style"
- )
- endif()
-
- find_package(Qt6 ${QT_MIN_VERSION} OPTIONAL_COMPONENTS Quick)
- if(${Qt6Quick_FOUND})
- find_package(KF6KirigamiPlatform ${KF6_MIN_VERSION} REQUIRED)
- endif()
-
- find_package(KF6FrameworkIntegration ${KF6_MIN_VERSION} CONFIG )
- set_package_properties(KF${QT_MAJOR_VERSION}FrameworkIntegration PROPERTIES
- DESCRIPTION "KF6 Framework Integration"
- URL "https://projects.kde.org/projects/frameworks/frameworkintegration"
- TYPE OPTIONAL
- PURPOSE "Required to use KStyle convenience functionalities in style")
-
- set(BREEZE_HAVE_QTQUICK ${Qt6Quick_FOUND})
-
- # https://bugreports.qt.io/browse/QTBUG-114706
- add_library(Qt::Core ALIAS Qt6::Core)
- add_library(Qt::Gui ALIAS Qt6::Gui)
- add_library(Qt::OpenGL ALIAS Qt6::OpenGL)
- add_library(Qt::Network ALIAS Qt6::Network)
- if(Qt6_VERSION_MINOR GREATER 6)
- add_library(Qt::PlatformModuleInternal ALIAS Qt6::PlatformModuleInternal)
- endif()
-
- add_subdirectory(libbreezecommon libbreezecommon6)
-
- if(WITH_DECORATIONS)
- find_package(KDecoration3 REQUIRED)
- add_subdirectory(kdecoration)
- endif()
-
- ki18n_install(po)
-
- unset(QUERY_EXECUTABLE CACHE)
-endfunction()
-if(BUILD_QT6)
- build_Qt6()
-endif()
-
-# add clang-format target for all our real source files
-file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
-kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
-kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
-
-feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/kwin/decoration/README.md b/kwin/decoration/README.md
deleted file mode 100644
index 0f073d06..00000000
--- a/kwin/decoration/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# Compiling instructions
-
-```
-mkdir build && cd build
-cmake -DCMAKE_INSTALL_PREFIX=/usr ..
-make
-sudo make install
-
-```
-
-# Breeze
-
-Breeze is the default style for [Plasma](https://kde.org/plasma-desktop/). This repository contains some parts of Breeze such as the cursors, wallpapers, and the application style.
-
-## Components
-
-This repository contains many parts of Breeze, such as:
-
-* Color schemes, located under [/colors](/colors).
-* Cursors, located under [/cursors](/cursor).
-* Window decorations, located under [/kdecoration](/kdecoration).
-* Application style, located under [/kstyle](/kstyle).
-* Wallpapers, located under [/wallpapers](/wallpapers).
-
-### See Also
-
-If you can't find what you're looking for, it may exist in another repository instead:
-
-* [Breeze Icons](https://invent.kde.org/frameworks/breeze-icons) contains the icon set used in Plasma.
-* [Plasma Framework](https://invent.kde.org/frameworks/plasma-framework/-/tree/master/src/desktoptheme) includes the [Plasma Style](https://develop.kde.org/docs/plasma/theme/) that affects the visuals for the Plasma panel and widgets.
-* [Plasma Workspace Wallpapers](https://invent.kde.org/plasma/plasma-workspace-wallpapers) contains the rest of the default wallpapers shipped with Plasma.
-* [Breeze for GTK](https://invent.kde.org/plasma/breeze-gtk) is the Breeze [GTK](https://gtk.org/) theme.
-* [QQC2 Desktop Style](https://invent.kde.org/frameworks/qqc2-desktop-style) is the default [Qt Quick Controls](https://doc.qt.io/qt-6/qtquickcontrols-index.html) style for desktop KDE applications. It draws controls in QtQuick-based apps using the current application style. If you're using KDE apps on Plasma or another Linux desktop, you're most likely using it.
-* [Breeze Style for QQC2](https://invent.kde.org/plasma/qqc2-breeze-style) is a Qt Quick Controls style that mimics the visual styling of Breeze specifically. If you're using KDE apps on Android or Plasma Mobile, you're most likely using it.
-
-## Building
-
-The easiest way to make changes and test Breeze during development is to [build it with kdesrc-build](https://community.kde.org/Get_Involved/development/Build_software_with_kdesrc-build).
-
-When building Breeze manually, keep in mind that the Qt5 and Qt6 versions will be built by default. To control which versions are built, use the `BUILD_QT5` and `BUILD_QT6` CMake variables.
-
-## Contributing
-
-Like other projects in the KDE ecosystem, contributions are welcome from all. This repository is managed in [KDE Invent](https://invent.kde.org/plasma/breeze), our GitLab instance.
-
-* Want to contribute code? See the [GitLab wiki page](https://community.kde.org/Infrastructure/GitLab) for a tutorial on how to send a merge request.
-* Reporting a bug? Please submit it on the [KDE Bugtracking System](https://bugs.kde.org/enter_bug.cgi?format=guided&product=breeze). Please do not use the Issues
-tab to report bugs.
-* Is there a part of Breeze that's not translated? See the [Getting Involved in Translation wiki page](https://community.kde.org/Get_Involved/translation) to see how
-you can help translate!
-
-If you get stuck or need help with anything at all, head over to the [KDE New Contributors room](https://go.kde.org/matrix/#/#kde-welcome:kde.org) on Matrix. For questions about Breeze, please ask in the [KDE Development room](https://go.kde.org/matrix/#/#kde-devel:kde.org). See [Matrix](https://community.kde.org/Matrix) for more details.
diff --git a/kwin/decoration/cmake/GtkUpdateIconCache.cmake b/kwin/decoration/cmake/GtkUpdateIconCache.cmake
deleted file mode 100644
index c0b98b9f..00000000
--- a/kwin/decoration/cmake/GtkUpdateIconCache.cmake
+++ /dev/null
@@ -1,17 +0,0 @@
-# SPDX-FileCopyrightText: 2015 Volker Krause
-#
-# SPDX-License-Identifier: BSD-3-Clause
-
-
-find_program(GTK_UPDATE_ICON_CACHE_EXECUTABLE NAMES gtk-update-icon-cache)
-
-macro(gtk_update_icon_cache _dir)
- if (GTK_UPDATE_ICON_CACHE_EXECUTABLE)
- install(CODE "
- set(DESTDIR_VALUE \"\$ENV{DESTDIR}\")
- if (NOT DESTDIR_VALUE)
- execute_process(COMMAND ${GTK_UPDATE_ICON_CACHE_EXECUTABLE} -q -i . WORKING_DIRECTORY ${_dir})
- endif()
- ")
- endif()
-endmacro()
diff --git a/kwin/decoration/install.sh b/kwin/decoration/install.sh
deleted file mode 100644
index 232faa7f..00000000
--- a/kwin/decoration/install.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-BUILD_DST="build"
-USE_NINJA=
-BUILD_COMMAND="make"
-
-if [[ "$*" == *"--ninja"* ]]
-then
- if [[ -z "$(command -v ninja)" ]]; then
- echo "Attempted to build using Ninja, but Ninja was not found on the system. Falling back to GNU Make."
- else
- echo "Compiling using Ninja"
- USE_NINJA="-G Ninja"
- BUILD_COMMAND="ninja"
- fi
-fi
-
-
-rm -rf "$BUILD_DST"
-mkdir "$BUILD_DST"
-cd "$BUILD_DST"
-cmake -DCMAKE_INSTALL_PREFIX=/usr .. $USE_NINJA
-$BUILD_COMMAND
-sudo $BUILD_COMMAND install
diff --git a/kwin/decoration/kdecoration/CMakeLists.txt b/kwin/decoration/kdecoration/CMakeLists.txt
deleted file mode 100644
index 58258abb..00000000
--- a/kwin/decoration/kdecoration/CMakeLists.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-add_definitions(-DTRANSLATION_DOMAIN="smod_deco")
-
-################# includes #################
-include_directories(${CMAKE_SOURCE_DIR}/libbreezecommon)
-include_directories(${CMAKE_BINARY_DIR}/libbreezecommon)
-
-################# newt target #################
-### plugin classes
-set(breezedecoration_SRCS
- breezebutton.cpp
- breezedecoration.cpp
- breezesettingsprovider.cpp
- breezeexceptionlist.cpp
- frametexture.cpp
- sizingmargins.cpp
- smod/smodbutton.cpp
- smod/smoddecoration.cpp
-)
-
-### build library
-kconfig_add_kcfg_files(breezedecoration_SRCS breezesettings.kcfgc)
-add_library(smoddecoration SHARED
- ${breezedecoration_SRCS}
- ${breezedecoration_config_PART_FORMS_HEADERS})
-
-set_target_properties(smoddecoration PROPERTIES
- OUTPUT_NAME org.smod.smod
- PREFIX ""
-)
-
-target_compile_definitions(smoddecoration PRIVATE MYSHAREDLIB_LIBRARY)
-
-#set_property(TARGET kwin4_effect_smodwindowbuttons PROPERTY POSITION_INDEPENDENT_CODE ON)
-
-set_target_properties(smoddecoration PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
-set_target_properties(smoddecoration PROPERTIES ENABLE_EXPORTS TRUE)
-
-add_compile_options(-fPIC)
-
-target_link_libraries(smoddecoration
- PRIVATE
- breezecommon6
- Qt6::Widgets
- Qt6::DBus
- KF6::CoreAddons
- KF6::ConfigGui
- KF6::GuiAddons
- KF6::I18n
- KF6::IconThemes
- KDecoration3::KDecoration
-)
-
-install(TARGETS smoddecoration DESTINATION ${KDE_INSTALL_PLUGINDIR}/${KDECORATION_PLUGIN_DIR})
-
-add_subdirectory(config)
-
-set(smod_HEADERS
- breeze.h
- breezebutton.h
- breezedecoration.h
- breezeexceptionlist.h
- breezesettingsprovider.h
- sizingmargins.h
-)
-
-kconfig_add_kcfg_files(smod_HEADERS breezesettings.kcfgc)
-
-ecm_generate_headers(smod_CamelCase_HEADERS
- HEADER_NAMES
- Breeze
- BreezeButton
- BreezeDecoration
- BreezeExceptionList
- BreezeSettingsProvider
- SizingMargins
-
- REQUIRED_HEADERS
- smod_HEADERS
-)
-
-ecm_generate_pkgconfig_file(
- BASE_NAME "smoddecoration"
- LIB_NAME ":org.smod.smod.so"
- INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR}
- LIB_INSTALL_DIR ${KDE_INSTALL_PLUGINDIR}/org.kde.kdecoration3
- FILENAME_VAR pkgconfig_filename
-)
-
-install(
- FILES
- ${smod_HEADERS}
- ${breezedecoration_config_PART_FORMS_HEADERS}
- ${smod_CamelCase_HEADERS}
-
- DESTINATION
- ${CMAKE_INSTALL_INCLUDEDIR}/SMOD/Decoration
-
- COMPONENT
- Devel
-)
-
-install(
- FILES
- ${pkgconfig_filename}
-
- DESTINATION
- ${CMAKE_INSTALL_LIBDIR}/pkgconfig
-)
diff --git a/kwin/decoration/kdecoration/Messages.sh b/kwin/decoration/kdecoration/Messages.sh
deleted file mode 100644
index 4f38b6d2..00000000
--- a/kwin/decoration/kdecoration/Messages.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!bin/sh
-$EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
-$XGETTEXT `find . -name \*.cc -o -name \*.cpp -o -name \*.h` -o $podir/breeze_kwin_deco.pot
-rm -f rc.cpp
diff --git a/kwin/decoration/kdecoration/breeze.h b/kwin/decoration/kdecoration/breeze.h
deleted file mode 100644
index 5c5492f7..00000000
--- a/kwin/decoration/kdecoration/breeze.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#pragma once
-
-#include "breezesettings.h"
-
-#include
-#include
-
-namespace Breeze
-{
-//* convenience typedefs
-using InternalSettingsPtr = QSharedPointer;
-using InternalSettingsList = QList;
-using InternalSettingsListIterator = QListIterator;
-
-//* metrics
-namespace Metrics
-{
-//* corner radius, in units of small spacing
-static constexpr qreal Frame_FrameRadius = 2;
-
-//* titlebar metrics, in units of small spacing
-static constexpr int TitleBar_TopMargin = 2;
-static constexpr int TitleBar_BottomMargin = 2;
-static constexpr int TitleBar_SideMargin = 2;
-static constexpr int TitleBar_ButtonSpacing = 2;
-
-// shadow dimensions (pixels)
-static constexpr int Shadow_Overlap = 3;
-
-// frame intensities (called bias in KColorUtilities::Mix)
-static constexpr qreal Bias_Default = 0.25;
-}
-
-//* standard pen widths
-namespace PenWidth
-{
-/* Using 1 instead of slightly more than 1 causes symbols drawn with
- * pen strokes to look skewed. The exact amount added does not matter
- * as long as it isn't too visible.
- */
-// The standard pen stroke width for symbols.
-static constexpr qreal Symbol = 1.01;
-}
-
-//* exception
-enum ExceptionMask {
- None = 0,
- BorderSize = 1 << 4,
-};
-}
diff --git a/kwin/decoration/kdecoration/breezebutton.cpp b/kwin/decoration/kdecoration/breezebutton.cpp
deleted file mode 100644
index 651b1c1c..00000000
--- a/kwin/decoration/kdecoration/breezebutton.cpp
+++ /dev/null
@@ -1,408 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2014 Martin Gräßlin
- * SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-#include "breezebutton.h"
-
-#include
-#include
-#include
-
-#include
-#include
-#include
-
-namespace Breeze
-{
-using KDecoration3::ColorGroup;
-using KDecoration3::ColorRole;
-using KDecoration3::DecorationButtonType;
-
-//__________________________________________________________________
-Button::Button(DecorationButtonType type, Decoration *decoration, QObject *parent)
- : DecorationButton(type, decoration, parent)
- , m_animation(new QVariantAnimation(this))
- , m_hoverProgress(0.0)
-{
- // setup animation
- // It is important start and end value are of the same type, hence 0.0 and not just 0
- m_animation->setStartValue(0.0);
- m_animation->setEndValue(1.0);
- m_animation->setEasingCurve(QEasingCurve::InOutQuad);
- connect(m_animation, &QVariantAnimation::valueChanged, this, [this](const QVariant &value) {
- setOpacity(value.toReal());
- });
-
-
- updateGeometry();
-
- // connections
- connect(decoration->window(), SIGNAL(iconChanged(QIcon)), this, SLOT(update()));
- connect(decoration->settings().get(), &KDecoration3::DecorationSettings::reconfigured, this, &Button::reconfigure);
- connect(this, &KDecoration3::DecorationButton::hoveredChanged, this, &Button::updateAnimationState);
-
- connect(this, &Button::buttonHoverStatus, decoration, &Decoration::buttonHoverStatus);
-
- reconfigure();
-}
-void Button::updateGeometry()
-{
- auto d = qobject_cast(decoration());
- QRect buttonRect = d->buttonRect(type());
- setGeometry(buttonRect);
- setIconSize(buttonRect.size());
-}
-
-//__________________________________________________________________
-Button::Button(QObject *parent, const QVariantList &args)
- : Button(args.at(0).value(), args.at(1).value(), parent)
-{
- m_flag = FlagStandalone;
- //! icon size must return to !valid because it was altered from the default constructor,
- //! in Standalone mode the button is not using the decoration metrics but its geometry
- m_iconSize = QSize(-1, -1);
-}
-
-void Button::smodPaintGlow(QPainter *painter, const QRectF &repaintArea)
-{
- return;
-}
-
-//__________________________________________________________________
-Button *Button::create(DecorationButtonType type, KDecoration3::Decoration *decoration, QObject *parent)
-{
- if (auto d = qobject_cast(decoration)) {
- Button *b = new Button(type, d, parent);
- const auto c = d->window();
- switch (type) {
- case DecorationButtonType::Close:
- //b->setVisible(c->isCloseable());
- //QObject::connect(c, &KDecoration3::DecoratedWindow::closeableChanged, b, &Breeze::Button::setVisible);
- b->setVisible(true);
- break;
-
- case DecorationButtonType::Maximize:
- b->setVisible(c->isMaximizeable() || c->isMinimizeable());
- b->setEnabled(c->isMaximizeable());
- QObject::connect(c, &KDecoration3::DecoratedWindow::maximizeableChanged, b,
- [b](bool maximizeable) {
- auto d = qobject_cast(b->decoration());
- const auto c = d->window();
-
- if (!c)
- {
- return;
- }
-
- b->setVisible(c->isMaximizeable() || c->isMinimizeable());
- b->setEnabled(maximizeable);
- });
- //b->setVisible(c->isMaximizeable());
- //QObject::connect(c, &KDecoration3::DecoratedWindow::maximizeableChanged, b, &Breeze::Button::setVisible);
- break;
-
- case DecorationButtonType::Minimize:
- //b->setVisible(c->isMinimizeable());
- //QObject::connect(c, &KDecoration3::DecoratedWindow::minimizeableChanged, b, &Breeze::Button::setVisible);
- b->setVisible(c->isMinimizeable() || c->isMaximizeable());
- b->setEnabled(c->isMinimizeable());
- QObject::connect(c, &KDecoration3::DecoratedWindow::minimizeableChanged, b,
- [b](bool minimizeable) {
- auto d = qobject_cast(b->decoration());
- const auto c = d->window();
-
- if (!c)
- {
- return;
- }
-
- b->setVisible(c->isMinimizeable() || c->isMaximizeable());
- b->setEnabled(minimizeable);
- });
- break;
-
- case DecorationButtonType::ContextHelp:
- b->setVisible(c->providesContextHelp());
- QObject::connect(c, &KDecoration3::DecoratedWindow::providesContextHelpChanged, b, &Breeze::Button::setVisible);
- break;
-
- case DecorationButtonType::Shade:
- b->setVisible(c->isShadeable());
- QObject::connect(c, &KDecoration3::DecoratedWindow::shadeableChanged, b, &Breeze::Button::setVisible);
- break;
-
- case DecorationButtonType::Menu:
- QObject::connect(c, &KDecoration3::DecoratedWindow::iconChanged, b, [b]() {
- b->update();
- });
- break;
-
- default:
- break;
- }
-
- return b;
- }
-
- return nullptr;
-}
-
-//__________________________________________________________________
-void Button::paint(QPainter *painter, const QRectF &repaintRegion)
-{
- smodPaint(painter, repaintRegion);
- return;
-}
-
-//__________________________________________________________________
-void Button::drawIcon(QPainter *painter) const
-{
- painter->setRenderHints(QPainter::Antialiasing);
-
- painter->translate(geometry().topLeft());
-
- const qreal width(m_iconSize.width());
- painter->scale(width / 20, width / 20);
- painter->translate(1, 1);
-
- // render background
- const QColor backgroundColor(this->backgroundColor());
- if (backgroundColor.isValid()) {
- painter->setPen(Qt::NoPen);
- painter->setBrush(backgroundColor);
- painter->drawEllipse(QRectF(0, 0, 18, 18));
- }
-
- // render mark
- const QColor foregroundColor(this->foregroundColor());
- if (foregroundColor.isValid()) {
- // setup painter
- QPen pen(foregroundColor);
- pen.setCapStyle(Qt::RoundCap);
- pen.setJoinStyle(Qt::MiterJoin);
- pen.setWidthF(PenWidth::Symbol * qMax((qreal)1.0, 20 / width));
-
- painter->setPen(pen);
- painter->setBrush(Qt::NoBrush);
-
- switch (type()) {
- case DecorationButtonType::Close: {
- painter->drawLine(QPointF(5, 5), QPointF(13, 13));
- painter->drawLine(13, 5, 5, 13);
- break;
- }
-
- case DecorationButtonType::Maximize: {
- if (isChecked()) {
- pen.setJoinStyle(Qt::RoundJoin);
- painter->setPen(pen);
-
- painter->drawPolygon(QVector{QPointF(4, 9), QPointF(9, 4), QPointF(14, 9), QPointF(9, 14)});
-
- } else {
- painter->drawPolyline(QVector{QPointF(4, 11), QPointF(9, 6), QPointF(14, 11)});
- }
- break;
- }
-
- case DecorationButtonType::Minimize: {
- painter->drawPolyline(QVector{QPointF(4, 7), QPointF(9, 12), QPointF(14, 7)});
- break;
- }
-
- case DecorationButtonType::OnAllDesktops: {
- painter->setPen(Qt::NoPen);
- painter->setBrush(foregroundColor);
-
- if (isChecked()) {
- // outer ring
- painter->drawEllipse(QRectF(3, 3, 12, 12));
-
- // center dot
- QColor backgroundColor(this->backgroundColor());
- auto d = qobject_cast(decoration());
- if (!backgroundColor.isValid() && d) {
- backgroundColor = d->titleBarColor();
- }
-
- if (backgroundColor.isValid()) {
- painter->setBrush(backgroundColor);
- painter->drawEllipse(QRectF(8, 8, 2, 2));
- }
-
- } else {
- painter->drawPolygon(QVector{QPointF(6.5, 8.5), QPointF(12, 3), QPointF(15, 6), QPointF(9.5, 11.5)});
-
- painter->setPen(pen);
- painter->drawLine(QPointF(5.5, 7.5), QPointF(10.5, 12.5));
- painter->drawLine(QPointF(12, 6), QPointF(4.5, 13.5));
- }
- break;
- }
-
- case DecorationButtonType::Shade: {
- if (isChecked()) {
- painter->drawLine(QPointF(4, 5.5), QPointF(14, 5.5));
- painter->drawPolyline(QVector{QPointF(4, 8), QPointF(9, 13), QPointF(14, 8)});
-
- } else {
- painter->drawLine(QPointF(4, 5.5), QPointF(14, 5.5));
- painter->drawPolyline(QVector{QPointF(4, 13), QPointF(9, 8), QPointF(14, 13)});
- }
-
- break;
- }
-
- case DecorationButtonType::KeepBelow: {
- painter->drawPolyline(QVector{QPointF(4, 5), QPointF(9, 10), QPointF(14, 5)});
-
- painter->drawPolyline(QVector{QPointF(4, 9), QPointF(9, 14), QPointF(14, 9)});
- break;
- }
-
- case DecorationButtonType::KeepAbove: {
- painter->drawPolyline(QVector{QPointF(4, 9), QPointF(9, 4), QPointF(14, 9)});
-
- painter->drawPolyline(QVector{QPointF(4, 13), QPointF(9, 8), QPointF(14, 13)});
- break;
- }
-
- case DecorationButtonType::ApplicationMenu: {
- painter->drawRect(QRectF(3.5, 4.5, 11, 1));
- painter->drawRect(QRectF(3.5, 8.5, 11, 1));
- painter->drawRect(QRectF(3.5, 12.5, 11, 1));
- break;
- }
-
- case DecorationButtonType::ContextHelp: {
- QPainterPath path;
- path.moveTo(5, 6);
- path.arcTo(QRectF(5, 3.5, 8, 5), 180, -180);
- path.cubicTo(QPointF(12.5, 9.5), QPointF(9, 7.5), QPointF(9, 11.5));
- painter->drawPath(path);
-
- painter->drawRect(QRectF(9, 15, 0.5, 0.5));
-
- break;
- }
-
- default:
- break;
- }
- }
-}
-
-//__________________________________________________________________
-QColor Button::foregroundColor() const
-{
- auto d = qobject_cast(decoration());
- if (!d) {
- return QColor();
-
- } else if (isPressed()) {
- return d->titleBarColor();
-
- } else if (type() == DecorationButtonType::Close && d->internalSettings()->outlineCloseButton()) {
- return d->titleBarColor();
-
- } else if ((type() == DecorationButtonType::KeepBelow || type() == DecorationButtonType::KeepAbove || type() == DecorationButtonType::Shade)
- && isChecked()) {
- return d->titleBarColor();
-
- } else if (m_animation->state() == QAbstractAnimation::Running) {
- return KColorUtils::mix(d->fontColor(), d->titleBarColor(), m_opacity);
-
- } else if (isHovered()) {
- return d->titleBarColor();
-
- } else {
- return d->fontColor();
- }
-}
-
-//__________________________________________________________________
-QColor Button::backgroundColor() const
-{
- auto d = qobject_cast(decoration());
- if (!d) {
- return QColor();
- }
-
- auto c = d->window();
- QColor redColor(c->color(ColorGroup::Warning, ColorRole::Foreground));
-
- if (isPressed()) {
- if (type() == DecorationButtonType::Close) {
- return redColor.darker();
- } else {
- return KColorUtils::mix(d->titleBarColor(), d->fontColor(), 0.3);
- }
-
- } else if ((type() == DecorationButtonType::KeepBelow || type() == DecorationButtonType::KeepAbove || type() == DecorationButtonType::Shade)
- && isChecked()) {
- return d->fontColor();
-
- } else if (m_animation->state() == QAbstractAnimation::Running) {
- if (type() == DecorationButtonType::Close) {
- if (d->internalSettings()->outlineCloseButton()) {
- return c->isActive() ? KColorUtils::mix(redColor, redColor.lighter(), m_opacity) : KColorUtils::mix(redColor.lighter(), redColor, m_opacity);
-
- } else {
- QColor color(redColor.lighter());
- color.setAlpha(color.alpha() * m_opacity);
- return color;
- }
-
- } else {
- QColor color(d->fontColor());
- color.setAlpha(color.alpha() * m_opacity);
- return color;
- }
-
- } else if (isHovered()) {
- if (type() == DecorationButtonType::Close) {
- return c->isActive() ? redColor.lighter() : redColor;
- } else {
- return d->fontColor();
- }
-
- } else if (type() == DecorationButtonType::Close && d->internalSettings()->outlineCloseButton()) {
- return c->isActive() ? redColor : d->fontColor();
-
- } else {
- return QColor();
- }
-}
-
-//________________________________________________________________
-void Button::reconfigure()
-{
- // animation
- auto d = qobject_cast(decoration());
- if (d) {
- m_animation->setDuration(d->animationsDuration());
- }
-
- if (type() == DecorationButtonType::Menu)
- {
- setVisible(!d->hideIcon());
- }
-}
-
-//__________________________________________________________________
-void Button::updateAnimationState(bool hovered)
-{
- auto d = qobject_cast(decoration());
- if (!(d && d->animationsDuration() > 0)) {
- return;
- }
-
- m_animation->setDirection(hovered ? QAbstractAnimation::Forward : QAbstractAnimation::Backward);
- if (m_animation->state() != QAbstractAnimation::Running) {
- m_animation->start();
- }
-}
-
-} // namespace
diff --git a/kwin/decoration/kdecoration/breezebutton.h b/kwin/decoration/kdecoration/breezebutton.h
deleted file mode 100644
index b74ed705..00000000
--- a/kwin/decoration/kdecoration/breezebutton.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2014 Martin Gräßlin
- * SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#pragma once
-
-#include "breezedecoration.h"
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-
-class QVariantAnimation;
-
-namespace Breeze
-{
-
-class Button : public KDecoration3::DecorationButton
-{
- Q_OBJECT
- Q_PROPERTY(qreal hoverProgress READ hoverProgress WRITE setHoverProgress);
-
-public:
- //* constructor
- explicit Button(QObject *parent, const QVariantList &args);
-
- //* destructor
- virtual ~Button() = default;
-
- //* button creation
- static Button *create(KDecoration3::DecorationButtonType type, KDecoration3::Decoration *decoration, QObject *parent);
-
- //* render
- virtual void paint(QPainter *painter, const QRectF &repaintRegion) override;
-
- //* flag
- enum Flag {
- FlagNone,
- FlagStandalone,
- FlagFirstInList,
- FlagLastInList,
- };
-
- //* flag
- void setFlag(Flag value)
- {
- m_flag = value;
- }
-
- //* standalone buttons
- bool isStandAlone() const
- {
- return m_flag == FlagStandalone;
- }
-
- //* offset
- void setOffset(const QPointF &value)
- {
- m_offset = value;
- }
-
- //* horizontal offset, for rendering
- void setHorizontalOffset(qreal value)
- {
- m_offset.setX(value);
- }
-
- //* vertical offset, for rendering
- void setVerticalOffset(qreal value)
- {
- m_offset.setY(value);
- }
-
- //* set icon size
- void setIconSize(const QSize &value)
- {
- m_iconSize = value;
- }
-
- //*@name active state change animation
- //@{
- void setOpacity(qreal value)
- {
- if (m_opacity == value) {
- return;
- }
- m_opacity = value;
- update();
- }
-
- qreal opacity() const
- {
- return m_opacity;
- }
-
- //@}
-
- qreal hoverProgress() const;
- void setHoverProgress(qreal hoverProgress);
-
- void smodPaintGlow(QPainter *painter, const QRectF &repaintArea);
- void updateGeometry();
-signals:
- void buttonHoverStatus(KDecoration3::DecorationButtonType button, bool hovered, QPoint pos);
-
-protected:
- void hoverEnterEvent(QHoverEvent *event) override;
- void hoverLeaveEvent(QHoverEvent *event) override;
-
-private Q_SLOTS:
-
- //* apply configuration changes
- void reconfigure();
-
- //* animation state
- void updateAnimationState(bool);
-
-private:
- //* private constructor
- explicit Button(KDecoration3::DecorationButtonType type, Decoration *decoration, QObject *parent = nullptr);
-
- //* draw button icon
- void drawIcon(QPainter *) const;
-
- void startHoverAnimation(qreal endValue);
- void smodPaint(QPainter *painter, const QRectF &repaintRegion);
-
- //*@name colors
- //@{
- QColor foregroundColor() const;
- QColor backgroundColor() const;
- //@}
-
- Flag m_flag = FlagNone;
-
- //* active state change animation
- QVariantAnimation *m_animation;
-
- //* vertical offset (for rendering)
- QPointF m_offset;
-
- //* icon size
- QSize m_iconSize;
-
- //* active state change opacity
- qreal m_opacity = 0;
-
- QPointer m_hoverAnimation;
- qreal m_hoverProgress;
-};
-
-} // namespace
diff --git a/kwin/decoration/kdecoration/breezedecoration.cpp b/kwin/decoration/kdecoration/breezedecoration.cpp
deleted file mode 100644
index e2f4756f..00000000
--- a/kwin/decoration/kdecoration/breezedecoration.cpp
+++ /dev/null
@@ -1,551 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2014 Martin Gräßlin
- * SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa
- * SPDX-FileCopyrightText: 2018 Vlad Zahorodnii
- * SPDX-FileCopyrightText: 2021 Paul McAuley
- *
- * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
- */
-
-#include "breezedecoration.h"
-
-#include "breezesettingsprovider.h"
-
-#include "breezebutton.h"
-
-#include "breezeboxshadowrenderer.h"
-
-#include
-#include
-
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "smod/smod.h"
-
-K_PLUGIN_FACTORY_WITH_JSON(BreezeDecoFactory, "smod.json", registerPlugin(); registerPlugin();)
-
-namespace Breeze
-{
-using KDecoration3::ColorGroup;
-using KDecoration3::ColorRole;
-
-static SizingMargins g_sizingmargins;
-static QString g_themeName = "Aero";
-static int g_shadowStrength = 255;
-static QColor g_shadowColor = Qt::black;
-static int g_lastBorderSize;
-
-//________________________________________________________________
-void Decoration::setOpacity(qreal value)
-{
- if (m_opacity == value) {
- return;
- }
- m_opacity = value;
- update();
-}
-QString Decoration::themeName()
-{
- return SMOD::currentlyRegisteredPath;
-}
-QPixmap Decoration::minimize_glow()
-{
- return QPixmap(QStringLiteral(":/effects/smodglow/textures/minimize"));
-}
-QPixmap Decoration::maximize_glow()
-{
- return QPixmap(QStringLiteral(":/effects/smodglow/textures/maximize"));
-}
-QPixmap Decoration::close_glow()
-{
- return QPixmap(QStringLiteral(":/effects/smodglow/textures/close"));
-}
-bool Decoration::glowEnabled()
-{
- if(g_sizingmargins.loaded())
- return g_sizingmargins.commonSizing().enable_glow;
- else return false;
-}
-
-//________________________________________________________________
-QColor Decoration::titleBarColor() const
-{
- return QColor(Qt::transparent);
-
- const auto c = window();
- if (hideTitleBar()) {
- return c->color(ColorGroup::Inactive, ColorRole::TitleBar);
- } else if (m_animation->state() == QAbstractAnimation::Running) {
- return KColorUtils::mix(c->color(ColorGroup::Inactive, ColorRole::TitleBar), c->color(ColorGroup::Active, ColorRole::TitleBar), m_opacity);
- } else {
- return c->color(c->isActive() ? ColorGroup::Active : ColorGroup::Inactive, ColorRole::TitleBar);
- }
-}
-
-//________________________________________________________________
-QColor Decoration::fontColor() const
-{
- const auto c = window();
- if (m_animation->state() == QAbstractAnimation::Running) {
- return KColorUtils::mix(c->color(ColorGroup::Inactive, ColorRole::Foreground), c->color(ColorGroup::Active, ColorRole::Foreground), m_opacity);
- } else {
- return c->color(c->isActive() ? ColorGroup::Active : ColorGroup::Inactive, ColorRole::Foreground);
- }
-}
-
-//________________________________________________________________
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
-bool Decoration::init()
-#else
-void Decoration::init()
-#endif
-{
- reconfigure();
- SMOD::registerResource(m_internalSettings->decorationTheme());
-
- g_sizingmargins.loadSizingMargins();
- const auto c = window();
- // active state change animation
- // It is important start and end value are of the same type, hence 0.0 and not just 0
- m_animation->setStartValue(0.0);
- m_animation->setEndValue(1.0);
- // Linear to have the same easing as Breeze animations
- m_animation->setEasingCurve(QEasingCurve::Linear);
- connect(m_animation, &QVariantAnimation::valueChanged, this, [this](const QVariant &value) {
- setOpacity(value.toReal());
- });
-
- m_shadowAnimation->setStartValue(0.0);
- m_shadowAnimation->setEndValue(1.0);
- m_shadowAnimation->setEasingCurve(QEasingCurve::OutCubic);
- connect(m_shadowAnimation, &QVariantAnimation::valueChanged, this, [this](const QVariant &value) {
- m_shadowOpacity = value.toReal();
- updateShadow();
- });
-
- // use DBus connection to update on breeze configuration change
- auto dbus = QDBusConnection::sessionBus();
- dbus.connect(QString(),
- QStringLiteral("/KGlobalSettings"),
- QStringLiteral("org.kde.KGlobalSettings"),
- QStringLiteral("notifyChange"),
- this,
- SLOT(reconfigure()));
-
- dbus.connect(QStringLiteral("org.kde.KWin"),
- QStringLiteral("/org/kde/KWin"),
- QStringLiteral("org.kde.KWin.TabletModeManager"),
- QStringLiteral("tabletModeChanged"),
- QStringLiteral("b"),
- this,
- SLOT(onTabletModeChanged(bool)));
-
- auto message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.KWin"),
- QStringLiteral("/org/kde/KWin"),
- QStringLiteral("org.freedesktop.DBus.Properties"),
- QStringLiteral("Get"));
- message.setArguments({QStringLiteral("org.kde.KWin.TabletModeManager"), QStringLiteral("tabletMode")});
- auto call = new QDBusPendingCallWatcher(dbus.asyncCall(message), this);
- connect(call, &QDBusPendingCallWatcher::finished, this, [this, call]() {
- QDBusPendingReply reply = *call;
- if (!reply.isError()) {
- onTabletModeChanged(reply.value().toBool());
- }
-
- call->deleteLater();
- });
-
- updateTitleBar();
- auto s = settings();
- connect(s.get(), &KDecoration3::DecorationSettings::borderSizeChanged, this, &Decoration::recalculateBorders);
-
- // a change in font might cause the borders to change
- connect(s.get(), &KDecoration3::DecorationSettings::fontChanged, this, &Decoration::recalculateBorders);
- connect(s.get(), &KDecoration3::DecorationSettings::spacingChanged, this, &Decoration::recalculateBorders);
-
- // buttons
- connect(s.get(), &KDecoration3::DecorationSettings::spacingChanged, this, &Decoration::updateButtonsGeometryDelayed);
- connect(s.get(), &KDecoration3::DecorationSettings::decorationButtonsLeftChanged, this, &Decoration::updateButtonsGeometryDelayed);
- connect(s.get(), &KDecoration3::DecorationSettings::decorationButtonsRightChanged, this, &Decoration::updateButtonsGeometryDelayed);
-
- // full reconfiguration
- connect(s.get(), &KDecoration3::DecorationSettings::reconfigured, this, &Decoration::reconfigure);
- connect(s.get(), &KDecoration3::DecorationSettings::reconfigured, SettingsProvider::self(), &SettingsProvider::reconfigure, Qt::UniqueConnection);
- connect(s.get(), &KDecoration3::DecorationSettings::reconfigured, this, &Decoration::updateButtonsGeometryDelayed);
-
- connect(c, &KDecoration3::DecoratedWindow::adjacentScreenEdgesChanged, this, &Decoration::recalculateBorders);
- connect(c, &KDecoration3::DecoratedWindow::maximizedHorizontallyChanged, this, &Decoration::recalculateBorders);
- connect(c, &KDecoration3::DecoratedWindow::maximizedVerticallyChanged, this, &Decoration::recalculateBorders);
- connect(c, &KDecoration3::DecoratedWindow::shadedChanged, this, &Decoration::recalculateBorders);
- connect(c, &KDecoration3::DecoratedWindow::captionChanged, this, [this]() {
- // update the caption area
- update(titleBar());
- update(); // Prevents rendering artifacts with the text glow
- });
-
- connect(c, &KDecoration3::DecoratedWindow::activeChanged, this, &Decoration::updateAnimationState);
- connect(c, &KDecoration3::DecoratedWindow::widthChanged, this, &Decoration::updateTitleBar);
- connect(c, &KDecoration3::DecoratedWindow::maximizedChanged, this, &Decoration::updateTitleBar);
- //connect(c, &KDecoration3::DecoratedWindow::maximizedChanged, this, &Decoration::setOpaque);
-
- connect(c, &KDecoration3::DecoratedWindow::widthChanged, this, &Decoration::updateButtonsGeometry);
- connect(c, &KDecoration3::DecoratedWindow::maximizedChanged, this, &Decoration::updateButtonsGeometry);
- connect(c, &KDecoration3::DecoratedWindow::adjacentScreenEdgesChanged, this, &Decoration::updateButtonsGeometry);
- connect(c, &KDecoration3::DecoratedWindow::shadedChanged, this, &Decoration::updateButtonsGeometry);
-
- connect(c, &KDecoration3::DecoratedWindow::widthChanged, this, &Decoration::updateBlur);
- connect(c, &KDecoration3::DecoratedWindow::heightChanged, this, &Decoration::updateBlur);
- connect(c, &KDecoration3::DecoratedWindow::maximizedChanged, this, &Decoration::updateBlur);
- connect(c, &KDecoration3::DecoratedWindow::shadedChanged, this, &Decoration::updateBlur);
-
- createButtons();
- updateShadow();
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
- return true;
-#endif
-}
-
-//________________________________________________________________
-void Decoration::updateTitleBar()
-{
- // The titlebar rect has margins around it so the window can be resized by dragging a decoration edge.
- auto s = settings();
- const auto c = window();
- const bool maximized = isMaximized();
- const int width = maximized ? c->width() : c->width() - 2 * s->smallSpacing() * Metrics::TitleBar_SideMargin;
- const int height = maximized ? borderTop() : borderTop() - s->smallSpacing() * Metrics::TitleBar_TopMargin;
- const int x = maximized ? 0 : s->smallSpacing() * Metrics::TitleBar_SideMargin;
- const int y = maximized ? 0 : s->smallSpacing() * Metrics::TitleBar_TopMargin;
- setTitleBar(QRect(x, y, width, height));
-}
-
-//________________________________________________________________
-void Decoration::updateAnimationState()
-{
- if (m_shadowAnimation->duration() > 0) {
- const auto c = window();
- m_shadowAnimation->setDirection(c->isActive() ? QAbstractAnimation::Forward : QAbstractAnimation::Backward);
- m_shadowAnimation->setEasingCurve(c->isActive() ? QEasingCurve::OutCubic : QEasingCurve::InCubic);
- if (m_shadowAnimation->state() != QAbstractAnimation::Running) {
- m_shadowAnimation->start();
- }
-
- } else {
- updateShadow();
- }
-
- if (m_animation->duration() > 0) {
- const auto c = window();
- m_animation->setDirection(c->isActive() ? QAbstractAnimation::Forward : QAbstractAnimation::Backward);
- if (m_animation->state() != QAbstractAnimation::Running) {
- m_animation->start();
- }
-
- } else {
- update();
- }
-}
-
-
-//________________________________________________________________
-void Decoration::reconfigure()
-{
-
- m_internalSettings = SettingsProvider::self()->internalSettings(this);
-
- SMOD::registerResource(m_internalSettings->decorationTheme());
- g_sizingmargins.loadSizingMargins();
- setScaledCornerRadius();
-
- KSharedConfig::Ptr config = KSharedConfig::openConfig();
- const KConfigGroup cg(config, QStringLiteral("KDE"));
-
- m_animation->setDuration(0);
- // Syncing anis between client and decoration is troublesome, so we're not using
- // any animations right now.
- // m_animation->setDuration( cg.readEntry("AnimationDurationFactor", 1.0f) * 100.0f );
-
- // But the shadow is fine to animate like this!
- m_shadowAnimation->setDuration(cg.readEntry("AnimationDurationFactor", 1.0f) * 100.0f);
-
- // borders
- recalculateBorders();
-
- // shadow
- updateShadow(true);
-
- updateButtonsGeometryDelayed();
- update();
-
- {
- // Reload smodglow
- QDBusMessage message = QDBusMessage::createMethodCall("org.kde.KWin", "/Effects", "", "reconfigureEffect");
- QList args;
- args.append("smodglow");
- message.setArguments(args);
- bool result = QDBusConnection::sessionBus().send(message);
- }
-
-}
-
-//________________________________________________________________
-void Decoration::recalculateBorders()
-{
- const auto c = window();
- auto s = settings();
-
- // left, right and bottom borders
- auto margins_l= sizingMargins().frameLeftSizing();
- auto margins_r= sizingMargins().frameRightSizing();
- auto margins_b= sizingMargins().frameBottomSizing();
- int left = isMaximized() ? 0 : margins_l.width;
- int right = isMaximized() ? 0 : margins_r.width;
- int bottom = (c->isShaded() || isMaximized()) ? 0 : margins_b.height;
-
- // Increase titlebar height if the font is too large for the configured size
- QString testString = "Message Box qd";
- QFontMetrics fm(s->font());
- auto bounds = fm.boundingRect(testString);
- auto margins = sizingMargins().commonSizing();
- int limitedHeight = qMax(titlebarHeight(), bounds.height());
- int top = (isMaximized() ? limitedHeight+margins.titlebar_padding_maximized : limitedHeight+margins.titlebar_padding_normal) + 1;
- if (hideTitleBar()) top = bottom;
-
- // Hide inner borders
- auto t_m = sizingMargins().topSide();
- auto l_m = sizingMargins().leftSide();
- auto r_m = sizingMargins().rightSide();
- auto b_m = sizingMargins().bottomSide();
-
- if (hideInnerBorder())
- {
- left = left < l_m.margin_right ? 0 : left - l_m.margin_right;
- right = right < r_m.margin_left ? 0 : right - r_m.margin_left;
- top = top < t_m.margin_bottom ? 0 : top - t_m.margin_bottom;
- bottom = bottom < b_m.margin_top ? 0 : bottom - b_m.margin_top;
- }
-
- left = qMax(0, left);
- right = qMax(0, right);
- top = qMax(0, top);
- bottom = qMax(0, bottom);
-
- setBorders(QMargins(left, top, right, bottom));
-
- // extended sizes
- const int extSize = s->largeSpacing();
- int extSides = 0;
- int extBottom = 0;
- if (hasNoBorders()) {
- if (!isMaximizedHorizontally()) {
- extSides = extSize;
- }
- if (!isMaximizedVertically()) {
- extBottom = extSize;
- }
-
- } else if (hasNoSideBorders() && !isMaximizedHorizontally()) {
- extSides = extSize;
- }
-
- setResizeOnlyBorders(QMargins(extSides, 0, extSides, extBottom));
-
- // TODO is this needed?
- updateBlur();
-}
-
-//________________________________________________________________
-void Decoration::createButtons()
-{
- m_leftButtons = new KDecoration3::DecorationButtonGroup(KDecoration3::DecorationButtonGroup::Position::Left, this, &Button::create);
- m_rightButtons = new KDecoration3::DecorationButtonGroup(KDecoration3::DecorationButtonGroup::Position::Right, this, &Button::create);
- updateButtonsGeometry();
-}
-
-//________________________________________________________________
-void Decoration::updateButtonsGeometryDelayed()
-{
- QTimer::singleShot(0, this, &Decoration::updateButtonsGeometry);
-}
-
-//________________________________________________________________
-void Decoration::updateButtonsGeometry()
-{
- const auto s = settings();
-
- // left buttons
- if (!m_leftButtons->buttons().isEmpty()) {
- const int vPadding = isMaximized() ? 0 : s->smallSpacing() * Metrics::TitleBar_TopMargin;
- const int hPadding = 0; //s->smallSpacing() * Metrics::TitleBar_SideMargin;
- m_leftButtons->setPos(QPointF(hPadding + borderLeft(), vPadding));
- }
-
- if (!m_rightButtons->buttons().isEmpty()) {
- const int vPadding = isMaximized() ? -1 : 1;
- const int lessPadding = g_sizingmargins.frameRightSizing().inset;
- auto r_m = sizingMargins().rightSide();
- m_rightButtons->setPos(QPointF(
- size().width() - m_rightButtons->geometry().width() - borderRight() - (isMaximized() ? 2 : 0) + lessPadding - ((hideInnerBorder() && !isMaximized()) ? r_m.margin_left : 0), vPadding));
-
- m_rightButtons->setSpacing(g_sizingmargins.commonSizing().caption_button_spacing);
- }
- foreach (QPointer button, m_rightButtons->buttons()) {
- static_cast