Debian Codegraph @

fvwm/recipes/LapLeft

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