Debian Codegraph @

fvwm/recipes/Thin

raw
1 # Thin desktop
2 # Written by Dominique Michel <[email protected]>, 2007-2013
3 #
4 # Simple but with many functions
5 # Icons on the desktop
6 # Menu on the mouse and on the dock
7 # Look similar to the Nebulea recipe and is mainly a mix of the original
8 # fvwm-crystal Clean, Dock and Nebulea recipes from
9 # Maciej Delmanowski <[email protected]>
10 # with a few modifications and added functions.
11 # The multimedia menu is from Tavis Ormandy <[email protected]> configuration
12 # http://dev.gentoo.org/~taviso/fvwm2rc.html
13 #
14 # See ChangeLog for details
15 #
16 # You can use folding to navigate this file
17
18 Echo Thin recipe loading from $.
19 InfoStoreAdd Recipe "Thin"
20
21 # Includes and FVWM modules {{{1
22 # Default FVWM-Crystal functions, initialization {{{2
23 Include components/functions/Window-Autohide
24
25 # Type of icons on the desktop {{{2
26 LoadPreferences IconsType
27
28 # Media player {{{2
29 Include components/functions/Music-$[infostore.MusicPlayer]
30
31 # Desktop settings {{{1
32 EdgeScroll 0 0
33 EdgeResistance 0
34 Style * EdgeMoveDelay 0
35 Style * EdgeMoveResistance 100
36 #EdgeResistance 0 100
37 HideGeometryWindow Move, Resize
38 OpaqueMoveSize 100
39 EdgeThickness 2
40
41 EWMH-Desktop 3 3 3 3
42 EWMH-Panel-Bottom 28
43
44 # Desktop manager {{{2
45 DestroyFunc RedrawIconBox
46 AddToFunc RedrawIconBox
47 + I PipeRead 'echo "Style * IconBox $(($[vp.width]-((((50*$[IconColumnsNumber]))+50))))x$(($[vp.height]-(((((((($[panel_font_size]*3))/2))))+6))))+$((((50*$[IconColumnsNumber]))+25))+3, IconFill left bottom, IconGrid 30 30"'
48 LoadPreferences DefaultDesktopManager
49
50 # Settings for icons on the desktop {{{1
51 Style * StickyIcon
52 Test (EnvMatch DefaultDesktopManager Crystal) PipeRead 'echo "Style * IconBox $(($[vp.width]-((((50*$[IconColumnsNumber]))+50))))x$(($[vp.height]-(((((((($[panel_font_size]*3))/2))))+6))))+$((((50*$[IconColumnsNumber]))+25))+3, IconFill left bottom, IconGrid 30 30"'
53 Test (!EnvMatch DefaultDesktopManager Crystal) PipeRead 'echo "Style * IconBox $(($[vp.width]-6))x$(($[vp.height]-50))+3+3, IconFill left bottom, IconGrid 30 30"'
54
55 # Change desktop with mouse wheel
56 Include components/bindings/Desktop-PageSwitch-Horizontal
57
58 # Main panel {{{1
59 All (FvwmButtons-Panel) Close
60 DestroyModuleConfig FvwmButtons-Panel: *
61 PipeRead 'echo "*FvwmButtons-Panel: Geometry $[vp.width]x$(((($[panel_font_size]*3))/2))+-1--1"'
62 *FvwmButtons-Panel: BoxSize smart
63 *FvwmButtons-Panel: ActiveColorset $[infostore.cs_panel_active]
64 *FvwmButtons-Panel: Colorset $[infostore.cs_panel_inactive]
65 *FvwmButtons-Panel: Rows 1
66 PipeRead 'echo "*FvwmButtons-Panel: Columns $(($[vp.width]/24))"'
67 *FvwmButtons-Panel: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
68 *FvwmButtons-Panel: Padding 1 1
69 *FvwmButtons-Panel: Frame 0
70 # Diamond with Menus {{{2
71 *FvwmButtons-Panel: (4x1, Size 96 24, Title (Side) "Menu", Icon "22x22/fvwm-crystal/fvwm-crystal.png", \
72 Action (Mouse 1) Menu /StartMenu $[MenuPosition_NE], \
73 Action (Mouse 2) Menu /Random-Wallpaper $[MenuPosition_NE], \
74 Action (Mouse 3) Menu /FVWM-Crystal $[MenuPosition_NE])
75
76 # Applications menu generator {{{2
77 # This creates the main "Start Menu", upside down because it's located on the
78 # bottom of the screen
79 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" --submenu-suffix="Item 100 o100" --sort=rprio --no-panel --check-execs'
80 AddToMenu /StartMenu "" Nop
81 AddToMenu /StartMenu "%32x32/fvwm-crystal/fvwm-crystal.png%FVWM-Crystal" Popup /FVWM-Crystal
82
83 # This creates app menu available under Alt+Win_R
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]/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'
85
86 # Desktop menu with left click
87 SetEnv DesktopMenu /StartMenu
88 #SetEnv DesktopMenu /FVWM-Crystal
89
90 # Notification area {{{1
91 # Settings of stalonetray {{{2
92 Test (!EnvMatch trayer_width 0) \
93 PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "stalonetray" ]; then echo FvwmStalonePanel \
94 24 $(($[trayer_width]/24)) 1 "+82" "--1" W $[trayer_width] $(((($[panel_font_size]*3))/2)) "+82" "--1"; fi'
95
96 # Settings of trayer {{{2
97 Test (!EnvMatch trayer_width 0) \
98 PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "trayer" ]; then echo FvwmTrayerPanel \
99 pixel pixel $(((($[panel_font_size]*3))/2)) bottom left "82" "1" \\"--width $[trayer_width]\\"; fi'
100
101 # The button
102 Test (!EnvMatch trayer_width 0) \
103 PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "stalonetray" ]; then echo "*FvwmButtons-Panel: ($(($[trayer_width]/24))x1, Size $[trayer_width] $(((($[panel_font_size]*3))/2)), \
104 Swallow (Close, Respawn, FvwmModule) FvwmStalonePanel Nop)"; \
105 else echo "*FvwmButtons-Panel: ($(($[trayer_width]/24))x1, Size $[trayer_width] $(((($[panel_font_size]*3))/2)), Swallow (UseOld. FvwmModule) trayer Nop)"; fi'
106
107 # Music panel {{{1
108 # Main music button, with some menus {{{2
109 PipeRead 'echo "*FvwmButtons-Panel: (1x1, Size 24 $(((($[panel_font_size]*3))/2)), Icon 22x22/categories/Multimedia.png, \
110 Action (Mouse 1) Menu /Player $[MenuPosition_NE], \
111 Action (Mouse 2) Music-GUI, \
112 Action (Mouse 3) Music-QJackGUI, \
113 Action (Mouse 4) Change-Volume-Up $[infostore.Vol_Step], \
114 Action (Mouse 5) Change-Volume-Down $[infostore.Vol_Step])"'
115 # music controls button {{{2
116 PipeRead 'echo "*FvwmButtons-Panel: (1x1, Size 24 $(((($[panel_font_size]*3))/2)), Icon 22x22/fvwm-crystal/media-eject.png, \
117 Action (Mouse 1) Menu /Playlist-button $[MenuPosition_NE], \
118 Action (Mouse 2) Menu /Music/Volume $[MenuPosition_NE], \
119 Action (Mouse 3) Menu /Mixer $[MenuPosition_NE], \
120 Action (Mouse 4) Music-Next, \
121 Action (Mouse 5) Music-Prev)"'
122 # music controls button {{{2
123 PipeRead 'echo "*FvwmButtons-Panel: (1x1, Size 24 $(((($[panel_font_size]*3))/2)), Icon 22x22/fvwm-crystal/media-playback-start.png, \
124 Action (Mouse 1) Music-Play, \
125 Action (Mouse 2) Music-Pause, \
126 Action (Mouse 3) Menu /Playback $[MenuPosition_NE], \
127 Action (Mouse 4) Music-Speed-Up, \
128 Action (Mouse 5) Music-Speed-Down)"'
129 # music controls button 4 {{{2
130 PipeRead 'echo "*FvwmButtons-Panel: (1x1, Size 24 $(((($[panel_font_size]*3))/2)), Icon 22x22/fvwm-crystal/media-skip-forward.png, \
131 Action (Mouse 1) Menu /Speed $[MenuPosition_NE], \
132 Action (Mouse 4) Button-Seek-+, \
133 Action (Mouse 5) Button-Seek--)"'
134 # }}}2
135
136 # Bottom panel {{{1
137 PipeRead 'echo InfoStoreAdd FvwmPager_Height $(($(((($[panel_font_size]*3))/2))*$[infostore.Desk_Pages_Y]))'
138 PipeRead 'echo InfoStoreAdd FvwmButtons_Columns $(($[vp.width]/28))'
139
140 # Window list {{{2
141 All (FvwmIconMan-Windows-2) Close
142 DestroyModuleConfig FvwmIconMan-Windows-2: *
143
144 *FvwmIconMan-Windows-2: Resolution Global
145 *FvwmIconMan-Windows-2: UseWinList True
146 *FvwmIconMan-Windows-2: DontShow Class=xmms,FvwmButtons,FvwmIconMan,FvwmPager,FvwmIdent,FvwmForm
147 *FvwmIconMan-Windows-2: ShowNoIcons True
148 *FvwmIconMan-Windows-2: DrawIcons Always
149 *FvwmIconMan-Windows-2: Sort Id
150 *FvwmIconMan-Windows-2: FollowFocus True
151 *FvwmIconMan-Windows-2: Format "%t"
152 *FvwmIconMan-Windows-2: Title ""
153 PipeRead "echo \*FvwmIconMan-Windows-2: ButtonGeometry $(($[vp.width]))x24"
154 PipeRead "echo \*FvwmIconMan-Windows-2: ManagerGeometry 1x1-$((28*$[infostore.Desk_Pages_X]))-1"
155 #*FvwmIconMan-Windows-2: MaxButtonWidthByColumns 80
156 *FvwmIconMan-Windows-2: Font "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
157 # Tips {{{3
158 *FvwmIconMan-Windows-2: Tips needed
159 *FvwmIconMan-Windows-2: TipsDelays 500 200
160 *FvwmIconMan-Windows-2: TipsFont "xft:$[panel_font]:pixelsize=$[panel_font_size]:$[panel_font_style]"
161 *FvwmIconMan-Windows-2: TipsBorderWidth 0
162 *FvwmIconMan-Windows-2: TipsColorset $[infostore.cs_panel_inactive]
163 *FvwmIconMan-Windows-2: TipsJustification leftup
164 # Button look {{{3
165 *FvwmIconMan-Windows-2: PlainButton flat
166 *FvwmIconMan-Windows-2: FocusButton flat
167 *FvwmIconMan-Windows-2: SelectButton flat
168 *FvwmIconMan-Windows-2: FocusAndSelectButton flat
169 *FvwmIconMan-Windows-2: IconButton flat
170 # Colorsets {{{3
171 *FvwmIconMan-Windows-2: Colorset $[infostore.cs_panel_inactive]
172 *FvwmIconMan-Windows-2: PlainColorset $[infostore.cs_panel_wininactive]
173 *FvwmIconMan-Windows-2: FocusColorset $[infostore.cs_panel_winactive]
174 *FvwmIconMan-Windows-2: SelectColorset $[infostore.cs_panel_active]
175 *FvwmIconMan-Windows-2: FocusAndSelectColorset $[infostore.cs_panel_active]
176 *FvwmIconMan-Windows-2: IconColorset $[infostore.cs_panel_inactive]
177 # Actions {{{3
178 *FvwmIconMan-Windows-2: Action Mouse 1 A SendCommand "Function Window-Focus-DefaultDesk-Raised"
179 *FvwmIconMan-Windows-2: Action Mouse 2 $[Mod2] SendCommand "Close"
180 *FvwmIconMan-Windows-2: Action Mouse 2 $[Mod0] SendCommand "Window-Iconify"
181 *FvwmIconMan-Windows-2: Action Mouse 3 $[Mod] SendCommand "Function Window-Focus-CurrentDesk-Raised"
182 # }}}3
183 Module FvwmIconMan FvwmIconMan-Windows-2
184 PipeRead 'echo "*FvwmButtons-Panel: ($(((($[vp.width]/24))-(((($[trayer_width]/24))+11+$[infostore.Desk_Pages_X]))))x1, \
185 Size $(($[vp.width]-(($[trayer_width]+264+(($[infostore.Desk_Pages_X]*24)))))) $(((($[panel_font_size]*3))/2)), Frame 0, Padding 0 0, \
186 Swallow(UseOld, Hints, Respawn) FvwmIconMan-Windows-2 Nop))"'
187
188 # }}}2
189
190 # Pager {{{2
191 DestroyFunc FvwmPagerWindow
192 AddToFunc FvwmPagerWindow
193 + I All (FvwmPager) Close
194 + I DestroyModuleConfig FvwmPager: *
195 + I *FvwmPager: MiniIcons
196 + I *FvwmPager: Font none
197 + I *FvwmPager: WindowBorderWidth 1
198 + I *FvwmPager: Window3DBorders
199 #*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: WindowColorsets $[infostore.cs_panel_wininactive] $[infostore.cs_panel_winactive]
204
205 FvwmPagerWindow
206 *FvwmButtons-Panel: ($[infostore.Desk_Pages_X]x1, Frame 0, Padding 0 0, \
207 Swallow(UseOld, Hints, Respawn) "FvwmPager" "Module FvwmPager FvwmPager"))
208
209 # Change desktop pages using mouse wheel on pager
210 Mouse (FvwmPager) 4 W $[Mod] GotoPage-Right
211 Mouse (FvwmPager) 5 W $[Mod] GotoPage-Left
212 # }}}2
213
214 # Override FVWM style (it's applied later)
215 Style FvwmButtons-Panel NoIcon
216
217 ######################################
218 # Clock {{{1
219 PipeRead 'echo "*FvwmButtons-Panel: (3x1, Size 72 $(((($[panel_font_size]*3))/2)), \
220 Swallow (Close, Respawn, FvwmModule) FvwmScript-Clock \'Script components/scripts/FvwmScript-Clock\', \
221 Action (Mouse 3) SendToModule *FvwmScript-Clock SendString 1 1 str)"'
222
223 Module FvwmButtons FvwmButtons-Panel
224
225 Echo /--------- Fvwm-Crystal: Recipe loaded ---------/
226 #PrintInfo infostore
227
228 # ViM modeline {{{1
229 # vim:foldmethod=marker:foldenable:foldlevel=0:ft=fvwm