From f5395e7d932de12b0655cd8866e18db7c7f70d41 Mon Sep 17 00:00:00 2001 From: Tio TROM Date: Wed, 28 Sep 2022 14:24:11 +0200 Subject: [PATCH] Update 'fixes-package.install' --- fixes-package.install | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/fixes-package.install b/fixes-package.install index b4200c4..e31a741 100644 --- a/fixes-package.install +++ b/fixes-package.install @@ -1,9 +1,31 @@ post_install() { + + for line in 'QT_QPA_PLATFORMTHEME' 'QT_QUICK_CONTROLS_STYLE'; do + grep -q "^\s*$line=\"gtk2\"" /etc/environment || continue + if grep -q "^\s*$line=" /etc/environment; then + sed -i "s/^\s*$line=.*$/$line=\"gtk2\"" /etc/environment + else + echo "$line=\"gtk2\"" >> /etc/environment + fi +done + + find /usr/lib/systemd/user/ -name "fix-*.service" -type f -printf "%f\0" | xargs -0 systemctl --global enable echo "Warning: A restart is required to take effect" } post_upgrade() { + + for line in 'QT_QPA_PLATFORMTHEME' 'QT_QUICK_CONTROLS_STYLE'; do + grep -q "^\s*$line=\"gtk2\"" /etc/environment || continue + if grep -q "^\s*$line=" /etc/environment; then + sed -i "s/^\s*$line=.*$/$line=\"gtk2\"" /etc/environment + else + echo "$line=\"gtk2\"" >> /etc/environment + fi +done + + find /usr/lib/systemd/user/ -name "fix-*.service" -type f -printf "%f\0" | xargs -0 systemctl --global enable echo "Warning: A restart is required to take effect" }