Debian Codegraph @

fvwm/recipes/Amiga

raw
1 # Amiga Workbench recipe for Fvwm-Crystal
2 # Written by Dominique Michel <[email protected]>, 2008-2013
3 # The multimedia menu is from Tavis Ormandy <[email protected]> configuration
4 # http://dev.gentoo.org/~taviso/fvwm2rc.html (dead link, too bad!)
5 # See ChangeLog for details
6 #
7 # This recipe try to incorporate the look and feel of the AmigaOS into
8 # fvwm-crystal. It will be best with the Amiga windows decorations,
9 # button model and focus policy. All this is very experimental at that time.
10 #
11 # For the real feel and look, just buy an Amiga (or the Amiga Forever software).
12 # You can also be interested by AROS. a free implimentation of the AmigaOS,
13 # which can run native or on top of a GNU/Linux installation.
14 #
15 # This recipe provide both typical fvwm features
16 # (like multiple desktop pages) and simulate the Amiga "stack" of pages
17 # between the fullscreened windows and the workbench. We can also bring in
18 # fullscreen almost any window, so the result in that aspect is even better
19 # than with the real AmigaOS.
20 # - Rigth click on a window maximize button put the window in full screen
21 # (Alt + * to return in its preceding state or to toggle). Middle click
22 # will maximise the window and left click will toggle the window between
23 # raised and lowered.
24 # - Left click on the top right button (pager) will cycle between the
25 # fullscreened windows and the workbench.
26 # - Some bindings are different:
27 # - DESKTOP
28 # LMB: unchanged, open the menu
29 # MMB: raise/lower the top bar.
30 # RMB: unchanged, open a terminal window.
31 # Alt + MMB: unchanged, hide or show desktop panels.
32 #
33 # You can use folding to navigate this file
34
35 Echo Amiga recipe loading from $.
36 InfoStoreAdd Recipe "Amiga"
37
38 # temporary fix for fvwm<2.6.6
39 # TODO: test it with 2.6.5, normaly not needed any more
40 Test (Version <= 2.6.5) SetEnv NotificationAreaManager $[infostore.NotificationAreaManager]
41
42 # user's id
43 PipeRead 'echo InfoStoreAdd Your_Id `id -un | sed "s/\\\<./\\\u&/"`'
44 # You can use the following instead of the line above:
45 #PipeRead 'echo InfoStoreAdd Your_Id `id -un | tr "a-z" "A-Z"`'
46
47 # Includes and FVWM modules {{{1
48 Include components/functions/Window-Autohide
49 Include components/functions/MakePanel
50 Include components/functions/FocusOnGotoPage
51 Include components/bindings/Desktop-MMB-ToggleTopBar
52
53 # Icons on the desktop {{{2
54 # Type of icons on the desktop {{{2
55 LoadPreferences IconsType
56
57 # Media player {{{2
58 Include components/functions/Music-$[infostore.MusicPlayer]
59
60 #############################
61 ### Desktop settings ### {{{1
62 #############################
63 EdgeScroll 100000 100000
64 EdgeResistance -1
65 Style * EdgeMoveDelay 250
66 Style * EdgeMoveResistance 20
67
68 HideGeometryWindow Move, Resize
69 OpaqueMoveSize 100
70
71 ## Change desktop with mouse wheel
72 Include components/bindings/Desktop-PageSwitch-Horizontal
73
74 ## pager's dimension
75 #InfoStoreAdd Desk_Pages_X "8"
76 #InfoStoreAdd Desk_Pages_Y "1"
77 #DesktopSize $[infostore.Desk_Pages_X]x$[infostore.Desk_Pages_Y]
78
79 ## Top bar dimensions ## {{{2
80 ########################
81 # The top bar is divided into
82 # >|TopLogo| WindowsList |Clock|Pager|<
83 # >| 11 |iconman_width| 2 | 1 |<
84 # The pager is onto a separated button.
85 # 1) The number of button and the button width are depandant of the screen
86 # size and of the font size.
87 # 2) The width in pixels of each element of the topbar must be made equal to
88 # its (button_number x button_width).
89 # 3) The error of the calculation is 0 <= e < button_width
90 # 4) that imply than to be sure for the clock to fit into the topbar,
91 # its button number must be made of 1 button greater than calculated. This
92 # button will be taken on the windows list.
93 # topbar width = (vp.width+2 pixels-pager_width) = (vp.width+2-24)
94 # pager button = 24xpanel_height pixels
95 # clock = 60x22
96
97 # button width in pixels: 30 for vp.width=1600 and panel font_size=20
98 PipeRead 'echo InfoStoreAdd buttons_width $(($[panel_font_size]+$(($[panel_font_size]/2))))'
99 # number of buttons: 52 with the same setting:
100 # $(((($[vp.width]-22))/$[infostore.buttons_width]))'
101
102 # Alogo width in pixels: 720
103 # This should work for an user's name up to 9 or 10 characters, as well than
104 # for a few GB of RAM and swap. If your setting is wider, adjust 112 and 554,
105 # but keep the ratio of those 2 numbers. This ration is necessary in order to
106 # get a correct width when changing the font size.
107 # The font I used at that time is the Bitstrem Cyberbit. Another font like
108 # Arial will give you more space. So, this setting should be good for
109 # almost anybody.
110 PipeRead 'echo InfoStoreAdd toplogo_width $(($(($((112+$(($((554*$[panel_font_size]))/18))))/$[infostore.buttons_width]))*$[infostore.buttons_width]))'
111
112 # variable_width: width of Iconman in number of buttons: 7
113 # pix_width: definitive systray width in pixels: 750
114 PipeRead 'tmpvar=$(($(((($[vp.width]-82))-$[infostore.toplogo_width])))); \
115 tmpvar2=$(($((${tmpvar}/$[infostore.buttons_width]))-1)); \
116 echo InfoStoreAdd pix_width $(($((${tmpvar2}*$[infostore.buttons_width])))); \
117 echo InfoStoreAdd variable_width ${tmpvar2}'
118
119 # Panel height
120 PipeRead 'echo InfoStoreAdd panel_height $(($[panel_font_size]+$(($[panel_font_size]/2))))'
121
122 ## Bottom bar dimensions ## {{{2
123 ###########################
124 # >| Left button | Media button | Notif aera | Menu panel |<
125 # >|bottom_panel_height |4*bottom_panel_height |$[trayer_width] |10* bottom_panel_height |<
126 # >| 35px | 140px |$[trayer_width] | 350px |<
127 # All the buttons are on separate buttons.
128 # Panel height
129 #InfoStoreAdd bottom_panel_height 35
130 InfoStoreAdd bottom_panel_height $[infostore.panel_height]
131
132 ## Desktop panel {{{2
133 ################
134 PipeRead 'echo EWMH-Desktop 3 3 $(($[infostore.panel_height]+3)) $[infostore.bottom_panel_height]
135 #EWMH-Panel-Bottom $[infostore.bottom_panel_height]
136 #EWMH-Panel-Top $[infostore.panel_height]
137
138 # Icons on Desktop {{{1
139 Test (EnvMatch DefaultDesktopManager Crystal) PipeRead 'echo "Style * IconBox $(($[vp.width]-((((50*$[IconColumnsNumber]))+36))))x$(($[vp.height]-$((12+$[infostore.panel_height]+$[infostore.bottom_panel_height]))))+$((((50*$[IconColumnsNumber]))+18))+$(($[infostore.panel_height]+6)), IconFill top right, IconGrid 30 30"'
140 Test (!EnvMatch DefaultDesktopManager Crystal) PipeRead 'echo "Style * IconBox $(($[vp.width]-6))x$(($[vp.height]-$((12+$[infostore.panel_height]+$[infostore.bottom_panel_height]))))+3+$(($[infostore.panel_height]+6)), IconFill top right, IconGrid 30 30"'
141
142 # Desktop manager {{{2
143 DestroyFunc RedrawIconBox
144 AddToFunc RedrawIconBox
145 + I PipeRead 'echo "Style * IconBox $(($[vp.width]-((((50*$[IconColumnsNumber]))+36))))x$(($[vp.height]-$((12+$[infostore.panel_height]+$[infostore.bottom_panel_height]))))+$((((50*$[IconColumnsNumber]))+18))+$(($[infostore.panel_height]+6)), IconFill top right, IconGrid 30 30"'
146 LoadPreferences DefaultDesktopManager
147
148 Style * StickyIcon
149 #Style ApplicationPanel !Icon
150
151 ###############
152 ### Top Panel # {{{1
153 ###############
154 ## InfoLine {{{1
155 DestroyFunc Get-InfoLine
156 AddToFunc Get-InfoLine
157 + I PipeRead `$[FVWM_SYSTEMDIR]/scripts/infoline_amiga`
158 + I SendToModule FvwmButtons-TopLogo ChangeButton InfoLine Title "$[FVWM_INFOLINE]"
159
160 ## Top panel crystal 1{{{
161 ####################
162 All (FvwmButtons-PanelTop) Close
163 DestroyModuleConfig FvwmButtons-PanelTop: *
164 # (vp.width - pager_width)
165 PipeRead 'echo \*FvwmButtons-PanelTop: Geometry $(($[vp.width]-24))x$[infostore.panel_height]+-1+-1'
166 *FvwmButtons-PanelTop: BoxSize smart
167 *FvwmButtons-PanelTop: ActiveColorset $[infostore.cs_panel_active]
168 *FvwmButtons-PanelTop: Colorset $[infostore.cs_panel_inactive]
169 *FvwmButtons-PanelTop: Rows 1
170 PipeRead 'echo \*FvwmButtons-PanelTop: Columns $(((($[vp.width]-22))/$[infostore.buttons_width]))'
171 *FvwmButtons-PanelTop: Padding 0 0
172 *FvwmButtons-PanelTop: Frame 0
173 *FvwmButtons-PanelTop: Font none
174 #"xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
175
176 ## Panel with FVWM-Crystal menu and Logo, as well than some free memory indication 2{{{
177 ###########
178 # Separated script to update InfoLine, otherwise the cursor get crazy
179 AddToFunc ExitFunction I Test (Quit) Exec exec killall UpdateInfoline $[infostore.SILENT]
180 AddToFunc ExitFunction I Test (ToRestart) Exec exec killall UpdateInfoline $[infostore.SILENT]
181 Exec exec $[FVWM_SYSTEMDIR]/scripts/UpdateInfoline 5 $[infostore.Fvwm_Crystal_Recipe] $[infostore.Your_Id]
182
183 # TopLogo panel
184 All (FvwmButtons-TopLogo) Close
185 DestroyModuleConfig FvwmButtons-TopLogo: *
186 *FvwmButtons-TopLogo: Geometry $[infostore.toplogo_width]x$[infostore.panel_height]+-1+-1
187 *FvwmButtons-TopLogo: BoxSize smart
188 *FvwmButtons-TopLogo: ActiveColorset $[infostore.cs_panel_active]
189 *FvwmButtons-TopLogo: PressColorset $[infostore.cs_panel_active]
190 *FvwmButtons-TopLogo: Colorset $[infostore.cs_panel_inactive]
191 *FvwmButtons-TopLogo: Rows 1
192 *FvwmButtons-TopLogo: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
193 *FvwmButtons-TopLogo: Padding 1 1
194 *FvwmButtons-TopLogo: Frame 0
195 #### Use the following for an animated icon (tested one time in the past...)
196 ### *FvwmButtons-TopLogo: (2x1, Size 22 22, \
197 ### Swallow (Close, Respawn) Display `Exec exec animate $[FVWM_USERDIR]/icons/Default/22x22/fvwm-crystal/dancing-tux.gif &`)
198 ## Crystal Variant
199 PipeRead `$[FVWM_SYSTEMDIR]/scripts/infoline_amiga`
200 *FvwmButtons-TopLogo: (1x1, Id "InfoLine", Title (Side) "$[infostore.Your_Id]'s Workbench: $[FVWM_INFOLINE]" Icon "22x22/fvwm-crystal/fvwm-crystal.png", \
201 ActionOnPress, \
202 Action (Mouse 1) Toggle-TopBar-RaiseLower, \
203 Action (Mouse 2) Menu /Random-Wallpaper $[MenuPosition_SE], \
204 Action (Mouse 3) Menu /FVWM-Crystal $[MenuPosition_SE], \
205 Action (Mouse 4) X fvwm-crystal.videomodeswitch+, \
206 Action (Mouse 5) X fvwm-crystal.videomodeswitch-)
207
208 PipeRead 'echo "*FvwmButtons-PanelTop: ($(($[infostore.toplogo_width]/$[infostore.buttons_width]))x1, Frame 0, Padding 0 0, Left, Size $[infostore.toplogo_width] 24, \
209 Swallow (UseOld, Hints, Respawn) \\\"FvwmButtons-TopLogo\\\" \\\"Module FvwmButtons FvwmButtons-TopLogo\\\")"'
210
211 ## Panel with windows list {{{2
212 ##########################
213 All (FvwmIconMan-Windows) Close
214 DestroyModuleConfig FvwmIconMan-Windows: *
215 *FvwmIconMan-Windows: Resolution Global
216 *FvwmIconMan-Windows: UseWinList True
217 *FvwmIconMan-Windows: DontShow Class=xmms,FvwmButtons,FvwmIconMan,FvwmPager,FvwmIdent,FvwmForm
218 *FvwmIconMan-Windows: ShowNoIcons True
219 *FvwmIconMan-Windows: DrawIcons Always
220 *FvwmIconMan-Windows: Format ""
221 *FvwmIconMan-Windows: Sort id
222 *FvwmIconMan-Windows: FollowFocus True
223 *FvwmIconMan-Windows: Title ""
224 *FvwmIconMan-Windows: ButtonGeometry 24x24
225 *FvwmIconMan-Windows: MaxButtonWidth 26
226 PipeRead 'echo "*FvwmIconMan-Windows: ManagerGeometry $[infostore.variable_width]x1+$[infostore.toplogo_width]-1"'
227 *FvwmIconMan-Windows: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
228 # Tips {{{3
229 *FvwmIconMan-Windows: Tips needed
230 *FvwmIconMan-Windows: TipsDelays 100 50
231 *FvwmIconMan-Windows: TipsFont "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
232 *FvwmIconMan-Windows: TipsFormat "%t"
233 *FvwmIconMan-Windows: TipsBorderWidth 0
234 *FvwmIconMan-Windows: TipsColorset $[infostore.cs_panel_active]
235 *FvwmIconMan-Windows: TipsJustification center
236 # Button look {{{3
237 *FvwmIconMan-Windows: PlainButton flat
238 *FvwmIconMan-Windows: FocusButton flat
239 *FvwmIconMan-Windows: SelectButton flat
240 *FvwmIconMan-Windows: FocusAndSelectButton flat
241 *FvwmIconMan-Windows: IconButton flat
242 # Colorsets {{{3
243 *FvwmIconMan-Windows: Colorset $[infostore.cs_panel_inactive]
244 *FvwmIconMan-Windows: PlainColorset $[infostore.cs_panel_winactive]
245 *FvwmIconMan-Windows: FocusColorset $[infostore.cs_panel_wininactive]
246 *FvwmIconMan-Windows: SelectColorset $[infostore.cs_panel_inactive]
247 *FvwmIconMan-Windows: FocusAndSelectColorset $[infostore.cs_panel_active]
248 *FvwmIconMan-Windows: IconColorset $[infostore.cs_panel_active]
249 # Actions {{{3
250 *FvwmIconMan-Windows: Action Mouse 1 A SendCommand "Function Window-Focus-DefaultDesk-Raised"
251 *FvwmIconMan-Windows: Action Mouse 2 $[Mod2] SendCommand "Close"
252 *FvwmIconMan-Windows: Action Mouse 2 $[Mod0] SendCommand "Window-Iconify"
253 *FvwmIconMan-Windows: Action Mouse 3 $[Mod] SendCommand "Function Window-Focus-CurrentDesk-Raised"
254 # }}}3
255
256 PipeRead 'echo "*FvwmButtons-PanelTop: ($[infostore.variable_width]x1, Frame 0, Padding 0 0, Right, Size $[infostore.pix_width] 24, \
257 Swallow (UseOld, Hints, Respawn) \\\"FvwmIconMan-Windows\\\" \\\"Module FvwmIconMan FvwmIconMan-Windows\\\")"'
258
259 ## Panel with date and hour {{{2
260 ###########################
261 All (FvwmButtons-Clock) Close
262 DestroyModuleConfig FvwmButtons-Clock: *
263 PipeRead 'echo \*FvwmButtons-Clock: Geometry -+$(($(($(($((60/$[infostore.buttons_width]))+1))*$[infostore.buttons_width]))+25))-+1'
264 #*FvwmButtons-Clock: Geometry -+85-+1
265 *FvwmButtons-Clock: BoxSize smart
266 *FvwmButtons-Clock: ActiveColorset $[infostore.cs_panel_active]
267 *FvwmButtons-Clock: Colorset $[infostore.cs_panel_inactive]
268 *FvwmButtons-Clock: Columns 2
269 *FvwmButtons-Clock: Padding 2 2
270 *FvwmButtons-Clock: Frame 0
271 *FvwmButtons-Clock: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
272 *FvwmButtons-Clock: (2x1, Size 60 24, \
273 Swallow (Close, Respawn, FvwmModule) "FvwmScript-Clock" 'Script components/scripts/FvwmScript-Clock', \
274 Action (Mouse 3) SendToModule *FvwmScript-Clock SendString 1 1 str)
275
276 PipeRead 'echo "*FvwmButtons-PanelTop: ($(($((60/$[infostore.buttons_width]))+1))x1, Frame 0, Padding 0 0, \
277 Swallow(UseOld, Hints, Respawn) \\\"FvwmButtons-Clock\\\" \\\"Module FvwmButtons FvwmButtons-Clock\\\")"'
278
279 Module FvwmButtons FvwmButtons-PanelTop
280
281 ### Panel with pager {{{1
282 ####################
283 All (FvwmButtons-Pager) Close
284 DestroyModuleConfig FvwmButtons-Pager: *
285 *FvwmButtons-Pager: Geometry 24x$[infostore.panel_height]--1+-1
286 *FvwmButtons-Pager: BoxSize smart
287 *FvwmButtons-Pager: ActiveColorset $[infostore.cs_panel_active]
288 *FvwmButtons-Pager: Colorset $[infostore.cs_panel_inactive]
289 *FvwmButtons-Pager: Rows 1
290 *FvwmButtons-Pager: Columns 1
291 *FvwmButtons-Pager: Padding 0 0
292 *FvwmButtons-Pager: Frame 0
293 *FvwmButtons-Pager: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
294
295 # Pager button {{{2
296 *FvwmButtons-Pager: (1x1, Size 24 24, Icon "22x22/fvwm-crystal/window-switch.png", \
297 Action (Mouse 1) Disappear, \
298 Action (Mouse 2) GotoPage prev, \
299 Action (Mouse 4) GotoPage-Right, \
300 Action (Mouse 5) GotoPage-Left, \
301 Panel (position Button right -2p 50p) FvwmPager LaunchPager)
302 # Panel (down, position right -5 0) "FvwmPager" "Module FvwmPager")
303
304 DestroyFunc LaunchPager
305 AddToFunc LaunchPager
306 + I Module FvwmPager
307 + I Wait FvwmPager
308
309 # Pager window {{{3
310 DestroyFunc FvwmPagerWindow
311 AddToFunc FvwmPagerWindow
312 + I DestroyModuleConfig FvwmPager*
313 + I KillModule FvwmPager
314 + I PipeRead 'echo \*FvwmPager: Geometry $((28*$[infostore.Desk_Pages_X]))x$((24*$[infostore.Desk_Pages_Y]))-90000-90000'
315 #+ I PipeRead 'echo \*FvwmPager: Geometry $((28*$[infostore.Desk_Pages_X]))x$((24*$[infostore.Desk_Pages_Y]))-$((28*$[infostore.Desk_Pages_X]))+$((24*$[infostore.Desk_Pages_Y]))'
316 + I *FvwmPager: MiniIcons
317 + I *FvwmPager: Font none
318 + I *FvwmPager: WindowBorderWidth 1
319 + I *FvwmPager: Window3DBorders
320 + I *FvwmPager: UseSkipList
321 + I *FvwmPager: Colorset * $[infostore.cs_panel_inactive]
322 + I *FvwmPager: HilightColorset * $[infostore.cs_panel_active]
323 + I *FvwmPager: WindowColorsets $[infostore.cs_panel_winactive] $[infostore.cs_panel_wininactive]
324
325 FvwmPagerWindow
326 Module FvwmButtons FvwmButtons-Pager
327
328 # Change desktop pages using mouse wheel on pager
329 Mouse (FvwmPager) 4 W $[Mod] GotoPage-Right
330 Mouse (FvwmPager) 5 W $[Mod] GotoPage-Left
331
332 ############################
333 ### Top Panel with menus ### 1{{{
334 ############################
335 Style FvwmButtons-PanelTopMenu StartsLowered
336
337 ## Main top panel for menu 1{{{
338 ##########################
339 All (FvwmButtons-PanelTopMenu) Close
340 DestroyModuleConfig FvwmButtons-PanelTopMenu: *
341 PipeRead 'echo \*FvwmButtons-PanelTopMenu: Geometry $(($[vp.width]-26))x$[infostore.panel_height]+-1+-1'
342 *FvwmButtons-PanelTopMenu: BoxSize smart
343 *FvwmButtons-PanelTopMenu: ActiveColorset $[infostore.cs_panel_active]
344 *FvwmButtons-PanelTopMenu: Colorset $[infostore.cs_panel_inactive]
345 *FvwmButtons-PanelTopMenu: Rows 1
346 # FvwmButtons-ApplicationMenuLength is set by fvwm-crystal.apps to 10
347 # Columns: ($[FvwmButtons-ApplicationMenuLength]+1)=11
348 PipeRead 'echo "*FvwmButtons-PanelTopMenu: Columns $(($[FvwmButtons-ApplicationMenuLength]+1))"'
349 *FvwmButtons-PanelTopMenu: Padding 0 0
350 *FvwmButtons-PanelTopMenu: Frame 0
351 *FvwmButtons-PanelTopMenu: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
352
353 ## Panel with Crystal menu 2{{{
354 ##########################
355 All (FvwmButtons-TopMenuPanel) Close
356 DestroyModuleConfig FvwmButtons-TopMenuPanel: *
357 # 1 column wide on a total of 11
358 PipeRead 'echo \*FvwmButtons-TopMenuPanel: Geometry $(($(($[vp.width]-26))/$(($[FvwmButtons-ApplicationMenuLength]+1))))x$[infostore.panel_height]+-1+-1'
359 *FvwmButtons-TopMenuPanel: BoxSize smart
360 *FvwmButtons-TopMenuPanel: ActiveColorset $[infostore.cs_panel_active]
361 *FvwmButtons-TopMenuPanel: PressColorset $[infostore.cs_panel_active]
362 *FvwmButtons-TopMenuPanel: Colorset $[infostore.cs_panel_inactive]
363 *FvwmButtons-TopMenuPanel: Rows 1
364 *FvwmButtons-TopMenuPanel: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
365 *FvwmButtons-TopMenuPanel: Padding 1 1
366 *FvwmButtons-TopMenuPanel: Frame 0
367 *FvwmButtons-TopMenuPanel: (1x1, Title (Side) "Workbench", \
368 Action (Mouse 1) Toggle-TopBar-RaiseLower, \
369 Action (Mouse 2) Toggle-TopBar-RaiseLower, \
370 Action (Mouse 3) Menu /FVWM-Crystal $[MenuPosition_SE])
371
372 ## Panel with application menu 2{{{
373 ##############################
374 All (FvwmButtons-ApplicationMenu) Close
375 DestroyModuleConfig FvwmButtons-ApplicationMenu: *
376 PipeRead 'fvwm-crystal.apps --database=$[FVWM_DISTROMENUDIR]/Applications --database=$[FVWM_SYSTEMDIR]/Applications --database=$[FVWM_USERDIR]/Applications --without=/Applications/$[FVWM_DISTROMENUNAME] --search-icons-in=$[FVWM_USERDIR]/icons/$[infostore.Icon_Theme]/48x48/categories:$[FVWM_USERDIR]/icons/$[infostore.Icon_Theme]/48x48/apps:$[FVWM_SYSTEMDIR]/icons/$[infostore.Icon_Theme]/48x48/categories:$[FVWM_SYSTEMDIR]/icons/$[infostore.Icon_Theme]/48x48/apps:$[FVWM_DISTROMENUDIR]/icons/$[infostore.Icon_Theme]/48x48/categories:$[FVWM_DISTROMENUDIR]/icons/$[infostore.Icon_Theme]/48x48/apps --default-file-icon=48x48/apps/default.png --default-dir-icon=48x48/categories/directory.png --min-submenu-length=5 --sort=prio --panel-icons=none --panel-action1=topapp --panel-action2=secondapp --panel-action3=menu --button-geometry=1 1 --menu-pos=S --root-cat-name="ApplicationMenu" --panel-titles=center --panel-name=FvwmButtons-ApplicationMenu --menuname-suffix="Menu" --check-execs'
377 *FvwmButtons-ApplicationMenu: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
378 *FvwmButtons-ApplicationMenu: BoxSize smart
379 *FvwmButtons-ApplicationMenu: ActiveColorset $[infostore.cs_panel_active]
380 *FvwmButtons-ApplicationMenu: PressColorset $[infostore.cs_panel_active]
381 *FvwmButtons-ApplicationMenu: Colorset $[infostore.cs_panel_inactive]
382 *FvwmButtons-ApplicationMenu: Rows 1
383 *FvwmButtons-ApplicationMenu: Padding 1 1
384 *FvwmButtons-ApplicationMenu: Frame 0
385 # 10 columns wide on a total of 11
386 PipeRead 'echo \*FvwmButtons-ApplicationMenu: Geometry $(($(($(($[vp.width]-26))*$[FvwmButtons-ApplicationMenuLength]))/$(($[FvwmButtons-ApplicationMenuLength]+1))))x$[infostore.panel_height]+$(($(($[vp.width]-26))/$(($[FvwmButtons-ApplicationMenuLength]+1))))+-1'
387
388 *FvwmButtons-PanelTopMenu: (1x1, Frame 0, Padding 0 0, Left, \
389 Swallow (UseOld, Hints, Respawn) "FvwmButtons-TopMenuPanel" "Module FvwmButtons FvwmButtons-TopMenuPanel")
390 *FvwmButtons-PanelTopMenu: ($[FvwmButtons-ApplicationMenuLength]x1, Frame 0, Padding 0 0, Left, \
391 Swallow (UseOld, Hints, Respawn) FvwmButtons-ApplicationMenu "Module FvwmButtons FvwmButtons-ApplicationMenu")
392
393 Module FvwmButtons FvwmButtons-PanelTopMenu
394
395 ################
396 ### Other menus {{{1
397 ################
398 # Applications menu generator {{{2
399 # The order matter, otherwise, the apps menu get screwed at recipe reloading
400 # This creates the main "Start Menu" at the top of the screen
401 PipeRead 'fvwm-crystal.apps --database=$[FVWM_DISTROMENUDIR]/Applications --database=$[FVWM_SYSTEMDIR]/Applications --database=$[FVWM_USERDIR]/Applications --search-icons-in=$[FVWM_USERDIR]/icons/$[infostore.Icon_Theme]/32x32/categories:$[FVWM_USERDIR]/icons/$[infostore.Icon_Theme]/32x32/apps:$[FVWM_SYSTEMDIR]/icons/$[infostore.Icon_Theme]/32x32/categories:$[FVWM_SYSTEMDIR]/icons/$[infostore.Icon_Theme]/32x32/apps:$[FVWM_DISTROMENUDIR]/icons/$[infostore.Icon_Theme]/32x32/categories:$[FVWM_DISTROMENUDIR]/icons/$[infostore.Icon_Theme]/32x32/apps --default-file-icon=32x32/apps/default.png --default-dir-icon=32x32/categories/directory.png --min-submenu-length=5 --root-cat-name="StartMenu" --sort=prio --no-panel --check-execs'
402 # --dont-clear--menu'
403 AddToMenu /StartMenu "" Nop
404 AddToMenu /StartMenu "%32x32/fvwm-crystal/fvwm-crystal.png%FVWM-Crystal" Popup /FVWM-Crystal
405
406 # This creates app menu available under Alt+Win_R
407 PipeRead 'fvwm-crystal.apps --database=$[FVWM_DISTROMENUDIR]/Applications --database=$[FVWM_SYSTEMDIR]/Applications --database=$[FVWM_USERDIR]/Applications --search-icons-in=$[FVWM_USERDIR]/icons/$[infostore.Icon_Theme]/22x22/categories:$[FVWM_USERDIR]/icons/$[infostore.Icon_Theme]/22x22/apps:$[FVWM_SYSTEMDIR]/icons/$[infostore.Icon_Theme]/22x22/categories:$[FVWM_SYSTEMDIR]/icons/$[infostore.Icon_Theme]/22x22/apps:$[FVWM_DISTROMENUDIR]/icons/$[infostore.Icon_Theme]/22x22/categories:$[FVWM_DISTROMENUDIR]/icons/$[infostore.Icon_Theme]/22x22/apps --default-file-icon=22x22/apps/default.png --default-dir-icon=22x22/categories/directory.png --min-submenu-length=5 --sort=prio --no-panel --check-execs'
408 AddToMenu /Applications '%22x22/fvwm-crystal/audio-x-generic.png%$[gt.Music]' Popup /Music
409
410 # Desktop menu with left click
411 #SetEnv DesktopMenu /FVWM-Crystal
412 SetEnv DesktopMenu /StartMenu
413
414 # One icon button {{{1
415 # MakePanel <Name> <geometry[pixel]> <boxsize> <rows> <columns> <padding_x> <padding_y> \
416 # <frame>
417 MakePanel BottomSwitchPanel "+-1--1" smart 1 1 0 0 0
418 *FvwmButtons-BottomSwitchPanel: (1x1, Size $[infostore.bottom_panel_height] $[infostore.bottom_panel_height], \
419 Icon "22x22/fvwm-crystal/window-bot.png", \
420 Action (Mouse 1) BottomPanels-Toggle, \
421 Action (Mouse 2) X pmount-gui, \
422 Action (Mouse 3) X pmount-gui -u )
423 Module FvwmButtons FvwmButtons-BottomSwitchPanel
424
425 # Make the bottom panels to disapear
426 DestroyFunc BottomPanels-Toggle
427 AddToFunc BottomPanels-Toggle
428 + I All (FvwmButtons-Bottom, !State 3) BottomPanels-Disappear
429 + I TestRc (NoMatch) BottomPanels-Appear
430
431 DestroyFunc BottomPanels-Disappear
432 AddToFunc BottomPanels-Disappear
433 + I All (FvwmButtons-Bottom) Iconify true
434 + I Style FvwmButtons-Bottom State 3
435 #+ I All (trayer) Iconify true
436 + I All (FvwmButtons-BottomSwitchPanel2) Iconify true
437 + I All (ApplicationPanel, !State 3) Iconify true
438
439 DestroyFunc BottomPanels-Appear
440 AddToFunc BottomPanels-Appear
441 + I All (FvwmButtons-Bottom) Iconify false
442 + I Style FvwmButtons-Bottom !State 3
443 #+ I All (trayer) Iconify false
444 + I All (FvwmButtons-BottomSwitchPanel2) Iconify false
445 + I All (ApplicationPanel, !State 3) Iconify false
446
447 # Bottom button with Music buttons and notification aera {{{1
448 # We use 1 button because MakePanel will imply 4 buttons, which imply more memory usage
449 All (FvwmButtons-Bottom) Close
450 DestroyModuleConfig FvwmButtons-Bottom: *
451 InfoStoreAdd NotifWidth 0
452 Test (!EnvMatch trayer_width 0) \
453 PipeRead 'echo "InfoStoreAdd NotifWidth $(((((($[trayer_width]*$[infostore.bottom_panel_height]))/24))+1))"'
454 PipeRead 'echo "*FvwmButtons-Bottom: Geometry $(((($[infostore.bottom_panel_height]*4))+$[infostore.NotifWidth]))x$[infostore.bottom_panel_height]+$[infostore.bottom_panel_height]--1"'
455 *FvwmButtons-Bottom: BoxSize smart
456 *FvwmButtons-Bottom: ActiveColorset $[infostore.cs_panel_active]
457 *FvwmButtons-Bottom: Colorset $[infostore.cs_panel_inactive]
458 *FvwmButtons-Bottom: Rows 1
459 *FvwmButtons-Bottom: Padding 0 0
460 *FvwmButtons-Bottom: Frame 0
461 *FvwmButtons-Bottom: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
462
463 # First button with main menus and controls {{{2
464 *FvwmButtons-Bottom: (1x1, Size $[infostore.bottom_panel_height] $[infostore.bottom_panel_height], Icon "22x22/categories/Multimedia.png", \
465 Action (Mouse 1) Menu /Player $[MenuPosition_NE], \
466 Action (Mouse 2) Music-GUI, \
467 Action (Mouse 3) Music-QJackGUI, \
468 Action (Mouse 4) Change-Volume-Up $[infostore.Vol_Step], \
469 Action (Mouse 5) Change-Volume-Down $[infostore.Vol_Step])
470 # media controls button 2 {{{2
471 *FvwmButtons-Bottom: (1x1, Size $[infostore.bottom_panel_height] $[infostore.bottom_panel_height], Icon "22x22/fvwm-crystal/media-eject.png", \
472 Action (Mouse 1) Menu /Playlist-button $[MenuPosition_NE], \
473 Action (Mouse 2) Menu /Music/Volume $[MenuPosition_NE], \
474 Action (Mouse 3) Menu /Mixer $[MenuPosition_NE], \
475 Action (Mouse 4) Music-Next, \
476 Action (Mouse 5) Music-Prev)
477 # music controls button 3 {{{2
478 *FvwmButtons-Bottom: (1x1, Size $[infostore.bottom_panel_height] $[infostore.bottom_panel_height], Icon "22x22/fvwm-crystal/media-playback-start.png", \
479 Action (Mouse 1) Music-Play, \
480 Action (Mouse 2) Music-Pause, \
481 Action (Mouse 3) Menu /Playback $[MenuPosition_NE], \
482 Action (Mouse 4) Music-Speed-Up, \
483 Action (Mouse 5) Music-Speed-Down)
484 # music controls button 4 {{{2
485 *FvwmButtons-Bottom: (1x1, Size $[infostore.bottom_panel_height] $[infostore.bottom_panel_height], Icon "22x22/fvwm-crystal/media-skip-forward.png", \
486 Action (Mouse 1) Menu /Speed $[MenuPosition_NE], \
487 Action (Mouse 4) Button-Seek-+, \
488 Action (Mouse 5) Button-Seek--)
489
490 # Notification aera {{{2
491 # Settings of stalonetray
492 Test (!EnvMatch trayer_width 0) \
493 PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "stalonetray" ]; then echo FvwmStalonePanel \
494 $[infostore.bottom_panel_height] $(($[trayer_width]/24)) 1 \
495 +$((((5*$[infostore.bottom_panel_height]))+2)) "--1" NE $[trayer_width] $[infostore.bottom_panel_height] \
496 +$((((5*$[infostore.bottom_panel_height]))+2)) "--1"; fi'
497 # Settings of trayer
498 Test (!EnvMatch trayer_width 0) \
499 PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "trayer" ]; then echo FvwmTrayerPanel \
500 pixel pixel $(($[infostore.bottom_panel_height]+2)) bottom left $(($(($[infostore.bottom_panel_height]*5))+2)) \
501 "-1" \\"--width $(($(($(($[trayer_width]*$[infostore.bottom_panel_height]))/24))+1))\\"; fi'
502 # The button
503 Test (!EnvMatch trayer_width 0) \
504 PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "stalonetray" ]; then echo *FvwmButtons-Bottom: \\($(($[trayer_width]/24))x1, \
505 Size $[infostore.NotifWidth] $[infostore.bottom_panel_height], Swallow \\(Close, Respawn, FvwmModule\\) FvwmStalonePanel Nop\\); \
506 else echo *FvwmButtons-Bottom: \\($(($[trayer_width]/24))x1, Size $[infostore.NotifWidth] $[infostore.bottom_panel_height], \
507 Swallow \\(UseOld, FvwmModule\\) trayer Nop\\); fi'
508
509 Module FvwmButtons FvwmButtons-Bottom
510
511 # One icon button {{{1
512 ## MakePanel <Name> <geometry[pixel]> <boxsize> <rows> <columns> <padding_x> <padding_y> <frame>
513 PipeRead 'echo "MakePanel BottomSwitchPanel2 +$(($((5*$[infostore.bottom_panel_height]))+$(($(($(($[trayer_width]*$[infostore.bottom_panel_height]))/24))))+3))--1 smart 1 1 0 0 0"'
514 *FvwmButtons-BottomSwitchPanel2: (1x1, Size $[infostore.bottom_panel_height] $[infostore.bottom_panel_height], \
515 Icon "22x22/fvwm-crystal/window-bot.png", \
516 Action (Mouse 1) BottomPanels2-Toggle, \
517 Action (Mouse 2) Nop, \
518 Action (Mouse 3) Nop
519 Module FvwmButtons FvwmButtons-BottomSwitchPanel2
520
521 # Make the application panel to disapear
522 DestroyFunc BottomPanels2-Toggle
523 AddToFunc BottomPanels2-Toggle
524 + I All (ApplicationPanel, !State 3) BottomPanels2-Disappear
525 + I TestRc (NoMatch) BottomPanels2-Appear
526
527 DestroyFunc BottomPanels2-Disappear
528 AddToFunc BottomPanels2-Disappear
529 + I All (ApplicationPanel) Iconify true
530 + I Style ApplicationPanel State 3
531
532 DestroyFunc BottomPanels2-Appear
533 AddToFunc BottomPanels2-Appear
534 + I All (ApplicationPanel) Iconify false
535 + I Style ApplicationPanel !State 3
536
537 # Application panel {{{1
538 All (ApplicationPanel) Close
539 DestroyModuleConfig ApplicationPanel: *
540 *ApplicationPanel: BoxSize smart
541 *ApplicationPanel: ActiveColorset $[infostore.cs_panel_active]
542 *ApplicationPanel: Colorset $[infostore.cs_panel_inactive]
543 *ApplicationPanel: Rows 2
544 *ApplicationPanel: Padding 0 0
545 *ApplicationPanel: Frame 0
546 *ApplicationPanel: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
547
548 ## This creates the main panel with applications - default app icon is
549 ## shown on the panel, and can be launched using RMB; LMB opens the app
550 ## category menu. Menus are not generated
551 PipeRead 'fvwm-crystal.apps --database=$[FVWM_DISTROMENUDIR]/Applications --database=$[FVWM_SYSTEMDIR]/Applications --database=$[FVWM_USERDIR]/Applications --without=/Applications/$[FVWM_DISTROMENUNAME] --search-icons-in=$[FVWM_USERDIR]/icons/$[infostore.Icon_Theme]/32x32/categories:$[FVWM_USERDIR]/icons/$[infostore.Icon_Theme]/32x32/apps:$[FVWM_SYSTEMDIR]/icons/$[infostore.Icon_Theme]/32x32/categories:$[FVWM_SYSTEMDIR]/icons/$[infostore.Icon_Theme]/32x32/apps:$[FVWM_DISTROMENUDIR]/icons/$[infostore.Icon_Theme]/32x32/categories:$[FVWM_DISTROMENUDIR]/icons/$[infostore.Icon_Theme]/32x32/apps --default-file-icon=32x32/apps/default.png --default-dir-icon=32x32/categories/directory.png --min-submenu-length=5 --sort=prio --panel-icons=topapp --panel-action1=menu --panel-action2=secondapp --panel-action3=topapp --button-geometry=2 2 --panel-size=32 32 --menu-pos=N --menuname-suffix="Panel" --no-menus --check-execs'
552 ## This generates menus for the panel buttons. They are created upside-down,
553 ## because panel is on the bottom of the screen
554 PipeRead 'fvwm-crystal.apps --database=$[FVWM_DISTROMENUDIR]/Applications --database=$[FVWM_SYSTEMDIR]/Applications --database=$[FVWM_USERDIR]/Applications --search-icons-in=$[FVWM_USERDIR]/icons/$[infostore.Icon_Theme]/22x22/categories:$[FVWM_USERDIR]/icons/$[infostore.Icon_Theme]/22x22/apps:$[FVWM_SYSTEMDIR]/icons/$[infostore.Icon_Theme]/22x22/categories:$[FVWM_SYSTEMDIR]/icons/$[infostore.Icon_Theme]/22x22/apps:$[FVWM_DISTROMENUDIR]/icons/$[infostore.Icon_Theme]/22x22/categories:$[FVWM_DISTROMENUDIR]/icons/$[infostore.Icon_Theme]/22x22/apps --default-file-icon=22x22/apps/default.png --default-dir-icon=22x22/categories/directory.png --min-submenu-length=5 --menuname-suffix="Panel" --sort=rprio --no-panel --check-execs'
555
556 ## $[ApplicationPanelLength] is set by fvwm-crystal.apps, contains the number
557 ## of the buttons on the panel
558 ## PipeRead 'echo "*ApplicationPanel: Geometry "$(($[ApplicationPanelLength]*$[infostore.bottom_panel_height]))"x"$[infostore.bottom_panel_height]"+$(($((5*$[infostore.bottom_panel_height]))+$(($[trayer_width]))+2))-+1"'
559 PipeRead 'echo "*ApplicationPanel: Geometry $(($[ApplicationPanelLength]*$[infostore.bottom_panel_height]))x$[infostore.bottom_panel_height]+$(($((5*$[infostore.bottom_panel_height]))+$(($(($(($[trayer_width]*$[infostore.bottom_panel_height]))/24))))+25))--1"'
560
561 Module FvwmButtons ApplicationPanel
562
563 # Used from the topbars, toggle the topbars between each other
564 DestroyFunc Toggle-TopBar-RaiseLower
565 AddToFunc Toggle-TopBar-RaiseLower
566 + I All (FvwmButtons-PanelTop, !State 3) TopBar-Raise
567 + I TestRc (NoMatch) TopBar-Lower
568
569 DestroyFunc TopBar-Raise
570 AddToFunc TopBar-Raise
571 + I All (FvwmButtons-PanelTopMenu) Raise
572 + I All (FvwmButtons-PanelTop) State 3 True
573
574 DestroyFunc TopBar-Lower
575 AddToFunc TopBar-Lower
576 + I All (FvwmButtons-PanelTopMenu) Lower
577 + I All (FvwmButtons-PanelTop) State 3 False
578
579 DestroyFunc Restore-TopBar-RaiseLower
580 AddToFunc Restore-TopBar-RaiseLower
581 + I All (FvwmButtons-PanelTop, !State 3) TopBar-Lower
582 + I TestRc (NoMatch) TopBar-Raise
583
584 # Override FVWM style (it's applied later) {{{1
585 Style ApplicationPanel NoIcon
586 Style FvwmPager NoIcon
587 Style FvwmButtons NoIcon
588 Style panel BorderWidth 0
589 Style FvwmIconMan-Windows BorderWidth 0
590 Style FvwmIconMan BorderWidth 0
591 Style FvwmStalonePanel NoIcon, BorderWidth 0
592 MenuStyle * PopupOffset 0 79
593 #LoadPreferences DeskIconsOnTop
594
595 Echo /--------- Fvwm-Crystal: Recipe loaded ---------/
596 #PrintInfo Locale 1 #2
597 #PrintInfo infostore
598
599 # ViM modeline {{{1
600 # vim:foldmethod=marker:foldenable:foldlevel=0:ft=fvwm