-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listening to System Theme #328
Labels
enhancement
New feature or request
Comments
I am achieving this by using a script running as a process in the background. Below is the script for anyone who is interested. #!/bin/bash
apply_pano_background() {
color_scheme="$1"
if [ "$color_scheme" == "'prefer-dark'" ]; then
dconf write /org/gnome/shell/extensions/pano/window-background-color "'rgb(36,36,36)'"
else
dconf write /org/gnome/shell/extensions/pano/window-background-color "'rgb(242,242,242)'"
fi
}
apply_pano_accent_color() {
accent_color=$(gsettings get org.gnome.desktop.interface accent-color)
case "$accent_color" in
"'blue'")
dconf write /org/gnome/shell/extensions/pano/active-item-border-color "'rgb(53,132,228)'"
dconf write /org/gnome/shell/extensions/pano/hovered-item-border-color "'rgb(53,132,228)'"
;;
"'teal'")
dconf write /org/gnome/shell/extensions/pano/active-item-border-color "'rgb(33,144,164)'"
dconf write /org/gnome/shell/extensions/pano/hovered-item-border-color "'rgb(33,144,164)'"
;;
"'green'")
dconf write /org/gnome/shell/extensions/pano/active-item-border-color "'rgb(58,148,74)'"
dconf write /org/gnome/shell/extensions/pano/hovered-item-border-color "'rgb(58,148,74)'"
;;
"'yellow'")
dconf write /org/gnome/shell/extensions/pano/active-item-border-color "'rgb(200,136,0)'"
dconf write /org/gnome/shell/extensions/pano/hovered-item-border-color "'rgb(200,136,0)'"
;;
"'orange'")
dconf write /org/gnome/shell/extensions/pano/active-item-border-color "'rgb(237,91,0)'"
dconf write /org/gnome/shell/extensions/pano/hovered-item-border-color "'rgb(237,91,0)'"
;;
"'red'")
dconf write /org/gnome/shell/extensions/pano/active-item-border-color "'rgb(230,45,66)'"
dconf write /org/gnome/shell/extensions/pano/hovered-item-border-color "'rgb(230,45,66)'"
;;
"'pink'")
dconf write /org/gnome/shell/extensions/pano/active-item-border-color "'rgb(213,97,153)'"
dconf write /org/gnome/shell/extensions/pano/hovered-item-border-color "'rgb(213,97,153)'"
;;
"'purple'")
dconf write /org/gnome/shell/extensions/pano/active-item-border-color "'rgb(145,65,172)'"
dconf write /org/gnome/shell/extensions/pano/hovered-item-border-color "'rgb(145,65,172)'"
;;
"'slate'")
dconf write /org/gnome/shell/extensions/pano/active-item-border-color "'rgb(111,131,150)'"
dconf write /org/gnome/shell/extensions/pano/hovered-item-border-color "'rgb(111,131,150)'"
;;
*)
dconf write /org/gnome/shell/extensions/pano/active-item-border-color "'rgb(111,131,150)'"
dconf write /org/gnome/shell/extensions/pano/hovered-item-border-color "'rgb(111,131,150)'"
;;
esac
}
current_scheme=$(gsettings get org.gnome.desktop.interface color-scheme)
current_accent=$(gsettings get org.gnome.desktop.interface accent-color)
apply_pano_background "$current_scheme"
apply_pano_accent_color
gsettings monitor org.gnome.desktop.interface color-scheme | while read -r line; do
current_scheme=$(gsettings get org.gnome.desktop.interface color-scheme)
apply_pano_background "$current_scheme"
done &
gsettings monitor org.gnome.desktop.interface accent-color | while read -r line; do
apply_pano_accent_color
done & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Currently, the extension does not change accent colours or listen to the current theme being applied in Gnome.
Describe the solution you'd like
The extension should be able to listen to the current accent colour and change its own accent colour (borders) too.
Describe alternatives you've considered
None
Additional context
Below is a demo:
Screencast.From.2024-11-11.20-35-53.mp4
The text was updated successfully, but these errors were encountered: