dshoreman / nextshot

A simple tool for taking screenshots on Linux and sharing via Nextcloud
GNU General Public License v2.0
42 stars 3 forks source link

Missing packages should be caught early #71

Closed bodryj closed 2 years ago

bodryj commented 4 years ago
$ nextshot -t
Starting Nextshot tray menu...
$ Waiting for selection...
/usr/bin/nextshot: строка 621: slop: команда не найдена

Aborted due to error

The error occurs when you are asked to take a screenshot

bodryj commented 4 years ago

Manjaro, KDE

bodryj commented 4 years ago

Команда не найдена = Command not found

bodryj commented 4 years ago

Decision:

# To use in i3 (or other X11-based environments)
sudo pacman -S --asdeps imagemagick slop xclip xdotool yad

# To use in Sway
sudo pacman -S --asdeps grim slurp wl-clipboard yad
dshoreman commented 4 years ago

While this technically isn't a bug, it would be nice if missing dependencies were caught earlier, so I'll go ahead and reopen this.


Something of a note to self:

It may not be possible for all required packages, but env-specific ones could likely be checked in parse_environment() for things like xclip which is always required on X11.

Those packages that are only needed some of the time could be detected in parse_args() while setting an option that requires them. If any packages are missing, Nextshot should show a hint along the lines of "Check required packages with nextshot -D" before aborting.