rage311 / ocss Goto Github PK
View Code? Open in Web Editor NEWOwnCloud Screenshot Sharing
OwnCloud Screenshot Sharing
Hi there,
using the script with mac doesnt work. Because you use gnome-screenshot is not available on mac an there is no else case for this.
Perhaps you could do something like this:
function take_screenshot() {
echo "Please select area"
is_mac || sleep 0.1 # https://bbs.archlinux.org/viewtopic.php?pid=1246173#p1246173
if(is_mac)
then
screencapture -s "$1" &>/dev/null
else
if ! (gnome-screenshot -a -f "$1" &>/dev/null || gnome-screenshot -a -f "$1" &>/dev/null); then #takes a screenshot with selection
echo "Couldn't make selective shot (mouse trapped?). Trying to grab active window instead"
if ! (gnome-screenshot -wb -f "$1" &>/dev/null || gnome-screenshot -wb -f "$1" &>/dev/null); then
echo "Error for image '$1'!" >> "$log_file"
echo "Error for image '$1'!"
notify error "Something went wrong :(" "Information has been logged"
exit 1
fi
fi
fi
}
screencapture -s
-s = Selection Mode
Hope it helps
Robin
Hi,
the is_mac as function does not really work, it always uses the "linux"-case. Perhaps you have an idea to make it work. I could test it for you, if you dont have a mac system.
Cu
Robin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.