Add colorpicker
This commit is contained in:
		
							parent
							
								
									6085c9f417
								
							
						
					
					
						commit
						1a40104856
					
				
					 4 changed files with 10 additions and 2 deletions
				
			
		
							
								
								
									
										6
									
								
								.bin/colorpicker
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								.bin/colorpicker
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,6 @@ | ||||||
|  | #!/usr/bin/env sh | ||||||
|  | 
 | ||||||
|  | grim -g "$(slurp -c bd93f9 -p)" -t ppm - \ | ||||||
|  |   | convert - -format '%[pixel:p{0,0}]' txt:- \ | ||||||
|  |   | grep -o '#[0-9A-F]\{6\}' \ | ||||||
|  |   | wl-copy -n | ||||||
|  | @ -38,7 +38,7 @@ call_screenshot_tool() { | ||||||
| 		flameshot) | 		flameshot) | ||||||
| 			result=$(flameshot gui -r | tee $screenshot_path | wc -c) ;; | 			result=$(flameshot gui -r | tee $screenshot_path | wc -c) ;; | ||||||
| 		grim) | 		grim) | ||||||
| 			result=$(grim -g "$(slurp)" - | tee $screenshot_path | wc -c) ;; | 			result=$(grim -g "$(slurp -c bd93f9)" - | tee $screenshot_path | wc -c) ;; | ||||||
| 		*) | 		*) | ||||||
| 			echo "Unknown screenshot tool: $tool" | 			echo "Unknown screenshot tool: $tool" | ||||||
| 			return 1 ;; | 			return 1 ;; | ||||||
|  |  | ||||||
|  | @ -12,8 +12,10 @@ bind = $main_mod, Pause, exec, menu-shutdown | ||||||
| bind = $main_mod, T, exec, ts-control | bind = $main_mod, T, exec, ts-control | ||||||
| bind = $main_mod, C, exec, [float] $TERMINAL -e python | bind = $main_mod, C, exec, [float] $TERMINAL -e python | ||||||
| 
 | 
 | ||||||
|  | # Screenshot / Color picker | ||||||
| bind = $main_mod, Print, exec, screenshot | bind = $main_mod, Print, exec, screenshot | ||||||
| bind = $main_mod CTRL, Print, exec, screenshot --no-upload | bind = $main_mod CTRL, Print, exec, screenshot --no-upload | ||||||
|  | bind = $main_mod ALT, Print, exec, colorpicker | ||||||
| 
 | 
 | ||||||
| bind = $main_mod SHIFT, R, exec, autostart-manage run-wayland | bind = $main_mod SHIFT, R, exec, autostart-manage run-wayland | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -65,4 +65,4 @@ handle() { | ||||||
| 	esac | 	esac | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| socat -U - "UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do handle "$line"; done | socat -U - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do handle "$line"; done | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue