155 Commits

Author SHA1 Message Date
b0a58be284 added qt6gtk2-tromjaro 2025-06-24 15:26:48 +00:00
4cac9f2107 add baack qt5gtk2 2025-04-09 13:39:54 +00:00
6fa33e8a2a Clean up
Replaced qt6gtk2-git with qt6gtk2. Removed qt5gtk2.
2025-04-09 12:53:17 +00:00
1a34c770c8 remove a deprecated dependency 2025-03-26 22:01:25 +00:00
36a979547b fix the highDPI issue 2024-06-03 13:46:03 +00:00
ef045c1265 Merge pull request 'Make sure that ~/.profile will be run at boot/login' () from rokosun-patch-1 into main
Reviewed-on: 
2024-06-03 13:44:17 +00:00
7d189e0c06 Make sure that ~/.profile will be run at boot/login
Fixes issues with highDPI.
Added better comments and fixed a small bug.
2024-06-03 10:18:08 +00:00
87e64585b0 Update PKGBUILD 2024-01-06 21:47:51 +00:00
e8d7c816d0 added yad as dependency 2024-01-05 10:39:32 +00:00
2ae3788d3c Update PKGBUILD 2023-11-24 20:57:59 +01:00
c0e90900c4 icons update 2023-11-23 01:20:45 +01:00
5f89952f3f Update PKGBUILD 2023-11-07 01:44:23 +01:00
02d11a58d5 repalce qqc2-desktop-style with qqc2-desktop-style5 2023-11-07 01:44:11 +01:00
f9f5c95a7b Update PKGBUILD 2023-11-07 01:37:06 +01:00
b39dfffa5e revert 2a53d23139
revert delete the qqc2-desktop-style dependency
2023-11-06 16:36:55 +01:00
2a53d23139 delete the qqc2-desktop-style dependency 2023-11-06 16:28:53 +01:00
f989a2e1be revert 7c457fd1f7
revert removed the conflicts
2023-11-06 16:28:25 +01:00
7c457fd1f7 removed the conflicts 2023-11-06 14:41:24 +01:00
2a412d38c2 Update PKGBUILD 2023-10-27 15:19:07 +02:00
fb1c550768 Merge pull request 'Don't set the XFWM theme twice' () from rokosun-patch-1 into main
Reviewed-on: 
2023-10-27 15:18:39 +02:00
0600a8f119 Don't set the XFWM theme twice
Now the script won't set the XFWM theme twice on hiDPI systems every time the user changes their theme.
Also replaced read only variables inside loops with mutable ones.
2023-10-25 12:52:28 +02:00
b741df884e removed 'libadwaita-without-adwaita-git' 2023-10-16 01:30:18 +02:00
3195288734 Update PKGBUILD 2023-10-15 23:44:49 +02:00
de69301c82 Merge pull request 'Create symlink instead of copying directory' () from rokosun-patch-1 into main
Reviewed-on: 
2023-10-15 23:44:19 +02:00
a6dfcff64f Create symlink instead of copying directory 2023-10-15 10:48:52 +02:00
dd6743836e added libadwaita-without-adwaita-git conflict 2023-10-15 00:34:08 +02:00
573d116696 added conflicts 2023-10-15 00:27:26 +02:00
e3da289b27 switching to qt6gtk2 2023-10-15 00:26:55 +02:00
5c9e44bbcb typo 2023-10-15 00:17:50 +02:00
88d7f94095 replaced qt5-styleplugins with qt5gkt2 2023-10-15 00:09:28 +02:00
7e57c04518 Merge pull request 'Sync gtk-4.0 directory to fix theming' () from rokosun-patch-1 into main
Reviewed-on: 
2023-10-14 22:26:03 +02:00
b2a3bb83b4 Sync gtk-4.0 directory to fix theming
Also removed old code for flatpak_icons_dir which is not needed anymore.
2023-10-14 22:06:49 +02:00
07f4fc3c64 Merge pull request 'Don't change XFWM theme or mouse cursor size on reboot' () from rokosun-patch-1 into main
Reviewed-on: 
2023-10-13 23:58:53 +02:00
af5514884e Don't change XFWM theme or mouse cursor size on reboot
Also made the code easier to read by using descriptive functions and read-only variables. Removed some unnecessary comments that cluttered the code.
2023-10-12 16:55:05 +02:00
43221f6357 Update PKGBUILD 2023-10-04 23:22:02 +02:00
03e57e6eaf added qt5-styleplugins back 2023-10-04 23:21:55 +02:00
ab29eb9af5 replaced some dependencies
qt5style plugin with qt5gtk2 and qt6gtk2 with qt6gtk2-git
2023-10-04 14:53:20 +02:00
357e464269 removed the quick controls gtk2 force because it was breaking the qt6 apps 2023-10-04 14:50:10 +02:00
d4c07e8919 Update PKGBUILD 2023-08-10 18:38:34 +02:00
8b63ce497f Update bin/periodic/fix-theming 2023-08-10 18:38:06 +02:00
08a72d4659 better QT fix 2023-08-10 17:10:16 +02:00
05f4dae9e3 added QT scaling support 2023-08-10 17:03:39 +02:00
7d12c48835 Update PKGBUILD 2023-08-10 01:26:32 +02:00
db8328bd8b remove the QT support for now because it is broken 2023-08-10 01:26:19 +02:00
358094c4bf Update PKGBUILD 2023-08-09 15:57:46 +02:00
cfa7771ec0 Update PKGBUILD 2023-08-08 17:43:14 +02:00
ac76a669a9 Update bin/periodic/fix-theming 2023-08-08 17:06:38 +02:00
c6037978e6 Update PKGBUILD 2023-08-08 17:03:00 +02:00
7b07f05111 revert 82cd64a07d
revert removed the icons patch
2023-08-08 16:59:31 +02:00
b800bf0bcc Scales up the mouse pointer too plus other fixes 2023-08-08 15:58:10 +02:00
d389039f0d Update PKGBUILD 2023-08-08 03:53:24 +02:00
82cd64a07d removed the icons patch 2023-08-08 00:44:37 +02:00
56e049367d Update PKGBUILD 2023-08-08 00:42:23 +02:00
b7c64c8305 Update PKGBUILD 2023-08-06 23:44:19 +02:00
0cdccf7d72 Roko's improvments 2023-08-06 15:08:58 +02:00
eSh
3e259fb09e Bump package version 2023-08-06 02:29:58 +02:00
66c21a8192 Merge pull request 'Cleanup' () from theme-folder-sync into main
Reviewed-on: 
2023-08-06 02:25:07 +02:00
eSh
0fffd21076 Delete systemd/services/fix-flatpaks-theming.service 2023-08-06 02:23:51 +02:00
dabc52d7c2 Merge pull request 'Move themes and icons folder syncing to the theming script' () from theme-folder-sync into main
Reviewed-on: 
2023-08-06 02:19:18 +02:00
eSh
72dc4f5c0d Delete bin/periodic/fix-flatpaks-theming 2023-08-06 02:15:26 +02:00
eSh
c2fc6dd83b add themes and icons folder sync 2023-08-06 02:14:02 +02:00
d3cddde72f better flatpak handling 2023-08-05 20:25:03 +02:00
d63a3ccf33 flatpak fixes 2023-08-04 19:18:45 +02:00
4811e675d8 many improvements 2023-08-04 19:15:59 +02:00
b6f7ffccba Update PKGBUILD 2023-08-03 23:11:35 +02:00
3c16633482 improvements from roko 2023-08-03 23:09:23 +02:00
17237c513b a bunch of fixes 2023-08-03 17:06:26 +02:00
5a4ab6f90e roko's changes 2023-08-03 16:42:27 +02:00
b521a23108 simpliffied code plus fix for the libadwaita theming 2023-08-03 16:40:26 +02:00
68321075f6 mor compatibility with the theming 2023-08-03 03:19:16 +02:00
b7ff344fe4 changed 1 icon 2023-08-02 04:49:43 +02:00
7586338b19 tblock icon fix 2023-06-04 16:01:08 +02:00
e1025ea57a bip sound mute improvement 2023-06-04 15:26:45 +02:00
b666bb94db improve the bip sound removal script 2023-06-04 15:26:24 +02:00
4054011068 cleaned and improved thezombie icons fixes by Roko 2023-02-08 13:42:59 +01:00
3a669f0664 Merge pull request 'Clean code and useful comments' () from rokosun-patch-1 into main
Reviewed-on: 
2023-02-08 13:42:19 +01:00
a0fd0f4856 Add support for all package managers by using $XDG_DATA_DIRS instead
Automatically find out all other_applications_dirs by looking at the $XDG_DATA_DIRS environment variable.
Also fix bug by declaring variables separately.
2023-02-06 19:50:58 +01:00
fb3b3e1cf5 Clean code and useful comments
Changed a lot of things but mostly to make the code easy to read and understand.
2023-02-04 08:33:57 +01:00
3140881902 one small icon addition 2023-02-03 23:26:31 +01:00
96761d6425 update for the new icons 2023-01-29 16:22:14 +01:00
249cbe2cc6 adding rokos commit 2022-12-20 21:44:45 +01:00
21b0d7f704 Merge pull request 'Use the -u option in sort, simplify array $existing_dirs' () from rokosun-patch-1 into main
Reviewed-on: 
2022-12-20 21:32:58 +01:00
1b93906376 Use the -u option in sort, simplify array $existing_dirs 2022-12-14 13:37:20 +01:00
d56fc7627b Update 'PKGBUILD' 2022-10-06 02:22:53 +02:00
6e124a74f0 Add back the newline character at the end of files ()
Reviewed-on: 
2022-10-02 15:29:49 +02:00
1c40099be8 Merge pull request 'Avoid repeating mkdir command' () from rokosun-patch-2 into main
Reviewed-on: 
2022-10-02 03:27:18 +02:00
6dea6c5a89 Merge pull request 'Remove unnecessary if statements' () from rokosun-patch-1 into main
Reviewed-on: 
2022-10-02 03:26:53 +02:00
f9d3bdbc08 Avoid repeating mkdir command 2022-10-01 18:43:10 +02:00
99c46b44ab Remove unnecessary if statements 2022-10-01 18:30:00 +02:00
8ae2c3d651 fixing the no .themes folder in Home 2022-10-01 01:53:25 +02:00
b4d8fccb7d Merge pull request 'create the .themes directory if it does not exist' () from tio-patch-1 into main
Reviewed-on: 
2022-10-01 01:52:59 +02:00
e966e1b6ba create the .themes directory if it does not exist 2022-10-01 01:46:59 +02:00
c69a3bb163 Update 'PKGBUILD' 2022-09-29 21:39:21 +02:00
d7a1e09a9a Deleted the hooks and scripts for reinstall-for-qt.
Reviewed-on: 

We do it without them now. Thus no more deleting of the database lock file.
2022-09-29 21:38:58 +02:00
bcf281ea47 Delete 'alpm-hooks/reinstall-for-qt6.hook' 2022-09-29 20:30:52 +02:00
87ea2f57ff Delete 'alpm-hooks/reinstall-for-qt5.hook' 2022-09-29 20:30:45 +02:00
94eee04395 Delete 'bin/standalone/reinstall-for-qt6' 2022-09-29 20:30:31 +02:00
56d4691663 Delete 'bin/standalone/reinstall-for-qt5' 2022-09-29 20:28:36 +02:00
f64c7a0467 Update 'PKGBUILD' 2022-09-29 19:03:36 +02:00
864d69b582 Merge pull request 'testing' () from testing into main
Reviewed-on: 
2022-09-29 19:03:13 +02:00
3cf00d0cd2 small typo 2022-09-29 18:19:19 +02:00
9fa5ce277e Add 'alpm-hooks/reinstall-for-qt6.hook' 2022-09-29 17:52:23 +02:00
1a9ed580a0 Update 'alpm-hooks/reinstall-for-qt5.hook' 2022-09-29 17:52:01 +02:00
c07cb59ff0 Add 'bin/standalone/reinstall-for-qt6' 2022-09-29 17:51:19 +02:00
4c96bb9406 Update 'bin/standalone/reinstall-for-qt5' 2022-09-29 17:50:55 +02:00
700235c52e Using the AUR to build these packages
They need to be built against the system's qt5-base and qt6-base versions, else all qt apps will fail to work
2022-09-29 17:33:48 +02:00
9f9713a673 Update 'PKGBUILD' 2022-09-29 00:03:38 +02:00
11f5d9da18 removed timeshift autosnap config 2022-09-28 22:25:01 +02:00
58b415ae8d Delete 'timeshift-autosnap.conf' 2022-09-28 22:24:35 +02:00
275b811f0f added timeshift-autosnap.conf file 2022-09-28 18:02:05 +02:00
2268c4c2bd Add 'timeshift-autosnap.conf' 2022-09-28 17:57:22 +02:00
ca054b9b6e added export QT_AUTO_SCREEN_SCALE_FACTOR=1 2022-09-28 17:55:45 +02:00
a729acbbef added "xset b off" to remove the beep sound 2022-09-28 17:47:28 +02:00
d909158646 No need to edit qt configuration files anymore 2022-09-28 16:28:05 +02:00
61afd40bfa Update 'PKGBUILD' 2022-09-28 15:57:47 +02:00
66feb5daf6 added tromjaro-fixes.sh 2022-09-28 15:56:31 +02:00
af82c8bd40 Update 'tromjaro-fixes.sh' 2022-09-28 15:46:39 +02:00
2f029b03a7 create tromjaro-fixes.sh 2022-09-28 15:43:44 +02:00
22bcfe821b Update 'PKGBUILD' 2022-09-28 15:42:16 +02:00
fd94f7ade8 added qqc2-desktop-style as dependency 2022-09-28 03:06:16 +02:00
9fee6265ba Update 'PKGBUILD' 2022-09-22 22:21:13 +02:00
9f1b15705f Update 'PKGBUILD' 2022-09-22 20:57:49 +02:00
104755ce40 Merge pull request 'create qt configuration files if it doesn't exist' () from rokosun-patch-1 into main
Reviewed-on: 
2022-09-22 17:02:41 +02:00
00325aa3c0 better handling of qt configuration files 2022-09-22 16:51:45 +02:00
c24e3da46e Update 'PKGBUILD' 2022-09-22 14:28:38 +02:00
1556b8b477 Update 'PKGBUILD' 2022-09-22 01:46:01 +02:00
84a1fbb00d Merge pull request 'added zafiro icon fix' () from tio-patch-1 into main
Reviewed-on: 
2022-09-22 01:22:39 +02:00
4a7333bbdb Update 'PKGBUILD' 2022-09-22 01:22:26 +02:00
a5c8229541 added zafiro icon fix 2022-09-22 00:44:49 +02:00
1a56d813dd create qt configuration files if it doesn't exist 2022-09-21 19:56:17 +02:00
cc045e6a93 Update 'PKGBUILD' 2022-09-21 15:00:56 +02:00
9dceaf275d added more dependencies 2022-09-20 13:13:04 +02:00
b0e26d4bdb bunch of fixes and improvements 2022-09-20 02:20:51 +02:00
7901a99abb Merge pull request 'reinstall-for-qt can only be run from pacman/pamac' () from rokosun-patch-2 into main
Reviewed-on: 
2022-09-20 02:18:18 +02:00
93a530ee36 reinstall-for-qt can only be run from pacman/pamac 2022-09-20 02:17:27 +02:00
4d115e390c Update 'systemd/services/fix-zombie-appicons.service' 2022-09-20 02:12:03 +02:00
b0190ff9c3 Merge pull request 'New code for fix-tweaked-desktop-files' () from fix-tweaked-desktop-files into main
Reviewed-on: 
2022-09-20 02:10:54 +02:00
391aba7869 Merge pull request 'Listen for more specific events using inotifywait' () from rokosun-patch-1 into main
Reviewed-on: 
2022-09-20 02:10:43 +02:00
fbfc7b5d08 Change name to "fix-zombie-appicons" 2022-09-20 02:06:23 +02:00
ca46fdc0d2 Make directores where possible 2022-09-20 01:44:56 +02:00
dfb1f44cbe small bug fixes 2022-09-20 01:09:11 +02:00
1a1819cf05 New code for fix-tweaked-desktop-files 2022-09-19 20:35:32 +02:00
275a4eebe7 Listen for more specific events using inotifywait
Also implemented some changes suggested by [Shellcheck](https://github.com/koalaman/shellcheck)
2022-09-19 14:09:49 +02:00
5c66881c3e RoKoMa 2022-09-19 00:49:31 +02:00
eSh
9860bd343b Merge branch 'rokosun-patch-1' into main 2022-09-19 00:44:39 +02:00
06ccad7d89 Update 'bin/periodic/fix-theming' 2022-09-19 00:40:44 +02:00
d44db40e3e Merge pull request 'Use the -m option in xfconf-query to monitor for changes' () from rokosun-patch-1 into main
Reviewed-on: 
2022-09-19 00:40:13 +02:00
cea6814e26 Merge pull request 'Watch for the changes in themes directories' () from watch-for-themes-update into main
Reviewed-on: 
2022-09-19 00:28:51 +02:00
eSh
a15086f7a6 watch for the changes in themes directories 2022-09-18 23:44:59 +02:00
73471917ef Use the -m option in xfconf-query to monitor for changes
I also improved the overall code syntax, there's no need for the old functions anymore.
2022-09-18 22:05:57 +02:00
2e44c5760f Update 'PKGBUILD' 2022-09-18 19:52:45 +02:00
5a66e4038e Update 'bin/periodic/fix-flatpaks-theming' 2022-09-18 19:52:31 +02:00
4d0deb3361 Update 'PKGBUILD' 2022-09-18 19:32:33 +02:00
b20111e686 inotify-tools as dependency 2022-09-18 19:32:19 +02:00
4e037213ed new rsync method 2022-09-18 19:31:38 +02:00
14 changed files with 387 additions and 170 deletions

@ -9,4 +9,4 @@ remove:
pamac-installer --remove tromjaro-fixes
clean:
$(RM) -rf src/ pkg/ *.tar.xz
$(RM) -rf src/ pkg/ *.tar.xz

@ -1,19 +1,27 @@
# Maintainer: TROM <contact@tromsite.com>
pkgname=tromjaro-fixes
pkgver=1.2.0
pkgrel=1
pkgver=3
pkgrel=2
pkgdesc="Various fixes for TROMjaro OS"
arch=(any)
url=""
license=(unknown)
depends=('xfce4-appfinder'
'xdotool'
'rsync')
'rsync'
'inotify-tools'
'qt6gtk2-tromjaro'
'qt5gtk2'
'yad')
conflicts=('qt5-styleplugins')
provides=('tromjaro-fixes')
backup=()
options=(!strip)
source=('scalable.zip::https://www.drive.tromsite.com/s/y8Gm7q6wLrXmtEN/download'
'tromjaro-fixes.sh')
sha256sums=('SKIP'
'SKIP')
install='fixes-package.install'
prepare() {
cp -R ../bin ../flatpak-overrides ../alpm-hooks ../systemd .
}
@ -35,4 +43,17 @@ package() {
# copy systemd units
install -d ${pkgdir}/usr/lib/systemd/user
install -Dm644 ${srcdir}/systemd/services/* ${pkgdir}/usr/lib/systemd/user
# copy zafiro dark icons
install -d ${pkgdir}/usr/local/share/icons/zafiro-dark/apps/scalable
install -Dm755 ${srcdir}/scalable/* ${pkgdir}/usr/local/share/icons/zafiro-dark/apps/scalable
# copy zafiro icons
install -d ${pkgdir}/usr/local/share/icons/zafiro/apps/scalable
install -Dm755 ${srcdir}/scalable/* ${pkgdir}/usr/local/share/icons/zafiro/apps/scalable
# copy tromjaro-fixes.sh
install -d ${pkgdir}/etc/profile.d/
install -Dm644 ${srcdir}/tromjaro-fixes.sh ${pkgdir}/etc/profile.d/
}

@ -8,4 +8,4 @@ Target = *
[Action]
Description = Refreshing the chaotic-aur keyring...
When = PreTransaction
Exec = /usr/bin/fix-chaotic-keyring
Exec = /usr/bin/fix-chaotic-keyring

@ -1,11 +0,0 @@
[Trigger]
Operation = Upgrade
Type = Package
Target = qt5-base
Target = qt6-base
[Action]
Description = Reinstalling needed packages for theming QT applications...
When = PostTransaction
Exec = /usr/bin/reinstall-for-qt

@ -1,7 +0,0 @@
#!/bin/sh
while :; do
rm -r ~/.themes/* 2> /dev/null
rsync -av --progress /usr/share/themes/* ~/.themes/ --exclude Windowck
rsync -av --progress ~/.local/share/themes/* ~/.themes/ --exclude Windowck-dark
sleep 600
done

@ -1,44 +1,229 @@
#!/bin/sh
#!/bin/bash
# shellcheck disable=SC2016
# This script will sync your XFCE theme & font to work systemwide and in
# a consistent manner accross different apps. It also improves
# the highDPI scaling to give you a better experience.
# Exit out if the same script is already running in the background
pidof -sq -o %PPID -x "$(basename "$0")" && exit
# Set the directory/file paths
declare -r flatpak_themes_dir="$HOME/.themes"
declare -r config_dir="${XDG_CONFIG_HOME:-$HOME/.config}"
declare -r profile="$HOME/.profile"
# Create directories if they don't exist
mkdir -p "$flatpak_themes_dir" "$config_dir" ||
{ echo "failed to make directories $flatpak_themes_dir & $config_dir"; exit 1; }
# Enable option for syncing the current theme with XFWM theme if not already enabled
[ "$(xfconf-query -c xsettings -p /Xfce/SyncThemes)" != 'true' ] &&
xfconf-query -c xsettings -p /Xfce/SyncThemes -n -t bool -s true
# Make sure ~/.profile is sourced inside ~/.bash_profile and ~/.zprofile
source_profile() {
for file in "$HOME/.bash_profile" "$HOME/.zprofile"; do
# Continue looping if it is already sourced
grep -Exq '\s*(.*&& )?\. "?\$HOME"?/\.profile"?\s*' "$file" ||
grep -Exq "\s*(.*&& )?\. ~/\.profile\s*" "$file" && continue
# If not then source it
if grep -q '\S' "$file"; then
# shellcheck disable=SC2015
tail -n1 "$file" | grep -qx '\s*' &&
local -r begin='' || local -r begin='\n'
printf '%b[ -f "$HOME/.profile" ] && . "$HOME/.profile"\n' "$begin" >> "$file"
else
echo '[ -f "$HOME/.profile" ] && . "$HOME/.profile"' > "$file"
fi
done
}
source_profile
xdg_directory_lookup() {
# Go through each item in $XDG_DATA_DIRS and find the subdirectory $1
while read -r dir; do
local subdir="${dir%/}/$1"
if [ -d "$subdir" ]; then
echo "$subdir"
break
fi
done < <(printf '%s:%s\n' "$HOME/.local/share" "$XDG_DATA_DIRS" | tr ':' '\n')
}
theme_exists() {
local -r theme_dir=$(xdg_directory_lookup "themes/$1")
[ -d "$theme_dir" ]
}
# Function for setting variables in ~/.profile
profile_set_variable() {
# Return if the variable is already set to the correct value
grep -xq "\s*export\s\+$1=$2\s*" "$profile" && return
# If the variable is set to a different value then remove that line
grep -q "^\s*export\s\+$1=" "$profile" && sed -i "/^\s*export\s\+$1=/d" "$profile"
# Set the variable to the correct value under a comment mentioning this script
if grep -xq '\s*#\s*Values set by the fix-theming script\s*' "$profile"; then
sed -i "/^\s*#\s*Values set by the fix-theming script\s*$/a export $1=$2" "$profile"
elif grep -q '\S' "$profile"; then
# shellcheck disable=SC2015
tail -n1 "$profile" | grep -qx '\s*' &&
local -r begin='' || local -r begin='\n'
printf '%b# Values set by the fix-theming script\nexport %s=%s\n' "$begin" "$1" "$2" >> "$profile"
else
printf '# Values set by the fix-theming script\nexport %s=%s\n' "$1" "$2" > "$profile"
fi
logout_required='true'
}
set_QT_scaling() {
for var in QT_SCALE_FACTOR QT_AUTO_SCREEN_SCALE_FACTOR QT_ENABLE_HIGHDPI_SCALING; do
profile_set_variable "$var" "$1"
done
}
set_cursor_size() {
xfconf-query -c xsettings -p /Gtk/CursorThemeSize -s "$1"
}
set_xfwm_theme() {
xfconf-query -c xfwm4 -p /general/theme -n -t string -s "$1"
}
# Use the highDPI variant of the XFWM theme
use_hdpi_theme_variant() {
# shellcheck disable=SC2015
[ -n "$1" ] && local -r xfwm_theme="$1" ||
local -r xfwm_theme=$(xfconf-query -c xfwm4 -p /general/theme)
for variant in xhdpi hdpi; do
# If this variant of the theme is already enabled then break out of the loop
[ "${xfwm_theme##*-}" = "$variant" ] && break
# Store the name for this variant of the theme in highDPI_theme variable
local highDPI_theme=$xfwm_theme-$variant
if theme_exists "$highDPI_theme"; then
set_xfwm_theme "$highDPI_theme"
[ -z "$1" ] &&
notify-send "XFWM theme changed to $highDPI_theme" "Changed to the highDPI variant of your chosen theme because you've enabled highDPI on your system"
break
fi
done
if ! theme_exists "$highDPI_theme"; then
[ -n "$1" ] && theme_exists "$1" && set_xfwm_theme "$1"
fi
}
# Use the normal variant of the XFWM theme
use_normal_theme_variant() {
local -r current_xfwm_theme=$(xfconf-query -c xfwm4 -p /general/theme)
for variant in xhdpi hdpi; do
# Continue looping if this (highDPI) variant of the theme is not enabled
[ "${current_xfwm_theme##*-}" != "$variant" ] && continue
# Store the name for the normal variant of this theme in normal_theme variable
local normal_theme=${current_xfwm_theme%-"$variant"}
if theme_exists "$normal_theme"; then
set_xfwm_theme "$normal_theme"
notify-send "XFWM theme changed to $normal_theme" "Changed to the normal variant of your chosen theme because you've disabled highDPI on your system"
break
fi
done
}
# Change XFWM theme, QT apps scaling, and mouse cursor size according to
# the user's current window scaling (highDPI setting)
hdpi_theme_fix() {
local -r current_window_scaling=$(xfconf-query -c xsettings -p /Gdk/WindowScalingFactor)
local -r current_cursor_size=$(xfconf-query -c xsettings -p /Gtk/CursorThemeSize)
unset logout_required
if [ "$current_window_scaling" -eq '2' ]; then
# Increase scaling for QT apps
set_QT_scaling 2
# Use the highDPI variant of the XFWM theme
use_hdpi_theme_variant
if [ "$current_cursor_size" -eq 25 ]; then
set_cursor_size '45'
notify-send 'Mouse cursor size increased to 45' "Changed to a larger mouse cursor because you've enabled highDPI on your system"
fi
else
# Decrease scaling for QT apps
set_QT_scaling 1
# Use the normal variant of the XFWM theme
use_normal_theme_variant
if [ "$current_cursor_size" -eq 45 ]; then
set_cursor_size '25'
notify-send 'Mouse cursor size decreased to 25' "Changed to a smaller mouse cursor because you've disabled highDPI on your system"
fi
fi
# Show popup menu about logout if it's required
[ "$logout_required" = 'true' ] &&
yad --image "dialog-question" --title "Alert" --buttons-layout=center --text-align=center --button=yad-yes:0 --button=yad-no:1 --text 'Logout is required in order to apply your DPI preferences to QT apps.\nWould you like to logout now?' &&
xfce4-session-logout --logout
}
sync_theme() {
# Get the current system theme
theme=$(xfconf-query -c xsettings -p /Net/ThemeName)
# Find the best match for the xfwm4 theme that corresponds with the current system theme
xfwm4_theme=$(find /usr/share/themes/ /usr/local/share/themes/ "$HOME"/.themes/ "$HOME"/.local/share/themes/ -mindepth 2 -maxdepth 2 -type d -name xfwm4 -printf '%h\n' 2>/dev/null | grep -o "/${theme}[^/]*$" | sort | head -n1)
# If a match is not found then use the Default theme
[ -z "$xfwm4_theme" ] && xfwm4_theme='Default'
# Apply the xfwm4 theme
xfconf-query -c xfwm4 -p /general/theme -n -t string -s "${xfwm4_theme#/}"
local -r current_theme=$(xfconf-query -c xsettings -p /Net/ThemeName)
# Get the current window scaling factor (highDPI setting)
local -r current_window_scaling=$(xfconf-query -c xsettings -p /Gdk/WindowScalingFactor)
# Apply the current theme with gsettings
gsettings set org.gnome.desktop.interface gtk-theme "$theme"
gsettings set org.gnome.desktop.interface gtk-theme "$current_theme"
# Apply the current theme for GTK and Libadwaita apps on flatpak
flatpak override --user --env=GTK_THEME="$current_theme"
# Apply the current theme for XFWM unless it's initial_sync on system reboot
if [ "$1" != 'initial_sync' ]; then
# Use the highDPI variant of the XFWM theme if the current_window_scaling factor is 2
if [ "$current_window_scaling" -eq '2' ]; then
use_hdpi_theme_variant "$current_theme"
else
set_xfwm_theme "$current_theme"
fi
fi
# Cleanup flatpak_themes_dir and remove ~/.config/gtk-4.0
rm -rf "${flatpak_themes_dir:?}"/{*,.*} "$config_dir/gtk-4.0"
# Find the directory where the current theme is stored
local -r current_theme_dir=$(xdg_directory_lookup "themes/$current_theme")
if [ -d "$current_theme_dir" ]; then
# Copy/sync current_theme_dir to flatpak_themes_dir
rsync -av --delete --progress "$current_theme_dir" "$flatpak_themes_dir"
# Create symlink for gtk-4.0 directory
ln -s "$current_theme_dir/gtk-4.0" "$config_dir"
fi
}
sync_icon_theme() {
# Get the current icon theme
icon_theme=$(xfconf-query -c xsettings -p /Net/IconThemeName)
# Apply the same theme in qt5ct and qt6ct configuration
sed -i "s/^icon_theme=.*$/icon_theme=$icon_theme/" "$HOME"/.config/qt5ct/qt5ct.conf
sed -i "s/^icon_theme=.*$/icon_theme=$icon_theme/" "$HOME"/.config/qt6ct/qt6ct.conf
sync_font() {
# Get the current system font
local -r current_font=$(xfconf-query -c xsettings -p /Gtk/FontName)
# Apply the same font for the title of XFCE windows
xfconf-query -c xfwm4 -p /general/title_font -n -t string -s "$current_font"
}
while :; do
# Get the current system theme
theme_new=$(xfconf-query -c xsettings -p /Net/ThemeName)
# Get the current icon theme
icon_theme_new=$(xfconf-query -c xsettings -p /Net/IconThemeName)
# Get the current font name
font_new=$(xfconf-query -c xsettings -p /Gtk/FontName)
# Initial synchronization
sync_theme 'initial_sync'
sync_font
# Run sync_theme if the new system theme doesn't match the previous one
[ "$theme_new" != "$theme_prev" ] && sync_theme
# Run sync_icon_theme if the new icon theme doesn't match the previous one
[ "$icon_theme_new" != "$icon_theme_prev" ] && sync_icon_theme
# If the new font doesn't match the previous one, apply the new font for the title of xfce windows
[ "$font_new" != "$font_prev" ] && xfconf-query -c xfwm4 -p /general/title_font -n -t string -s "$font_new"
# The new values become the previous values
theme_prev=$theme_new
icon_theme_prev=$icon_theme_new
font_prev=$font_new
sleep 3
done
# Monitor when the user changes their system theme, font or
# DPI setting in XFCE and sync them as needed
while read -r line; do
case "$line" in
'set: /Net/ThemeName') sync_theme ;;
'set: /Gdk/WindowScalingFactor') hdpi_theme_fix ;;
'set: /Gtk/FontName') sync_font ;;
esac
done < <(xfconf-query -c xsettings -m)

@ -1,89 +0,0 @@
#!/bin/bash
pidof -sq -o %PPID -x "$(basename "$0")" && exit
data="$HOME"/.local/share/applications/tweaked-desktop-files
data2="$HOME"/.local/share/applications/bakkedup-desktop-files
# Directories where desktop files are stored
user="$HOME"/.local/share/applications
flatpak_local="$HOME"/.local/share/flatpak/exports/share/applications
flatpak_global=/var/lib/flatpak/exports/share/applications
pacman_local=/usr/local/share/applications
pacman_global=/usr/share/applications
snap=/var/lib/snapd/desktop/applications
detectfiles() {
for file in "$user"/*.desktop; do
name=$(basename "$file") || continue
[ -d "$file" ] || grep -xq "\(flatpak-local\|flatpak-global\|pacman-local\|pacman-global\|snap\)/$name" "$data" && continue
if [ -f "$flatpak_local/$name" ]; then
echo "flatpak-local/$name" >> "$data"
elif [ -f "$flatpak_global/$name" ]; then
echo "flatpak-global/$name" >> "$data"
elif [ -f "$pacman_local/$name" ]; then
echo "pacman-local/$name" >> "$data"
elif [ -f "$pacman_global/$name" ]; then
echo "pacman-global/$name" >> "$data"
elif [ -f "$snap/$name" ]; then
echo "snap/$name" >> "$data"
fi
done
}
fixfiles() {
lastmod=$(stat -c "%Y" "$data")
tmp="$(mktemp)"
trap 'rm $tmp' EXIT
[ -f "$data" ] && cp "$data" "$tmp" && copied='true'
lineno=0
[ "$copied" = 'true' ] && while IFS= read -r line; do
((lineno++))
name=${line#*/}
file="$user/$name"
# shellcheck disable=2015 # To disable shellcheck error here, line below is intended to work this way
echo "$line" | grep -xq '\(flatpak-local\|flatpak-global\|pacman-local\|pacman-global\|snap\)/.\+' && [ -f "$file" ] || { sed -i "${lineno}d" "$tmp" && ((lineno--)) ; continue; }
[ -f "$flatpak_local/$name" ] ||
[ -f "$flatpak_global/$name" ] ||
[ -f "$pacman_local/$name" ] ||
[ -f "$pacman_global/$name" ] ||
[ -f "$snap/$name" ] ||
{ mv "$file" "$file.bak" && echo "$line" >> "$data2"; }
done < "$data"
[ "$copied" = 'true' ] && [ "$(stat -c '%Y' "$data")" = "$lastmod" ] && sort "$tmp" | uniq > "$data"
[ -n "$(sort "$data2" | uniq -d)" ] && cp "$data2" "$tmp" && sort "$tmp" | uniq > "$data2"
for bakfile in "$user"/*.desktop.bak; do
origfile="${bakfile%.bak}"
[ -f "$origfile" ] && continue
name=$(basename "$origfile") || continue
[ -f "$flatpak_local/$name" ] ||
[ -f "$flatpak_global/$name" ] ||
[ -f "$pacman_local/$name" ] ||
[ -f "$pacman_global/$name" ] ||
[ -f "$snap/$name" ] &&
mv "$bakfile" "$origfile"
done
}
while :; do
user_new=$(ls -ad "$user"/*.desktop 2>/dev/null)
flatpak_local_new=$(ls -ad "$flatpak_local"/*.desktop 2>/dev/null)
flatpak_global_new=$(ls -ad "$flatpak_global"/*.desktop 2>/dev/null)
pacman_local_new=$(ls -ad "$pacman_local"/*.desktop 2>/dev/null)
pacman_global_new=$(ls -ad "$pacman_global"/*.desktop 2>/dev/null)
snap_new=$(ls -ad "$snap"/*.desktop 2>/dev/null)
[ "$user_new" != "$user_old" ] && detectfiles
[ "$flatpak_local_new" != "$flatpak_local_old" ] ||
[ "$flatpak_global_new" != "$flatpak_global_old" ] ||
[ "$pacman_local_new" != "$pacman_local_old" ] ||
[ "$pacman_global_new" != "$pacman_global_old" ] ||
[ "$snap_new" != "$snap_old" ] && fixfiles
user_old=$user_new
flatpak_local_old=$flatpak_local_new
flatpak_global_old=$flatpak_global_new
pacman_local_old=$pacman_local_new
pacman_global_old=$pacman_global_new
snap_old=$snap_new
sleep 5
done

120
bin/periodic/fix-zombie-appicons Executable file

@ -0,0 +1,120 @@
#!/bin/bash
# Exit out if the same script is already running in the background
pidof -sq -o %PPID -x "$(basename "$0")" && exit
# Setting read-only variables
declare -r datadir="$HOME"/.local/share/fix-zombie-appicons
declare -r backup_dir="$datadir"/backup
declare -r datafile="$datadir"/tweaked-desktop-files
# Desktop files stored here will take precedence over the other ones
declare -r home_local_applications_dir="$HOME/.local/share/applications"
# Go through each item in $XDG_DATA_DIRS to find all other directories
# except home_local_applications_dir where desktop files are stored, and
# save these to other_applications_dirs
while read -r dir; do
full_dir_path=${dir%/}/applications
other_applications_dirs+=("$full_dir_path")
# Directories inside user's home directory
[[ "$full_dir_path" = "$HOME"/* ]] && dirs_inside_user_home+=("$full_dir_path")
done < <(echo "$XDG_DATA_DIRS" | tr ':' '\n' | sort -u | grep -vFx "$home_local_applications_dir")
declare -r other_applications_dirs dirs_inside_user_home
# Create tempfile which is used by the fix_desktop_files function
tempfile="$(mktemp)"
trap 'rm $tempfile' EXIT # Delete tempfile when the script exits
declare -r tempfile
# This function will check for new desktop files in home_local_applications_dir and
# record them in datafile if the same file is found in any of the other_applications_dirs.
detect_new_desktop_files() {
for file in "$home_local_applications_dir"/*.desktop; do
# This is added as a failsafe to ensure its a file and not a directory
[ -d "$file" ] && continue
filename=$(basename "$file")
# Continue looping if the filename is already recorded in the datafile
grep -xq "$filename" "$datafile" && continue
# If the same file is present in any of the other_applications_dirs then add its filename to datafile
for dir in "${other_applications_dirs[@]}"; do
[ -f "$dir/$filename" ] && echo "$filename" >> "$datafile" && break
done
done
}
# The following function will:
# 1. Go through all the files recorded in datafile and move them to backup_dir if
# the same file is not found in other_applications_dirs anymore.
# 2. Go through all the bakked up files in backup_dir and move them back to
# its original_file_path if the same file is present in any of
# the other_applications_dirs. This will not overwrite if a new
# file already exists at original_file_path.
fix_desktop_files() {
# This is added as a failsafe to avoid overwriting datafile in case the file got edited during this period
local -r last_modified_time=$(stat -c "%Y" "$datafile")
# Copy datafile to tempfile because its not possible to directly edit the file inside a while-read loop
[ -f "$datafile" ] && cp "$datafile" "$tempfile" && local -r datafile_copied='true'
local -i line_number=0
# Loop through each line in datafile
[ "$datafile_copied" = 'true' ] && while IFS='' read -r filename; do
line_number+=1
file="$home_local_applications_dir/$filename"
# If the file don't exist anymore then remove the line from datafile (as tempfile) and continue looping
[ -f "$file" ] || { sed -i "${line_number}d" "$tempfile" && line_number+=-1 ; continue; }
# If the same file is not present in any of the other_applications_dirs then move the file to backup_dir
unset file_exists
for dir in "${other_applications_dirs[@]}"; do
[ -f "$dir/$filename" ] && file_exists='true' && break
done
[ "$file_exists" != 'true' ] && mv "$file" "$backup_dir/$filename.bak"
done < "$datafile"
# Write the contents from tempfile back to datafile after sorting and removing duplicate lines
[ "$datafile_copied" = 'true' ] && [ "$(stat -c '%Y' "$datafile")" = "$last_modified_time" ] && sort -u "$tempfile" > "$datafile"
for bakfile in "$backup_dir"/*.desktop.bak; do
filename=$(basename "${bakfile%.bak}")
original_file_path="$home_local_applications_dir/$filename"
# Continue looping if a new file is already present at the original_file_path,
# this will prevent the backup from overwriting the new file
[ -f "$original_file_path" ] && continue
# If the same bakked up file is present in any of the other_applications_dirs then move it back to its original_file_path
for dir in "${other_applications_dirs[@]}"; do
[ -f "$dir/$filename" ] && mv "$bakfile" "$original_file_path" && break
done
done
}
# Create some directories in the user's home directory if they don't already exist
mkdir -p "$datadir" "$backup_dir" "$home_local_applications_dir" ||
{ echo "failed to make directories $datadir, $backup_dir & $home_local_applications_dir"; exit 1; }
# Try to create dirs_inside_user_home if they don't already exist
[ ${#dirs_inside_user_home[@]} -gt 0 ] && mkdir -p "${dirs_inside_user_home[@]}"
# Check which directories currently exist on the user's system so that inotifywait can monitor them for changes
for dir in "$home_local_applications_dir" "${other_applications_dirs[@]}"; do
[ -d "$dir" ] && currently_existing_dirs+=("$dir")
done
# Both functions will be run once when the script first starts
detect_new_desktop_files
fix_desktop_files
# Inotifywait monitors currently_existing_dirs and the functions are run each time when there is a change in relevant directories
while IFS='' read -r line; do
if [ "$line" = "$home_local_applications_dir/" ]; then
detect_new_desktop_files
else
fix_desktop_files
fi
done < <(inotifywait -qm --format '%w' --include '\.desktop$' -e 'move,move_self,create,delete,delete_self,unmount' "${currently_existing_dirs[@]}")

@ -1,2 +1,2 @@
#!/bin/bash
pacman-key --populate chaotic
pacman-key --populate chaotic

@ -1,3 +0,0 @@
#!/bin/bash
rm /var/lib/pacman/db.lck
pacman --noconfirm -S qt5-styleplugins qt6gtk2

@ -1,2 +1,2 @@
[Context]
filesystems=~/.themes;
filesystems=~/.config/gtk-4.0;~/.themes;~/.icons;xdg-config/gtk-4.0;

@ -1,15 +0,0 @@
# This service unit is for fix-flatpaks-theming script
#
[Unit]
Description=Fix flatpak theming script
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
ExecStart=/usr/bin/fix-flatpaks-theming
[Install]
WantedBy=default.target

@ -9,7 +9,7 @@ StartLimitIntervalSec=0
Type=simple
Restart=always
RestartSec=1
ExecStart=/usr/bin/fix-tweaked-desktop-files
ExecStart=/usr/bin/fix-zombie-appicons
[Install]
WantedBy=default.target

16
tromjaro-fixes.sh Normal file

@ -0,0 +1,16 @@
# Sync the QT with GTK
export QT_QPA_PLATFORMTHEME="qt6gtk2"
export QT_AUTO_SCREEN_SCALE_FACTOR=1
# Show color output in less
export LESS=-R
export LESS_TERMCAP_mb=$'\e[1;31m'
export LESS_TERMCAP_md=$'\e[1;36m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_so=$'\e[01;44;33m'
export LESS_TERMCAP_se=$'\e[0m'
export LESS_TERMCAP_us=$'\e[1;32m'
export LESS_TERMCAP_ue=$'\e[0m'
# Disable the beep sound
[ -n "$DISPLAY" ] && xset b off