Pārlūkot izejas kodu

Add first version of README

Alois Mahdal 10 gadus atpakaļ
vecāks
revīzija
7a330b37ef
1 mainītis faili ar 116 papildinājumiem un 0 dzēšanām
  1. 116
    0
      README

+ 116
- 0
README Parādīt failu

@@ -2,3 +2,119 @@ GMON
2 2
 ====
3 3
 
4 4
 Generic plugin-based monitor, mainly for use with Xfce genmon
5
+
6
+Generic plugin-based monitor, mainly for use with Xfce genmon.
7
+
8
+
9
+SYNOPSIS
10
+--------
11
+
12
+    gmon [options] command [args...]
13
+
14
+
15
+DESCRIPTION
16
+-----------
17
+
18
+gmon is a plugin-based "pretty-printer" that allows adding own sub-commands
19
+and use them with common interface.
20
+
21
+Typical use case is when you have a space where only limited number of characters
22
+can be displayed, but you want to display arbitrary amount of information (like
23
+name of currently playing song or status of a task), either having it trimmed
24
+gracefully or defining own way how to "squeeze" it in.
25
+
26
+Apart from that, the plugin can define other modes of output that might suit
27
+other targets better.  For example, genmon Xfce plugin is able to periodically
28
+display output of a command in desktop panel.  Apart from displaying simple
29
+string, it can parse XML-like content and use it to display tooltip or an icon.
30
+You could implement mode in your plugin for this target, and use gmon both for
31
+your Xfce panel and your terminal in a consistent manner.
32
+
33
+
34
+OPTIONS
35
+-------
36
+
37
+`-c`, `--chars` *chars*
38
+  limit in charcters
39
+
40
+`--format` *format*
41
+  output format: *plain* for plain text, *xgp* for xfce4-genmon-plugin.  User-
42
+  defined format names must start with `x-` prefix.
43
+
44
+`-p`, `--plain`
45
+  same as `--format=plain`
46
+
47
+`-x`, `--xgp`
48
+  same as `--format=xgp`
49
+
50
+`-h`, `--help`
51
+  print help message
52
+
53
+`--version`
54
+  show version
55
+
56
+
57
+EXAMPLE PLUGINS
58
+---------------
59
+
60
+These are pretty useless for real life, they only serve for illustration
61
+of basic concept or as examples of how to implement your own plugin.
62
+
63
+### sh ###
64
+
65
+This one takes first argument as a command name and runs it as a new process,
66
+passing the rest of arguments to it untouched:
67
+
68
+    $ gmon sh uname -a
69
+    Linux fullmoon.brq.redhat.com 3.13.6-...
70
+    $ gmon sh who
71
+    somebody  tty1         2014-03-28 19:...
72
+
73
+Note that arguments are untouched, so things like wildcards/glubs will not
74
+work (unless the shell where you type the `gmon` command expands them).
75
+
76
+
77
+### echo ###
78
+
79
+Connects the arguments and prints them:
80
+
81
+    $ gmon echo hello
82
+    hello
83
+    $ gmon echo "one two"   "three"
84
+    one twothree
85
+
86
+
87
+### dump ###
88
+
89
+Dumps the arguments as Python sees them (using repr() builtin)
90
+
91
+    $ gmon dump "one two"   "three"
92
+    args = ['one two', 'three']
93
+    $ gmon dump uname -a
94
+    args = ['uname', '-a']
95
+
96
+
97
+FILES
98
+-----
99
+
100
+*plugins*
101
+  folder where plugins are stored
102
+
103
+
104
+ENVIRONMENT
105
+-----------
106
+
107
+`GMON_PLUGINS`
108
+  Alternate folder for plugins
109
+
110
+
111
+AUTHOR
112
+------
113
+
114
+Alois Mahdal <alois.mahdal@zxcvb.cz>
115
+
116
+
117
+SEE ALSO
118
+--------
119
+
120
+[xfce4-genmon-plugin page](http://goodies.xfce.org/projects/panel-plugins/xfce4-genmon-plugin)