Bug 469238 - When run from a global shortcut, `normcap` does not copy text to clipboard, but `normcap | tee /dev/null` does
Summary: When run from a global shortcut, `normcap` does not copy text to clipboard, b...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.4
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-01 14:59 UTC by sk.griffinix
Modified: 2023-09-03 08:39 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sk.griffinix 2023-05-01 14:59:11 UTC
SUMMARY
***
Faced an issue while setting shortcut to normcap (https://github.com/dynobo/normcap/). When added as application or command `normcap`, and assigned shortcut, it triggers the program but the program fails to copy to clipboard. When command is edited so as to pipe it through anything, eg `normcap | tee /dev/null`, it triggers the same and also copies to clipboard. 
***


STEPS TO REPRODUCE
1. System Settings>Shortcuts>Add applications
2. Search and select normcap
3. Assign a shortcut (like ctrl+pritnscrn)

OBSERVED RESULT
When invoked through shortcut, normcap allows for region selection on screen and selects text but does not copy that text to clipboard.

EXPECTED RESULT
It should copy the text to clipboard. Piping the command should not be required

ADDITIONAL INFORMATION
Bug report for the same was created on https://github.com/dynobo/normcap/issues/422
Comment 1 Magnus Boman 2023-09-03 08:39:55 UTC
I ran into this as well but with wl-copy, I've been using the good ol' "custom shortcuts" but that has been intentionally removed from Wayland, adding my script as a command shortcut results in the problem explained in this report.

Broken:
<output> | wl-copy --trim-newline

Works:
<output> | wl-copy --trim-newline | tee /dev/null