Commit graph

28 commits

Author SHA1 Message Date
Clar Charr fab5720576 Use fork in swaygrab instead of popen. 2017-08-27 14:12:52 -04:00
David Blajda 8d54a6746c FFmpeg options for swaygrab 2017-06-17 22:14:39 -04:00
johalun 7fef283044 FreeBSD fixes
Increase _POSIX_SOURCE value where needed.
Increase _XOPEN_SOURCE value where needed.
Conditionally link to libcap (only on Linux).
Possibly some trailing whitespace fixes (automatic).
2017-06-06 09:45:50 +02:00
Sebastian Noack 173b338567 Add -DVERSION flag for release version numbers 2017-04-26 15:56:46 +02:00
Drew DeVault 9aed9d9359 UnGNUify the codebase 2017-03-10 23:41:24 -05:00
Zandr Martin 0516dba3f6
implement "focused container" feature for swaygrab 2016-09-18 16:41:08 -05:00
Hummer12007 24cc12e043 Added -R option to getopt opt_string 2016-03-28 22:26:41 +03:00
Mikkel Oscar Lyderik 5e253fdd9a Correctly exit sway on errors.
Calling `exit` in sway_terminate prevents sway from correctly shutting
down (freeing data, cleanly terminating the ipc server, etc.).

A better way is to exit straight away if the failure occurs before
`wlc_run` and use sway_abort as usual if it occur when wlc is running.
2016-02-26 09:42:21 +01:00
Drew DeVault a416715372 Revert "s/numlen/log10/g"
This reverts commit 038bb8cc7c.
2016-01-23 16:35:32 -05:00
Drew DeVault 038bb8cc7c s/numlen/log10/g 2016-01-23 15:51:38 -05:00
Mikkel Oscar Lyderik e0ba689dba Copy filename from argv
Fix #449
2016-01-17 18:48:29 +01:00
Mikkel Oscar Lyderik 364e37a1eb Fix whitespace issues. 2016-01-05 23:42:40 +01:00
Julien Savard 7b00eab8ad swaygrab: Fix memory leak when recording videos 2015-12-22 23:47:07 -05:00
Mikkel Oscar Lyderik c97555d9f0 swaygrab: add default output filename.
With this it's possible to run `swaygrab` without a filename argument.
With no filename supplied it will use a default name based on the
current time.

The default file will get the extension `png` for screenshots and `webm`
for video capture.
2015-12-17 18:37:09 +01:00
Mikkel Oscar Lyderik d49282b2c3 swaygrab: make focused output default
This makes swaygrab use the currently focused output as source if no
other output is defined with the `-o, --output <output>` option.
2015-12-17 16:09:03 +01:00
Mikkel Oscar Lyderik 45b959f601 Move numlen(1) to sway/util.c 2015-12-14 17:07:52 +01:00
Christoph Gysin 923c3245ac Fix option parsing
Using 'flag' results in duplicate code paths for short and long options.

This broke the -q short option in swaymsg, because there was:

 {"quiet", no_argument, &quiet, 'q'}

Which will set quiet to 'q' and return 0, not 'q'.
2015-11-28 23:50:44 +02:00
Christoph Gysin 12c8cf5bf6 swaygrab: Add --help option that prints usage 2015-11-28 23:50:44 +02:00
Christoph Gysin b235ccd212 swaygrab: Print usage and exit on unknown options 2015-11-28 23:50:44 +02:00
Christoph Gysin 3ba33321de Use macros for exit values 2015-11-28 23:50:10 +02:00
Drew DeVault 4916e30378 Remove extraneous logging from swaygrab 2015-11-28 09:04:02 -05:00
Drew DeVault e0cb8284fb Rearrange logging headers
Ref #270
2015-11-28 08:49:02 -05:00
Drew DeVault 0bb872ab70 Fix uninitialized variable warning in swaygrab 2015-11-27 16:01:19 -05:00
Drew DeVault 2ef7cf9e97 Add ffmpeg capture to swaygrab (with limitations)
This needs to be multithreaded to have any sort of realistic expectation
of performance, due to issues with syncronous I/O.
2015-11-27 14:21:38 -05:00
Drew DeVault 04bd9386fe Fix swaygrab memory leak 2015-11-27 10:40:28 -05:00
Drew DeVault f05b6cd55c Implement swaygrab for still images 2015-11-27 10:39:18 -05:00
Drew DeVault 062c74b7d0 Add command line to swaygrab
Also modifies IPC client so that we can work with persistent
connections.
2015-11-27 10:10:29 -05:00
Drew DeVault 7c04cd4fc8 Add swaygrab subproject 2015-11-27 09:53:50 -05:00