diff --git a/debian/changelog b/debian/changelog index 6cf826a..19a56e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -pika-gnome-layouts (2.0-99pika3) kinetic; urgency=low +pika-gnome-layouts (2.0-99pika4) kinetic; urgency=low - * Fix Windows 11 layout + * Redo Themeing system -- Ward Nakchbandi Sat, 01 Oct 2022 14:50:00 +0200 diff --git a/usr/lib/pika/gnome-layouts/libadwaita.sh b/usr/lib/pika/gnome-layouts/libadwaita.sh index 38334e1..8a1f065 100755 --- a/usr/lib/pika/gnome-layouts/libadwaita.sh +++ b/usr/lib/pika/gnome-layouts/libadwaita.sh @@ -1,27 +1,25 @@ #! /bin/bash + +# Remove current libadwaita theme rm -rfv $HOME/.config/gtk-4.0 -THEME=$(dconf read /org/gnome/desktop/interface/gtk-theme | sed "s+'++" | sed "s+'++" | sed "s+-Dark++" | sed "s+-Light++" ) -if echo $THEME | grep -i orchis - then - if [[ $1 = dark ]] - then - kvantummanager --set Orchis-dark - cp -rfv /usr/share/themes/$THEME-Dark/gtk-4.0 $HOME/.config/ - else - kvantummanager --set Orchis - cp -rfv /usr/share/themes/$THEME-Light/gtk-4.0 $HOME/.config/ - fi -else - if [ -f $HOME/.config/pika_theme ] - . "$HOME/.config/pika_theme" - then - if [[ $1 = dark ]] - then - kvantummanager --set $KVANTUM_THEME_DARK - cp -rfv $GTK_THEME_PATH_DARK/gtk-4.0 $HOME/.config/ - else - kvantummanager --set $KVANTUM_THEME_LIGHT - cp -rfv $GTK_THEME_PATH_LIGHT/gtk-4.0 $HOME/.config/ - fi - fi + +# Import Theme Settings From system dir +if [ -f /etc/pika_theme ] +then +. "/etc/pika_theme" fi + +# Import Theme Settings From user dir +if [ -f $HOME/.config/pika_theme ] +then +. "$HOME/.config/pika_theme" +fi + +if [[ $1 = dark ]] +then +kvantummanager --set $KVANTUM_THEME_DARK +cp -rfv $GTK_THEME_PATH_DARK/gtk-4.0 $HOME/.config/ +else +kvantummanager --set $KVANTUM_THEME_LIGHT +cp -rfv $GTK_THEME_PATH_LIGHT/gtk-4.0 $HOME/.config/ +fi \ No newline at end of file