mirror of
https://github.com/winneon/gsu.git
synced 2026-09-10 07:16:25 -04:00
Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2220791c4 | ||
|
|
b28773d43f | ||
|
|
cb75044088 | ||
|
|
ce24a0b81f | ||
|
|
d06106166d |
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2017 Jesse Bryan
|
||||
Copyright (c) 2017-2020 Jesse Bryan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
66
README.md
66
README.md
|
|
@ -52,50 +52,49 @@ VIDEO OPTIONS
|
|||
|
||||
## Installation
|
||||
|
||||
### Arch Linux
|
||||
### Package Manager
|
||||
|
||||
Install **[gsu]** or **[gsu-git]** from the AUR.
|
||||
* [Arch Linux (AUR): gsu](https://aur.archlinux.org/packages/gsu/)
|
||||
* [Arch Linux (AUR): gsu-git](https://aur.archlinux.org/packages/gsu-git/)
|
||||
|
||||
[gsu]: https://aur.archlinux.org/packages/gsu/
|
||||
[gsu-git]: https://aur.archlinux.org/packages/gsu-git/
|
||||
### Manual
|
||||
|
||||
### Universal Install
|
||||
|
||||
gsu depends heavily on maim, slop, FFmpeg, curl, and jq for its functionality. To install gsu's dependencies, run the following commands in accordance to your distro.
|
||||
To install gsu's required dependencies, run the following command in accordance to your distro.
|
||||
|
||||
#### Arch Linux
|
||||
|
||||
```
|
||||
$ sudo pacman -S maim slop ffmpeg curl jq xdotool
|
||||
$ sudo pacman -S curl jq xdotool maim slop ffmpeg
|
||||
```
|
||||
|
||||
#### Debian 8
|
||||
|
||||
Be sure that the `unstable` repository is enabled on Debian, or your screenshots may not output properly. This is because Debian 8 has outdated versions of maim and slop.
|
||||
#### Ubuntu 20.04 LTS/Debian 11
|
||||
|
||||
```
|
||||
$ sudo apt-get install maim slop ffmpeg curl jq xdotool
|
||||
$ sudo apt install curl jq xdotool maim slop ffmpeg
|
||||
```
|
||||
|
||||
#### Ubuntu 17.04
|
||||
#### Older Debian-based (Ubuntu 19.10/Debian 10 or prior)
|
||||
|
||||
**Unsupported.** slop and maim both are terribly out of date in Ubuntu's 17.04 repositories, resulting in artifacting and improper screenshots. When Ubuntu 17.10 is released, it will be properly supported.
|
||||
maim, slop, and FFmpeg all have bugs in earlier versions that make gsu unusable in certain scenarios. Therefore, they must all be installed via source.
|
||||
|
||||
If you can't wait until then, you can install [slop] and [maim] from source. Afterwards, run the following command to install the remaining dependencies.
|
||||
Afterwards, run the following command to install the remaining required dependencies.
|
||||
|
||||
```
|
||||
$ sudo apt-get install ffmpeg curl jq xdotool
|
||||
$ sudo apt install curl jq xdotool
|
||||
```
|
||||
|
||||
[slop]: https://github.com/naelstrof/slop#install-using-cmake-requires-cmake
|
||||
[maim]: https://github.com/naelstrof/maim#install-using-your-package-manager-preferred
|
||||
|
||||
#### Other Linux or BSD
|
||||
|
||||
Install `maim`, `slop`, `ffmpeg`, `curl`, `jq`, and `xdotool` using your package manager of choice. You could also install each package from source, but who has time for that?
|
||||
Install `curl`, `jq`, `xdotool`, `maim`, `slop`, and `ffmpeg` via source or your package manager of choice. *If installing by package manager, ensure that the following required versions are met.*
|
||||
|
||||
*maim*: 5.x or later
|
||||
*slop*: 7.x or later
|
||||
*FFmpeg*: 4.2.x or later
|
||||
|
||||
---
|
||||
|
||||
You can optionally install `xsel` if you want automatic URL clipboard pasting after the utility finishes an upload.
|
||||
|
||||
After installing the dependents, run the following commands to install gsu.
|
||||
|
||||
```
|
||||
|
|
@ -104,8 +103,6 @@ $ tar xvf gsu.tar.gz && cd gsu-1.3.2
|
|||
$ sudo make install
|
||||
```
|
||||
|
||||
You can optionally install `xsel` if you want automatic URL clipboard pasting after the utility finishes an upload.
|
||||
|
||||
## Configuration
|
||||
|
||||
Run the utility at least once, i.e. `gsu --help`. The configuration file will be generated in `$XDG_CONFIG_HOME/gsu` if it didn't already exist. The most common location is `~/.config/gsu`.
|
||||
|
|
@ -114,24 +111,35 @@ Run the utility at least once, i.e. `gsu --help`. The configuration file will be
|
|||
|
||||
Here are some frequent problems users may face and their respective solutions. If you have more solutions, feel free to send in an issue or pull request.
|
||||
|
||||
### The outputted screenshot has weird black or white sections.
|
||||
### The outputted capture is completely black or another solid color.
|
||||
|
||||
This is a common problem with older versions of maim. You have a few choices:
|
||||
Make sure that you are running your DE/WM under the latest version of X11. Wayland is untested. To check, run the following command.
|
||||
|
||||
* On Debian 8, enable the `unstable` APT repository, and upgrade maim and slop.
|
||||
* On Ubuntu 17.04 and other distros, install both maim and slop from source.
|
||||
```
|
||||
$ echo $XDG_SESSION_TYPE
|
||||
```
|
||||
|
||||
If you are running X11 and the problem persists, try disabling OpenGL hardware-based acceleration by adding `--no-opengl` to your gsu command.
|
||||
|
||||
### The outputted capture has black/white sections or artifacts.
|
||||
|
||||
This is a problem with older versions of maim. Upgrade maim to 5.x or later or install via source.
|
||||
|
||||
### The capture session won't end when capturing a video or gif.
|
||||
|
||||
Versions of FFmpeg prior to 4.2.x have a bug where an `x11grab` capture sessions won't end unless forcibly killed by the system. Upgrade FFmpeg to 4.2.x or install via source.
|
||||
|
||||
### There is no audio in the captured video.
|
||||
|
||||
Pulseaudio is the default audio capture device. If you do not use pulseaudio, adjust your audio capture device in the configuration file.
|
||||
PulseAudio is the default audio capture device. If you do not use PulseAudio, adjust your audio capture device in the configuration file.
|
||||
|
||||
If you do use pulseaudio, use a program like `pavucontrol` to change the input device to a monitor of your audio output device. If you use `pavucontrol`, the resulting setup should look similar to below.
|
||||
If you do use PulseAudio, use a program like `pavucontrol` to change the input device to a monitor of your audio output device. If you use PAVUcontrol, the resulting setup should look similar to below.
|
||||
|
||||

|
||||
|
||||
## Credits
|
||||
|
||||
* [Dalton Nell](https://github.com/naelstrof) for maim and slop, used for screenshot creation and selections
|
||||
* [The FFmpeg team](https://ffmpeg.org/) for ffmpeg, used for video and gif creation
|
||||
* [The FFmpeg team](https://ffmpeg.org/) for FFmpeg, used for video and gif creation
|
||||
* [Daniel Stenberg](https://github.com/bagder) for curl, used for uploading
|
||||
* [Stephen Dolan](https://github.com/stedolan) for jq, used for parsing JSON
|
||||
|
|
|
|||
19
gsu
19
gsu
|
|
@ -24,12 +24,12 @@ GENERAL OPTIONS
|
|||
-v, --version Show the current version.
|
||||
-l, --list-displays List your current displays and their resolutions.
|
||||
-u, --upload Upload after running the utility.
|
||||
--hide Minimize the current window while capturing.
|
||||
This is useful when running with --terminal to hide
|
||||
the newly opened term.
|
||||
--terminal Open interactive commands in a new terminal..
|
||||
SET THIS IF RUNNING FROM ANYTHING OTHER THAN A TERM,
|
||||
i.e. xbindkeys
|
||||
--hide Minimize the current window while capturing.
|
||||
This is useful when running with --terminal to hide
|
||||
the newly opened term.
|
||||
--notify Send a libnotify notification of the output.
|
||||
|
||||
UTILITY OPTIONS
|
||||
|
|
@ -39,11 +39,14 @@ UTILITY OPTIONS
|
|||
-g, --gif Record a video and convert it to the gif format.
|
||||
|
||||
CAPTURE OPTIONS
|
||||
-n, --nocursor Hide the cursor.
|
||||
-n, --no-cursor Hide the cursor.
|
||||
-d, --display NUM|TYPE Set the selection to a specific display.
|
||||
Can read from an argument or from stdin.
|
||||
Values: number of display, 'active', 'all' (default)
|
||||
|
||||
SCREENSHOT OPTIONS
|
||||
-o, --no-opengl Disable OpenGL hardware-accelerated capture.
|
||||
|
||||
VIDEO OPTIONS
|
||||
-c, --countdown NUM Countdown before recording."
|
||||
|
||||
|
|
@ -171,7 +174,7 @@ Set this variable in '$config_path/config.conf'."
|
|||
"-s" | "--screenshot") set_type "screenshot" ;;
|
||||
"-m" | "--video") set_type "video" ;;
|
||||
"-g" | "--gif") set_type "gif" ;;
|
||||
"-n" | "--nocursor") nocursor="-u"; draw_mouse="-draw_mouse 0" ;;
|
||||
"-n" | "--no-cursor") nocursor="-u"; draw_mouse="-draw_mouse 0" ;;
|
||||
|
||||
"-d" | "--display")
|
||||
if [[ -t 0 ]]; then
|
||||
|
|
@ -186,6 +189,8 @@ Set this variable in '$config_path/config.conf'."
|
|||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
"-o" | "--no-opengl") noopengl="--noopengl" ;;
|
||||
|
||||
"-c" | "--countdown")
|
||||
if ! [[ $2 =~ ^[0-9]+$ ]]; then
|
||||
|
|
@ -318,9 +323,9 @@ get_command() {
|
|||
case "$type" in
|
||||
"screenshot")
|
||||
if [[ -z "$display" ]]; then
|
||||
cmd="$(maim $nocursor -s "$operand" 2>&1>/dev/null)"
|
||||
cmd="$(maim $noopengl $nocursor -s "$operand" 2>&1>/dev/null)"
|
||||
else
|
||||
cmd="$(maim $nocursor -g "${MONW}x${MONH}+${MONX}+${MONY}" "$operand" 2>&1>/dev/null)"
|
||||
cmd="$(maim $noopengl $nocursor -g "${MONW}x${MONH}+${MONX}+${MONY}" "$operand" 2>&1>/dev/null)"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
|||
21
gsu.1
21
gsu.1
|
|
@ -1,5 +1,5 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
|
||||
.TH GSU "1" "September 2017" "gsu 1.3.2" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.11.
|
||||
.TH GSU "1" "December 2019" "gsu 1.3.2" "User Commands"
|
||||
.SH NAME
|
||||
gsu \- manual page for gsu 1.3.2
|
||||
.SH SYNOPSIS
|
||||
|
|
@ -25,16 +25,16 @@ List your current displays and their resolutions.
|
|||
\fB\-u\fR, \fB\-\-upload\fR
|
||||
Upload after running the utility.
|
||||
.TP
|
||||
\fB\-\-hide\fR
|
||||
Minimize the current window while capturing.
|
||||
This is useful when running with \fB\-\-terminal\fR to hide
|
||||
the newly opened term.
|
||||
.TP
|
||||
\fB\-\-terminal\fR
|
||||
Open interactive commands in a new terminal..
|
||||
SET THIS IF RUNNING FROM ANYTHING OTHER THAN A TERM,
|
||||
i.e. xbindkeys
|
||||
.TP
|
||||
\fB\-\-hide\fR
|
||||
Minimize the current window while capturing.
|
||||
This is useful when running with \fB\-\-terminal\fR to hide
|
||||
the newly opened term.
|
||||
.TP
|
||||
\fB\-\-notify\fR
|
||||
Send a libnotify notification of the output.
|
||||
.PP
|
||||
|
|
@ -54,7 +54,7 @@ Record a video and convert it to the gif format.
|
|||
.PP
|
||||
CAPTURE OPTIONS
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-nocursor\fR
|
||||
\fB\-n\fR, \fB\-\-no\-cursor\fR
|
||||
Hide the cursor.
|
||||
.TP
|
||||
\fB\-d\fR, \fB\-\-display\fR NUM|TYPE
|
||||
|
|
@ -62,6 +62,11 @@ Set the selection to a specific display.
|
|||
Can read from an argument or from stdin.
|
||||
Values: number of display, 'active', 'all' (default)
|
||||
.PP
|
||||
SCREENSHOT OPTIONS
|
||||
.TP
|
||||
\fB\-o\fR, \fB\-\-no\-opengl\fR
|
||||
Disable OpenGL hardware\-accelerated capture.
|
||||
.PP
|
||||
VIDEO OPTIONS
|
||||
.TP
|
||||
\fB\-c\fR, \fB\-\-countdown\fR NUM
|
||||
|
|
|
|||
Loading…
Reference in a new issue