summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-19 13:29:48 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-19 13:29:48 +0100
commit3f36f82f2bf77ff36e7f4eccefc2ad595a8078d3 (patch)
tree8328b959e349630d527c815a20d2e5953aa06aa2
parentm readme + partially done overview in info manual (diff)
downloadblueshift-3f36f82f2bf77ff36e7f4eccefc2ad595a8078d3.tar.gz
blueshift-3f36f82f2bf77ff36e7f4eccefc2ad595a8078d3.tar.bz2
blueshift-3f36f82f2bf77ff36e7f4eccefc2ad595a8078d3.tar.xz
misc + partial info chapter: invoking
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--TODO3
-rw-r--r--info/blueshift.texinfo87
-rwxr-xr-xsrc/__main__.py4
3 files changed, 90 insertions, 4 deletions
diff --git a/TODO b/TODO
index 293063c..3de5474 100644
--- a/TODO
+++ b/TODO
@@ -1,7 +1,8 @@
Medium priority:
+ Command line autocompletion
Small examples
-r support in the comperhensive example
- store settings so that we can transition from them instead of from clean
+ Store settings so that we can transition from them instead of from clean
Signal USR1 for configuration reload
Low priority:
diff --git a/info/blueshift.texinfo b/info/blueshift.texinfo
index 9698ae6..e389c5c 100644
--- a/info/blueshift.texinfo
+++ b/info/blueshift.texinfo
@@ -89,12 +89,97 @@ calls to any system dependent functions.
If Blueshift does not work for you for any of these
reasons, you should take a look at Redshift.
-Blueshift is fully extensible and highly configurable.
@node Invoking
@chapter Invoking
+Blueshift uses argparser to read options from the
+commnad line. It inherits a few properaties from this:
+abbreviations are supported, you only need to type the
+beginning of the long options so that the rest can
+be filled in unambiguously by the program; @option{--}
+can be used, as usual, to make all following options
+being parsed as just arguments; and @option{++} works
+like @option{--}, except it only allied to the next
+option. Any argument that is not parsed as an option
+for Blueshift is passed onto the configuration script.
+
+Blueshift recognises the following options:
+
+@table @option
+@item -c
+@itemx --configurations FILE
+Select configuration script. This defaults to the
+first file of the following the exists:
+@file{$XDG_CONFIG_HOME/blueshift/blueshiftrc},
+@file{$HOME/.config/blueshift/blueshiftrc},
+@file{$HOME/.blueshiftrc}, @file{/etc/blueshiftrc}.
+Blueshift does not check the user home, rather it
+checks @env{HOME} which should be the user home, unless
+you change it yourself.
+
+@item -p @c the long name of option is inspired from openntpd
+@itemx --panic-gate
+@itemx --panicgate
+Applies the settings directly instead of transitioning
+into the initial settings. There is not option for doing
+this when the program exists. But you press @kbd{Control+c}
+twice, or send SIGTERM twice, to skip transition into
+default settings.
+
+@item -h
+@itemx -?
+@itemx --help
+Prints help information.
+
+@item -C
+@itemx --copying
+@itemx --copyright
+Prints copyright information.
+
+@itemx -W
+@itemx --warranty
+Prints non-warranty information,
+included in the copyright information.
+
+@itemx -v
+@itemx --version
+Prints the name of the program and the
+installed version of the program
+@end table
+
+Blueshift also supports a few options
+for ad-hoc settings. These are ignored
+(unlessed fetched by the configuration file)
+if @option{-c} (@option{--configurations})
+is used.
+
+@table @option
+@item -g
+@itemx --gamma RGB|R:G:B
+
+@item -b
+@itemx --brightness RGB|R:G:B
+
+@item +b
+@itemx ++brightness Y
+
+@item -t
+@itemx --temperature TEMP
+
+@item -l
+@itemx --location LAT:LON
+
+@item -r
+@itemx --reset
+
+@item -o
+@itemx --output
+@itemx --crtc CRTC
+@end table
+
+
@node GNU Free Documentation License
@appendix GNU Free Documentation License
diff --git a/src/__main__.py b/src/__main__.py
index 9ae00e3..f08520f 100755
--- a/src/__main__.py
+++ b/src/__main__.py
@@ -25,7 +25,7 @@ from argparser import *
PROGRAM_NAME = 'blueshift'
-PROGRAM_VERSION = '1.0'
+PROGRAM_VERSION = '1.1'
## Set global variables
@@ -242,7 +242,7 @@ parser.add_argumented(['-o', '--output', '--crtc'], 0, 'CRTCS',
'It is best to start one instance per monitor with colour calibration')
parser.add_argumentless(['-h', '-?', '--help'], 0, 'Print this help information')
parser.add_argumentless(['-C', '--copying', '--copyright'], 0, 'Print copyright information')
-parser.add_argumentless(['-W', '--warranty'], 0, 'Print warranty information')
+parser.add_argumentless(['-W', '--warranty'], 0, 'Print non-warranty information')
parser.add_argumentless(['-v', '--version'], 0, 'Print program name and version')
parser.parse()