10 Commits

Author SHA1 Message Date
a2c0ce3ec1 another gpt with inotifywait addition
seems to work....
2023-08-03 19:32:30 +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 47 additions and 20 deletions

View File

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

View File

@@ -1,14 +1,30 @@
#!/bin/bash
shared_themes_dir=/usr/share/themes/
home_local_themes_dir="$HOME/.local/share/themes/"
source_theme_dirs=("$shared_themes_dir" "$home_local_themes_dir")
target_themes_dir="$HOME/.themes"
mkdir -p "$target_themes_dir" "$home_local_themes_dir" ||
{ echo "failed to make directoris $target_themes_dir & $home_local_themes_dir"; exit 1; }
# Set the directories
echo "Set watch for" "${source_theme_dirs[@]}" "directories ..."
while inotifywait -qr -e 'modify,attrib,move,move_self,create,delete,delete_self,unmount' "${source_theme_dirs[@]}"; do
rsync -av --delete --progress "${source_theme_dirs[@]}" "$target_themes_dir"
echo "Directory $target_themes_dir is synchronized with" "${source_theme_dirs[@]}"
shared\_themes\_dir=/usr/share/themes/
local\_themes\_dir="$HOME/.themes/"
# Function to synchronize themes from shared to local directory
sync\_themes() {
rsync -av --delete --progress "$shared\_themes\_dir" "$local\_themes\_dir"
echo "Directory $local\_themes\_dir is synchronized with $shared\_themes\_dir"
}
# Initial synchronization
sync\_themes
# Function to monitor both shared and local themes directories
monitor\_themes() {
inotifywait -m -r -e modify,attrib,move,move\_self,create,delete,delete\_self,unmount "$shared\_themes\_dir" "$local\_themes\_dir" |
while read -r events; do
sync\_themes
done
}
# Start monitoring in the background
monitor\_themes

View File

@@ -1,15 +1,22 @@
#!/bin/bash
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#/}"
# Enable syncing the current theme with xfwm4 if not already enabled
[ "$(xfconf-query -c xsettings -p /Xfce/SyncThemes)" != 'true' ] && xfconf-query -c xsettings -p /Xfce/SyncThemes -n -t bool -s true
# Apply the current theme with gsettings
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() {
@@ -22,6 +29,7 @@ sync_font() {
sync_theme
sync_font
# Monitor when the user changes their system theme or font in XFCE and sync them as needed
while read -r line; do
case "$line" in
'set: /Net/ThemeName') sync_theme ;;

View File

@@ -1,2 +1,5 @@
[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'
# Disable the beep sound
xset b off
[ -n "$DISPLAY" ] && xset b off