diff --git a/debian/changelog b/debian/changelog index d5c4204..6cf826a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -pika-gnome-layouts (2.0-99pika2) kinetic; urgency=low +pika-gnome-layouts (2.0-99pika3) kinetic; urgency=low * Fix Windows 11 layout diff --git a/usr/lib/pika/gnome-layouts/dconf-accent.sh b/usr/lib/pika/gnome-layouts/dconf-accent.sh index 0cecdcc..d226a99 100755 --- a/usr/lib/pika/gnome-layouts/dconf-accent.sh +++ b/usr/lib/pika/gnome-layouts/dconf-accent.sh @@ -22,4 +22,9 @@ dconf write /org/gnome/shell/extensions/nightthemeswitcher/gtk-variants/night "' dconf write /org/gnome/shell/extensions/nightthemeswitcher/shell-variants/day "'Orchis-$1-Light'" dconf write /org/gnome/shell/extensions/nightthemeswitcher/shell-variants/night "'Orchis-$1-Dark'" fi +if dconf read /org/gnome/desktop/interface/color-scheme | grep dark +then +/usr/lib/pika/gnome-layouts/libadwaita.sh dark +else /usr/lib/pika/gnome-layouts/libadwaita.sh +fi diff --git a/usr/lib/pika/gnome-layouts/libadwaita.sh b/usr/lib/pika/gnome-layouts/libadwaita.sh index 69d2376..50fd1ba 100755 --- a/usr/lib/pika/gnome-layouts/libadwaita.sh +++ b/usr/lib/pika/gnome-layouts/libadwaita.sh @@ -1,8 +1,26 @@ #! /bin/bash rm -rfv $HOME/.config/gtk-4.0 -cp -rfv /usr/share/themes/$(dconf read /org/gnome/desktop/interface/gtk-theme | sed "s+'++" | sed "s+'++")/gtk-4.0 $HOME/.config/ -kvantummanager --set Orchis -if [[ $1 = dark ]] -then -kvantummanager --set Orchis-dark +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 ] + then + if [[ $1 = dark ]] + then + kvantummanager --set $(cat $HOME/.config/pika_theme | grep 'KVANTUM_THEME_DARK=' | head -n1 | sed "s#KVANTUM_THEME_DARK=##") + cp -rfv $(cat $HOME/.config/pika_theme | grep 'GTK_THEME_PATH_DARK=' | head -n1 | sed "s#GTK_THEME_PATH_DARK=##")/gtk-4.0 $HOME/.config/ + else + kvantummanager --set $(cat $HOME/.config/pika_theme | grep 'KVANTUM_THEME_LIGHT=' | head -n1 | sed "s#KVANTUM_THEME_LIGHT=##") + cp -rfv $(cat $HOME/.config/pika_theme | grep 'GTK_THEME_PATH_LIGHT=' | head -n1 | sed "s#GTK_THEME_PATH_LIGHT=##")/gtk-4.0 $HOME/.config/ + fi + fi fi diff --git a/usr/lib/pika/gnome-layouts/main.py b/usr/lib/pika/gnome-layouts/main.py index 5ea4cf2..d3c40d0 100644 --- a/usr/lib/pika/gnome-layouts/main.py +++ b/usr/lib/pika/gnome-layouts/main.py @@ -245,10 +245,10 @@ class Application: subprocess.run(["echo 'theme change done!'"], shell=True) def teal_accent_button_pressed_cb (self, widget): subprocess.run(["/usr/lib/pika/gnome-layouts/dconf-accent.sh Teal"], shell=True) - subprocess.run(["pkexec /usr/lib/pika/gnome-layouts/-u -C teal"], shell=True) + subprocess.run(["pkexec /usr/lib/pika/gnome-layouts/papirus-folders -u -C teal"], shell=True) subprocess.run(["echo 'theme change done!'"], shell=True) def gray_accent_button_pressed_cb (self, widget): - subprocess.run(["/usr/lib/pika/gnome-layouts/dconf-accent.sh Gray"], shell=True) + subprocess.run(["/usr/lib/pika/gnome-layouts/dconf-accent.sh Grey"], shell=True) subprocess.run(["pkexec /usr/lib/pika/gnome-layouts/papirus-folders -u -C grey"], shell=True) subprocess.run(["echo 'theme change done!'"], shell=True) diff --git a/usr/lib/pika/gnome-layouts/main.ui b/usr/lib/pika/gnome-layouts/main.ui index 951f0f9..dbd2714 100644 --- a/usr/lib/pika/gnome-layouts/main.ui +++ b/usr/lib/pika/gnome-layouts/main.ui @@ -617,7 +617,7 @@ center center none - + True @@ -665,7 +665,7 @@ center center none - + True