Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

grim + slurp > "screenshot region is empty" #59

Open
Macellatore opened this issue Sep 4, 2019 · 4 comments
Open

grim + slurp > "screenshot region is empty" #59

Macellatore opened this issue Sep 4, 2019 · 4 comments

Comments

@Macellatore
Copy link

Hello, i'm using the latest grim installed from pacman (grim-1.2.0-2).
If calling grim (either with slurp getting the coords or when setting them manually) with the -g option, this is the output:

macellatore# grim -g "10,20 300x400" screenshot.png                                                                                                                                           
screenshot region is empty

It broke all of a sudden, last month it was working fine.

@emersion
Copy link
Owner

emersion commented Sep 4, 2019

Can you run swaymsg -t get_outputs?

@Macellatore
Copy link
Author

macellatore# swaymsg -t get_outputs
Output eDP-1 'Unknown 0x04B2 0x00000000' (focused)
  Current mode: 1920x1080 @ 60.020000 Hz
  Position: 0,1080
  Scale factor: 1.000000
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 4
  Available modes:
    1920x1080 @ 40.014999 Hz
    1920x1080 @ 60.020000 Hz

@emersion
Copy link
Owner

emersion commented Sep 4, 2019

This is because your only output is positioned at 0,1080. 10,20 300x400 is outside of those coordinates. We should probably print a better error message.

Regarding slurp giving wrong coordinates, maybe this is an instance of emersion/slurp#37?

@Macellatore
Copy link
Author

Sure, it has to be it!
Changing my sway .config file from:

output eDP-1 position 0,1080
output HDMI-A-1 position 0,0

to:

output eDP-1 position 0,0
output HDMI-A-1 position 0,-1080

allowed me to get the right coords (at least for the primary display) without changing the relative position of my displays.
Thanks a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants