GithubHelp home page GithubHelp logo

Comments (7)

Katzenkralle avatar Katzenkralle commented on July 23, 2024 1

I had the same issue where copying to clipboard, with autoclosing enabled, would not work. I fixed it by installing wl-clipboard. I wonder how it could work without it in the first place.

from swappy.

kadamski avatar kadamski commented on July 23, 2024 1

@AsarNaufil did you try using "early_exit=true" option in the config file? See the information in the man page. Isn't that what you need?

from swappy.

eightballocto avatar eightballocto commented on July 23, 2024 1

Just for the heck of it, I'll share a script I made for screenshotting displays in sway. You'll probably have to modify it depending on how many displays you have. This script autocloses swappy after a given amount of time, depending on the positional parameter it's given at execution. I typically like to specify this number inside of the sway config, usually as 5 or 10.

#! /bin/bash

# Print screen of active workspace on the corresponding display

# Because we're sending this to swappy, let's add the convenience of when this screenshot was taken.
time=$(date +%D_%I:%M_%p)

# Ask swaymsg which display is "active"
# Also strip quotes.
display=$(swaymsg -rt get_workspaces | jq '.[] | select(.focused==true)' | jq .output | tr -d '"')

# Screenshot, also send to swappy. Swappy will "die" after a set amount of time, specified by the command argument.
grim -o $display - | wl-copy
grim -o $display - | timeout ${1}m swappy --name=GrimScreenshot_${time} -f -```

from swappy.

jtheoof avatar jtheoof commented on July 23, 2024

I'm not I understand the use case here. If it's just to copy content from the screen you don't need swappy at all.

from swappy.

AsarNaufil avatar AsarNaufil commented on July 23, 2024

I'm not I understand the use case here. If it's just to copy content from the screen you don't need swappy at all.

to copy screenshots taken?

from swappy.

kadamski avatar kadamski commented on July 23, 2024

But swappy is all about editing the screenshot taken. Swappy doesn't make screenshots itself (that's what we usually use grim for). It also doesn't do the region selection (that's what we usually use slurp for).

If you do not want to add text/arrows/circles etc to the screenshot you take, swappy is not needed in your workflow. If, on the other hand, you do want to add some annotations then killing it from the outside script after a fixed amount of time doesn't make much sense anyways. Adding annotations is inherently interactive process and as such you never know how long it will take.

If to want to copy the image to clipboard, there's a button for that in swappy's window. You can co figure if swappy will be closed as soon as you click it or not.

It seems to me like this script is trying to (ab)use swappy as a "screenshot previewer".

from swappy.

AsarNaufil avatar AsarNaufil commented on July 23, 2024

I see.. I'll close the issue then. Thanks.

from swappy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.