From 93dc9656e2513d3b350d6a114c92aee64eb76358 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Tue, 11 Nov 2014 03:44:47 +0100 Subject: Add initial manapage --- CMakeLists.txt | 5 ++- README.rst | 1 + cmake/FindSphinx.cmake | 14 +++++++ doc/CMakeLists.txt | 9 ++++ doc/conf.py | 15 +++++++ doc/yawa.rst | 109 +++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 cmake/FindSphinx.cmake create mode 100644 doc/CMakeLists.txt create mode 100644 doc/conf.py create mode 100644 doc/yawa.rst diff --git a/CMakeLists.txt b/CMakeLists.txt index c75092e..e7402dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,9 +4,11 @@ project (yawa) set(PACKAGE_NAME "yawa") set(PACKAGE_VERSION "0.0.1") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") -set(PACKAGE_DESCRIPTION "yet another wallpaper application") +set(PACKAGE_DESCRIPTION "Yet Another Wallpaper Application") set(PACKAGE_BUGREPORT "johannes@kyriasis.com") +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") + configure_file( ${CMAKE_SOURCE_DIR}/src/config.h.in ${CMAKE_SOURCE_DIR}/src/config.h @@ -19,3 +21,4 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) add_subdirectory("src") +add_subdirectory("doc") diff --git a/README.rst b/README.rst index 55331f8..883a963 100644 --- a/README.rst +++ b/README.rst @@ -19,6 +19,7 @@ Dependencies * glibc (argp argument parsing) * imlib2 * libx11 +* sphinx (man page) Building ======== diff --git a/cmake/FindSphinx.cmake b/cmake/FindSphinx.cmake new file mode 100644 index 0000000..ed0d376 --- /dev/null +++ b/cmake/FindSphinx.cmake @@ -0,0 +1,14 @@ +find_program(SPHINX_EXECUTABLE NAMES sphinx-build + HINTS + $ENV{SPHINX_DIR} + PATH_SUFFIXES bin + DOC "Sphinx documentation generator" +) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(Sphinx DEFAULT_MSG + SPHINX_EXECUTABLE +) + +mark_as_advanced(SPHINX_EXECUTABLE) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..e5aa8cc --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,9 @@ +find_package(Sphinx REQUIRED) + +add_custom_target(man ALL + ${SPHINX_EXECUTABLE} + -q -b man + "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Building man page with Sphinx" +) diff --git a/doc/conf.py b/doc/conf.py new file mode 100644 index 0000000..9d2a16b --- /dev/null +++ b/doc/conf.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import sys +import os + +project = 'yawa' +master_doc = 'yawa' +source_suffix = '.rst' + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('yawa', 'yawa', 'Yet Another Wallpaper Application', + ['Johannes Löthberg'], 1) +] diff --git a/doc/yawa.rst b/doc/yawa.rst new file mode 100644 index 0000000..353d731 --- /dev/null +++ b/doc/yawa.rst @@ -0,0 +1,109 @@ +yawa +==== + +Synopsis +-------- + +**yawa** [*options*] + +Description +----------- + +:program:`yawa` is Yet Another Wallpaper Application, and a cleaned up fork of hsetroot + +Options +------- + +Gradients: +~~~~~~~~~~ + +-a COLOR, --add COLOR + Add the specified hex color to range + +-d DISTANCE, --distance DISTANCE + Distance to use for adding color to range (Specify multiple times for + successive distances). Defaults to 1 for each color. + +-c, --clear + Clear the color range + +-g ANGLE, --gradient ANGLE + Render gradient using the specified angle + +Solid: +~~~~~~ + +-s COLOR, --solid COLOR + Render a solid background using the specified color + +Image files: +~~~~~~~~~~~~ + +-C IMAGE, --center IMAGE + Render the specified image centered on the screen + +-f IMAGE, --full IMAGE + Render the specified image using the maximum aspect ratio + +-F IMAGE, --fill IMAGE + Render the specified image stretched out + +-t IMAGE, --tile IMAGE + Render the specified image tiled + +Manipulations: +~~~~~~~~~~~~~~ + +-b RADIUS, --blur RADIUS + Blur the current image using the specified radius + +-B AMOUNT, --brightness AMOUNT + Adjust the brightness of the current image with the specified amount of + brightness + +-G AMOUNT, --gamma AMOUNT + Adjust the gamma level of the current image with the specifed amount + +-o AMOUNT, --contrast AMOUNT + Adjust the constrast of the current image with the specified amount + +-S RADIUS, --sharpen RADIUS + Sharpen the current image + +-T COLOR, --tint COLOR + Tint the current image using the specified hex color + +--fliph + Flip the current image horizontally + +--flipv + Flip the current image vertically + +--flipd + Flip the current image diagonally + +Misc: +~~~~~ + +-A AMOUNT, --alpha AMOUNT + Adjust the alpha level for colors and images + +-w FILENAME, --write FILENAME + Write the current image to the specified file. The filename specifies + the out-format + +-h, --help + Show this help message and exit + +--usage + Print a short usage message + +-?, --version + Print program version + +Examples +-------- + +Set the background to a nice blue to yellow horizontal gradient + + :program:`yawa --add "#ffb301" --add "#00ffff" --gradient 100` -- cgit v1.2.3-70-g09d2