add color picker
This commit is contained in:
		
							parent
							
								
									19b43a12f2
								
							
						
					
					
						commit
						b40b957fad
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,14 @@
 | 
			
		|||
{ config, pkgs, lib, ... }:
 | 
			
		||||
let
 | 
			
		||||
  inherit (import ./variables.nix) key theme color accent font;
 | 
			
		||||
  color_picker = pkgs.writeShellScript "color_picker" ''
 | 
			
		||||
    grim -g "$(slurp -b aabbcc00 -p)" - |
 | 
			
		||||
        convert - txt:- |
 | 
			
		||||
        grep -oE '#[0-9A-Fa-f]{6}' |
 | 
			
		||||
        wl-copy -n
 | 
			
		||||
 | 
			
		||||
    notify-send "$(wl-paste)" "Copied to clipboard"
 | 
			
		||||
  '';
 | 
			
		||||
  pulse_sink = pkgs.writeShellScriptBin "pulse_sink" ''
 | 
			
		||||
    #!/bin/sh
 | 
			
		||||
    output=$(printf "HDMI\nHeadphones" | wdmenu -i -p "Output:")
 | 
			
		||||
| 
						 | 
				
			
			@ -275,6 +283,7 @@ in {
 | 
			
		|||
          other_binds = {
 | 
			
		||||
            "${mod}+p" = "exec ${pkgs.wpass}/bin/wpass";
 | 
			
		||||
            "${mod}+s" = "exec ${menu}";
 | 
			
		||||
            "${mod}+c" = "exec ${color_picker}";
 | 
			
		||||
            "${mod}+Return" = "exec ${terminal}";
 | 
			
		||||
            "${mod}+Ctrl+Return" = "exec thunar";
 | 
			
		||||
            "${mod}+x" = "kill";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue