Debian Codegraph @

fvwm/recipes/LapRight

raw
1 # LapRight recipe for Fvwm-Crystal
2 # Written by Dominique Michel <[email protected]>, 2013-2014
3 #
4 # Modern laptops have a much wider than high screen. This recipie try to adress
5 # this issue by putting all the decorations on the right.
6 #
7 # You can use folding to navigate this file
8
9 Echo LapRight recipe loading from $.
10 InfoStoreAdd Recipe "LapRight"
11
12 # Includes and FVWM modules {{{1
13 # Default FVWM-Crystal functions, initialization {{{2
14 #Include components/functions/Window-Autohide
15 Include components/functions/FocusOnGotoPage
16
17 # Type of icons on the desktop {{{2
18 LoadPreferences IconsType
19
20 # Media player {{{2
21 Include components/functions/Music-$[infostore.MusicPlayer]
22
23 # Desktop settings {{{1
24 EdgeScroll 100000 100000
25 EdgeResistance -1
26 Style * EdgeMoveDelay 250
27 Style * EdgeMoveResistance 20
28
29 HideGeometryWindow Move, Resize
30 OpaqueMoveSize 100
31
32 # Change desktop with mouse wheel
33 Include components/bindings/Desktop-PageSwitch-Horizontal
34
35 # Pager {{{1
36 All (FvwmPager) Close
37 DestroyModuleConfig FvwmPager: *
38
39 # Desktop panel {{{1
40 EWMH-Desktop 3 63 3 3
41 EWMH-Panel-Bottom 3
42 EWMH-Panel-Top 3
43 EwmhBaseStruts 3 63 3 3
44
45 # Desktop manager {{{2
46 DestroyFunc RedrawIconBox
47 AddToFunc RedrawIconBox
48 + I PipeRead 'echo "Style * IconBox $(($[vp.width]-((((50*$[IconColumnsNumber]))+100))))x$(($[vp.height]-6))+$((((50*$[IconColumnsNumber]))+17))+6, IconFill left bottom, IconGrid 30 30"'
49 LoadPreferences DefaultDesktopManager
50
51 # Icons on Desktop {{{1
52 Test (EnvMatch DefaultDesktopManager Crystal) PipeRead 'echo "Style * IconBox $(($[vp.width]-((((50*$[IconColumnsNumber]))+100))))x$(($[vp.height]-6))+$((((50*$[IconColumnsNumber]))+17))+6, IconFill left bottom, IconGrid 30 30"'
53 Test (!EnvMatch DefaultDesktopManager Crystal) Style * IconBox 3 66 -1 -1, IconFill left bottom, IconGrid 30 30
54
55 Style * StickyIcon
56 Style ApplicationPanel !Icon
57
58 # top |Crystal|---|ApplicationPanel|---|NotifArea| Clock |Media|Pager| bottom #
59 # # | 60px |---| 490px |---| varianle| 24px |48px | 60px|# #
60 # Top button with Crystal {{{1
61 All (FvwmButtons-Top) Close
62 DestroyModuleConfig FvwmButtons-Top: *
63 *FvwmButtons-Top: Geometry 60x60-0+0
64 *FvwmButtons-Top: BoxSize smart
65 *FvwmVuttons-Top: ActiveColorset $[infostore.cs_panel_active]
66 *FvwmButtons-Top: Colorset $[infostore.cs_panel_inactive]
67 #*FvwmButtons-Top: Colorset $[infostore.cs_transparent]
68 *FvwmButtons-Top: Rows 1
69 *FvwmButtons-Top: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
70 *FvwmButtons-Top: Padding 6 6
71 *FvwmButtons-Top: Frame 0
72 *FvwmButtons-Top: (1x1, Icon "48x48/fvwm-crystal/fvwm-crystal.png", \
73 Action (Mouse 1) Menu /FVWM-Crystal $[MenuPosition_W], \
74 Action (Mouse 2) Menu /Random-Wallpaper $[MenuPosition_W], \
75 Action (Mouse 3) Menu /Applications $[MenuPosition_W])
76
77 Module FvwmButtons FvwmButtons-Top
78
79 # Other menus {{{1
80 # Applications menu generator {{{2
81 # This creates the main "Start Menu" avaiable at mouse button 1
82 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'
83 AddToMenu /StartMenu "" Nop
84 AddToMenu /StartMenu "%32x32/fvwm-crystal/fvwm-crystal.png%FVWM-Crystal" Popup /FVWM-Crystal
85
86 # This creates app menu available under Alt+Win_R
87 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'
88 AddToMenu /Applications '%22x22/fvwm-crystal/audio-x-generic.png%$[gt.Music]' Popup /Music
89
90 # Desktop menu with left click {{{1
91 SetEnv DesktopMenu /StartMenu
92 #SetEnv DesktopMenu /Applications
93 #SetEnv DesktopMenu /FVWM-Crystal
94
95 # Window list on mouse button 2 {{{2
96 Mouse 2 R $[Mod0] Window-List
97
98 # Application panel {{{1
99 All (ApplicationPanel) Close
100 DestroyModuleConfig ApplicationPanel: *
101 PipeRead 'echo "*ApplicationPanel: Geometry 60x490-0+$(((((($[vp.height]-((150+490+24+(((((((((((($trayer_width))/24))-1))/2))+1))*30))))))/2))+60))"'
102 *ApplicationPanel: BoxSize smart
103 *ApplicationPanel: ActiveColorset $[infostore.cs_panel_active]
104 *ApplicationPanel: Colorset $[infostore.cs_panel_inactive]
105 #*ApplicationPanel: Colorset $[infostore.cs_transparent]
106 *ApplicationPanel: Rows 10
107 *ApplicationPanel: Padding 6 2
108 *ApplicationPanel: Frame 0
109 *ApplicationPanel: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
110
111 # This creates the main panel with applications - default app icon is
112 # shown on the panel, and can be launched using RMB; LMB opens the app
113
114 # category menu
115 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=topapp --panel-action1=menu --panel-action2=secondapp --panel-action3=topapp --menu-pos=W --menuname-suffix="Panel" --check-execs'
116
117 Module FvwmButtons ApplicationPanel
118
119 # Bottom button {{{1
120 All (FvwmButtons-Bottom) Close
121 DestroyModuleConfig FvwmButtons-Bottom: *
122 PipeRead 'echo *FvwmButtons-Bottom: Geometry 60x$(((((((((((((($trayer_width))/24))-1))/2))+1))*30))+102))-0-0'
123 *FvwmButtons-Bottom: BoxSize smart
124 *FvwmButtons-Bottom: ActiveColorset $[infostore.cs_panel_active]
125 *FvwmButtons-Bottom: Colorset $[infostore.cs_panel_inactive]
126 #*FvwmButtons-Bottom: Colorset $[infostore.cs_transparent]
127 *FvwmButtons-Bottom: Columns 2
128 *FvwmButtons-Bottom: Padding 2 2
129 *FvwmButtons-Bottom: Frame 0
130 *FvwmButtons-Bottom: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
131
132 # Notification aera {{{2
133 # We use fixed sizes
134 # Settings of stalonetray
135 Test (!EnvMatch trayer_width 0) \
136 PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "stalonetray" ]; then echo FvwmStalonePanel \
137 30 2 $(((((((($[trayer_width]/24))-1))/2))+1)) "+$(($[vp.width]-62))" "-+132" NE 60 $(((((((((((($trayer_width))/24))-1))/2))+1))*30)) "+$(($[vp.width]-62))" "-+132"; fi'
138 # Settings of trayer
139 Test (!EnvMatch trayer_width 0) \
140 PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "trayer" ]; then echo FvwmTrayerPanel \
141 pixel pixel $(((((((((((($trayer_width))/24))-1))/2))+1))*30)) bottom left $(($[vp.width]-62)) "132" \\"--width 60\\"; fi'
142 # The button
143 Test (!EnvMatch trayer_width 0) \
144 PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "stalonetray" ]; then echo "*FvwmButtons-Bottom: (2x$(((((((((($trayer_width))/24))-1))/2))+1)), \
145 Size 60 $(((((((((($[trayer_width]/24))-1))/2))+1))*30)), Swallow (Close, Respawn, FvwmModule) FvwmStalonePanel Nop)"; \
146 else echo "*FvwmButtons-Bottom: (2x$(((((((((($trayer_width))/24))-1))/2))+1)), Size 60 $(((((((((($[trayer_width]/24))-1))/2))+1))*30)), \
147 Swallow (UseOld, FvwmModule) trayer Nop)"; fi'
148
149 # Clock {{{2
150 *FvwmButtons-Bottom: (2x1, \
151 Swallow (Close, Respawn, FvwmModule) "FvwmScript-Clock" 'Script components/scripts/FvwmScript-Clock', \
152 Action (Mouse 3) SendToModule *FvwmScript-Clock SendString 1 1 str)
153
154 # Main music button, with some menus {{{2
155 *FvwmButtons-Bottom: (1x1, Size 22 22, Icon "22x22/categories/Multimedia.png", \
156 Action (Mouse 1) Menu /Player $[MenuPosition_W], \
157 Action (Mouse 2) Music-GUI, \
158 Action (Mouse 3) Music-QJackGUI, \
159 Action (Mouse 4) Change-Volume-Up $[infostore.Vol_Step], \
160 Action (Mouse 5) Change-Volume-Down $[infostore.Vol_Step])
161 # music controls button {{{2
162 *FvwmButtons-Bottom: (1x1, Size 22 22, Icon "22x22/fvwm-crystal/media-eject.png", \
163 Action (Mouse 1) Menu /Playlist-button $[MenuPosition_W], \
164 Action (Mouse 2) Menu /Music/Volume $[MenuPosition_W], \
165 Action (Mouse 3) Menu /Mixer $[MenuPosition_W], \
166 Action (Mouse 4) Music-Next, \
167 Action (Mouse 5) Music-Prev)
168 # music controls button {{{2
169 *FvwmButtons-Bottom: (1x1, Size 22 22, Icon "22x22/fvwm-crystal/media-playback-start.png", \
170 Action (Mouse 1) Music-Play, \
171 Action (Mouse 2) Music-Pause, \
172 Action (Mouse 3) Menu /Playback $[MenuPosition_W], \
173 Action (Mouse 4) Music-Speed-Up, \
174 Action (Mouse 5) Music-Speed-Down)
175 # music controls button 4 {{{2
176 *FvwmButtons-Bottom: (1x1, Size 22 22, Icon "22x22/fvwm-crystal/media-skip-forward.png", \
177 Action (Mouse 1) Menu /Speed $[MenuPosition_W], \
178 Action (Mouse 4) Button-Seek-+, \
179 Action (Mouse 5) Button-Seek--)
180
181 # Pager button {{{2
182 *FvwmButtons-Bottom: (2x1, Size 60 30, Icon "22x22/fvwm-crystal/user-desktop.png", \
183 Action (Mouse 2) GotoPage prev, \
184 Action (Mouse 3) GotoPage next, \
185 Action (Mouse 4) GotoPage-Right, \
186 Action (Mouse 5) GotoPage-Left, \
187 Panel (position Button right -70p 30p) FvwmPager "Module FvwmPager")
188
189 # Pager window {{{2
190 DestroyFunc FvwmPagerWindow
191 AddToFunc FvwmPagerWindow
192 + I KillModule FvwmPager
193 + I DestroyModuleConfig FvwmPager: *
194 + I PipeRead 'echo \*FvwmPager: Geometry $((60*$[infostore.Desk_Pages_X]))x$((60*$[infostore.Desk_Pages_Y]))-+50000-+50000'
195 + I *FvwmPager: MiniIcons
196 + I *FvwmPager: Font none
197 + I *FvwmPager: WindowBorderWidth 1
198 + I *FvwmPager: Window3DBorders
199 #+ I *FvwmPager: NoSeparators
200 + I *FvwmPager: UseSkipList
201 + I *FvwmPager: Colorset * $[infostore.cs_panel_inactive]
202 + I *FvwmPager: HilightColorset * $[infostore.cs_panel_active]
203 #+ I *FvwmPager: Colorset $[infostore.cs_transparent]
204 #+ I *FvwmPager: HilightColorset $[infostore.cs_transparent]
205 + I *FvwmPager: WindowColorsets $[infostore.cs_panel_wininactive] $[infostore.cs_panel_winactive]
206 #+ I *FvwmPager: WindowColorset $[infostore.cs_transparent] $[infostore.cs_transparent]
207
208 FvwmPagerWindow
209
210 Module FvwmButtons FvwmButtons-Bottom
211
212 # Override FVWM style (it's applied later) {{{1
213 MenuStyle * PopupOffset 0 79
214 # Style * TitleAtLeft
215
216 Echo /--------- Fvwm-Crystal: Recipe loaded ---------/
217 #PrintInfo infostore
218
219 # ViM modeline {{{1
220 # vim:foldmethod=marker:foldenable:foldlevel=0:ft=fvwm