Compare commits

..

No commits in common. "master" and "1.1.1" have entirely different histories.

5 changed files with 108 additions and 452 deletions

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2017-2020 Jesse Bryan
Copyright (c) 2017 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

114
README.md
View file

@ -9,137 +9,43 @@ gsu (General Screenshot Utility) allows for easy capturing and uploading of imag
* GIF capture.
* Built-in uploading to uguu.se, streamable, and gfycat.
* Custom uploading capability if the above services don't suit your fancy.
* dmenu and rofi integration.
* A clean and easy to understand CLI.
## Usage
```
Usage: gsu [OPTION]... SOURCE
A general screenshot and upload utility for images, video, and gifs.
SOURCE defaults to $XDG_CONFIG_HOME/gsu/imgs if nothing is provided.
The most common location for $XDG_CONFIG_HOME is ~/.config.
GENERAL OPTIONS
-h, --help Show the help menu.
-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
--notify Send a libnotify notification of the output.
UTILITY OPTIONS
-r, --dmenu Select the one of the below options from dmenu or rofi.
-s, --screenshot Take a screenshot. (default)
-m, --video Record a video of the screen.
-g, --gif Record a video and convert it to the gif format.
CAPTURE OPTIONS
-n, --nocursor 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)
VIDEO OPTIONS
-c, --countdown NUM Countdown before recording.
```
## Installation
### Package Manager
### Arch Linux
* [Arch Linux (AUR): gsu](https://aur.archlinux.org/packages/gsu/)
* [Arch Linux (AUR): gsu-git](https://aur.archlinux.org/packages/gsu-git/)
Install [**gsu**](https://aur.archlinux.org/packages/gsu/) or [**gsu-git**](https://aur.archlinux.org/packages/gsu-git/) from the AUR.
### Manual
### Install From Source
To install gsu's required dependencies, run the following command in accordance to your distro.
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.
#### Arch Linux
```
$ sudo pacman -S curl jq xdotool maim slop ffmpeg
$ sudo pacman -S tar make maim ffmpeg curl jq
```
#### Ubuntu 20.04 LTS/Debian 11
#### Debian/Ubuntu 17.04+
```
$ sudo apt install curl jq xdotool maim slop ffmpeg
$ sudo apt-get install tar make maim ffmpeg curl jq
```
#### Older Debian-based (Ubuntu 19.10/Debian 10 or prior)
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.
Afterwards, run the following command to install the remaining required dependencies.
```
$ sudo apt install curl jq xdotool
```
#### Other Linux or BSD
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.
```
$ curl -o gsu.tar.gz https://codeload.github.com/winneon/gsu/tar.gz/1.3.2
$ tar xvf gsu.tar.gz && cd gsu-1.3.2
$ curl -o gsu.tar.gz https://codeload.github.com/winneon/gsu/tar.gz/v1.1.1
$ tar xvf gsu.tar.gz cd gsu-1.1.1
$ sudo make install
```
## 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`.
## Troubleshooting
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 capture is completely black or another solid color.
Make sure that you are running your DE/WM under the latest version of X11. Wayland is untested. To check, run the following command.
```
$ 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.
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.
![pavucontrol example](http://i.imgur.com/qbN5741.png)
## 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

View file

@ -1,23 +1,5 @@
#!/usr/bin/env bash
# Terminal. Uncomment your terminal to use,
# or uncomment and edit one of the values to use your own terminal.
#
# If uncommented, be sure that the terminal you are providing is installed.
# If --terminal is provided, a new terminal using this variable will be opened.
# Use the string "CMD" to refer to the command that is run (gsu).
#
# gnome-terminal:
#GSU_TERM=(gnome-terminal -- CMD)
#
# urxvt:
#GSU_TERM=(urxvt -e bash -c "'CMD'")
# Audio input device. If empty, gsu defaults to pulseaudio.
# See https://www.ffmpeg.org/ffmpeg-devices.html#Input-Devices for a list
# of valid input devices.
AUDIO=""
# Streamable email/username.
# REQUIRED for video upload without a custom upload command.
STREAMABLE_USER=""
@ -34,6 +16,6 @@ S_UPLOAD=""
# Use the string "GSUFILEOUT" to refer to your gsu operand.
V_UPLOAD=""
# Custom gif upload command. Leave empty to upload to gfycat.
# Custom gif upload command. Leave empty to upload to uguu.se.
# Use the string "GSUFILEOUT" to refer to your gsu operand.
G_UPLOAD=""

358
gsu
View file

@ -1,54 +1,28 @@
#!/usr/bin/env bash
VERSION="1.3.2"
VERSION="1.1.1"
config_path="${XDG_CONFIG_HOME:-${HOME}/.config}/gsu"
notify() {
echo -e "$1"
if [[ ! -z "$notify_arg" ]] && type -p notify-send >/dev/null; then
notify-send "gsu" "$1"
fi
}
print_help() {
echo "\
Usage: gsu [OPTION]... SOURCE
A general screenshot and upload utility for images, video, and gifs.
SOURCE defaults to \$XDG_CONFIG_HOME/gsu/imgs if nothing is provided.
The most common location for \$XDG_CONFIG_HOME is ~/.config.
GENERAL OPTIONS
-h, --help Show the help menu.
-v, --version Show the current version.
-l, --list-displays List your current displays and their resolutions.
-u, --upload Upload after running the utility.
--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.
-h, --help Show the help menu
-v, --version Show the current version
UTILITY OPTIONS
-r, --dmenu Select the one of the below options from dmenu or rofi.
-s, --screenshot Take a screenshot. (default)
-m, --video Record a video of the screen.
-g, --gif Record a video and convert it to the gif format.
CAPTURE OPTIONS
-n, --no-cursor Hide the cursor.
-u, --upload Upload after running the utility
-n, --nocursor 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.
-s, --screenshot Take a screenshot
-m, --video Record a video of the screen
-g, --gif Record a video and convert it to the gif format
VIDEO OPTIONS
-c, --countdown NUM Countdown before recording."
-c, --countdown NUM Countdown before recording"
exit 0
}
@ -58,28 +32,6 @@ print_version() {
exit 0
}
print_displays() {
local monitors=$(xrandr | grep -o "[0-9]*x[0-9]*[+-][0-9]*[+-][0-9]*")
if [[ -z "$monitors" ]]; then
echo "gsu: unable to find any displays"
exit 1
fi
readarray -t monitors <<< "$monitors"
local displays=""
for ((i = 0; i < ${#monitors[@]}; i++)); do
((num = i + 1))
displays="${displays}\n${num}: ${monitors[$i]}"
done
displays=$(sed 's/\\n//' <<< $displays)
echo -e "$displays"
exit 0
}
print_not_int() {
regex=$(echo "$1" | sed -e "s/^-\{1,2\}//")
@ -105,92 +57,35 @@ Valid characters: alphanumeric, dot, slash, underscore, dash."
exit 1
}
print_missing_operand() {
echo "\
gsu: missing operand
Try 'gsu --help' for more information."
exit 1
}
print_missing_deps() {
local args=""
for arg in "$@"; do
args="$args '$arg'"
done
args=$(sed 's/ //' <<< $args)
echo "gsu: missing required dependency(s) -- $args"
echo "gsu: missing required dependency -- '$1'"
exit 1
}
print_manually_quit() {
echo "gsu: manually quit from user action"
exit 1
exit 0
}
get_args() {
local prev_arg=""
while [[ "$1" ]]; do
case "$1" in
"-h" | "--help") print_help ;;
"-v" | "--version") print_version ;;
"-l" | "--list-displays") print_displays ;;
"-u" | "--upload") upload="$1" ;;
"--hide")
if ! type -p xdotool >/dev/null; then
print_missing_deps "xdotool"
fi
hide="$1"
;;
"--terminal")
if [[ -z "$GSU_TERM" ]]; then
notify "\
gsu: \$GSU_TERM is not set
Set this variable in '$config_path/config.conf'."
exit 1
fi
terminal_arg="$1"
;;
"--notify") notify_arg="$1" ;;
"-r" | "--dmenu")
if type -p dmenu >/dev/null; then
dmenu_type=(dmenu)
fi
if type -p rofi >/dev/null; then
dmenu_type=(rofi -dmenu -p "gsu > ")
fi
if [[ -z "$dmenu_type" ]]; then
print_missing_deps "dmenu or rofi"
else
rofi_arg="$1"
fi
;;
"-d" | "--display") display="$2" ;;
"-s" | "--screenshot") set_type "screenshot" ;;
"-m" | "--video") set_type "video" ;;
"-g" | "--gif") set_type "gif" ;;
"-n" | "--no-cursor") nocursor="-u"; draw_mouse="-draw_mouse 0" ;;
"-d" | "--display")
if [[ -t 0 ]]; then
display="$2"
else
display=$(cat)
display="${display:0:1}"
if [[ -z "$display" ]]; then
notify "gsu: display is empty, assuming quit from dmenu or rofi"
exit 1
fi
fi
;;
"-o" | "--no-opengl") noopengl="--noopengl" ;;
"-n" | "--nocursor") nocursor="-u"; draw_mouse="-draw_mouse 0" ;;
"-c" | "--countdown")
if ! [[ $2 =~ ^[0-9]+$ ]]; then
@ -203,22 +98,20 @@ Set this variable in '$config_path/config.conf'."
-*) print_invalid_option "$1" ;;
*)
case "$prev_arg" in
"-d" | "--display" | "-c" | "--countdown") ;;
*)
if [[ "$1" =~ ^[a-zA-Z0-9_.\/-]+$ ]]; then
operand="$1"
else
print_invalid_operand "$1"
fi
;;
esac
if [[ "$1" =~ ^[a-zA-Z0-9_.\/-]+$ ]]; then
operand="$1"
else
print_invalid_operand "$1"
fi
;;
esac
prev_arg="$1"
shift
done
if [[ -z "$operand" ]]; then
print_missing_operand
fi
}
get_config() {
@ -313,19 +206,17 @@ get_command() {
done
if [[ "$MONW" == "0" ]] && [[ "$MONH" == "0" ]] && [[ "$MONX" == "0" ]] && [[ "$MONY" == "0" ]]; then
notify "gsu: unable to find your display"
echo "gsu: unable to find your display"
exit 1
fi
fi
check_minimize
case "$type" in
"screenshot")
if [[ -z "$display" ]]; then
cmd="$(maim $noopengl $nocursor -s "$operand" 2>&1>/dev/null)"
cmd="$(maim $nocursor -s "$operand" 2>&1>/dev/null)"
else
cmd="$(maim $noopengl $nocursor -g "${MONW}x${MONH}+${MONX}+${MONY}" "$operand" 2>&1>/dev/null)"
cmd="$(maim $nocursor -g "${MONW}x${MONH}+${MONX}+${MONY}" "$operand" 2>&1>/dev/null)"
fi
;;
@ -334,41 +225,23 @@ get_command() {
read -r X Y W H G ID < <(slop -f "%x %y %w %h %g %i")
if [[ -z "$X" ]] || [[ -z "$Y" ]] || [[ -z "$W" ]] || [[ -z "$H" ]]; then
check_maximize
print_manually_quit
fi
fi
if [[ -z "$AUDIO" ]]; then
if ! type -p pulseaudio >/dev/null; then
notify "\
gsu: no audio device set, default device 'pulse' cannot be found
Either install pulseaudio, or add your audio device to `$config_path/config.conf`."
check_maximize
exit 1
fi
AUDIO="pulse"
fi
if [[ ! -z "$countdown_enable" ]]; then
check_maximize
countdown "$countdown_enable" "Handing control over to ffmpeg in COUNTNUM seconds."
check_minimize
fi
echo "Press [q] or [Ctrl+C] to stop recording."
if [[ -z "$display" ]]; then
cmd=$(ffmpeg -y -f alsa -i $AUDIO -r 30 -f x11grab -show_region 1 $draw_mouse -s "$W"x"$H" -i :0.0+$X,$Y -c:v libx264 -crf 18 -preset:v ultrafast -c:a aac -b:a 192k -loglevel error "$output" 2>&1>/dev/null)
cmd=$(ffmpeg -y -f alsa -i pulse -r 30 -f x11grab -show_region 1 $draw_mouse -s "$W"x"$H" -i :0.0+$X,$Y -c:v libx264 -crf 18 -preset:v ultrafast -c:a aac -b:a 192k -loglevel error "$output" 2>&1>/dev/null)
else
cmd=$(ffmpeg -y -f alsa -i $AUDIO -r 30 -f x11grab -show_region 1 $draw_mouse -s "$MONW"x"$MONH" -i :0.0+$MONX,$MONY -c:v libx264 -crf 18 -preset:v ultrafast -c:a aac -b:a 192k -loglevel error "$output" 2>&1>/dev/null)
cmd=$(ffmpeg -y -f alsa -i pulse -r 30 -f x11grab -show_region 1 $draw_mouse -s "$MONW"x"$MONH" -i :0.0+$MONX,$MONY -c:v libx264 -crf 18 -preset:v ultrafast -c:a aac -b:a 192k -loglevel error "$output" 2>&1>/dev/null)
fi
;;
esac
check_maximize
}
set_type() {
@ -377,20 +250,6 @@ set_type() {
fi
}
check_minimize() {
if [[ ! -z "$hide" ]]; then
xdotool_id=$(xdotool getactivewindow)
xdotool windowminimize $xdotool_id
sleep 0.5
fi
}
check_maximize() {
if [[ ! -z "$hide" ]] && [[ ! -z "$xdotool_id" ]]; then
xdotool windowactivate $xdotool_id
fi
}
countdown() {
for ((i = $1; i > 0; i--)); do
echo -ne "\r${2//COUNTNUM/$i}"
@ -420,7 +279,7 @@ check_valid_exts() {
fi
done
notify "gsu: invalid $type file extension -- '$extension'"
echo "gsu: invalid $type file extension -- '$extension'"
exit 1
}
@ -438,9 +297,8 @@ take_screenshot() {
log "$cmd"
notify "\
gsu: maim returned an error
Check the most recent log in '$config_path/logs'."
echo "gsu: maim returned an error"
echo "Check the most recent log in '$config_path/logs'."
exit 1
fi
@ -468,9 +326,8 @@ take_video() {
else
log "$cmd"
notify "\
gsu: ffmpeg returned an error
Check the most recent log in '$config_path/logs'."
echo -e "\ngsu: ffmpeg returned an error"
echo "Check the most recent log in '$config_path/logs'."
exit 1
fi
@ -494,9 +351,8 @@ make_gif() {
log "$cmd"
notify "\
gsu: ffmpeg returned an error
Check the most recent log in '$config_path/logs'."
echo -e "\ngsu: ffmpeg returned an error"
echo "Check the most recent log in '$config_path/logs'."
exit 1
}
@ -524,9 +380,8 @@ upload() {
"video")
if [[ -z "$V_UPLOAD" ]]; then
if [[ -z "$STREAMABLE_USER" ]] || [[ -z "$STREAMABLE_PASS" ]]; then
notify "\
gsu: invalid streamable credentials
Fill in your credentials in '$config_path/config.conf' and try again."
echo -e "\ngsu: invalid streamable credentials"
echo "Fill in your credentials in '$config_path/config.conf' and try again."
exit 1
else
@ -553,14 +408,14 @@ Fill in your credentials in '$config_path/config.conf' and try again."
rm "$output"
if [[ "$cmd" == "200" ]]; then
echo "Gfycat is processing..."
echo "Gfycat is processing..."
local count=0
while [[ "$(curl -s https://api.gfycat.com/v1/gfycats/fetch/status/$output | jq -e -r '.task')" != "complete" ]]; do
((count++))
if [[ $count == 300 ]]; then
notify "gsu: gfycat timed out while processing"
echo -e "\ngsu: gfycat timed out while processing"
exit 1
fi
@ -569,7 +424,7 @@ Fill in your credentials in '$config_path/config.conf' and try again."
cmd="https://gfycat.com/$output"
else
notify "gsu: gfycat returned an invalid http code -- '$cmd'"
echo -e "\ngsu: gfycat returned an invalid http code -- '$cmd'"
exit 1
fi
fi
@ -579,103 +434,48 @@ Fill in your credentials in '$config_path/config.conf' and try again."
;;
esac
if type -p xsel >/dev/null && [[ "$cmd" == "http"* ]]; then
echo -n "$cmd" | xsel -ib
if type -p xclip >/dev/null && [[ "$cmd" == "http"* ]]; then
echo -n "$cmd" | xclip
echo -n "$cmd" | xclip -sel clip
fi
notify "$cmd"
}
remove_args() {
local args=()
while [[ "$1" ]]; do
if [[ "$1" == "--terminal" ]]; then
shift
else
args+=("$1")
shift
fi
done
echo "${args[@]}"
echo "$cmd"
}
main() {
get_config
get_args "$@"
set_type "screenshot"
if [[ -z "$terminal_arg" ]]; then
if [[ ! -z "$rofi_arg" ]]; then
case $(echo -e "Take a screenshot\nRecord a video\nRecord a video and convert it to the gif format" | "${dmenu_type[@]}") in
"Take a screenshot") set_type "screenshot" ;;
"Record a video") set_type "video" ;;
"Record a video and convert it to the gif format") set_type "gif" ;;
*) print_manually_quit ;;
esac
fi
set_type "screenshot"
if [[ -z "$operand" ]]; then
local ext=""
case "$type" in
"screenshot") ext=".png" ;;
"video") ext=".mp4" ;;
"gif") ext=".gif" ;;
esac
mkdir -p "$config_path/imgs"
operand="$config_path/imgs/$(date +"%F.%H-%M-%S.%N")$ext"
fi
case "$type" in
"screenshot")
if [[ -z "$S_UPLOAD" ]]; then
check_valid_exts "png,jpg"
fi
take_screenshot
;;
"video")
if [[ -z "$V_UPLOAD" ]]; then
check_valid_exts "mp4,mkv,mov"
fi
take_video
;;
"gif")
if [[ -z "$G_UPLOAD" ]]; then
check_valid_exts "gif"
fi
take_video
make_gif
;;
esac
if [[ ! -z "$upload" ]]; then
upload
else
notify "gsu: saved to '$operand'"
fi
else
pushd $(dirname ${BASH_SOURCE[0]}) &>/dev/null
local absolute="$PWD/$(basename ${BASH_SOURCE[0]})"
popd &>/dev/null
local args=$(remove_args "$@")
for ((i = 0; i < ${#GSU_TERM[@]}; i++)); do
if [[ "${GSU_TERM[$i]}" == *"CMD"* ]]; then
GSU_TERM[$i]="${GSU_TERM[$i]//CMD/$absolute $args}"
case "$type" in
"screenshot")
if [[ -z "$S_UPLOAD" ]]; then
check_valid_exts "png,jpg"
fi
done
eval "${GSU_TERM[@]}"
take_screenshot
;;
"video")
if [[ -z "$V_UPLOAD" ]]; then
check_valid_exts "mp4,mkv,mov"
fi
take_video
;;
"gif")
if [[ -z "$G_UPLOAD" ]]; then
check_valid_exts "gif"
fi
take_video
make_gif
;;
esac
if [[ ! -z "$upload" ]]; then
upload
fi
exit 0

66
gsu.1
View file

@ -1,76 +1,44 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.11.
.TH GSU "1" "December 2019" "gsu 1.3.2" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
.TH GSU "1" "September 2017" "gsu 1.1.1" "User Commands"
.SH NAME
gsu \- manual page for gsu 1.3.2
gsu \- manual page for gsu 1.1.1
.SH SYNOPSIS
.B gsu
[\fI\,OPTION\/\fR]... \fI\,SOURCE\/\fR
.SH DESCRIPTION
A general screenshot and upload utility for images, video, and gifs.
.PP
SOURCE defaults to \fI\,$XDG_CONFIG_HOME/gsu/imgs\/\fP if nothing is provided.
The most common location for $XDG_CONFIG_HOME is ~/.config.
.PP
GENERAL OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
Show the help menu.
Show the help menu
.TP
\fB\-v\fR, \fB\-\-version\fR
Show the current version.
.TP
\fB\-l\fR, \fB\-\-list\-displays\fR
List your current displays and their resolutions.
Show the current version
.TP
\fB\-u\fR, \fB\-\-upload\fR
Upload after running the utility.
Upload after running the utility
.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
UTILITY OPTIONS
.TP
\fB\-r\fR, \fB\-\-dmenu\fR
Select the one of the below options from dmenu or rofi.
.TP
\fB\-s\fR, \fB\-\-screenshot\fR
Take a screenshot. (default)
.TP
\fB\-m\fR, \fB\-\-video\fR
Record a video of the screen.
.TP
\fB\-g\fR, \fB\-\-gif\fR
Record a video and convert it to the gif format.
.PP
CAPTURE OPTIONS
.TP
\fB\-n\fR, \fB\-\-no\-cursor\fR
Hide the cursor.
\fB\-n\fR, \fB\-\-nocursor\fR
Hide the cursor
.TP
\fB\-d\fR, \fB\-\-display\fR NUM|TYPE
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.
\fB\-s\fR, \fB\-\-screenshot\fR
Take a screenshot
.TP
\fB\-m\fR, \fB\-\-video\fR
Record a video of the screen
.TP
\fB\-g\fR, \fB\-\-gif\fR
Record a video and convert it to the gif format
.PP
VIDEO OPTIONS
.TP
\fB\-c\fR, \fB\-\-countdown\fR NUM
Countdown before recording.
Countdown before recording
.SH "SEE ALSO"
The full documentation for
.B gsu