dylanaraps / neofetch

🖼️ A command-line system information tool written in bash 3.2+
MIT License
22.13k stars 1.66k forks source link

Incorrect GTK2 theme if more than one filename specified in GTK2_RC_FILES #2214

Open DinoDevel opened 2 years ago

DinoDevel commented 2 years ago

Description

Neofetch doesn't parse GTK2_RC_FILES. But according to gnome wiki, and as name of the variable suggests, GTK2_RC_FILES can, and usually is, contain more than one gtkrc filename. Neofetch still treats entire contents of GTK2_RC_FILES as single filename even if environment variable GTK2_RC_FILES contains more than on filename. This obviously fails resulting in fallback to defaults in /etc/gtk-2.0/gtkrc.

Neofetch version

Neofetch 6.0.0

Verbose log

+ [[ -z '' ]]
+ [[ -f /home/xxxxxxx/.gtkrc-2.0:/home/xxxxxxx/.config/gtkrc-2.0 ]]
+ [[ -f /etc/gtk-2.0/gtkrc ]]
++ grep '^[^#]*gtk-theme-name' /etc/gtk-2.0/gtkrc
+ gtk2_theme='gtk-theme-name = "Adwaita"'
+ gtk2_theme=' "Adwaita"'
+ [[ -z '' ]]
+ [[ -f /home/xxxxxxx/.config/gtk-3.0/settings.ini ]]
++ grep '^[^#]*gtk-theme-name' /home/xxxxxxx/.config/gtk-3.0/settings.ini
+ gtk3_theme=gtk-theme-name=Breeze-Dark
+ gtk3_theme=Breeze-Dark