aboutsummaryrefslogtreecommitdiff
path: root/README.rest.txt
blob: c5ff33137c02765f71da628895ecfe01e9dffe53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
.. -*- mode: rst; coding: utf-8 -*-
 
====================================
 Dakkar's ``fvwm-crystal`` settings
====================================
 
I use a 2800x1050 desktop (two 20" LCD panels on a GeForce 6600), with
`slightly modified version`_ of the `TopLine` recipe. I also use a 5x5
pages virtual desktop, and a Dvorak keyboard with valume keys (mapped
to the proper keycodes in X11). My music player is `AmaroK`, and my
desktop manager is `ROX`.
 
.. _`slightly modified version`: ../tree/recipes/TopLine
 
Since my monitors can "pivot", I have further modified the recipe to
handle rotating the displays. This needs help from the video card. See
the section `Rotating the displays`_.
 
The recipe
==========
 
The main differences from the stock `TopLine` are:
 
- different desktop bindings
- larger thumbnails
- different behaviour of the edges
- 2 identical pagers (one per physical screen)
- geometries rewritten to use ``@g`` to work with `Xinerama`
- each pager (and my "biff" terminal) is raised above all other
  windows if I keep the mouse pointer on it long enough
- some functions added to handle `rotating the displays`_
 
The decoration
==============
 
I have changed the `Clearlooks DeepSky` decoration_ to add a mini-icon
as button 3.
 
.. _decoration: ../tree/decorations/Dakkar/
 
The colorsets
=============
 
Since I use tha `Gentoo` version of ``fvwm2``, it has a patch that
allow fake transparency in the menus. Thus, I changed the
`DarkDesktop` and `WhiteDesktop` colorsets_ to use this feature.
 
.. _colorsets: ../tree/colorsets/
 
The bindings
============
 
I redefined most keyboard bindings to my taste. Of particular interest
may be the Music_ file, where I bind the volume controls to the volume
keycodes, and the ``Music-GUI`` function to the "eject" keycode. I
also bound most window manipulation functions to various combination
of ``Alt`` and the numeric keypad (see the `Window-Control-Dakkar`_
file)
 
.. _Music: ../tree/components/bindings/Music
.. _Window-Control-Dakkar: ../tree/components/bindings/Window-Control-Dakkar
 
The preferences
===============
 
To be able to select `AmaroK` as a music player, and `amixer` as a
mixer control, I created the `dakkar_Preferences`_ file, which adds
them to the appropriate menus.
 
.. _`dakkar_Preferences`: ../tree/components/desktop/dakkar_Preferences
 
The styles and icons
====================
 
I added some style declaration and icons for some applications
(e.g. the windows created by ``xine-ui`` and ``xpad`` should be bare,
and I added icons for ``xchat-2`` and ``skype``)
 
The functions
=============
 
I redefined a couple of function in the Numpad_ to add the
``AnyScreen`` option.
 
.. _Numpad: ../tree/components/functions/Numpad
 
Then I wrote the `Mixer-amixer`_ and `Music-amarok`_ files to interact
with by chosen music programs.
 
.. _`Mixer-amixer`: ../tree/components/functions/Mixer-amixer
.. _`Music-amarok`: ../tree/components/functions/Music-amarok
 
``amixer`` is a simple command-line mixer, and its integration was
easy.
 
`AmaroK` is a `KDE` application, and it's not straightforward to
control. At the moment only "random", "repeat", "stop", "play/pause"
and "show/hide" are implemented, all via ``dcop`` calls.
 
The ``Music-GUI`` function is used to toggle the display of
`AmaroK`, and also to start it: it the ``dcop`` calls fails, the
``amarok`` command gets executed, launching the program.
 
.. note:: `AmaroK` and `Trayer`
 
   For some not-really-clear-to-me reason, the tray icon of `AmaroK`
   is not displayed by `Trayer`, normally. To work around this
   problem, I have written the small ``amarok`` script, which sits in
   my ``~/bin`` directory (which is at the beginning of my
   ``$PATH``). Using this, the icon works as expected.
 
I also tweaked a Perl script I found on the Web to create a menu for
my ``screen`` sessions, see the `Screen-Menu`_ configuration file and
the `fvwm-screen.pl`_ script.
 
.. _`Screen-Menu`: ../tree/components/functions/Screen-Menu
.. _`fvwm-screen.pl`: ../tree/scripts/fvwm-screen.pl
 
Finally, in the `Notify`_ file, I redefined the ``UrgencyFunc`` to pop
up a notification via the dbus notification mechanism (using a `simple
Perl script`_ which uses `Net::DBus`_).
 
.. _Notify: ../tree/components/functions/Notify
.. _`simple Perl script`: ../tree/FvwmNotify.pm
.. _`Net::DBus`: http://search.cpan.org/~danberr/Net-DBus-0.33.5/
 
Rotating the displays
=====================
 
This takes a little background.
 
First of all, my ``/etc/X11/xorg.conf`` file has a ``Screen`` section
like this::
 
  Section "Screen"
    Identifier  "dual-nv"
    Device      "nvidia"
    Monitor     "LCD"
    DefaultDepth 24
    Option "TwinView" "true"
    Option "MetaModes" "DFP-0: 1400x1050 @1400x1050 +0+0, DFP-1: 1400x1050 @1400x1050 +1400+0"
    Option "RandRRotation" "on"
    Option "Xinerama" "on"
 
    SubSection "Display"
      ViewPort 0 0
      Depth    24
      Modes    "1400x1050"
    EndSubSection
  EndSection
 
This specifies that, normally, I use my displays horizontally, one to
the right of the other.
 
Then, in my `~/.xinirc`_, I add a second "MetaMode"::
 
  ./bin/nv-control-dpy --add-metamode \
   'DFP-0: 1400x1050 @1400x1050 +0+1050, DFP-1: 1400x1050 @1400x1050 +0+0'
 
The ``nv-control-dpy`` program can be found in the source tarball for
the ``nvidia-settings`` program, in the ``samples`` subdirectory.
 
You may be wondering: why adding a second MetaMode in this way, when
you can specify both in the ``xorg.conf`` file? Good question. The
answer is that, if you do it "the logical way", the always helpful
NVidia drivers will tell the X server that you have a virtual screen
whose size is the bounding box of the union of all MetaModes. Which in
my case would mean that I'd have a lot of panning around, *very*
irritating when you use multiple viewports. Adding the MetaMode after
the startup of the X server avoids this issue.
 
In the recipe, I have two functions to set landscape (normal) and
portrait (vertical) orientation. They call ``xrandr`` to set the
display orientation and size, and do some repositioning of the various
things that need it:
 
- a script instructs `ROX-Filer` to change its "pinboard" to the one
  with the proper layout (this is not optimal, but since I very rarely
  change the contents of my pinboard, works well enough for me)
`gkrellm2` and my "biff" terminal get moved to their proper
  positions during ``StartFunction``
 
Maybe there's a samrter way to get the same result, but this works,
and it only took an evening to set up.
 
.. _`~/.xinirc`: ../tree/xinitrc