Skip to content

4v3ngR/Glass

 
 

Repository files navigation

Glass

About this fork

This fork is a fork of Darkly with the goal of simplification and compatibility with the kde and qt apps that I happen to use. Ultimately I want to remove as many app specific patches as possible while maintaining the shiny glass experience that can be obtained with the help of Better Blur.

This is a preview using an unmodified breeze colorscheme.

Glass

What changed (and what I want to do)

style

  • Reduce logic
  • Fix for black backgrounds in Konsole and transmission (and likely others)
  • Make the window background color transparent
  • Various other tweaks to my liking
  • Remove configuration options that no longer do anything

WM

  • Make the window decorations transparent
  • Be able to replace my aurorae WM theme (pictured above)
  • Make new button images (more like the macOS images)

Installation

Manual

To ensure this application style works on applications still using QT5 both QT5 and QT6 dependencies are required to be installed before building from source.

Installation script

Note

A script called install.sh is now available which both builds and installs this application style.

./install.sh will remove if existing, build and install Glass using both QT5/QT6 dependencies.

./install.sh QT5 will build & install using only QT5/KF5 dependencies.

./install.sh QT6 will build & install using only QT6/KF6 dependencies.

./install.sh remove will remove Glass.


Flatpak

Due to flatpak's restriction on file system access (in short no access to system libraries, /dev, etc), Glass flatpak bundle is only an extension of KDE runtime.
If you want to apply Glass as the application style, you either need:

  • Glass installed on the system via package manager (pacman, rpm, apt-get, etc) or
  • Set manually with QT_STYLE_OVERRIDE=Glass env variable [sudo flatpak override --env=QT_QPA_PLATFORMTHEME=kde (sudo only applies for flatpaks in /var/lib/flatpak, otherwise use --user without sudo)]

Important (primarily) for users of immutable distros!
Glass won't show as an option in System settings > Theme > Application styles without system installation. Also, both Glass runtime version and the KDE runtime version must match (if they don't match, the app won't use Glass)

This brings some untentended behaviour (for any application style, not Glass in particular), for example:

  • Changing color scheme partly applies for QWidget apps (not at all for QML-based)
  • Changing application style doesn't apply until the app is restarted

Manifests should have the latest versions of KDE Runtime and SDK. Change the version accordingly. (you can find the version of runtime for each app by running flatpak list --app --columns=app,runtime)

Build with:

org.flatpak.Builder flatpak-build --repo=local --force-clean --ccache org.kde.KStyle.Glass6.json

use org.kde.KStyle.Glass5.json for KF5

Bundle with:

flatpak build-bundle local/ glass.flatpak runtime/org.kde.KStyle.Glass/x86_64/<runtime_version>

Void Linux

sudo xbps-install -Sy git extra-cmake-modules base-devel qt5-devel qt6-base-devel \
      kcoreaddons-devel kf6-kcoreaddons-devel kcmutils-deve kf6-kcmutils-devel \
      kconfig-devel kf6-kconfig-devel kguiaddons-devel kf6-kguiaddons-devel \
      ki18n-devel kf6-ki18n-devel kiconthemes-devel kf6-kiconthemes-devel \
      kwindowsystem-devel kf6-kwindowsystem-devel kirigami2-devel kf6-kirigami-devel \
      kf6-kdecoration-devel frameworkintegration-devel kf6-frameworkintegration-devel
git clone --single-branch --depth=1 https://github.com/4v3ngR/Glass.git
cd Glass
./install.sh

Arch Linux

sudo pacman -S --noconfirm cmake extra-cmake-modules kdecoration qt6-declarative kcoreaddons \
      kcmutils kcolorscheme kconfig kguiaddons kiconthemes kwindowsystem git \
      qt5-declarative qt5-x11extras gcc make kcmutils5 \
      frameworkintegration5 kconfigwidgets5 kiconthemes5 \
      kirigami2 kwindowsystem5
git clone --single-branch --depth=1 https://github.com/4v3ngR/Glass.git
cd Glass
./install.sh

Fedora

Fedora 40/41
sudo dnf install -y git cmake extra-cmake-modules "cmake(KDecoration3)" kwin-devel \
      kf6-kcolorscheme-devel kf6-kguiaddons-devel kf6-ki18n-devel kf6-kiconthemes-devel \
      kf6-kirigami-devel kf6-kcmutils-devel kf6-frameworkintegration-devel \
      libepoxy-devel "cmake(Qt5Core)" "cmake(Qt5Gui)" "cmake(Qt5DBus)" "cmake(KF5GuiAddons)" \
      "cmake(KF5WindowSystem)" "cmake(KF5I18n)" "cmake(KF5CoreAddons)" "cmake(KF5ConfigWidgets)" \
      "cmake(Qt5UiTools)" "cmake(KF5GlobalAccel)" "cmake(KF5IconThemes)" "cmake(KF5Init)" \
      "cmake(KF5KIO)" kf5-kpackage-devel kf5-kcmutils-devel qt5-qtquickcontrols2-devel \
      kf5-kirigami2-devel "cmake(KF5FrameworkIntegration)"
git clone --single-branch --depth=1 https://github.com/4v3ngR/Glass.git
cd Glass
./install.sh

openSUSE Tumbleweed

sudo zypper in --no-recommends git ninja cmake kf6-extra-cmake-modules kf6-kconfig-devel \
      kf6-frameworkintegration-devel gmp-ecm-devel kf6-kconfigwidgets-devel \
      kf6-kguiaddons-devel kf6-ki18n-devel kf6-kiconthemes-devel kf6-kwindowsystem-devel \
      kf6-kcolorscheme-devel kf6-kcoreaddons-devel kf6-kcmutils-devel \
      qt6-quick-devel kf6-kirigami-devel qt6-base-devel kdecoration6-devel \
      qt6-tools qt6-widgets-devel gcc-c++ extra-cmake-modules libQt5Gui-devel \
      libQt5DBus-devel libqt5-qttools-devel libqt5-qtx11extras-devel \
      libQt5OpenGL-devel libQt5Network-devel libepoxy-devel kconfig-devel \
      kconfigwidgets-devel kcrash-devel kglobalaccel-devel ki18n-devel kio-devel \
      kservice-devel kinit-devel knotifications-devel kwindowsystem-devel kguiaddons-devel \
      kiconthemes-devel kpackage-devel kwin5-devel xcb-util-devel xcb-util-cursor-devel \
      xcb-util-wm-devel xcb-util-keysyms-devel kcmutils-devel \
      libqt5-qtquick3d-devel kirigami2-devel libKF5I18n5
git clone --single-branch --depth=1 https://github.com/4v3ngR/Glass.git
cd Glass
./install.sh

KDE neon

sudo apt install -y git build-essential cmake kf6-extra-cmake-modules \
      kf6-extra-cmake-modules kf6-frameworkintegration-dev \
      kf6-kcmutils-dev kf6-kcolorscheme-dev kf6-kconfig-dev kf6-kconfigwidgets-dev \
      kf6-kcoreaddons-dev kf6-kguiaddons-dev kf6-ki18n-dev kf6-kiconthemes-dev \
      kf6-kirigami2-dev kf6-kpackage-dev kf6-kservice-dev kf6-kwindowsystem-dev \
      kirigami2-dev kwayland-dev libx11-dev libkdecorations2-dev libkf5config-dev \
      libkf5configwidgets-dev libkf5coreaddons-dev libkf5guiaddons-dev libkf5i18n-dev \
      libkf5iconthemes-dev libkf5kcmutils-dev libkf5package-dev libkf5service-dev \
      libkf5style-dev libkf5wayland-dev libkf5windowsystem-dev libplasma-dev \
      libqt5x11extras5-dev qt6-base-dev qt6-declarative-dev qtbase5-dev \
      qtdeclarative5-dev gettext qt6-svg-dev extra-cmake-modules qt3d5-dev
git clone --single-branch --depth=1 https://github.com/4v3ngR/Glass.git
cd Glass
./install.sh

Distrobox (Fedora 41)

distrobox create --name lightly --image registry.fedoraproject.org/fedora-toolbox:41
distrobox enter lightly
sudo dnf install -y git cmake extra-cmake-modules "cmake(KDecoration3)" kwin-devel \
    kf6-kcolorscheme-devel kf6-kguiaddons-devel kf6-ki18n-devel kf6-kiconthemes-devel \
    kf6-kirigami-devel kf6-kcmutils-devel \
    libepoxy-devel "cmake(Qt5Core)" "cmake(Qt5Gui)" "cmake(Qt5DBus)" "cmake(KF5GuiAddons)" \
    "cmake(KF5WindowSystem)" "cmake(KF5I18n)" "cmake(KF5CoreAddons)" "cmake(KF5ConfigWidgets)" \
    "cmake(Qt5UiTools)" "cmake(KF5GlobalAccel)" "cmake(KF5IconThemes)" "cmake(KF5Init)" \
    "cmake(KF5KIO)" kf5-kpackage-devel kf5-kcmutils-devel qt5-qtquickcontrols2-devel \
    kf5-kirigami2-devel "cmake(KF5FrameworkIntegration)"

git clone --single-branch --depth=1 https://github.com/4v3ngR/Glass.git
cd Glass
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_LIBDIR=lib64 \
      -DBUILD_TESTING=OFF ..

cd ./kdecoration/config/
make -j $(nproc)
cd ../../
make -j $(nproc)
make install
Set environment variable on plasma startup:

echo "export QT_PLUGIN_PATH=$HOME/.local/lib64/plugins:\$QT_PLUGIN_PATH" > $HOME/.config/plasma-workspace/env/localthemes.sh && chmod +x $HOME/.config/plasma-workspace/env/localthemes.sh

Kubuntu (25.04)

sudo apt-get install -y -qq cmake build-essential libkf5config-dev libkdecorations3-dev \
      libqt5x11extras5-dev qtdeclarative5-dev extra-cmake-modules \
      libkf5guiaddons-dev libkf5configwidgets-dev libkf5windowsystem-dev kirigami2-dev \
      libkf5coreaddons-dev libkf5iconthemes-dev gettext qt3d5-dev libkf5kcmutils-dev \
      qt6-base-dev libkf6coreaddons-dev libkf6colorscheme-dev \
      libkf6config-dev libkf6guiaddons-dev libkf6i18n-dev libkf6iconthemes-dev \
      libkf6windowsystem-dev libkf6kcmutils-dev libkirigami-dev libkf6style-dev
git clone --single-branch --depth=1 https://github.com/4v3ngR/Glass.git
cd Glass
./install.sh

NixOS

To install Glass on NixOS, add the following line to your nixos flake

environment.systemPackages = with pkgs; [ glass-qt5 glass ];
qt.platformTheme = "qt5ct";

For home-manager, add the following line

qt.style.package = with pkgs; [ glass-qt5 glass ];
qt.platformTheme.name = "qtct";

To apply the theme, use qt5ct or qt6ct and select Glass

If you want to compile Glass from its source, do the following

  1. add inputs.glass.url = "github:4v3ngR/Glass"; to flake.nix

  2. use the following package names for home-manager or NixOS

inputs.glass.packages.${pkgs.system}.glass-qt5
inputs.glass.packages.${pkgs.system}.glass-qt6

Alpine Linux / postmarketOS

doas apk add --virtual build-deps bash build-base clang21-extra-tools git cmake extra-cmake-modules kdecoration-dev \
      kcmutils-dev kcolorscheme-dev kwindowsystem-dev kirigami-dev frameworkintegration-dev \
      kcmutils5-dev kirigami2-dev frameworkintegration5-dev qt5-qtx11extras-dev
git clone --single-branch --depth=1 https://github.com/4v3ngR/Glass.git
cd Glass
./install.sh
doas apk del build-deps

Known issues & solutions

Blurred icon rendering on Wayland with fractional scaling

On Wayland when scaling is set to >100% some icons appear blurred.

The fix for now until QT is updated is to add QT_SCALE_FACTOR_ROUNDING_POLICY=RoundPreferFloor into the file /etc/environment

Restart to apply the changes.

For further details see: https://bugs.kde.org/show_bug.cgi?id=479891

About

A transparent glass style for qt applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

No contributors

Languages

  • C++ 97.1%
  • CMake 1.9%
  • Other 1.0%