File: TopDown

package info (click to toggle)
fvwm-crystal 3.4.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 21,708 kB
  • sloc: sh: 3,265; cs: 1,335; python: 875; makefile: 214
file content (169 lines) | stat: -rw-r--r-- 10,699 bytes parent folder | download | duplicates (2)
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
# TopDown desktop
# Written by: Maciej Delmanowski <harnir@post.pl>
#
# 2007-2013 - Dominique Michel <dominique_libre@users.sourceforge.net>
# See ChangeLog for details
#
# You can use folding to navigate this file

Echo TopDown recipe loading from $.
InfoStoreAdd Recipe "TopDown"

# ImagePath {{{1
InfoStoreAdd Icon_Theme "Default"
ImagePath $[FVWM_USERDIR]/icons/$[infostore.Icon_Theme]:$[FVWM_SYSTEMDIR]/icons/$[infostore.Icon_Theme]

# Includes and FVWM modules {{{1
# Type of icons on the desktop {{{2
LoadPreferences IconsType

# Media player {{{2
Include components/functions/Music-$[infostore.MusicPlayer]

# Desktop settings {{{1
EdgeScroll	0	0
EdgeResistance	0
Style * EdgeMoveDelay	0
Style * EdgeMoveResistance 100

HideGeometryWindow	Move, Resize
OpaqueMoveSize	100
EdgeThickness	1

EWMH-Desktop 3 3 3 3
EWMH-Panel-Top 51
EWMH-Panel-Bottom 30

# Desktop manager {{{2
DestroyFunc RedrawIconBox
AddToFunc RedrawIconBox
+ I PipeRead 'echo "Style * IconBox $(($[vp.width]-((((50*$[IconColumnsNumber]))+50))))x$(($[vp.height]-(((((((($[panel_font_size]*3))/2))))+88))))+$((((50*$[IconColumnsNumber]))+25))-50, IconFill left bottom, IconGrid 30 30"'
LoadPreferences DefaultDesktopManager

# Settings for icons on the desktop {{{1
#Style * IconBox 1200x800+30-50, IconFill left bottom, IconGrid 30 30
Style * StickyIcon
Test (EnvMatch DefaultDesktopManager Crystal) PipeRead 'echo "Style * IconBox $(($[vp.width]-((((50*$[IconColumnsNumber]))+50))))x$(($[vp.height]-(((((((($[panel_font_size]*3))/2))))+88))))+$((((50*$[IconColumnsNumber]))+25))-50, IconFill left bottom, IconGrid 30 30"'
Test (!EnvMatch DefaultDesktopManager Crystal) PipeRead 'echo "Style * IconBox $(($[vp.width]-6))x$(($[vp.height]-50))+30-50, IconFill left bottom, IconGrid 30 30"'

# Main "/ApplicationsAndRootMenu" menu {{{1
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=AndRootMenu --sort=prio --no-panel --check-execs'
AddToMenu /ApplicationsAndRootMenu
+ "" Nop
+ '%22x22/fvwm-crystal/audio-x-generic.png%$[gt.Music]' Popup /Music
+ "" Nop
+ '%22x22/fvwm-crystal/fvwm-crystal.png%$[gt.FVWM-Crystal documentation]' Popup /Developer/FVWM-Crystal-Documentation
+ "" Nop
+ '%22x22/fvwm-crystal/handles.png%$[gt.Screen resolution]' Popup /ScreenResolution
+ '%22x22/fvwm-crystal/preferences-desktop-screensaver.png%$[gt.Screensaver]' Popup /Screensaver
+ '%22x22/fvwm-crystal/camera-photo.png%$[gt.Screenshot]' Popup /Screenshot
+ "" Nop
+ '%22x22/fvwm-crystal/preferences-desktop-theme.png%$[gt.Window decorations]' Popup /Window-Decorations
+ '%22x22/fvwm-crystal/colorsets.png%$[gt.Colorsets]' Popup /Colorsets
+ '%22x22/fvwm-crystal/preferences-desktop-wallpaper.png%$[gt.Wallpaper]' Popup /Wallpaper
+ '%22x22/fvwm-crystal/preferences-desktop.png%$[gt.Preferences]' Popup /Preferences
+ "" Nop
+ '%22x22/fvwm-crystal/applications-development.png%$[gt.Developer menu]' Popup /Developer
+ '%22x22/fvwm-crystal/fvwm-crystal.png%$[gt.About FVWM-Crystal]' Include components/functions/About
+ '%22x22/fvwm-crystal/system-log-out.png%$[gt.Exit]' Popup /Exit

# Desktop menu with left click
#SetEnv DesktopMenu /FVWM-Crystal
SetEnv DesktopMenu /ApplicationsAndRootMenu

# Pager {{{1
DestroyFunc FvwmPagerWindow
AddToFunc FvwmPagerWindow
+ I All (FvwmPager) Close
+ I DestroyModuleConfig FvwmPager: *
+ I PipeRead 'echo InfoStoreAdd FvwmPager_Width $((65*$[infostore.Desk_Pages_X]))'
+ I PipeRead 'echo \*FvwmPager: Geometry $[infostore.FvwmPager_Width]x$((48*$[infostore.Desk_Pages_Y]))+$((($[vp.width]-$[infostore.FvwmPager_Width])/2))+3'
+ I *FvwmPager: MiniIcons
+ I *FvwmPager: Font none
+ I *FvwmPager: WindowBorderWidth 1
+ I *FvwmPager: Window3DBorders
#*FvwmPager: NoSeparators
+ I *FvwmPager: UseSkipList
+ I *FvwmPager: Colorset * $[infostore.cs_panel_inactive]
+ I *FvwmPager: HilightColorset * $[infostore.cs_panel_active]
+ I *FvwmPager: WindowColorsets $[infostore.cs_panel_wininactive] $[infostore.cs_panel_winactive]
+ I Module FvwmPager

FvwmPagerWindow

# Change desktop pages using mouse wheel on pager
Mouse (FvwmPager) 4 W $[Mod] GotoPage-Right
Mouse (FvwmPager) 5 W $[Mod] GotoPage-Left

# Dock, applications panel and menu generator {{{1
All (ApplicationPanel) Close
DestroyModuleConfig ApplicationPanel: *
*ApplicationPanel: BoxSize smart
*ApplicationPanel: ActiveColorset $[infostore.cs_panel_active]
*ApplicationPanel: Colorset $[infostore.cs_panel_inactive]
*ApplicationPanel: Rows 1
*ApplicationPanel: Padding 1 1
*ApplicationPanel: Frame 0
*ApplicationPanel: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"

# fvwm-crystal.apps {{{2
# This creates the distribution-based panel button - defaut distribution
# icon, only menu is opened (no default app on the panel). Menus are not
# generated
PipeRead 'fvwm-crystal.apps --database=$[FVWM_DISTROMENUDIR]/Applications --database=$[FVWM_SYSTEMDIR]/Applications --database=$[FVWM_USERDIR]/Applications --with=/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=standard --panel-action1=menu --panel-action2=none --panel-action3=menu --panel-size=40 40 --menu-pos=N --menuname-suffix="Dock" --no-menus --check-execs'
# This creates the main panel with applications - default app icon is
# shown on the panel, and can be launched using RMB; LMB opens the app
# category menu. Menus are not generated
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=none --panel-action3=topapp --panel-size=40 40 --menu-pos=N --menuname-suffix="Dock" --no-menus --check-execs'
# This generates menus for the panel buttons. They are created upside-down,
# because panel is on the bottom of the screen
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 --menuname-suffix="Dock" --submenu-suffix="Item 100 o100" --sort=rprio --no-panel --check-execs'
# This creates the menu with applications available under Alt+Win_R
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'
# }}}2

# $[ApplicationPanelLength] is set by fvwm-crystal.apps, contains the number
# of the buttons on the panel
PipeRead 'echo \*ApplicationPanel: Geometry +$((($[vp.width]-(($[ApplicationPanelLength]*40)))/2))-1'

Module FvwmButtons ApplicationPanel

# Clock {{{1
All (FvwmButtons-Clock) Close
DestroyModuleConfig FvwmButtons-Clock: *
*FvwmButtons-Clock: Geometry -1-1
*FvwmButtons-Clock: BoxSize smart
*FvwmButtons-Clock: ActiveColorset $[infostore.cs_panel_active]
*FvwmButtons-Clock: Colorset $[infostore.cs_panel_inactive]
*FvwmButtons-Clock: Columns 2
*FvwmButtons-Clock: Padding 2 2
*FvwmButtons-Clock: Frame 0
*FvwmButtons-Clock: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"

*FvwmButtons-Clock: (2x1, Size 60 24, \
Swallow (Close, Respawn, FvwmModule) "FvwmScript-Clock" 'Script components/scripts/FvwmScript-Clock', \
Action (Mouse 3) SendToModule *FvwmScript-Clock SendString 1 1 str)

Module FvwmButtons FvwmButtons-Clock

Style FvwmPager !Icon
Style ApplicationPanel !Icon
Style FvwmButtons-Clock !Icon
Style FvwmButtons-Clock Layer 2

# Notification area {{{1
# Settings of stalonetray {{{2
Test (!EnvMatch trayer_width 0) \
PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "stalonetray" ]; then echo FvwmStalonePanel \
    24 $(($[trayer_width]/24)) 1 "-64" "-1" W $[trayer_width] 24 "-64" "-1"; fi'

# Settings of trayer {{{2
Test (!EnvMatch trayer_width 0) \
PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "trayer" ]; then echo FvwmTrayerPanel \
    request pixel "24" bottom right "64" "3"; fi'

Echo /--------- Fvwm-Crystal: Recipe loaded ---------/
#PrintInfo infostore

# ViM modeline {{{1
# vim:foldmethod=marker:foldenable:foldlevel=0:ft=fvwm