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