Minor refactors
This commit is contained in:
		
							parent
							
								
									b7c00a985c
								
							
						
					
					
						commit
						8f57daf4bd
					
				|  | @ -9,9 +9,9 @@ with lib; | |||
| with lib.my; | ||||
| let cfg = config.modules.desktop.browsers.qutebrowser; | ||||
| in { | ||||
|   options.modules.desktop.browsers.qutebrowser = { | ||||
|   options.modules.desktop.browsers.qutebrowser = with types; { | ||||
|     enable = mkBoolOpt false; | ||||
|     userStyles = mkOpt types.lines ""; | ||||
|     userStyles = mkOpt lines ""; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|  | @ -32,7 +32,7 @@ in { | |||
|         source = "${configDir}/qutebrowser"; | ||||
|         recursive = true; | ||||
|       }; | ||||
|       dataFile."qutebrowser/userstyles.css".text = userStyles; | ||||
|       dataFile."qutebrowser/userstyles.css".text = cfg.userStyles; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
|  | @ -114,13 +114,17 @@ in { | |||
|     env.GTK_DATA_PREFIX = [ "${config.system.path}" ]; | ||||
|     env.QT_QPA_PLATFORMTHEME = "gtk2"; | ||||
|     qt5 = { style = "gtk2"; platformTheme = "gtk2"; }; | ||||
|     # Also, read xresources files in ~/.config/xtheme/* and init scripts in | ||||
|     # ~/.config/xsessions/*, so I can centralize my theme config files. | ||||
| 
 | ||||
|     services.xserver.displayManager.sessionCommands = | ||||
|       let cfg = config.services.xserver.desktopManager.wallpaper; in '' | ||||
|         # Also, read xresources files in ~/.config/xtheme/* and init scripts in | ||||
|         # ~/.config/xsessions/*, so I can centralize my theme config files. | ||||
|         export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc" | ||||
|         source "$XDG_CONFIG_HOME"/xsession/*.sh | ||||
|         xrdb -merge "$XDG_CONFIG_HOME"/xtheme/* | ||||
| 
 | ||||
|         # Set the wallpaper ourselves so we don't need .background-image and/or | ||||
|         # .fehbg polluting $HOME | ||||
|         if [ -e "$XDG_DATA_HOME/wallpaper" ]; then | ||||
|           ${pkgs.feh}/bin/feh --bg-${cfg.mode} \ | ||||
|             ${optionalString cfg.combineScreens "--no-xinerama"} \ | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue