# Light desktop
# Written by: Maciej Delmanowski <harnir@linux.net.pl>
#
# 2007-2013 Dominique Michel <dominique_libre@users.sourceforge.net>
# See ChangeLog for details
#
# You can use folding to navigate this file

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

# 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	100
EdgeResistance			0
Style * EdgeMoveDelay		250
Style * EdgeMoveResistance	100
HideGeometryWindow 	Move, Resize
OpaqueMoveSize	100
EdgeThickness	1

EWMH-Desktop 3 3 3 3
EWMH-Panel-Top 30

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

# 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 {{{1
SetEnv DesktopMenu /ApplicationsAndRootMenu
#SetEnv DesktopMenu /FVWM-Crystal

# Applications menu {{{1
# 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 --panel-icons=topapp --panel-action1=menu --panel-action2=none --panel-action3=topapp --menu-pos=S --no-panel --check-execs'

# Pager {{{1
DestroyFunc FvwmPagerWindow
AddToFunc FvwmPagerWindow
+ I All (FvwmPager) Close
+ I DestroyModuleConfig FvwmPager: *
#InfoStoreAdd Desk_Pages_X "8"
#InfoStoreAdd Desk_Pages_Y "1"
#DesktopSize $[infostore.Desk_Pages_X]x$[infostore.Desk_Pages_Y]
+ I PipeRead 'echo \*FvwmPager: Geometry $(((($[panel_font_size]+(($[panel_font_size]/2))))*$[infostore.Desk_Pages_X]))x$(((($[panel_font_size]+(($[panel_font_size]/2))))*$[infostore.Desk_Pages_Y]))+$(((($[vp.width]-((28*$[infostore.Desk_Pages_X]))))/2))+3'
+ I *FvwmPager: MiniIcons
+ I *FvwmPager: Font none
+ I *FvwmPager: WindowBorderWidth 1
+ I *FvwmPager: Window3DBorders
#+ I *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

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

# NotificationArea {{{1
# Settings of stalonetray {{{2
Test (!EnvMatch trayer_width 0) \
PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "stalonetray" ]; then echo FvwmStalonePanel \
    $(($[panel_font_size]+$(($[panel_font_size]/2)))) \
    $(($[trayer_width]/$(($[panel_font_size]+$(($[panel_font_size]/2)))))) 1 \
    "-1" "+3" W $(($(($[trayer_width]*$(($[panel_font_size]+$(($[panel_font_size]/2))))))/24)) $(($[panel_font_size]+$(($[panel_font_size]/2)))) \
    "-1" "+3"; fi'
# Settings of trayer {{{2
Test (!EnvMatch trayer_width 0) \
    PipeRead 'if [ "$[infostore.NotificationAreaManager]" = "trayer" ]; then echo FvwmTrayerPanel \
    request pixel 24 top right 3 "-1"; fi'

Style FvwmPager !Icon

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

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