Skip to content

Commit

Permalink
Added support to disable man page compression. Access via the CMAKE_C…
Browse files Browse the repository at this point in the history
…OMPRESS_MAN variable.
  • Loading branch information
naelstrof committed Dec 4, 2014
1 parent 8dd7883 commit 178b253
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 8 deletions.
21 changes: 14 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ cmake_minimum_required( VERSION 2.8 )
project( "maim" )
set( maim_VERSION_MAJOR 3 )
set( maim_VERSION_MINOR 3 )
set( maim_VERSION_PATCH 40 )
set( maim_VERSION_PATCH 41 )

set( BIN_TARGET "${PROJECT_NAME}" )
if( NOT CMAKE_INSTALL_PREFIX )
set( CMAKE_INSTALL_PREFIX "/usr" )

if ( NOT CMAKE_INSTALL_PREFIX )
set( CMAKE_INSTALL_PREFIX "/usr" )
endif()

if ( NOT CMAKE_INSTALL_MANDIR )
set( CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_PREFIX}/share/man" )
set( CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Directory where man pages reside. (/usr/share/man, /usr/local/share/man, etc.)" )

set( CMAKE_COMPRESS_MAN TRUE CACHE BOOL "Whether or not to compress the man pages for install." )

if ( CMAKE_COMPRESS_MAN )
set( MANTARGET "man-src/maim.1.gz" )
else()
set( MANTARGET "man-src/maim.1" )
endif()

if( NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE )
Expand Down Expand Up @@ -54,7 +61,7 @@ find_program( GZIP_EXECUTABLE gzip
if ( RONN_EXECUTABLE AND GZIP_EXECUTABLE )
add_custom_target( "man"
COMMAND "${RONN_EXECUTABLE}" "-r" "maim.1.ronn"
COMMAND "${GZIP_EXECUTABLE}" "maim.1"
COMMAND "${GZIP_EXECUTABLE}" "-k" "maim.1"
WORKING_DIRECTORY man-src VERBATIM )
endif()

Expand Down Expand Up @@ -118,6 +125,6 @@ target_link_libraries( "${BIN_TARGET}"
install( TARGETS "${BIN_TARGET}"
DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )

install( FILES "${CMAKE_SOURCE_DIR}/man-src/maim.1.gz"
install( FILES "${CMAKE_SOURCE_DIR}/${MANTARGET}"
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
COMPONENT doc )
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ help
----
Join us on irc at freenode in *#maim*.
```text
maim v3.3.40
maim v3.3.41
Copyright (C) 2014 Dalton Nell, Maim Contributors
(https://github.com/naelstrof/maim/graphs/contributors)
Expand Down
157 changes: 157 additions & 0 deletions man-src/maim.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "MAIM" "1" "December 2014" "" ""
.
.SH "NAME"
\fBmaim\fR \- Takes screenshots
.
.SH "SYNOPSIS"
\fBmaim\fR [options] [file]
.
.SH "DESCRIPTION"
maim (MAke IMage) is a utility that takes screenshots of your desktop using imlib2\. It\'s meant to overcome shortcomings of scrot and performs better than scrot in several ways\.
.
.SH "OPTIONS"
.
.TP
\fB\-\-help\fR
Print help and exit
.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version and exit
.
.SS "Options"
.
.TP
\fB\-\-xdisplay=hostname:number\.screen_number\fR
Sets the x display\.
.
.TP
\fB\-s\fR, \fB\-\-select\fR
Enables user region selection\. Requires slop to be installed\. (default=off)
.
.TP
\fB\-x\fR, \fB\-\-x=INT\fR
Sets the x coordinate for taking an image
.
.TP
\fB\-y\fR, \fB\-\-y=INT\fR
Sets the y coordinate for taking an image
.
.TP
\fB\-w\fR, \fB\-\-w=INT\fR
Sets the width for taking an image
.
.TP
\fB\-h\fR, \fB\-\-h=INT\fR
Sets the height for taking an image
.
.TP
\fB\-g\fR, \fB\-\-geometry=WxH+X+Y\fR
Set the region to capture
.
.TP
\fB\-d\fR, \fB\-\-delay=FLOAT\fR
Set the amount of time to wait before taking an image\. (default=`0\.0\')
.
.TP
\fB\-i\fR, \fB\-\-windowid=INT\fR
Set the window to capture\. Defaults to the root window id\.
.
.TP
\fB\-\-localize\fR
Localizes given geometry to the given window\. So \fBmaim \-i $ID \-g 100x100+0+0 \-\-localize\fR would screenshot the top\-left 100x100 pixels of the given window, rather than the top\-left 100x100 pixels of the root window\. (default=off)
.
.TP
\fB\-\-hidecursor\fR
Prevents the system cursor from showing up in screenshots\. (default=off)
.
.TP
\fB\-m\fR, \fB\-\-mask=STRING\fR
Masks off\-screen pixels so they don\'t show up in screenshots\. (possible values="auto", "off", "on" default=`auto\')
.
.SS "SLOP OPTIONS"
.
.TP
\fB\-\-nokeyboard\fR
Disables the ability to cancel selections with the keyboard\. (default=off)
.
.TP
\fB\-b\fR, \fB\-\-bordersize=INT\fR
Set the selection rectangle\'s thickness\. Does nothing when \fB\-\-highlight\fR is enabled\. (default=`5\')
.
.TP
\fB\-p\fR, \fB\-\-padding=INT\fR
Set the padding size of the selection\. Can be negative\. (default=`0\')
.
.TP
\fB\-t\fR, \fB\-\-tolerance=INT\fR
How far in pixels the mouse can move after clicking and still be detected as a normal click instead of a click and drag\. Setting this to 0 will disable window selections\. (default=`2\')
.
.TP
\fB\-\-gracetime=FLOAT\fR
Set the amount of time before slop will check for keyboard cancellations in seconds\. (default=`0\.4\')
.
.TP
\fB\-c\fR, \fB\-\-color=FLOAT,FLOAT,FLOAT,FLOAT\fR
Set the selection rectangle\'s color\. Supports RGB or RGBA values\. (default=`0\.5,0\.5,0\.5,1\')
.
.TP
\fB\-n\fR, \fB\-\-nodecorations\fR
Attempt to select child windows in order to avoid window decorations\. (default=off)
.
.TP
\fB\-\-min=INT\fR
Set the minimum output of width or height values\. This is useful to avoid outputting 0\. Setting min and max to the same value disables drag selections\. (default=`0\')
.
.TP
\fB\-\-max=INT\fR
Set the maximum output of width or height values\. Setting min and max to the same value disables drag selections\. (default=`0\')
.
.TP
\fB\-l\fR, \fB\-\-highlight\fR
Instead of outlining selections, slop highlights it\. This is only useful when \fB\-\-color\fR is set to a transparent color\. (default=off)
.
.SH "EXAMPLES"
Screenshot the active window
.
.IP "" 4
.
.nf

$ maim \-i $(xdotool getactivewindow)
.
.fi
.
.IP "" 0
.
.P
Prompt a transparent red selection to screenshot\.
.
.IP "" 4
.
.nf

$ maim \-s \-c 1,0,0,0\.6
.
.fi
.
.IP "" 0
.
.P
Save a dated screenshot\.
.
.IP "" 4
.
.nf

$ maim ~/$(date +%F\-%T)\.png
.
.fi
.
.IP "" 0
.
.SH "COPYRIGHT"
Copyright (C) 2014 Dalton Nell \fB<naelstrof@gmail\.com>\fR, Maim Contributors \fB<http://github\.com/naelstrof/maim/graphs/contributors>\fR\.
Binary file modified man-src/maim.1.gz
Binary file not shown.

0 comments on commit 178b253

Please sign in to comment.