12 Commits

Author SHA1 Message Date
bd11ec4837 add icon sync for flatpaks 2023-08-04 00:24:40 +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
5 changed files with 44 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
# Maintainer: TROM <contact@tromsite.com> # Maintainer: TROM <contact@tromsite.com>
pkgname=tromjaro-fixes pkgname=tromjaro-fixes
pkgver=1.4.5 pkgver=1.6
pkgrel=2 pkgrel=1
pkgdesc="Various fixes for TROMjaro OS" pkgdesc="Various fixes for TROMjaro OS"
arch=(any) arch=(any)
url="" url=""

View File

@@ -1,14 +1,31 @@
#!/bin/bash #!/bin/bash
# Set the directory paths
shared_themes_dir=/usr/share/themes/ shared_themes_dir=/usr/share/themes/
home_local_themes_dir="$HOME/.local/share/themes/" home_local_themes_dir="$HOME/.local/share/themes/"
source_theme_dirs=("$shared_themes_dir" "$home_local_themes_dir") source_theme_dirs=("$shared_themes_dir" "$home_local_themes_dir")
target_themes_dir="$HOME/.themes" target_themes_dir="$HOME/.themes"
mkdir -p "$target_themes_dir" "$home_local_themes_dir" || shared_icons_dir=/usr/share/icons/
{ echo "failed to make directoris $target_themes_dir & $home_local_themes_dir"; exit 1; } home_local_icons_dir="$HOME/.local/share/icons/"
source_icon_dirs=("$shared_icons_dir" "$home_local_icons_dir")
target_icons_dir="$HOME/.icons"
echo "Set watch for" "${source_theme_dirs[@]}" "directories ..." # Function to synchronize themes and icons from source to target directory
while inotifywait -qr -e 'modify,attrib,move,move_self,create,delete,delete_self,unmount' "${source_theme_dirs[@]}"; do sync_themes_and_icons() {
rsync -av --delete --progress "${source_theme_dirs[@]}" "$target_themes_dir" rsync -av --delete --progress "${source_theme_dirs[@]}" "$target_themes_dir"
echo "Directory $target_themes_dir is synchronized with" "${source_theme_dirs[@]}" rsync -av --delete --progress "${source_icon_dirs[@]}" "$target_icons_dir"
echo "Directories $target_themes_dir and $target_icons_dir are synchronized with source directories"
}
# Create the target and local directories if they don't exist
mkdir -p "$target_themes_dir" "$home_local_themes_dir" "$target_icons_dir" "$home_local_icons_dir" ||
{ echo "failed to make directories $target_themes_dir & $home_local_themes_dir & $target_icons_dir & $home_local_icons_dir"; exit 1; }
echo "Set watch for theme directories: ${source_theme_dirs[@]}, and icon directories: ${source_icon_dirs[@]}"
# Start watching for file changes in the source theme and icon directories
inotifywait -qmr -e 'modify,attrib,move,move_self,create,delete,delete_self,unmount' "${source_theme_dirs[@]}" "${source_icon_dirs[@]}" |
while read -r events; do
sync_themes_and_icons
done done

View File

@@ -1,15 +1,22 @@
#!/bin/bash #!/bin/bash
sync_theme() { sync_theme() {
# Get the current system theme # Get the current system theme
theme=$(xfconf-query -c xsettings -p /Net/ThemeName) theme=$(xfconf-query -c xsettings -p /Net/ThemeName)
# Find the best match for the xfwm4 theme that corresponds with the current system theme # Enable syncing the current theme with xfwm4 if not already enabled
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) [ "$(xfconf-query -c xsettings -p /Xfce/SyncThemes)" != 'true' ] && xfconf-query -c xsettings -p /Xfce/SyncThemes -n -t bool -s true
# 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#/}"
# Apply the current theme with gsettings # Apply the current theme with gsettings
gsettings set org.gnome.desktop.interface gtk-theme "$theme" gsettings set org.gnome.desktop.interface gtk-theme "$theme"
# Apply the current theme for GTK apps in flatpak
# Define the path to the flatpak override directory
flatpak_override_dir="$HOME/.local/share/flatpak/overrides"
# Create the directory if it doesn't exist
[ -d "$flatpak_override_dir" ] || mkdir -p "$flatpak_override_dir" || { echo 'failed creating directory!'; return 1; }
# Write the theme configuration to the global override file
echo "[Environment]
GTK_THEME=$theme" > "$flatpak_override_dir/global"
} }
sync_font() { sync_font() {
@@ -22,6 +29,7 @@ sync_font() {
sync_theme sync_theme
sync_font sync_font
# Monitor when the user changes their system theme or font in XFCE and sync them as needed
while read -r line; do while read -r line; do
case "$line" in case "$line" in
'set: /Net/ThemeName') sync_theme ;; 'set: /Net/ThemeName') sync_theme ;;

View File

@@ -1,2 +1,5 @@
[Context] [Context]
filesystems=~/.themes; filesystems=~/.config/gtk-4.0;~/.themes;~/.icons;xdg-config/gtk-4.0;xdg-config/Kvantum:ro;
[Environment]
QT_STYLE_OVERRIDE=kvantum

View File

@@ -14,4 +14,4 @@ export LESS_TERMCAP_us=$'\e[1;32m'
export LESS_TERMCAP_ue=$'\e[0m' export LESS_TERMCAP_ue=$'\e[0m'
# Disable the beep sound # Disable the beep sound
xset b off [ -n "$DISPLAY" ] && xset b off