neXromancers / shotgun

Minimal X screenshot utility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Screenshots are dark with picom

kaihendry opened this issue · comments

https://s.natalian.org/2020-05-31/picom-killed.png - bright

https://s.natalian.org/2020-05-31/with-picom.png - dark

Maintainer edit

In most cases this problem comes from picom's shadow effect. To fix it, you'll either want to disable shadows completely, or tell picom not to draw shadows on your selection tool.
For hacksaw, add this snippet to your configuration file:

shadow-exclude = [
  "name = 'hacksaw'"
]

I don't seemed to have any issues. @kaihendry Nice, you are here.

1590911373

@kaihendry are you using hacksaw to select a screenshot region? Can you provide the info I asked for in neXromancers/hacksaw#33 (comment)?

No problem, thanks anyway.

@9ary the cause seems to be shadows with picom. Hacksaw does dim my screen and screenshots (with shotgun) do turn out dark.

shadows disabled
shadows enabled

selection with shadows
selection without shadows

As you can see, the colors are much brighter without shadows.

Here's my shadow config for picom:

# Shadow
shadow = true;
shadow-radius = 15;
shadow-offset-x = -15;
shadow-offset-y = -15;
shadow-opacity = 0.25;

#shadow-exclude = "(!name = 'rofi' && !class_g = 'Rofi' && !name = 'dunst' && !class_g = 'Dunst' && !class_g *?= 'Polybar')"

shadow-exclude = [
    "class_g *?= 'jgmenu'",
    "class_g *?= 'VirtualBox'",
    "class_g *?= 'Conky'",
    "class_g *?= 'Notify-osd'",
    "class_g *?= 'cairo-dock'",
    "class_g *?= 'trayer'",
    "class_g *?= 'navigator'",
    "class_g *?= 'Cairo-clock'",
    "class_g *?= 'Cairo-dock'",
    "class_g *?= 'Polybar'",
    "class_g *?= 'Docky'",
    "class_g = 'boox'",
    "class_g = 'hacksaw'",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    "window_type = 'dock'",
    "_GTK_FRAME_EXTENTS@:c"
];

Yes, that's what we worked out in the hacksaw thread. Note that hacksaw sets a window title, but not a class, so you might have better luck matching on that. I'll be closing this issue because it's not a shotgun problem.

All answers until the link to a commit (without comment in the issue thread) are false, so for people who will come here for a direct solution :

Add this to your picom config :

shadow-exclude = [
  "name = 'hacksaw'"
]

Thanks for the tip! I'll add this information to the first post here and in the hacksaw issue.