adding a lot of guix things to better setup guix
A lot of these changes are for Guix not Nix, however, nix still works on the laptop so I'm going to reset the changes on the desktop to this commit so that Nix might work there for Camp.
This commit is contained in:
parent
bad4b948fb
commit
fe1e6c695b
87 changed files with 37132 additions and 38 deletions
|
@ -41,6 +41,8 @@ YOUR-USER-NAME ALL=(ALL) NOPASSWD:/run/current-system/profile/bin/chvt,/run/cur
|
|||
"sway"
|
||||
"dbus-glib"
|
||||
"hyprland"
|
||||
"mesa"
|
||||
"mesa-utils"
|
||||
"libvdpau"
|
||||
"android-udev-rules"
|
||||
"adb"
|
||||
|
@ -85,7 +87,8 @@ YOUR-USER-NAME ALL=(ALL) NOPASSWD:/run/current-system/profile/bin/chvt,/run/cur
|
|||
(using-setuid? #f)))
|
||||
|
||||
(set-xorg-configuration
|
||||
(xorg-configuration (keyboard-layout (keyboard-layout "us"))))
|
||||
(xorg-configuration (keyboard-layout (keyboard-layout "us"))
|
||||
(drivers '("modesetting" "mesa"))))
|
||||
|
||||
(service console-font-service-type
|
||||
(map (lambda (tty)
|
||||
|
|
|
@ -12,25 +12,39 @@
|
|||
# The guix version of dolphin isn't built for wayland and can't find the icon theme
|
||||
pmbootstrap
|
||||
element-desktop-wayland
|
||||
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
libvdpau-va-gl
|
||||
|
||||
#fonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
mplus-outline-fonts.githubRelease
|
||||
proggyfonts
|
||||
];
|
||||
|
||||
# programs.firefox = {
|
||||
# enable = true;
|
||||
# package = pkgs.firefox-wayland.override {
|
||||
# cfg = {
|
||||
# enableTridactylNative = true;
|
||||
# enablePlasmaBrowserIntegration = true;
|
||||
# };
|
||||
# };
|
||||
# profiles.chris = {
|
||||
# name = "default";
|
||||
# path = "chris.default";
|
||||
# isDefault = true;
|
||||
# };
|
||||
# };
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-wayland.override {
|
||||
cfg = {
|
||||
enableTridactylNative = true;
|
||||
enablePlasmaBrowserIntegration = true;
|
||||
};
|
||||
};
|
||||
profiles.chris = {
|
||||
name = "default";
|
||||
path = "chris.default";
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# home.file.".mozilla/native-messaging-hosts".source = "/home/chris/.nix-profile/lib/mozilla/native-messaging-hosts";
|
||||
home.file.".mozilla/native-messaging-hosts".source = "/home/chris/.nix-profile/lib/mozilla/native-messaging-hosts";
|
||||
|
||||
accounts.email = {
|
||||
maildirBasePath = "mail";
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#:use-module (pkgs emacs-xyz)
|
||||
#:use-module (pkgs tridactyl-native)
|
||||
#:use-module (pkgs phinger-cursors-theme)
|
||||
#:use-module (pkgs qt5ct-kde)
|
||||
#:use-module (pkgs kdenlive)
|
||||
#:use-module (home-services pipewire)
|
||||
#:use-module (gnu home)
|
||||
#:use-module (gnu home services)
|
||||
|
@ -15,11 +17,13 @@
|
|||
#:use-module (gnu home services shells)
|
||||
#:use-module (gnu home services xdg)
|
||||
#:use-module (gnu home services gnupg)
|
||||
#:use-module (gnu home services fontutils)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages vim)
|
||||
#:use-module (gnu packages rust-apps)
|
||||
#:use-module (gnu packages video)
|
||||
#:use-module (gnu packages gnupg)
|
||||
#:use-module (gnu packages kde)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix packages)
|
||||
|
@ -27,6 +31,26 @@
|
|||
#:use-module (guix build-system emacs)
|
||||
#:use-module ((guix licenses) #:prefix license:))
|
||||
|
||||
|
||||
;; (define snazzy-theme
|
||||
;; "A set of the Snazzy colors to be used in colorschemes"
|
||||
;; '((base00 . "#282a36")
|
||||
;; (base01 . "#34353e")
|
||||
;; (base02 . "#43454f")
|
||||
;; (base03 . "#78787e")
|
||||
;; (base04 . "#a5a5a9")
|
||||
;; (base05 . "#e2e4e5")
|
||||
;; (base05 . "#eff0eb")
|
||||
;; (base06 . "#f1f1f0")
|
||||
;; (base06 . "#ff5c57")
|
||||
;; (base09 . "#ff9f43")
|
||||
;; (base0A . "#f3f99d")
|
||||
;; (base0B . "#5af78e")
|
||||
;; (base0C . "#9aedfe")
|
||||
;; (base0D . "#57c7ff")
|
||||
;; (base0E . "#ff6ac1")
|
||||
;; (base0F . "#b2643c")))
|
||||
|
||||
(define home-packages
|
||||
(list "vim"
|
||||
"exa"
|
||||
|
@ -76,7 +100,7 @@
|
|||
"slurp"
|
||||
"imv"
|
||||
"phinger-cursors-theme"
|
||||
"firefox"
|
||||
;; "firefox"
|
||||
"icecat"
|
||||
"qutebrowser"
|
||||
"nyxt"
|
||||
|
@ -88,8 +112,19 @@
|
|||
"kdeconnect"
|
||||
"plasma"
|
||||
"dolphin"
|
||||
"ffmpegthumbs"
|
||||
"ffmpegthumbnailer"
|
||||
"kio-fuse"
|
||||
"kio-extras"
|
||||
"nautilus"
|
||||
"dconf"
|
||||
"dconf-editor"
|
||||
"tracker"
|
||||
"tracker-miners"
|
||||
"gvfs"
|
||||
"kfind"
|
||||
"ark"
|
||||
"kdenlive"
|
||||
"kdenlive-fix"
|
||||
"gimp"
|
||||
"mediainfo"
|
||||
;; "tridactyl-native"
|
||||
|
@ -244,8 +279,7 @@
|
|||
(plain-file "less-color" "export LESS=\"--RAW-CONTROL-CHARS\"")
|
||||
(plain-file "man-colors" "[[ -f ~/.LESS_TERMCAP ]] && . ~/.LESS_TERMCAP")
|
||||
(plain-file "starship" "source $HOME/.config/starship/init.sh")
|
||||
(plain-file "direnv" "eval \"$(direnv hook bash)\"
|
||||
")))))
|
||||
(plain-file "direnv" "eval \"$(direnv hook bash)\"")))))
|
||||
(simple-service 'extra-env-vars
|
||||
home-environment-variables-service-type
|
||||
`(("PATH" . "$PATH:/home/chris/bin:/home/chris/.nix-profile/bin")
|
||||
|
@ -291,6 +325,7 @@
|
|||
("btop" ,(local-file "../.config/bpytop" #:recursive? #t))
|
||||
("mpv" ,(local-file "../.config/mpv" #:recursive? #t))
|
||||
("blesh" ,(local-file "../.config/blesh" #:recursive? #t))
|
||||
("imv" ,(local-file "../.config/imv" #:recursive? #t))
|
||||
("starship" ,(local-file "../.config/starship" #:recursive? #t))
|
||||
("starship.toml" ,(local-file "../.config/starship.toml"))
|
||||
("guix/channels.scm" ,(local-file "channels.scm"))
|
||||
|
@ -298,6 +333,7 @@
|
|||
("fish/functions" ,(local-file "../.config/fish/functions" #:recursive? #t))
|
||||
("qt5ct/colors/snazzy.conf" ,(local-file "../.config/qt5ct/snazzy.conf"))
|
||||
("alacritty/alacritty.yml" ,(local-file "../.config/alacritty/alacritty.yml"))
|
||||
("qutebrowser" ,(local-file "../.config/qutebrowser" #:recursive? #t))
|
||||
("direnv/direnvrc" ,(plain-file "direnvrc" "\
|
||||
use_guixs() {
|
||||
eval \"$(guix shell \"$@\" --search-paths)\"
|
||||
|
@ -317,8 +353,20 @@ gtk-primary-button-warps-slider=true
|
|||
gtk-shell-shows-menubar=1
|
||||
gtk-theme-name=Breeze
|
||||
gtk-toolbar-style=3
|
||||
gtk-xft-dpi=98304
|
||||
"))))
|
||||
#gtk-xft-dpi=98304
|
||||
"))
|
||||
;; ("gtk-3.0/gtk.css" ,(plain-file "gtk.css" "
|
||||
|
||||
;; "))
|
||||
;; ("gtk-3.0/gtk-dark.css" ,(plain-file "gtk-dark.css"
|
||||
;; "@import url(\"dist/gtk.css\");"))
|
||||
("gtk-3.0/gtk.css" ,(local-file "../.config/gtk-3.0/gtk.css"))
|
||||
("gtk-3.0/gtk-dark.css" ,(local-file "../.config/gtk-3.0/gtk-dark.css"))
|
||||
("gtk-3.0/dist" ,(local-file "../.config/gtk-3.0/dist" #:recursive? #t))
|
||||
("gtk-3.0/gtk.gresource" ,(local-file "../.config/gtk-3.0/gtk.gresource"))
|
||||
("gtk-3.0/gtk.gresource.xml" ,(local-file "../.config/gtk-3.0/gtk.gresource.xml"))
|
||||
("gtk-3.0/assets" ,(local-file "../.config/gtk-3.0/assets" #:recursive? #t))
|
||||
("gtk-2.0" ,(local-file "../.config/gtk-2.0" #:recursive? #t))))
|
||||
(simple-service 'scripts
|
||||
home-files-service-type
|
||||
`(("bin" ,(local-file "../scripts" #:recursive? #t))
|
||||
|
@ -340,6 +388,14 @@ Inherits=phinger-cursors-light
|
|||
(default-cache-ttl-ssh 28800)
|
||||
(max-cache-ttl-ssh 28800)))
|
||||
|
||||
(simple-service 'additional-fonts-service
|
||||
home-fontconfig-service-type
|
||||
(list "~/.nix-profile/share/fonts"
|
||||
'(alias
|
||||
(family "monospace")
|
||||
(prefer
|
||||
(family "Liberation Mono")))))
|
||||
|
||||
(service home-xdg-user-directories-service-type
|
||||
(home-xdg-user-directories-configuration
|
||||
(videos "$HOME/vids")
|
||||
|
@ -373,10 +429,10 @@ Inherits=phinger-cursors-light
|
|||
("application/x-extension-xhtml" . "firefox.desktop")
|
||||
("application/xhtml+xml" . "firefox.desktop")
|
||||
("inode/directory" . "dolphin.desktop")
|
||||
("image/gif" . "imv.desktop")
|
||||
("image/jpeg" . "imv.desktop")
|
||||
("image/heif" . "imv.desktop")
|
||||
("image/png" . "imv.desktop")
|
||||
("image/gif" . "imv-rifle.desktop")
|
||||
("image/jpeg" . "imv-rifle.desktop")
|
||||
("image/heif" . "imv-rifle.desktop")
|
||||
("image/png" . "imv-rifle.desktop")
|
||||
("audio/vorbis" . "mpv-slow.desktop")
|
||||
("audio/mp3" . "mpv-slow.desktop")
|
||||
("audio/flac" . "mpv-slow.desktop")
|
||||
|
@ -402,10 +458,10 @@ Inherits=phinger-cursors-light
|
|||
("application/x-extension-xht" . "firefox.desktop")
|
||||
("application/x-extension-xhtml" . "firefox.desktop")
|
||||
("application/xhtml+xml" . "firefox.desktop")
|
||||
("image/gif" . "imv.desktop")
|
||||
("image/jpeg" . "imv.desktop")
|
||||
("image/heif" . "imv.desktop")
|
||||
("image/png" . "imv.desktop")
|
||||
("image/gif" . "imv-rifle.desktop")
|
||||
("image/jpeg" . "imv-rifle.desktop")
|
||||
("image/heif" . "imv-rifle.desktop")
|
||||
("image/png" . "imv-rifle.desktop")
|
||||
("audio/vorbis" . "mpv-slow.desktop")
|
||||
("audio/mp3" . "mpv-slow.desktop")
|
||||
("audio/flac" . "mpv-slow.desktop")
|
||||
|
@ -417,6 +473,12 @@ Inherits=phinger-cursors-light
|
|||
(name "MPV for Audio and Streams")
|
||||
(type 'application)
|
||||
(config
|
||||
'((exec . "mpv --profile=slow %U"))))))))
|
||||
'((exec . "mpv --profile=slow %U"))))
|
||||
(xdg-desktop-entry
|
||||
(file "imv-rifle")
|
||||
(name "IMV rifling all files")
|
||||
(type 'application)
|
||||
(config
|
||||
'((exec . "rifle-imv %U"))))))))
|
||||
(service home-pipewire-service-type)
|
||||
(service home-dbus-service-type))))
|
||||
|
|
40
guix/pkgs/dolphin-xyz.scm
Normal file
40
guix/pkgs/dolphin-xyz.scm
Normal file
|
@ -0,0 +1,40 @@
|
|||
(define-module (dolphin-xyz)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages qt)
|
||||
#:use-module (gnu packages kde-systemtools)
|
||||
#:use-module (guix build-system qt)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix gexp)
|
||||
)
|
||||
|
||||
(define-public dolphin-xyz
|
||||
(package
|
||||
(inherit dolphin)
|
||||
(inputs
|
||||
(list baloo
|
||||
baloo-widgets
|
||||
kactivities
|
||||
kbookmarks
|
||||
kcmutils
|
||||
kcompletion
|
||||
kconfig
|
||||
kcoreaddons
|
||||
kcrash
|
||||
kdbusaddons
|
||||
ki18n
|
||||
kiconthemes
|
||||
kinit
|
||||
kio
|
||||
knewstuff
|
||||
knotifications
|
||||
kparts
|
||||
ktextwidgets
|
||||
kuserfeedback
|
||||
kwindowsystem
|
||||
breeze-icons ;; default icon set
|
||||
phonon
|
||||
qtbase-5
|
||||
qtwayland
|
||||
wayland
|
||||
solid))))
|
19
guix/pkgs/kdenlive.scm
Normal file
19
guix/pkgs/kdenlive.scm
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
|
||||
(define-module (pkgs kdenlive)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix build-system qt)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages kde)
|
||||
#:use-module (gnu packages kde-frameworks)
|
||||
#:use-module (guix gexp))
|
||||
|
||||
(define-public kdenlive-fix
|
||||
(package
|
||||
(inherit kdenlive)
|
||||
(name "kdenlive-fix")
|
||||
(inputs (modify-inputs
|
||||
(package-inputs kdenlive)
|
||||
(append kirigami kirigami-addons)))))
|
||||
|
||||
kdenlive-fix
|
186
guix/pkgs/patches/qt5ct-kde.patch
Normal file
186
guix/pkgs/patches/qt5ct-kde.patch
Normal file
|
@ -0,0 +1,186 @@
|
|||
Index: qt5ct/CMakeLists.txt
|
||||
===================================================================
|
||||
--- qt5ct/CMakeLists.txt (revision 678)
|
||||
+++ qt5ct/CMakeLists.txt (working copy)
|
||||
@@ -25,8 +25,11 @@
|
||||
|
||||
ADD_DEFINITIONS(-DQT_DISABLE_DEPRECATED_BEFORE=0x050C00 -DUSE_WIDGETS)
|
||||
|
||||
-find_package(Qt5 ${QT_MINIMUM_VERSION} COMPONENTS Widgets Concurrent LinguistTools DBus ThemeSupport REQUIRED)
|
||||
+find_package(Qt5 ${QT_MINIMUM_VERSION} COMPONENTS Widgets Concurrent LinguistTools DBus QuickControls2 ThemeSupport REQUIRED)
|
||||
find_package(Qt5Gui ${QT_MINIMUM_VERSION} CONFIG REQUIRED Private)
|
||||
+find_package(KF5Config REQUIRED)
|
||||
+find_package(KF5ConfigWidgets REQUIRED)
|
||||
+find_package(KF5IconThemes REQUIRED)
|
||||
|
||||
get_target_property(QT_LRELEASE_EXECUTABLE Qt5::lrelease IMPORTED_LOCATION)
|
||||
|
||||
@@ -45,7 +48,9 @@
|
||||
message(FATAL_ERROR "Could NOT find qtpaths executable")
|
||||
endif()
|
||||
|
||||
-execute_process(COMMAND ${QT_QTPATHS_EXECUTABLE} --plugin-dir OUTPUT_VARIABLE PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+if(NOT PLUGINDIR)
|
||||
+ execute_process(COMMAND ${QT_QTPATHS_EXECUTABLE} --plugin-dir OUTPUT_VARIABLE PLUGINDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+endif()
|
||||
message(STATUS "Plugin path: " ${PLUGINDIR})
|
||||
|
||||
message(STATUS "Generating translations ...")
|
||||
Index: qt5ct/src/qt5ct/appearancepage.cpp
|
||||
===================================================================
|
||||
--- qt5ct/src/qt5ct/appearancepage.cpp (revision 678)
|
||||
+++ qt5ct/src/qt5ct/appearancepage.cpp (working copy)
|
||||
@@ -378,7 +378,7 @@
|
||||
{
|
||||
QDir dir(path);
|
||||
dir.setFilter(QDir::Files);
|
||||
- dir.setNameFilters(QStringList() << "*.conf");
|
||||
+ dir.setNameFilters(QStringList() << "*.conf" << "*.colors");
|
||||
|
||||
for(const QFileInfo &info : dir.entryInfoList())
|
||||
{
|
||||
Index: qt5ct/src/qt5ct-common/qt5ct.cpp
|
||||
===================================================================
|
||||
--- qt5ct/src/qt5ct-common/qt5ct.cpp (revision 678)
|
||||
+++ qt5ct/src/qt5ct-common/qt5ct.cpp (working copy)
|
||||
@@ -112,6 +112,7 @@
|
||||
for(const QString &p : QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation))
|
||||
{
|
||||
paths << (p + QLatin1String("/qt5ct/colors"));
|
||||
+ paths << (p + QLatin1String("/color-schemes"));
|
||||
}
|
||||
paths << QLatin1String(QT5CT_DATADIR"/qt5ct/colors");
|
||||
paths.removeDuplicates();
|
||||
Index: qt5ct/src/qt5ct-qtplugin/CMakeLists.txt
|
||||
===================================================================
|
||||
--- qt5ct/src/qt5ct-qtplugin/CMakeLists.txt (revision 678)
|
||||
+++ qt5ct/src/qt5ct-qtplugin/CMakeLists.txt (working copy)
|
||||
@@ -9,5 +9,5 @@
|
||||
|
||||
add_library(qt5ct-qtplugin MODULE ${app_SRCS})
|
||||
set_target_properties(qt5ct-qtplugin PROPERTIES OUTPUT_NAME qt5ct)
|
||||
-target_link_libraries(qt5ct-qtplugin PRIVATE Qt5::Widgets Qt5::GuiPrivate Qt5::DBus Qt5::ThemeSupportPrivate qt5ct-common)
|
||||
+target_link_libraries(qt5ct-qtplugin PRIVATE Qt5::Widgets Qt5::GuiPrivate Qt5::DBus Qt5::QuickControls2 Qt5::ThemeSupportPrivate KF5::ConfigCore KF5::ConfigWidgets KF5::IconThemes qt5ct-common)
|
||||
install(TARGETS qt5ct-qtplugin DESTINATION ${PLUGINDIR}/platformthemes)
|
||||
Index: qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp
|
||||
===================================================================
|
||||
--- qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp (revision 678)
|
||||
+++ qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.cpp (working copy)
|
||||
@@ -45,6 +45,7 @@
|
||||
#endif
|
||||
#include <QFile>
|
||||
#include <QFileSystemWatcher>
|
||||
+#include <QQuickStyle>
|
||||
|
||||
#include "qt5ct.h"
|
||||
#include "qt5ctplatformtheme.h"
|
||||
@@ -58,6 +59,11 @@
|
||||
#include <QStringList>
|
||||
#include <qpa/qplatformthemefactory_p.h>
|
||||
|
||||
+#include <ksharedconfig.h>
|
||||
+#include <kcolorscheme.h>
|
||||
+#include <kiconengine.h>
|
||||
+#include <kiconloader.h>
|
||||
+
|
||||
Q_LOGGING_CATEGORY(lqt5ct, "qt5ct", QtWarningMsg)
|
||||
|
||||
//QT_QPA_PLATFORMTHEME=qt5ct
|
||||
@@ -73,6 +79,10 @@
|
||||
QMetaObject::invokeMethod(this, "createFSWatcher", Qt::QueuedConnection);
|
||||
#endif
|
||||
QGuiApplication::setFont(m_generalFont);
|
||||
+ //if the user has explicitly set something else, don't interfere
|
||||
+ if (QQuickStyle::name().isEmpty()) {
|
||||
+ QQuickStyle::setStyle(QLatin1String("org.kde.desktop"));
|
||||
+ }
|
||||
}
|
||||
qCDebug(lqt5ct) << "using qt5ct plugin";
|
||||
#ifdef QT_WIDGETS_LIB
|
||||
@@ -79,6 +89,7 @@
|
||||
if(!QStyleFactory::keys().contains("qt5ct-style"))
|
||||
qCCritical(lqt5ct) << "unable to find qt5ct proxy style";
|
||||
#endif
|
||||
+ QCoreApplication::instance()->installEventFilter(this);
|
||||
}
|
||||
|
||||
Qt5CTPlatformTheme::~Qt5CTPlatformTheme()
|
||||
@@ -185,6 +196,11 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+QIconEngine *Qt5CTPlatformTheme::createIconEngine(const QString &iconName) const
|
||||
+{
|
||||
+ return new KIconEngine(iconName, KIconLoader::global());
|
||||
+}
|
||||
+
|
||||
void Qt5CTPlatformTheme::applySettings()
|
||||
{
|
||||
if(!QGuiApplication::desktopSettingsAware() || m_isIgnored)
|
||||
@@ -299,7 +315,15 @@
|
||||
if(!schemePath.isEmpty() && settings.value("custom_palette", false).toBool())
|
||||
{
|
||||
schemePath = Qt5CT::resolvePath(schemePath); //replace environment variables
|
||||
- m_palette = new QPalette(loadColorScheme(schemePath));
|
||||
+ if(schemePath.endsWith(".colors"))
|
||||
+ {
|
||||
+ m_palette = new QPalette(KColorScheme::createApplicationPalette(KSharedConfig::openConfig(schemePath)));
|
||||
+ qApp->setProperty("KDE_COLOR_SCHEME_PATH", schemePath);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ m_palette = new QPalette(loadColorScheme(schemePath));
|
||||
+ }
|
||||
}
|
||||
m_iconTheme = settings.value("icon_theme").toString();
|
||||
//load dialogs
|
||||
@@ -464,3 +488,30 @@
|
||||
|
||||
return customPalette;
|
||||
}
|
||||
+
|
||||
+bool Qt5CTPlatformTheme::eventFilter(QObject *obj, QEvent *e)
|
||||
+{
|
||||
+ if(obj == qApp && e->type() == QEvent::DynamicPropertyChange)
|
||||
+ {
|
||||
+ QDynamicPropertyChangeEvent *ee = static_cast<QDynamicPropertyChangeEvent*>(e);
|
||||
+ if(ee->propertyName() == "KDE_COLOR_SCHEME_PATH")
|
||||
+ {
|
||||
+ if(qApp->property("KDE_COLOR_SCHEME_PATH").isNull())
|
||||
+ {
|
||||
+ QSettings settings(Qt5CT::configFile(), QSettings::IniFormat);
|
||||
+ settings.beginGroup("Appearance");
|
||||
+ QString schemePath = settings.value("color_scheme_path").toString();
|
||||
+ if(!schemePath.isEmpty() && settings.value("custom_palette", false).toBool())
|
||||
+ {
|
||||
+ schemePath = Qt5CT::resolvePath(schemePath); //replace environment variables
|
||||
+ if(schemePath.endsWith(".colors"))
|
||||
+ {
|
||||
+ qApp->setProperty("KDE_COLOR_SCHEME_PATH", schemePath);
|
||||
+ applySettings();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return QObject::eventFilter(obj, e);
|
||||
+}
|
||||
Index: qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h
|
||||
===================================================================
|
||||
--- qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h (revision 678)
|
||||
+++ qt5ct/src/qt5ct-qtplugin/qt5ctplatformtheme.h (working copy)
|
||||
@@ -87,10 +87,13 @@
|
||||
//virtual QPixmap fileIconPixmap(const QFileInfo &fileInfo, const QSizeF &size,
|
||||
// QPlatformTheme::IconOptions iconOptions = 0) const;
|
||||
|
||||
- //virtual QIconEngine *createIconEngine(const QString &iconName) const;
|
||||
+ virtual QIconEngine *createIconEngine(const QString &iconName) const;
|
||||
//virtual QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const;
|
||||
//virtual QString standardButtonText(int button) const;
|
||||
|
||||
+protected:
|
||||
+ bool eventFilter(QObject *obj, QEvent *e) override;
|
||||
+
|
||||
private slots:
|
||||
void applySettings();
|
||||
#ifdef QT_WIDGETS_LIB
|
21
guix/pkgs/qt5ct-kde.scm
Normal file
21
guix/pkgs/qt5ct-kde.scm
Normal file
|
@ -0,0 +1,21 @@
|
|||
(define-module (pkgs qt5ct-kde)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix build-system qt)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages qt)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (srfi srfi-1))
|
||||
|
||||
(define-public qt5ct-kde
|
||||
(package
|
||||
(inherit qt5ct)
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri
|
||||
(string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
|
||||
(patches (search-patches "qt5ct-kde.patch"))
|
||||
(sha256
|
||||
(base32 "14742vs32m98nbfb5mad0i8ciff5f45gfcb5v03p4hh2dvhhqgfn"))))))
|
Loading…
Add table
Add a link
Reference in a new issue