Skip to main content

A Variety Of Screenshot Tools

gnome-screenshot.png

As I learned recently on Mastodon, there are multiple candidates for screenshot programs for GNU/Linux systems. Until now, I was pretty happy with GNOMEs built-in gnome-screenshot tool, but I decided to take a look at the other contestants and see what the differences are.

So all of the tree tools have a git repository, so we can clone and take a closer look at each of them. Currently I am not really interested in functionality, but only in complexity of the codes base. So let's take cloc as our judge. Be sure to exclude the translation files as they are not part of the code base:

Gnome-screenshot

dzu@krikkit:/opt/src/git/gnome-screenshot (master)$ cloc . --exclude-lang="PO File"
     152 text files.
     141 unique files.                                          
     114 files ignored.

github.com/AlDanial/cloc v 1.98  T=0.06 s (653.0 files/s, 76435.1 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                               12            561            385           2421
Glade                            2              0              2            382
SVG                              5              0              0            362
Meson                            5             29              3            173
C/C++ Header                    11             82            213            136
JSON                             1              0              0             57
XML                              2              0              0             55
Bourne Shell                     1              8              0             15
YAML                             1              2              0             13
Markdown                         1              3              0              8
Text                             1              0              0              6
-------------------------------------------------------------------------------
SUM:                            42            685            603           3628
-------------------------------------------------------------------------------
dzu@krikkit:/opt/src/git/gnome-screenshot (master)$ 

Shutter

dzu@krikkit:/opt/src/git/shutter (master)$ cloc . --exclude-lang="PO File"
     365 text files.
     329 unique files.                                          
     285 files ignored.

github.com/AlDanial/cloc v 1.98  T=0.45 s (312.2 files/s, 124630.1 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
SVG                              74            192             69          23687
Perl                             49           6692           5064          19438
Bourne Again Shell                7             55            173            190
Markdown                          5             55              0            132
XML                               1              0              0             40
make                              1              3              0             37
YAML                              2              6              1             34
Bourne Shell                      1              5              0             22
--------------------------------------------------------------------------------
SUM:                            140           7008           5307          43580
--------------------------------------------------------------------------------
dzu@krikkit:/opt/src/git/shutter (master)$ 

Swappy

dzu@krikkit:/opt/src/git/swappy (master)$ cloc . --exclude-lang="PO File"
      58 text files.
      49 unique files.                              
      20 files ignored.

github.com/AlDanial/cloc v 1.98  T=0.06 s (706.2 files/s, 77214.6 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
C                                11            426             27           2103
Glade                             1              0              1            819
Markdown                          2            115              0            267
C/C++ Header                     11             67              4            265
JSON                              5              0              0            219
SVG                               1              0              0            118
Meson                             3             19              5            108
YAML                              5              6              1             89
Bourne Again Shell                1             22              5             77
CSS                               1              6              0             23
JavaScript                        1              3              0              8
XML                               1              0              0              7
Text                              1              0              0              1
--------------------------------------------------------------------------------
SUM:                             44            664             43           4104
--------------------------------------------------------------------------------
dzu@krikkit:/opt/src/git/swappy (master)$ 

Summary

Source code

App Lang LOC
gnome-screenshot C 3628
swappy C 4104
shutter Perl 43580

Translations

App Lang LOC
gnome-screenshot C 18297
swappy C 166
shutter Perl 109808

Assessment

Different tools can be totally different "points" in the "implementations space". If you do have limited time and try to understand which of some candidates is the most interesting from an engineering point of view, then looking at the source code is invaluable.

Being able to rate first hand the complexity of the software and the size of the community (translations) makes it easy to arrive at an initial assessment.

Comments

Comments powered by Disqus