scripts: extract color_picker from sway
This commit is contained in:
		
							parent
							
								
									313a8e168a
								
							
						
					
					
						commit
						caa4495215
					
				
					 3 changed files with 13 additions and 9 deletions
				
			
		
							
								
								
									
										10
									
								
								scripts/color_picker
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								scripts/color_picker
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,10 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
set -xe
 | 
			
		||||
 | 
			
		||||
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"
 | 
			
		||||
| 
						 | 
				
			
			@ -40,6 +40,7 @@ create_scripts
 | 
			
		|||
      [ capitaine-cursors grim slurp jq sway wl-clipboard xdg-user-dirs ];
 | 
			
		||||
    volumesh = [ pulseaudio libnotify ];
 | 
			
		||||
    pulse_sink = [ pulseaudio pamixer final.wdmenu ];
 | 
			
		||||
    color_picker = [ grim slurp wl-clipboard libnotify imagemagick ];
 | 
			
		||||
  } // lib.mapAttrs import_script {
 | 
			
		||||
  wdmenu = ./wdmenu.nix;
 | 
			
		||||
  wlauncher = ./wlauncher.nix;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue