Skip to content

Can't pipe maim into xclip if I specify a name to create a file #300

@The-Sound

Description

@The-Sound

Hi there! For the past week or so, I started piping maim into xclp as per the examples, which I completely forgot I was able to.
The command I'm using, resides in the i3 configuration files of a Void installation, and goes like this, in case context is necesary (path is absolute, just redacted):

bindsym --release Print exec --no-startup-id maim -b 1 -s -m 1 -p 5 -u Clipboard.png | xclip -selection clipboard -t image/png

My intention with the command was to pipe it, but to create a file too in case I need it.

I've found I can reproduce the issue from terminal too. It will not spite any error, but when I try to paste from any clipboard, a blank image will follow, or nothing at all depending on the program pasted in:
Image

When hovering on some past issues, I've found that someone checked the image being pipe, so I did:

maim -b 1 -s -m 1 -p 5 -u Clipboard.png | file -
/dev/stdin: empty

Kinda weird because past week was working, so somehow wondered if somehow creating the file was stopping it from being piped, and voila:

maim -b 1 -s -m 1 -p 5 -u | file -
/dev/stdin: PNG image data, 349 x 112, 8-bit/color RGBA, non-interlaced

I was wondering if this is actual expected behaviour, and/or if I could have it the way I wanted with a file AND a image in the clipboard.
I couldn't find any example to do this so apologies if there's one and I've missed it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions