fix thememing maybe

This commit is contained in:
Ward Nakchbandi 2023-03-28 15:22:20 +03:00
parent 87c75b92ea
commit 7372ab0d6d
4 changed files with 38 additions and 7 deletions

View File

@ -1,4 +1,4 @@
pika-settings (3.0-99pika12) kinetic; urgency=low pika-settings (3.0-99pika13) kinetic; urgency=low
* Fix darkmode themeing * Fix darkmode themeing

View File

@ -163,8 +163,8 @@ night = 'Orchis-Yellow-Dark'
[org.gnome.shell.extensions.nightthemeswitcher.commands] [org.gnome.shell.extensions.nightthemeswitcher.commands]
enabled = true enabled = true
sunrise = '/usr/lib/pika/gnome-layouts/libadwaita.sh' sunrise = 'pika-gnome-theme'
sunset = '/usr/lib/pika/gnome-layouts/libadwaita.sh dark' sunset = 'pika-gnome-theme dark'
[org.gnome.shell.extensions.arcmenu] [org.gnome.shell.extensions.arcmenu]
custom-menu-button-icon = '/usr/share/pixmaps/pika-mono-logo.png' custom-menu-button-icon = '/usr/share/pixmaps/pika-mono-logo.png'

View File

@ -0,0 +1,25 @@
#! /bin/bash
# Remove current libadwaita theme
rm -rfv $HOME/.config/gtk-4.0
# 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

View File

@ -8,16 +8,22 @@ dconf write /org/gnome/desktop/interface/icon-theme "'Papirus'"
dconf write /org/gnome/desktop/interface/monospace-font-name "'Fira Mono 11'" dconf write /org/gnome/desktop/interface/monospace-font-name "'Fira Mono 11'"
dconf write /org/gnome/desktop/interface/document-font-name "'Roboto Slab 11'" dconf write /org/gnome/desktop/interface/document-font-name "'Roboto Slab 11'"
dconf write /org/gnome/desktop/interface/font-name "'Fira Sans Semi-Light 10'" dconf write /org/gnome/desktop/interface/font-name "'Fira Sans Semi-Light 10'"
dconf write /org/gnome/shell/extensions/nightthemeswitcher/time/manual-time-source = true
dconf write /org/gnome/shell/extensions/nightthemeswitcher/time/ondemand-button-placement = "'none'"
dconf write /org/gnome/shell/extensions/nightthemeswitcher/time/ondemand-time = "'night'"
dconf write /org/gnome/shell/extensions/nightthemeswitcher/time/time-source = "'ondemand'"
dconf write /org/gnome/shell/extensions/nightthemeswitcher/commands/enabled true dconf write /org/gnome/shell/extensions/nightthemeswitcher/commands/enabled true
dconf write /org/gnome/shell/extensions/nightthemeswitcher/commands/sunrise "'/usr/lib/pika/gnome-layouts/libadwaita.sh'" dconf write /org/gnome/shell/extensions/nightthemeswitcher/commands/sunrise "'pika-gnome-theme'"
dconf write /org/gnome/shell/extensions/nightthemeswitcher/commands/sunset "'/usr/lib/pika/gnome-layouts/libadwaita.sh dark'" dconf write /org/gnome/shell/extensions/nightthemeswitcher/commands/sunset "'pika-gnome-theme dark'"
dconf write /org/gnome/shell/extensions/nightthemeswitcher/gtk-variants/day "'Orchis-Yellow-Light'" dconf write /org/gnome/shell/extensions/nightthemeswitcher/gtk-variants/day "'Orchis-Yellow-Light'"
dconf write /org/gnome/shell/extensions/nightthemeswitcher/gtk-variants/night "'Orchis-Yellow-Dark'" dconf write /org/gnome/shell/extensions/nightthemeswitcher/gtk-variants/night "'Orchis-Yellow-Dark'"
dconf write /org/gnome/shell/extensions/nightthemeswitcher/shell-variants/day "'Orchis-Yellow-Light'" dconf write /org/gnome/shell/extensions/nightthemeswitcher/shell-variants/day "'Orchis-Yellow-Light'"
dconf write /org/gnome/shell/extensions/nightthemeswitcher/shell-variants/night "'Orchis-Yellow-Dark'" dconf write /org/gnome/shell/extensions/nightthemeswitcher/shell-variants/night "'Orchis-Yellow-Dark'"
echo '#! /bin/bash' > $HOME/.config/pika_theme || touch $HOME/.config/pika_theme && echo '#! /bin/bash' > $HOME/.config/pika_theme echo '#! /bin/bash' > $HOME/.config/pika_theme || touch $HOME/.config/pika_theme && echo '#! /bin/bash' > $HOME/.config/pika_theme
echo 'KVANTUM_THEME_DARK=Orchis-dark' >> $HOME/.config/pika_theme echo 'KVANTUM_THEME_DARK=Orchis-dark#' >> $HOME/.config/pika_theme
echo 'KVANTUM_THEME_LIGHT=Orchis' >> $HOME/.config/pika_theme echo 'KVANTUM_THEME_LIGHT=Orchis#' >> $HOME/.config/pika_theme
echo 'GTK_THEME_PATH_DARK=/usr/share/themes/$(dconf read /org/gnome/desktop/interface/gtk-theme | 'sed \"s+\'++\"' | 'sed \"s+\'++\"' | 'sed \"s+-Dark++\"' | 'sed \"s+-Light++\"')'-Dark >> $HOME/.config/pika_theme echo 'GTK_THEME_PATH_DARK=/usr/share/themes/$(dconf read /org/gnome/desktop/interface/gtk-theme | 'sed \"s+\'++\"' | 'sed \"s+\'++\"' | 'sed \"s+-Dark++\"' | 'sed \"s+-Light++\"')'-Dark >> $HOME/.config/pika_theme
echo 'GTK_THEME_PATH_LIGHT=/usr/share/themes/$(dconf read /org/gnome/desktop/interface/gtk-theme | 'sed \"s+\'++\"' | 'sed \"s+\'++\"' | 'sed \"s+-Dark++\"' | 'sed \"s+-Light++\"')'-Light >> $HOME/.config/pika_theme echo 'GTK_THEME_PATH_LIGHT=/usr/share/themes/$(dconf read /org/gnome/desktop/interface/gtk-theme | 'sed \"s+\'++\"' | 'sed \"s+\'++\"' | 'sed \"s+-Dark++\"' | 'sed \"s+-Light++\"')'-Light >> $HOME/.config/pika_theme
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
pika-gnome-theme dark
fi fi