author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 02 Jan 2011 23:59:57 +0200 | |
changeset 845 | 0448cc4914f3 |
parent 400 | fe31cd23bfe5 |
child 846 | 7ea3cc9f8d82 |
permissions | -rw-r--r-- |
138 | 1 |
-*- mode: outline; coding: utf-8 -*- |
2 |
||
3 |
* Standard. |
|
4 |
||
5 |
See |
|
6 |
||
7 |
http://www.tronche.com/gui/x/icccm/ |
|
8 |
||
227 | 9 |
* Making screenshort. |
10 |
||
11 |
$ sudo apt-get install scrot |
|
12 |
$ scrot -d <sec> <file> |
|
13 |
||
14 |
or |
|
15 |
||
16 |
$ sudo apt-get install imagemagic |
|
17 |
$ import -quality 100 -pause <sec> -silent <file> |
|
348 | 18 |
|
845 | 19 |
* Input method. |
20 |
||
21 |
** Input method by setxkbmap. |
|
22 |
||
23 |
$ setxkbmap -rules xorg -model pc104 -layout "us,ru" -option "grp:rwin_toggle,grp_led:scroll" -variant ",winkeys" |
|
24 |
||
25 |
** Input method by xorg.conf. |
|
26 |
||
27 |
Section "InputDevice" |
|
28 |
Identifier "Keyboard0" |
|
29 |
Driver "kbd" |
|
30 |
Option "XkbModel" "pc105" |
|
31 |
Option "XkbLayout" "us,ru" |
|
32 |
Option "XkbVariant" ",winkeys" |
|
33 |
Option "XkbOptions" "grp:rwin_switch,grp_led:scroll" |
|
34 |
EndSection |
|
35 |
||
348 | 36 |
* .Xdefaults |
37 |
||
38 |
The syntax of an Xdefaults file is as follows: |
|
39 |
||
399 | 40 |
[client. | *][{restriction.} | *]resource: value |
348 | 41 |
|
399 | 42 |
client |
348 | 43 |
The name of the application, some program allow change it by |
399 | 44 |
'-name' option. This element is optional (can be substituated |
45 |
with wildcard). |
|
46 |
restriction |
|
47 |
||
48 |
Class names or name of specific class instance. The classes |
|
49 |
names conventionally start with an upper-case letter. |
|
50 |
||
348 | 51 |
resource |
52 |
The name of the resource whose value is to be changed. |
|
53 |
Resources are typically lowercase with uppercase |
|
54 |
concatenation. |
|
55 |
value |
|
400
fe31cd23bfe5
About string resource.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
399
diff
changeset
|
56 |
The actual value of the resource. |
348 | 57 |
delimiters |
58 |
A period (.) is used to signify each step down into the |
|
59 |
hierarchy. A colon (:) is used to separate the resource |
|
60 |
declaration from the actual value. |
|
61 |
||
62 |
Comment start with '!' char and goes up to end of line or C-like /* */. |
|
63 |
||
64 |
Use xprop utility to find classes and resources used by application. |
|
65 |
||
66 |
To reread your .Xresources file, and throw away your old resources: |
|
67 |
||
68 |
$ xrdb ~/.Xdefaults |
|
69 |
||
70 |
To reread your .Xresources file, and keep your old resources: |
|
71 |
||
72 |
$ xrdb -merge ~/.Xdefaults |
|
73 |
||
399 | 74 |
** Example. |
75 |
||
76 |
*foreground: yellow |
|
77 |
XClock*foreground: pink |
|
78 |
Xman*topBox*foreground: blue |
|
79 |
||
80 |
** Value types. |
|
81 |
||
400
fe31cd23bfe5
About string resource.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
399
diff
changeset
|
82 |
*** String. |
fe31cd23bfe5
About string resource.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
399
diff
changeset
|
83 |
|
fe31cd23bfe5
About string resource.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
399
diff
changeset
|
84 |
This can be path specification like '/usr/bin/firefox'. |
fe31cd23bfe5
About string resource.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
399
diff
changeset
|
85 |
|
399 | 86 |
*** Colors. |
87 |
||
400
fe31cd23bfe5
About string resource.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
399
diff
changeset
|
88 |
For color names see '/usr/lib/X11/rgb.txt'. Also you can use hex |
fe31cd23bfe5
About string resource.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
399
diff
changeset
|
89 |
representation #ffffff. |
399 | 90 |
|
91 |
*** Font. |
|
92 |
||
93 |
You can use either a full name, a wildcarded specification, or a font alias. |
|
94 |
||
95 |
XTerm*Font: -adobe-courier-bold-r-normal--14-140-75-75-m-90-iso8859-1 |
|
96 |
XTerm*Font: *courier-bold-r*140* |
|
97 |
XTerm*Font: 7x14 |
|
98 |
||
99 |
*** Geometry. |
|
100 |
||
101 |
XCalc*geometry: 120x120-0-0 |
|
102 |
XClock*geometry: -50+100 |
|
103 |
||
104 |
*** Cursor names. |
|
105 |
||
106 |
Cursor resources require the name of the file in /usr/include/X11/bitmaps that |
|
107 |
contains the cursor you want to use. |
|
108 |
||
109 |
ScoTerm*pointerShape: gumby |
|
110 |
||
111 |
*** Pixmaps. |
|
112 |
||
113 |
Pixmaps are patterns, like bitmaps, that are used to texture or color an area |
|
114 |
on your display. Pixmap resources are specified like cursors or bitmaps. |
|
115 |
||
116 |
*** Numebers. |
|
117 |
||
118 |
XLogo*borderWidth: 10 |
|
119 |
||
120 |
*** Boolean. |
|
121 |
||
122 |
Some resources require a boolean value, such as 'true' or 'false', 'yes' or |
|
123 |
'no', or 'on' or 'off'. |
|
124 |
||
348 | 125 |
** Wildcard matching. |
126 |
||
127 |
The asterisk can be used as a wildcard, making it easy to write a single rule |
|
128 |
that can be applied to many different applications or elements. |