roko's changes
This commit is contained in:
parent
b521a23108
commit
5a4ab6f90e
|
@ -3,12 +3,8 @@
|
|||
sync_theme() {
|
||||
# Get the current system theme
|
||||
theme=$(xfconf-query -c xsettings -p /Net/ThemeName)
|
||||
|
||||
# Enable syncing the current theme with xfwm4
|
||||
if [ "$(xfconf-query -c xsettings -p /Xfce/SyncThemes)" != 'true' ]; then
|
||||
xfconf-query -c xsettings -p /Xfce/SyncThemes -n -t bool -s true
|
||||
fi
|
||||
|
||||
# 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"
|
||||
|
||||
|
@ -16,12 +12,8 @@ sync_theme() {
|
|||
|
||||
# Define the path to the flatpak override directory
|
||||
flatpak_override_dir="$HOME/.local/share/flatpak/overrides"
|
||||
|
||||
# Create the directory if it doesn't exist
|
||||
if [ ! -d "$flatpak_override_dir" ]; then
|
||||
mkdir -p "$flatpak_override_dir" || { echo 'Failed creating directory!'; return 1; }
|
||||
fi
|
||||
|
||||
[ -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"
|
||||
|
@ -30,7 +22,6 @@ GTK_THEME=$theme" > "$flatpak_override_dir/global"
|
|||
sync_font() {
|
||||
# Get the current system font
|
||||
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 "$font"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user