Compare commits
10 Commits
3a669f0664
...
tio-patch-
Author | SHA1 | Date | |
---|---|---|---|
a2c0ce3ec1 | |||
17237c513b | |||
5a4ab6f90e | |||
b521a23108 | |||
68321075f6 | |||
b7ff344fe4 | |||
7586338b19 | |||
e1025ea57a | |||
b666bb94db | |||
4054011068 |
4
PKGBUILD
4
PKGBUILD
@@ -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=0
|
||||||
pkgdesc="Various fixes for TROMjaro OS"
|
pkgdesc="Various fixes for TROMjaro OS"
|
||||||
arch=(any)
|
arch=(any)
|
||||||
url=""
|
url=""
|
||||||
|
@@ -1,14 +1,30 @@
|
|||||||
#!/bin/bash
|
#!/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" ||
|
# Set the directories
|
||||||
{ echo "failed to make directoris $target_themes_dir & $home_local_themes_dir"; exit 1; }
|
|
||||||
|
|
||||||
echo "Set watch for" "${source_theme_dirs[@]}" "directories ..."
|
shared\_themes\_dir=/usr/share/themes/
|
||||||
while inotifywait -qr -e 'modify,attrib,move,move_self,create,delete,delete_self,unmount' "${source_theme_dirs[@]}"; do
|
local\_themes\_dir="$HOME/.themes/"
|
||||||
rsync -av --delete --progress "${source_theme_dirs[@]}" "$target_themes_dir"
|
|
||||||
echo "Directory $target_themes_dir is synchronized with" "${source_theme_dirs[@]}"
|
# 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
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Start monitoring in the background
|
||||||
|
|
||||||
|
monitor\_themes
|
||||||
|
@@ -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 ;;
|
||||||
|
@@ -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
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user