move theme settings to global vars
This commit is contained in:
		
							parent
							
								
									e07ec45d45
								
							
						
					
					
						commit
						32d2e07e84
					
				
					 5 changed files with 15 additions and 40 deletions
				
			
		| 
						 | 
				
			
			@ -15,23 +15,4 @@
 | 
			
		|||
      systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
 | 
			
		||||
    '';
 | 
			
		||||
  };
 | 
			
		||||
  # currently, there is some friction between sway and gtk:
 | 
			
		||||
  # https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
 | 
			
		||||
  # the suggested way to set gtk settings is with gsettings
 | 
			
		||||
  # for gsettings to work, we need to tell it where the schemas are
 | 
			
		||||
  # using the XDG_DATA_DIR environment variable
 | 
			
		||||
  # run at the end of sway config
 | 
			
		||||
  configure-gtk = pkgs.writeTextFile {
 | 
			
		||||
    name = "configure-gtk";
 | 
			
		||||
    destination = "/bin/configure-gtk";
 | 
			
		||||
    executable = true;
 | 
			
		||||
    text = let
 | 
			
		||||
      schema = pkgs.gsettings-desktop-schemas;
 | 
			
		||||
      datadir = "${schema}/share/gsettings-schemas/${schema.name}";
 | 
			
		||||
    in ''
 | 
			
		||||
      export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
 | 
			
		||||
      gnome_schema=org.gnome.desktop.interface
 | 
			
		||||
      # gsettings set $gnome_schema gtk-theme 'Dracula'
 | 
			
		||||
    '';
 | 
			
		||||
  };
 | 
			
		||||
})
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue