Maintenance - We're currently working on things and you might experience some issues. Should be wrapped up soon!

This post has been de-listed (Author was flagged for spam)

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
Quick Question on Bash Script
Post Body

I am using I3WM and I found a solution to copy screenshots to a clipboard using the command below.

import png:- | xclip -selection clipboard -t image/png

I want to bind this to a key in I3WM but I think the pipe is giving me trouble. I have this line in my i3/config file but nothing happens when I press the keybinding after refreshing I3WM.

bindsym Print exec import png:- | xclip -selection clipboard -t image/png

Another route I tried was putting the above in a bash script and then bind that to the Print key with this line.

bindsym Print exec --no-startup-id ./.script/ScreenshotArea.sh

But I had no luck with that working. I assume it has something to do with the pipe in the command which I have to admit, I only understand that it works kinda like a while loop, but beyond that I have no clue what it's doing in this situation.

#!/bin/bash
import png:- | xclip -selection clipboard -t image/png

Any suggestions?

Author
Account Strength
0%
Account Age
13 years
Verified Email
Yes
Verified Flair
No
Total Karma
3,864
Link Karma
969
Comment Karma
2,895
Profile updated: 6 months ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago