nwg-piotr / nwg-look

GTK3 settings editor adapted to work in the wlroots environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GTK2 file not being created even though checkbox is set

Frontear opened this issue · comments

Attempting to set a theme, running Hyprland WM setting WhiteSur theme. Everything applies correctly but the gtk2 file does not get saved. I do have GTK2_RC_FILES defined, idk if thats meant to break the app but it doesnt respect this env either. There are 0 traces of any gtk2 files created on the system.

By constrast, lxappearence did make them. I recently switched from lxappearance to this, because I was recommended it. Any ideas what might be happening?

According to Arch Wiki:

GTK 2 user specific: ~/.gtkrc-2.0

and that's where nwg-look saves changes.

It doesnt create this file for me, thats what im confused about as well

Try running in the terminal with the -d argument. Press the "Apply" button, and show me the terminal output.

$ nwg-look -d
INFO[0000] >>> Loading preferences                      
DEBU[0000] Loaded preferences: {"export-settings-ini":true,"export-gtkrc-20":true,"export-index-theme":true,"export-xsettingsd":true} 
DEBU[0000] lang 'en_US' set from the $LANG variable     
INFO[0000] lang: en_US                                  
INFO[0000] >>> Loading basic lang from '/usr/share/nwg-look/langs/en_US.json' 
DEBU[0000] Cursor theme found: Adwaita                  
DEBU[0000] Cursor theme found: WhiteSur-cursors         
INFO[0000] >>> Parsing original /home/frontear/.config/gtk-3.0/settings.ini 
DEBU[0000] gtk-theme-name: WhiteSur-Dark-solid          
DEBU[0000] gtk-icon-theme-name: WhiteSur-dark           
DEBU[0000] gtk-font-name: Cantarell 11                  
DEBU[0000] gtk-cursor-theme-name: WhiteSur-cursors      
DEBU[0000] gtk-cursor-theme-size: 24                    
DEBU[0000] gtk-toolbar-style: GTK_TOOLBAR_ICONS         
DEBU[0000] gtk-toolbar-icon-size: GTK_ICON_SIZE_LARGE_TOOLBAR 
DEBU[0000] gtk-button-images: false                     
DEBU[0000] gtk-menu-images: false                       
DEBU[0000] gtk-enable-event-sounds: true                
DEBU[0000] gtk-enable-input-feedback-sounds: false      
DEBU[0000] gtk-xft-antialias: 1                         
DEBU[0000] gtk-xft-hinting: 1                           
DEBU[0000] gtk-xft-hintstyle: hintslight                
DEBU[0000] gtk-xft-rgba: rgb                            
DEBU[0000] gtk-application-prefer-dark-theme: true      
INFO[0000] >>> Reading gsettings                        
INFO[0000] gtk-theme: WhiteSur-Dark-solid               
INFO[0000] icon-theme: WhiteSur-dark                    
INFO[0000] font-name: Cantarell 11                      
INFO[0000] cursor-theme: WhiteSur-cursors               
INFO[0000] cursor-size: 24                              
INFO[0000] toolbar-style: both-horiz                    
INFO[0000] toolbar-icons-size: large                    
INFO[0000] font-hinting: slight                         
INFO[0000] font-antialiasing: grayscale                 
INFO[0000] font-rgba-order: rgb                         
INFO[0000] text-scaling-factor: 1                       
INFO[0000] color-scheme: prefer-dark                    
INFO[0000] event-sounds: true                           
INFO[0000] input-feedback-sounds: false                 
DEBU[0000] Excluded theme: Default                      
DEBU[0000] Excluded theme: Emacs                        
DEBU[0000] Theme found: Fluent                          
DEBU[0000] Theme found: Fluent-Dark                     
DEBU[0000] Theme found: Fluent-Dark-compact             
DEBU[0000] Theme found: Fluent-Light                    
DEBU[0000] Theme found: Fluent-Light-compact            
DEBU[0000] Theme found: Fluent-compact                  
DEBU[0000] Theme found: Fluent-green                    
DEBU[0000] Theme found: Fluent-green-Dark               
DEBU[0000] Theme found: Fluent-green-Dark-compact       
DEBU[0000] Theme found: Fluent-green-Light              
DEBU[0000] Theme found: Fluent-green-Light-compact      
DEBU[0000] Theme found: Fluent-green-compact            
DEBU[0000] Theme found: Fluent-grey                     
DEBU[0000] Theme found: Fluent-grey-Dark                
DEBU[0000] Theme found: Fluent-grey-Dark-compact        
DEBU[0000] Theme found: Fluent-grey-Light               
DEBU[0000] Theme found: Fluent-grey-Light-compact       
DEBU[0000] Theme found: Fluent-grey-compact             
DEBU[0000] Theme found: Fluent-orange                   
DEBU[0000] Theme found: Fluent-orange-Dark              
DEBU[0000] Theme found: Fluent-orange-Dark-compact      
DEBU[0000] Theme found: Fluent-orange-Light             
DEBU[0000] Theme found: Fluent-orange-Light-compact     
DEBU[0000] Theme found: Fluent-orange-compact           
DEBU[0000] Theme found: Fluent-pink                     
DEBU[0000] Theme found: Fluent-pink-Dark                
DEBU[0000] Theme found: Fluent-pink-Dark-compact        
DEBU[0000] Theme found: Fluent-pink-Light               
DEBU[0000] Theme found: Fluent-pink-Light-compact       
DEBU[0000] Theme found: Fluent-pink-compact             
DEBU[0000] Theme found: Fluent-purple                   
DEBU[0000] Theme found: Fluent-purple-Dark              
DEBU[0000] Theme found: Fluent-purple-Dark-compact      
DEBU[0000] Theme found: Fluent-purple-Light             
DEBU[0000] Theme found: Fluent-purple-Light-compact     
DEBU[0000] Theme found: Fluent-purple-compact           
DEBU[0000] Theme found: Fluent-red                      
DEBU[0000] Theme found: Fluent-red-Dark                 
DEBU[0000] Theme found: Fluent-red-Dark-compact         
DEBU[0000] Theme found: Fluent-red-Light                
DEBU[0000] Theme found: Fluent-red-Light-compact        
DEBU[0000] Theme found: Fluent-red-compact              
DEBU[0000] Theme found: Fluent-round                    
DEBU[0000] Theme found: Fluent-round-Dark               
DEBU[0000] Theme found: Fluent-round-Dark-compact       
DEBU[0000] Theme found: Fluent-round-Light              
DEBU[0000] Theme found: Fluent-round-Light-compact      
DEBU[0000] Theme found: Fluent-round-compact            
DEBU[0000] Theme found: Fluent-round-green              
DEBU[0000] Theme found: Fluent-round-green-Dark         
DEBU[0000] Theme found: Fluent-round-green-Dark-compact 
DEBU[0000] Theme found: Fluent-round-green-Light        
DEBU[0000] Theme found: Fluent-round-green-Light-compact 
DEBU[0000] Theme found: Fluent-round-green-compact      
DEBU[0000] Theme found: Fluent-round-grey               
DEBU[0000] Theme found: Fluent-round-grey-Dark          
DEBU[0000] Theme found: Fluent-round-grey-Dark-compact  
DEBU[0000] Theme found: Fluent-round-grey-Light         
DEBU[0000] Theme found: Fluent-round-grey-Light-compact 
DEBU[0000] Theme found: Fluent-round-grey-compact       
DEBU[0000] Theme found: Fluent-round-orange             
DEBU[0000] Theme found: Fluent-round-orange-Dark        
DEBU[0000] Theme found: Fluent-round-orange-Dark-compact 
DEBU[0000] Theme found: Fluent-round-orange-Light       
DEBU[0000] Theme found: Fluent-round-orange-Light-compact 
DEBU[0000] Theme found: Fluent-round-orange-compact     
DEBU[0000] Theme found: Fluent-round-pink               
DEBU[0000] Theme found: Fluent-round-pink-Dark          
DEBU[0000] Theme found: Fluent-round-pink-Dark-compact  
DEBU[0000] Theme found: Fluent-round-pink-Light         
DEBU[0000] Theme found: Fluent-round-pink-Light-compact 
DEBU[0000] Theme found: Fluent-round-pink-compact       
DEBU[0000] Theme found: Fluent-round-purple             
DEBU[0000] Theme found: Fluent-round-purple-Dark        
DEBU[0000] Theme found: Fluent-round-purple-Dark-compact 
DEBU[0000] Theme found: Fluent-round-purple-Light       
DEBU[0000] Theme found: Fluent-round-purple-Light-compact 
DEBU[0000] Theme found: Fluent-round-purple-compact     
DEBU[0000] Theme found: Fluent-round-red                
DEBU[0000] Theme found: Fluent-round-red-Dark           
DEBU[0000] Theme found: Fluent-round-red-Dark-compact   
DEBU[0000] Theme found: Fluent-round-red-Light          
DEBU[0000] Theme found: Fluent-round-red-Light-compact  
DEBU[0000] Theme found: Fluent-round-red-compact        
DEBU[0000] Theme found: Fluent-round-teal               
DEBU[0000] Theme found: Fluent-round-teal-Dark          
DEBU[0000] Theme found: Fluent-round-teal-Dark-compact  
DEBU[0000] Theme found: Fluent-round-teal-Light         
DEBU[0000] Theme found: Fluent-round-teal-Light-compact 
DEBU[0000] Theme found: Fluent-round-teal-compact       
DEBU[0000] Theme found: Fluent-round-yellow             
DEBU[0000] Theme found: Fluent-round-yellow-Dark        
DEBU[0000] Theme found: Fluent-round-yellow-Dark-compact 
DEBU[0000] Theme found: Fluent-round-yellow-Light       
DEBU[0000] Theme found: Fluent-round-yellow-Light-compact 
DEBU[0000] Theme found: Fluent-round-yellow-compact     
DEBU[0000] Theme found: Fluent-teal                     
DEBU[0000] Theme found: Fluent-teal-Dark                
DEBU[0000] Theme found: Fluent-teal-Dark-compact        
DEBU[0000] Theme found: Fluent-teal-Light               
DEBU[0000] Theme found: Fluent-teal-Light-compact       
DEBU[0000] Theme found: Fluent-teal-compact             
DEBU[0000] Theme found: Fluent-yellow                   
DEBU[0000] Theme found: Fluent-yellow-Dark              
DEBU[0000] Theme found: Fluent-yellow-Dark-compact      
DEBU[0000] Theme found: Fluent-yellow-Light             
DEBU[0000] Theme found: Fluent-yellow-Light-compact     
DEBU[0000] Theme found: Fluent-yellow-compact           
DEBU[0000] Theme found: Nordic                          
DEBU[0000] Theme found: Orchis                          
DEBU[0000] Theme found: Orchis-Compact                  
DEBU[0000] Theme found: Orchis-Dark                     
DEBU[0000] Theme found: Orchis-Dark-Compact             
DEBU[0000] Theme found: Orchis-Light                    
DEBU[0000] Theme found: Orchis-Light-Compact            
DEBU[0000] Theme found: Raleigh                         
DEBU[0000] Theme found: WhiteSur-Dark                   
DEBU[0000] Theme found: WhiteSur-Dark-solid             
DEBU[0000] Theme found: WhiteSur-Light                  
DEBU[0000] Theme found: WhiteSur-Light-solid            
DEBU[0003] Saved config: {
 "export-settings-ini": true,
 "export-gtkrc-20": true,
 "export-index-theme": true,
 "export-xsettingsd": true
}
$ ls -la                                                                                                                                                                                          
total 88
drwx------ 20 frontear frontear 4096 Jul 22 16:51 .
drwxr-xr-x  4 root     root     4096 Jun  6 15:35 ..
drwxr-xr-x  2 frontear frontear 4096 Jul 21 19:42 bin
drwxr-xr-x 23 frontear frontear 4096 Jul 24 21:24 .cache
drwxr-xr-x 36 frontear frontear 4096 Jul 23 02:20 .config
drwxr-xr-x  2 frontear frontear 4096 Jun  6 22:56 Desktop
drwxr-xr-x  4 frontear frontear 4096 Jun 24 17:25 Documents
drwxr-xr-x  2 frontear frontear 4096 Jul 22 18:54 Downloads
drwx------  5 frontear frontear 4096 Jun 21 22:04 .gnupg
drwxr-xr-x  3 frontear frontear 4096 Jul 22 16:51 .java
drwx------  4 frontear frontear 4096 Jun 28 18:34 .local
drwxr-xr-x  2 frontear frontear 4096 Jun  6 22:56 Music
drwxr-xr-x  4 frontear frontear 4096 Jul 22 18:50 Pictures
drwx------  3 frontear frontear 4096 Jun 27 18:43 .pki
drwxr-xr-x  2 frontear frontear 4096 Jun  6 22:56 Public
drwxr-xr-x  4 frontear frontear 4096 Jun 14 21:03 .secret-service
drwx------  2 frontear frontear 4096 Jun 15 01:58 .ssh
drwxr-xr-x  2 frontear frontear 4096 Jun  6 22:56 Templates
drwxr-xr-x  2 frontear frontear 4096 Jun  6 22:56 Videos
drwxr-xr-x  4 frontear frontear 4096 Jun 25 02:39 .vscode
-rw-r--r--  1 frontear frontear 1138 Jun 27 18:41 .zprofile
-rw-r--r--  1 frontear frontear 1102 Jun 27 18:46 .zshrc

Do not open the "Preferences" tab. Launch the program and press the "Apply" button while you still have the default "Widgets" tab open.

Hah, I see the issue. The bug is that the ~/.config/gtk-2.0 folder (defined in GTK2_RC_FILES) does not exist, and as a result it cannot create the file ~/.config/gtk-2.0/gtkrc. Making the directory works and the program correctly operates as intended. That being said, probably a good idea to fix that issue to consider a warning, or automate recursive dir creation.

Edit, notice it also "WARN"s and says can't find icons folder if ~/.icons doesn't exist.

IMO it's user's job to make sure if the path they specify in an env var actually exists.

I replaced the fatal error on output path not found with a warning, so from now it won't stop further program execution:

INFO[0007] >>> Backing up gsettings to /home/piotr/.local/share/nwg-look 
INFO[0007] >>> Exporting /home/piotr/.config/gtk-3.0/settings.ini 
INFO[0007] >>> Exporting /home/piotr/test1234/test.ini  
WARN[0007] Failed creating file: open /home/piotr/test1234/test.ini: no such file or directory 
INFO[0007] >>> Exporting /home/piotr/.icons/default/index.theme 
INFO[0007] >>> Exporting /home/piotr/.config/xsettingsd/xsettingsd.conf 

Edit, notice it also "WARN"s and says can't find icons folder if ~/.icons doesn't exist.

It warns if none of ~/.icons, XDG_DATA_HOME/icons or ~/.local/share/icons exists, because one of above is necessary.