Code Monkey home page Code Monkey logo

Comments (9)

KittyKatt avatar KittyKatt commented on May 29, 2024

Please let me know if this is fixed. :)

from screenfetch.

spaghetti2514 avatar spaghetti2514 commented on May 29, 2024

This is very much not fixed, as should be evident by the fragment

"${shotfile} 2>dev/null"

Problems are as follows

  • "2>dev/null" is relative and not absolute, so it would only work assuming you have a dev directory in your current working directory and then errors would be redirected into a file called null within that directory. That first slash is quite a devil. However, this problem doesn't even arise because...
  • It's in quotes with $shotfile, so if $shotfile is screen.png, screencapture is now trying to create an image called "screen.png 2>dev/null" which errors out because forward slashes can't be in filenames.

And so the line should be

if [ "$distro" == "Mac OS X" ]; then screencapture -x -T 3 "${shotfile}" &> /dev/null

from screenfetch.

KittyKatt avatar KittyKatt commented on May 29, 2024

Ah, yes. My bad. Check referenced commit.

from screenfetch.

spaghetti2514 avatar spaghetti2514 commented on May 29, 2024

It does take a screenshot now when -s is specified.
Is any text output expected? I'm not sure if scrot outputs anything or not, so I don't know what to add to emulate it.

Edit: scrot's man page says that the -cd3 included in screenfetch's call of scrot should make it display a "countdown"
OS X currently just awkwardly waits for three seconds in silence before taking a screenshot

from screenfetch.

KittyKatt avatar KittyKatt commented on May 29, 2024

scrot does have a countdown.

It will say "Taking shot in 3.. 2.. 1.. 0"

It starts at n and appends "n-x.. " for every second in the countdown. Screenshot is saved on count 0.

from screenfetch.

spaghetti2514 avatar spaghetti2514 commented on May 29, 2024

Okay, full scrot mimicry should be able to be achieved with the following line

if [ "$distro" == "Mac OS X" ]; then printf "Taking shot in 3.. "; sleep 1; printf "2.. "; sleep 1; printf "1.. "; sleep 1; printf "0.\n"; screencapture -x "${shotfile}" &> /dev/null

Just for the default screenshot action at least, which I think is all that's needed to be provided by screenfetch

from screenfetch.

KittyKatt avatar KittyKatt commented on May 29, 2024

See commit fe5dc7b and test, please.

from screenfetch.

spaghetti2514 avatar spaghetti2514 commented on May 29, 2024

Works beautifully.

from screenfetch.

KittyKatt avatar KittyKatt commented on May 29, 2024

Fantastic. Consider this closed.

from screenfetch.

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.