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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -173,9 +173,7 @@ let
 | 
			
		|||
    "${mod}+c" = "exec ${pkgs.color_picker}/bin/color_picker";
 | 
			
		||||
    "${mod}+Return" = "exec ${terminal}";
 | 
			
		||||
    "${mod}+Ctrl+Return" = "exec thunar";
 | 
			
		||||
    "${mod}+Shift+s" = ''
 | 
			
		||||
      exec grim - | satty --filename - --output-filename "$(xdg-user-dir PICTURES)"/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png
 | 
			
		||||
    '';
 | 
			
		||||
    "${mod}+Shift+s" = "exec ${pkgs.screenshotsh}/bin/screenshotsh edit";
 | 
			
		||||
    "${mod}+Ctrl+v" = "exec wl-paste | tesseract -l por - - | wl-copy";
 | 
			
		||||
    "${mod}+k" = "exec showkeys";
 | 
			
		||||
    "${mod}+Alt+x" = "exec pkill wl-crosshair || exec wl-crosshair";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue