This commit is contained in:
Ward Nakchbandi (Cosmic Fusion) 2023-10-27 17:20:23 +03:00 committed by GitHub
parent 540339e4a9
commit 6d27e588d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 21 deletions

View File

@ -1,4 +1,4 @@
pika-gnome-settings (4.5-100pika1) pikauwu; urgency=low pika-gnome-settings (4.5-100pika2) pikauwu; urgency=low
* Update to pikauwu * Update to pikauwu

View File

@ -2,6 +2,9 @@
override_dh_installgsettings: override_dh_installgsettings:
dh_installgsettings --priority=50 dh_installgsettings --priority=50
override_dh_missing:
dh_missing
chmod +x debian/pika-gnome-settings/usr/bin/*
%: %:
dh $@ dh $@

View File

@ -1,22 +1,5 @@
#! /bin/dash #! /bin/dash
if [ "$(gsettings get org.pika.layouts pika-theme)" = 1 ] if [ "$(gsettings get org.pika.layouts pika-theme)" = 1 ]
then then
while true pika-gnome-darkmode-py
do
if [ -f /tmp/pika-gnome-color-scheme ]
then
if [ "$(gsettings get org.gnome.desktop.interface color-scheme)" != "$(cat /tmp/pika-gnome-color-scheme)" ]
then
if [ "$(gsettings get org.gnome.desktop.interface color-scheme)" = "'prefer-dark'" ]
then
pika-gnome-theme dark
else
pika-gnome-theme
fi
gsettings get org.gnome.desktop.interface color-scheme > /tmp/pika-gnome-color-scheme
fi
else
gsettings get org.gnome.desktop.interface color-scheme > /tmp/pika-gnome-color-scheme
fi
done
fi fi

View File

@ -0,0 +1,13 @@
#! /usr/bin/python3
from gi.repository import Gio
import subprocess
import time
gso=Gio.Settings.new("org.gnome.desktop.interface")
gso_currnet=gso.get_value("color-scheme")
while True:
gso_old, gso_currnet = gso_currnet, gso.get_value("color-scheme")
if gso_currnet != gso_old:
subprocess.run(["pika-gnome-theme"])
time.sleep(0.05)

View File

@ -15,7 +15,7 @@ then
. "$HOME/.config/pika_theme" . "$HOME/.config/pika_theme"
fi fi
if [[ $1 = dark ]] if [ "$(gsettings get org.gnome.desktop.interface color-scheme)" = "'prefer-dark'" ]
then then
gsettings set org.gnome.shell.extensions.user-theme name "$GTK_THEME_DARK" gsettings set org.gnome.shell.extensions.user-theme name "$GTK_THEME_DARK"
gsettings set org.gnome.desktop.interface gtk-theme "$GTK_THEME_DARK" gsettings set org.gnome.desktop.interface gtk-theme "$GTK_THEME_DARK"