sway: only open current monitor for satty screenshot editor
This commit is contained in:
		
							parent
							
								
									e72e9a2688
								
							
						
					
					
						commit
						2f7572839f
					
				
					 2 changed files with 10 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -46,4 +46,13 @@ case $1 in
 | 
			
		|||
            $screenshot -o "$cur_output" - | $copy ||
 | 
			
		||||
            $screenshot - | $copy
 | 
			
		||||
        ;;
 | 
			
		||||
    edit)
 | 
			
		||||
        # Focused monitor to clipboard
 | 
			
		||||
        cur_output=$(swaymsg -t get_outputs |
 | 
			
		||||
            jq -r '.[] | select(.focused) | .name')
 | 
			
		||||
 | 
			
		||||
        test -n "$cur_output" &&
 | 
			
		||||
            $screenshot -o "$cur_output" - | satty --filename - --output-filename "$DESTFILE" ||
 | 
			
		||||
            $screenshot - | satty --filename - --output-filename "$DESTFILE"
 | 
			
		||||
        ;;
 | 
			
		||||
esac
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue