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