Compare commits
2 Commits
07f4fc3c64
...
7e57c04518
Author | SHA1 | Date | |
---|---|---|---|
7e57c04518 | |||
b2a3bb83b4 |
|
@ -5,12 +5,12 @@ pidof -sq -o %PPID -x "$(basename "$0")" && exit
|
||||||
|
|
||||||
# Set the directory/file paths
|
# Set the directory/file paths
|
||||||
declare -r flatpak_themes_dir="$HOME/.themes"
|
declare -r flatpak_themes_dir="$HOME/.themes"
|
||||||
declare -r flatpak_icons_dir="$HOME/.icons"
|
declare -r config_dir="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
declare -r profile="$HOME/.profile"
|
declare -r profile="$HOME/.profile"
|
||||||
|
|
||||||
# Create flatpak icons & themes directories if they don't exist
|
# Create directories if they don't exist
|
||||||
mkdir -p "$flatpak_themes_dir" "$flatpak_icons_dir" ||
|
mkdir -p "$flatpak_themes_dir" "$config_dir" ||
|
||||||
{ echo "failed to make directories $flatpak_themes_dir & $flatpak_icons_dir"; exit 1; }
|
{ echo "failed to make directories $flatpak_themes_dir & $config_dir"; exit 1; }
|
||||||
|
|
||||||
# Enable option for syncing the current theme with XFWM theme if not already enabled
|
# Enable option for syncing the current theme with XFWM theme if not already enabled
|
||||||
[ "$(xfconf-query -c xsettings -p /Xfce/SyncThemes)" != 'true' ] &&
|
[ "$(xfconf-query -c xsettings -p /Xfce/SyncThemes)" != 'true' ] &&
|
||||||
|
@ -162,14 +162,20 @@ sync_theme() {
|
||||||
[ "$current_window_scaling" -eq '2' ] && use_hdpi_theme_variant 'disable_notification'
|
[ "$current_window_scaling" -eq '2' ] && use_hdpi_theme_variant 'disable_notification'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Cleanup flatpak_themes_dir
|
# Cleanup flatpak_themes_dir and ~/.config/gtk-4.0
|
||||||
rm -rf "${flatpak_themes_dir:?}"/*
|
rm -rf "${flatpak_themes_dir:?}"/{*,.*} "$config_dir/gtk-4.0"/{*,.*}
|
||||||
|
|
||||||
# Find the directory where the current theme is stored
|
# Find the directory where the current theme is stored
|
||||||
local -r current_theme_dir=$(xdg_directory_lookup "themes/$current_theme")
|
local -r current_theme_dir=$(xdg_directory_lookup "themes/$current_theme")
|
||||||
|
|
||||||
|
if [ -d "$current_theme_dir" ]; then
|
||||||
# Copy/sync current_theme_dir to flatpak_themes_dir
|
# Copy/sync current_theme_dir to flatpak_themes_dir
|
||||||
[ -d "$current_theme_dir" ] &&
|
|
||||||
rsync -av --delete --progress "$current_theme_dir" "$flatpak_themes_dir"
|
rsync -av --delete --progress "$current_theme_dir" "$flatpak_themes_dir"
|
||||||
|
local -r current_theme_gtk4_dir="$current_theme_dir/gtk-4.0"
|
||||||
|
[ -d "$current_theme_gtk4_dir" ] &&
|
||||||
|
# Copy/sync current_theme_gtk4_dir to config_dir
|
||||||
|
rsync -av --delete --progress "$current_theme_gtk4_dir" "$config_dir"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
sync_font() {
|
sync_font() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user