replace wofi with bemenu
This commit is contained in:
		
							parent
							
								
									6382debb3b
								
							
						
					
					
						commit
						158c761ae2
					
				
					 3 changed files with 14 additions and 81 deletions
				
			
		|  | @ -52,7 +52,6 @@ in { | |||
|     ./theme.nix | ||||
|     ./sway.nix | ||||
|     ./waybar.nix | ||||
|     ./wofi.nix | ||||
|   ]; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|  |  | |||
|  | @ -8,10 +8,16 @@ with lib; let | |||
|   cfg = config.local.gui; | ||||
| in { | ||||
|   config = mkIf cfg.enable { | ||||
|     home.packages = [ | ||||
|       pkgs.wlr-randr | ||||
|     home.packages = with pkgs; [ | ||||
|       wlr-randr | ||||
|       bemenu | ||||
|     ]; | ||||
| 
 | ||||
|     home.sessionVariables = { | ||||
|       "BEMENU_BACKEND" = "wayland"; | ||||
|       "BEMENU_RENDERER" = "bemenu-wlroots"; | ||||
|     }; | ||||
| 
 | ||||
|     services = { | ||||
|       swayidle = { | ||||
|         enable = true; | ||||
|  | @ -43,7 +49,7 @@ in { | |||
|           cfg.monitors; | ||||
| 
 | ||||
|         modifier = "Mod4"; | ||||
|          | ||||
| 
 | ||||
|         focus = { | ||||
|           followMouse = true; | ||||
|           wrapping = "workspace"; | ||||
|  | @ -85,6 +91,8 @@ in { | |||
|           titlebar = false; | ||||
|         }; | ||||
| 
 | ||||
|         menu = "bemenu-run"; | ||||
| 
 | ||||
|         workspaceLayout = "tabbed"; | ||||
| 
 | ||||
|         colors = { | ||||
|  | @ -128,17 +136,17 @@ in { | |||
| 
 | ||||
|         keybindings = let | ||||
|           mod = config.wayland.windowManager.sway.config.modifier; | ||||
|           wofi = config.programs.wofi.package; | ||||
| 
 | ||||
|           grimshot = getExe pkgs.sway-contrib.grimshot; | ||||
|           bemenuCommand = ''bemenu-run --center --width-factor 0.2 --fixed-height --list 10 --scrollbar none --auto-select --accept-single --fn "JetBrains Mono 12" --prompt "" --tb "#000000" --tf "#EAEAEA" --fb "#000000" --ff "#EAEAEA" --cb "#EAEAEA" --cf "#000000" --nb "#000000" --nf "#EAEAEA" --sb "#000000" --sf "#EAEAEA" --hb "#000000" --hf "#EAEAEA" --fbb "#000000" --fbf "#000000" --ab "#000000" --af "#EAEAEA"''; | ||||
|         in | ||||
|           mkOptionDefault { | ||||
|             "${mod}+a" = "focus parent"; | ||||
|             "${mod}+c" = "focus child"; | ||||
|             "${mod}+d" = "exec --no-startup-id ${getExe wofi} -S run"; | ||||
|             "${mod}+d" = "exec ${bemenuCommand}"; | ||||
|             "${mod}+l" = "exec ${getExe pkgs.gtklock} -d"; | ||||
|             "${mod}+Return" = "exec ${lib.getExe pkgs.kitty} ${lib.getExe pkgs.tmux}"; | ||||
|             "${mod}+Shift+s" = "exec ${grimshot} copy area"; | ||||
|             "${mod}+Shift+a" = "exec ${grimshot} copy active"; | ||||
|             "${mod}+Tab" = "focus right"; | ||||
|             "${mod}+Shift+Tab" = "focus left"; | ||||
|             "${mod}+Shift+w" = "move workspace to output right"; | ||||
|  |  | |||
|  | @ -1,74 +0,0 @@ | |||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| with lib; let | ||||
|   cfg = config.local.gui; | ||||
| in { | ||||
|   config = mkIf cfg.enable { | ||||
|     programs = { | ||||
|       wofi = { | ||||
|         enable = true; | ||||
|         settings = { | ||||
|           prompt = ""; | ||||
|           width = "25%"; | ||||
|           height = "30%"; | ||||
|         }; | ||||
|         style = '' | ||||
|           window { | ||||
|             background-color: rgb(0, 0, 0); | ||||
|             color: #eaeaea; | ||||
|             font-family: monospace; | ||||
|             font-size: 12px; | ||||
|             border: none; | ||||
|             border-radius: 0; | ||||
|             padding: 0; | ||||
|             width: 50%;   /* half screen width */ | ||||
|           } | ||||
| 
 | ||||
|           /* Search input */ | ||||
|           #input { | ||||
|             background-color: rgba(0, 0, 0, 0.5); | ||||
|             color: #ffffff; | ||||
|             padding: 4px 6px; | ||||
|             border: none; | ||||
|             border-radius: 0; | ||||
|             margin: 0; | ||||
|           } | ||||
| 
 | ||||
|           /* Results list container */ | ||||
|           #inner-box { | ||||
|             background-color: transparent; | ||||
|             margin: 0; | ||||
|             padding: 0; | ||||
|           } | ||||
| 
 | ||||
|           /* Entries */ | ||||
|           #entry { | ||||
|             padding: 2px 6px; | ||||
|             margin: 0; | ||||
|             border-radius: 0; | ||||
|             background-color: transparent; | ||||
|             color: #cccccc; | ||||
|           } | ||||
| 
 | ||||
|           /* Text inside entries */ | ||||
|           #text { | ||||
|             padding: 0; | ||||
|             margin: 0; | ||||
|           } | ||||
| 
 | ||||
|           /* Scrollbar */ | ||||
|           scrollbar { | ||||
|             background: transparent; | ||||
|           } | ||||
|           scrollbar slider { | ||||
|             background: rgba(255, 255, 255, 0.15); | ||||
|           } | ||||
|         ''; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue