]> git.phdru.name Git - dotfiles.git/blobdiff - .fvwm/phd.m4
.fvwm2rc: fix a bug - wait for term names
[dotfiles.git] / .fvwm / phd.m4
index 4b76f82af03960f175e92c27c2a6299a416166ad..b9dbe42fe6f69c754f84d363ae12bd0483228cd7 100644 (file)
@@ -5,17 +5,13 @@
 dnl The file is in m4 format, use FvwmM4 module to read it
 dnl like this: ModuleSynchronous FvwmM4 -lock .fvwm2rc
 
 dnl The file is in m4 format, use FvwmM4 module to read it
 dnl like this: ModuleSynchronous FvwmM4 -lock .fvwm2rc
 
-
 dnl This is to prevent FvwmM4 to shadow $HOME
 undefine(`HOME')
 
 dnl This is to prevent FvwmM4 to shadow $HOME
 undefine(`HOME')
 
-
 dnl Echo dimension
 dnl Echo dimension
-changecom(`/*', `*/')
-# width = WIDTH
-changecom(`#')
-
+`#' width = WIDTH
 
 
+divert(-1)
 dnl koi8-r Fonts
 dnl define(`SMALL_FONT_KOI8', `-*-fixed-medium-r-normal-*-*-100-*-*-*-*-koi8-r')
 dnl define(`MEDIUM_FONT_KOI8', `-*-fixed-medium-r-normal-*-*-120-*-*-*-*-koi8-r')
 dnl koi8-r Fonts
 dnl define(`SMALL_FONT_KOI8', `-*-fixed-medium-r-normal-*-*-100-*-*-*-*-koi8-r')
 dnl define(`MEDIUM_FONT_KOI8', `-*-fixed-medium-r-normal-*-*-120-*-*-*-*-koi8-r')
@@ -30,6 +26,7 @@ dnl define(`XBUFFY_FONT', `-cronyx-helvetica-bold-r-*-*-*-100-*-*-*-*-koi8-r')
 
 
 dnl TrueType Fonts
 
 
 dnl TrueType Fonts
+define(`VERY_SMALL_FONT', `xft:Sans:size=10')
 define(`SMALL_FONT', `xft:Sans:size=12')
 define(`MEDIUM_FONT', `xft:Sans:size=14')
 define(`BIG_FONT', `xft:Sans:size=16')
 define(`SMALL_FONT', `xft:Sans:size=12')
 define(`MEDIUM_FONT', `xft:Sans:size=14')
 define(`BIG_FONT', `xft:Sans:size=16')
@@ -37,36 +34,28 @@ define(`LARGE_FONT', `xft:Sans:size=18')
 define(`HUGE_FONT', `xft:Sans:size=20')
 
 dnl Bold TT fonts
 define(`HUGE_FONT', `xft:Sans:size=20')
 
 dnl Bold TT fonts
-define(`SMALL_BOLD_FONT', `SMALL_FONT:Bold')
-define(`MEDIUM_BOLD_FONT', `MEDIUM_FONT:Bold')
-define(`BIG_BOLD_FONT', `BIG_FONT:Bold')
+define(`SMALL_BOLD_FONT', SMALL_FONT`:Bold')
+define(`MEDIUM_BOLD_FONT', MEDIUM_FONT`:Bold')
+define(`BIG_BOLD_FONT', BIG_FONT`:Bold')
 
 
+define(`TITLE_FONT', MEDIUM_FONT)
+define(`ICON_FONT', LARGE_FONT)
 
 dnl Font and geometry aliases that depend on whether the screen resolution is
 dnl 800x600, 1024x768 or 1920x1200
 
 
 dnl Font and geometry aliases that depend on whether the screen resolution is
 dnl 800x600, 1024x768 or 1920x1200
 
-define(`TITLE_FONT', `MEDIUM_FONT')
-
-define(`ICON_FONT', `LARGE_FONT')
-
-
 define(`PAGER_GEOM',
 define(`PAGER_GEOM',
-ifelse(eval(WIDTH < 1024), 1, `365x100+0+0',dnl
-ifelse(eval(WIDTH < 1920), 1, `365x100+0+0', `600x160+0+0'dnl
-))dnl
-)
-
-define(`PAGER_FONT',
-ifelse(eval(WIDTH < 1920), 1, `SMALL_FONT', `BIG_FONT'dnl
-))
+ifelse(eval(WIDTH < 1024), 1, `365x100+0+0',
+       eval(WIDTH < 1920), 1, `365x100+0+0', `600x160+0+0'))
+
+define(`SMALL_PAGER_FONT', ifelse(eval(WIDTH < 1920), 1, VERY_SMALL_FONT, SMALL_FONT))
+define(`PAGER_FONT', ifelse(eval(WIDTH < 1920), 1, SMALL_FONT, BIG_FONT))
 define(`BUTTONS_FONT', PAGER_FONT)
 
 
 define(`MENU_FONT',
 define(`BUTTONS_FONT', PAGER_FONT)
 
 
 define(`MENU_FONT',
-ifelse(eval(WIDTH < 1024), 1, `xft:Helvetica:size=16',dnl
-ifelse(eval(WIDTH < 1920), 1, `xft:Helvetica:size=18', `xft:Helvetica:size=22'dnl
-))dnl
-)
+ifelse(eval(WIDTH < 1024), 1, `xft:Sans:size=16',
+       eval(WIDTH < 1920), 1, `xft:Sans:size=18', `xft:Sans:size=22'))
 define(`IDENT_FONT', MENU_FONT)
 define(`WIN_LIST_FONT', MENU_FONT)
 define(`ICON_BOX_FONT', MENU_FONT)
 define(`IDENT_FONT', MENU_FONT)
 define(`WIN_LIST_FONT', MENU_FONT)
 define(`ICON_BOX_FONT', MENU_FONT)
@@ -74,96 +63,76 @@ define(`ICON_BOX_FONT', MENU_FONT)
 
 dnl XSetBg message width and font
 define(`TEXT_WIDTH',
 
 dnl XSetBg message width and font
 define(`TEXT_WIDTH',
-ifelse(eval(WIDTH < 1024), 1, 70,dnl
-ifelse(eval(WIDTH < 1920), 1, 75, `80'dnl
-))dnl
-)
+ifelse(eval(WIDTH < 1024), 1, 70,
+       eval(WIDTH < 1920), 1, 75, 80))
 
 
-define(`MESSAGE_FONT', `Nimbus Sans L 18')dnl
+define(`MESSAGE_FONT', `Nimbus Sans L 18')
 
 
 dnl Terminal emulator
 define(`TERM_GEOM',
 
 
 dnl Terminal emulator
 define(`TERM_GEOM',
-ifelse(eval(WIDTH < 1024), 1, `80x25',dnl
-ifelse(eval(WIDTH < 1920), 1, `80x30', `80x32'dnl
-))dnl
-)
+ifelse(eval(WIDTH < 1024), 1, `80x25',
+       eval(WIDTH < 1920), 1, `80x30', `80x32'))
 
 
-define(`TERM_GEOM_BOTLT', `TERM_GEOM+0-0')dnl
-define(`TERM_GEOM_BOTRT', `TERM_GEOM-0-0')dnl
+define(`TERM_GEOM_BOTLT', TERM_GEOM`+0-0')
+define(`TERM_GEOM_BOTRT', TERM_GEOM`-0-0')
 
 define(`TERM_GEOM_BIG',
 
 define(`TERM_GEOM_BIG',
-ifelse(eval(WIDTH < 1024), 1, `96x30',dnl
-ifelse(eval(WIDTH < 1920), 1, `112x32', `126x35'dnl
-))dnl
-)
+ifelse(eval(WIDTH < 1024), 1, `96x30',
+       eval(WIDTH < 1920), 1, `112x32+2-0', `126x35'))
 
 
 define(`TERM', `urxvt')
 define(`TERM_KOI8', `Exec LC_CTYPE=ru_RU.KOI8-R exec TERM')
 define(`TERM_UTF8', `Exec exec "$HOME"/lib/X11/utf8rxvt')
 
 
 define(`TERM', `urxvt')
 define(`TERM_KOI8', `Exec LC_CTYPE=ru_RU.KOI8-R exec TERM')
 define(`TERM_UTF8', `Exec exec "$HOME"/lib/X11/utf8rxvt')
-define(`TERM_KOI8_BOTLT', `Exec LC_CTYPE=ru_RU.KOI8-R exec TERM -geometry TERM_GEOM_BOTLT')
-define(`TERM_UTF8_BOTLT', `Exec exec "$HOME"/lib/X11/utf8rxvt -geometry TERM_GEOM_BOTLT')
-define(`TERM_KOI8_BOTRT', `Exec LC_CTYPE=ru_RU.KOI8-R exec TERM -geometry TERM_GEOM_BOTRT')
-define(`TERM_UTF8_BOTRT', `Exec exec "$HOME"/lib/X11/utf8rxvt -geometry TERM_GEOM_BOTRT')
+define(`TERM_KOI8_BOTLT', `TERM_KOI8 -geometry TERM_GEOM_BOTLT')
+define(`TERM_UTF8_BOTLT', `TERM_UTF8 -geometry TERM_GEOM_BOTLT')
+define(`TERM_KOI8_BOTRT', `TERM_KOI8 -geometry TERM_GEOM_BOTRT')
+define(`TERM_UTF8_BOTRT', `TERM_UTF8 -geometry TERM_GEOM_BOTRT')
 
 
 define(`REMOTE_HOST_KOI8',
 
 
 define(`REMOTE_HOST_KOI8',
-TERM_KOI8 -title "$2" -n "$2" -e ssh -4 "$1"dnl
-)
+`TERM_KOI8 -title "$2" -n "$2" -e ssh -4 "$1"')
 
 define(`REMOTE_HOST_KOI8_MENU',
 
 define(`REMOTE_HOST_KOI8_MENU',
-"$2 (koi8)" REMOTE_HOST_KOI8($1, $2)dnl
-)
+"$2 (koi8)" REMOTE_HOST_KOI8($1, $2))
 
 define(`REMOTE_HOST_KOI8_BOTLT',
 
 define(`REMOTE_HOST_KOI8_BOTLT',
-TERM_KOI8_BOTLT -title "$2" -n "$2" -e ssh -4 "$1"dnl
-)
+TERM_KOI8_BOTLT -title "$2" -n "$2" -e ssh -4 "$1")
 
 define(`REMOTE_HOST_KOI8_BOTRT',
 
 define(`REMOTE_HOST_KOI8_BOTRT',
-TERM_KOI8_BOTRT -title "$2" -n "$2" -e ssh -4 "$1"dnl
-)
+`TERM_KOI8_BOTRT -title "$2" -n "$2" -e ssh -4 "$1"')
 
 define(`REMOTE_HOST_KOI8_BOTLT_MENU',
 
 define(`REMOTE_HOST_KOI8_BOTLT_MENU',
-"$2 (koi8,btlt)" REMOTE_HOST_KOI8_BOTLT($1, $2)dnl
-)
+"$2 (koi8,btlt)" REMOTE_HOST_KOI8_BOTLT($1, $2))
 
 define(`REMOTE_HOST_KOI8_BOTRT_MENU',
 
 define(`REMOTE_HOST_KOI8_BOTRT_MENU',
-"$2 (koi8,btrt)" REMOTE_HOST_KOI8_BOTRT($1, $2)dnl
-)
+"$2 (koi8,btrt)" REMOTE_HOST_KOI8_BOTRT($1, $2))
 
 define(`REMOTE_HOST_UTF8',
 
 define(`REMOTE_HOST_UTF8',
-TERM_UTF8 -e ssh -4 "$1"dnl
-)
+TERM_UTF8 -e ssh -4 "$1")
 
 define(`REMOTE_HOST_UTF8_MENU',
 
 define(`REMOTE_HOST_UTF8_MENU',
-"$2 (utf8)" REMOTE_HOST_UTF8($1, $2)dnl
-)
+"$2 (utf8)" REMOTE_HOST_UTF8($1, $2))
 
 define(`REMOTE_HOST_UTF8_BOTLT',
 
 define(`REMOTE_HOST_UTF8_BOTLT',
-TERM_UTF8_BOTLT -e ssh -4 "$1"dnl
-)
+TERM_UTF8_BOTLT -e ssh -4 "$1")
 
 define(`REMOTE_HOST_UTF8_BOTRT',
 
 define(`REMOTE_HOST_UTF8_BOTRT',
-TERM_UTF8_BOTRT -e ssh -4 "$1"dnl
-)
+TERM_UTF8_BOTRT -e ssh -4 "$1")
 
 define(`REMOTE_HOST_UTF8_BOTLT_MENU',
 
 define(`REMOTE_HOST_UTF8_BOTLT_MENU',
-"$2 (utf8,btlt)" REMOTE_HOST_UTF8_BOTLT($1, $2)dnl
-)
+"$2 (utf8,btlt)" REMOTE_HOST_UTF8_BOTLT($1, $2))
 
 define(`REMOTE_HOST_UTF8_BOTRT_MENU',
 
 define(`REMOTE_HOST_UTF8_BOTRT_MENU',
-"$2 (utf8,btrt)" REMOTE_HOST_UTF8_BOTRT($1, $2)dnl
-)
+"$2 (utf8,btrt)" REMOTE_HOST_UTF8_BOTRT($1, $2))
 
 define(`REMOTE_HOST_KOI8_BIG',
 
 define(`REMOTE_HOST_KOI8_BIG',
-TERM_KOI8 -geometry TERM_GEOM_BIG -title "$2" -n "$2" -e ssh -4 "$1"dnl
-)
+TERM_KOI8 -geometry TERM_GEOM_BIG -title "$2" -n "$2" -e ssh -4 "$1")
 
 define(`REMOTE_HOST_KOI8_BIG_MENU',
 
 define(`REMOTE_HOST_KOI8_BIG_MENU',
-"$2 (koi8)" REMOTE_HOST_KOI8_BIG($1, $2)dnl
-)
-
+"$2 (koi8)" REMOTE_HOST_KOI8_BIG($1, $2))
+divert
 
 ##########################################################################
 # PATH Setup
 
 ##########################################################################
 # PATH Setup
@@ -183,7 +152,7 @@ Style * Color Black/#60a0c0
 
 # Set colors/font for pop-up menus
 # Syntax: MenuStyle forecolor backcolor shadecolor font style(fvwm/mwm)
 
 # Set colors/font for pop-up menus
 # Syntax: MenuStyle forecolor backcolor shadecolor font style(fvwm/mwm)
-MenuStyle * FVWM, Foreground Black, Background grey, Greyed SlateGrey, Font MENU_FONT fvwm
+MenuStyle * FVWM, Foreground Black, Background grey, Greyed SlateGrey, Font MENU_FONT
 
 # Set fonts to use on title bar and icon label
 Style * Font              TITLE_FONT
 
 # Set fonts to use on title bar and icon label
 Style * Font              TITLE_FONT
@@ -251,7 +220,6 @@ DesktopSize 2 2
 #
 Style * PositionPlacement Center
 
 #
 Style * PositionPlacement Center
 
-
 ############################################################################
 # STYLE Flag Setup
 #
 ############################################################################
 # STYLE Flag Setup
 #
@@ -264,7 +232,8 @@ Style * BorderWidth 5, HandleWidth 5, Icon unknown1.xpm
 Style * DecorateTransient, ClickToFocusRaisesOff
 
 Style "Fvwm*"           !Title, Sticky, WindowListSkip
 Style * DecorateTransient, ClickToFocusRaisesOff
 
 Style "Fvwm*"           !Title, Sticky, WindowListSkip
-Style "FvwmButtons"     !Handles, BorderWidth 0
+Style "FvwmButtons"     !Handles, BorderWidth 0, Layer 2
+Style "FvwmPager"       Layer 2
 
 # Terminals
 Style "*term"           Icon term.xpm
 
 # Terminals
 Style "*term"           Icon term.xpm
@@ -291,7 +260,7 @@ Style "*Pidgin*"        MinOverlapPercentPlacement
 # (S)MPlayer
 Style "*MPlayer*"       Layer 6, PositionPlacement 350p 100p
 
 # (S)MPlayer
 Style "*MPlayer*"       Layer 6, PositionPlacement 350p 100p
 
-Style "*clock"          !Title, Sticky, WindowListSkip, Color Black/#40c040, NeverFocus, PositionPlacement 50-50w +1p
+Style "*clock"          !Title, Sticky, WindowListSkip, Color Black/#40c040, NeverFocus, PositionPlacement 50-50w +1p, Layer 2
 Style "emacs"           NoPPosition
 Style "gxmessage"       PositionPlacement 50-50w +20
 Style "*lock"           !Title, Sticky, WindowListSkip
 Style "emacs"           NoPPosition
 Style "gxmessage"       PositionPlacement 50-50w +20
 Style "*lock"           !Title, Sticky, WindowListSkip
@@ -394,7 +363,6 @@ ButtonStyle 3 12 10x23@0 90x23@0 90x28@0 10x28@1 10x47@1 90x47@0 90x52@0 10x52@1
 # the number "2"
 #ButtonStyle 8 12 80x80@0 22x80@0 80x40@0 70x25@0 30x25@0 20x35@0 20x30@1 30x20@1 70x20@1 80x30@1 20x75@1 80x75@1
 
 # the number "2"
 #ButtonStyle 8 12 80x80@0 22x80@0 80x40@0 70x25@0 30x25@0 20x35@0 20x30@1 30x20@1 70x20@1 80x30@1 20x75@1 80x75@1
 
-
 ############################################################################
 # MOUSE Setup
 #
 ############################################################################
 # MOUSE Setup
 #
@@ -478,20 +446,31 @@ Key 8           A       CM      GotoPage 1 1
 #############################################################################
 # START-UP Functions
 #
 #############################################################################
 # START-UP Functions
 #
-AddToFunc "InitFunction"
+DestroyFunc InitFunction
+AddToFunc InitFunction
 +              I Module FvwmBacker
 +              I Module FvwmButtons
 +              I Module FvwmCommandS
 +              I Module FvwmPager 0 2
 
 +              I Module FvwmBacker
 +              I Module FvwmButtons
 +              I Module FvwmCommandS
 +              I Module FvwmPager 0 2
 
-AddToFunc "RestartFunction"
+DestroyFunc RestartFunction
+AddToFunc RestartFunction
 +              I Module FvwmBacker
 +              I Module FvwmButtons
 +              I Module FvwmCommandS
 +              I Module FvwmPager 0 2
 +              I Module FvwmBacker
 +              I Module FvwmButtons
 +              I Module FvwmCommandS
 +              I Module FvwmPager 0 2
-+              I Next [!iconic CurrentScreen xterm] Focus
++              I Schedule 1000 Raise-All
+
+DestroyFunc UrgencyFunc
+AddToFunc UrgencyFunc
++                             I Iconify off
++                             I ThisWindow ("*Downloads") Break
++                             I FlipFocus
++                             I Raise
++                             I WarpToWindow 5p 5p
 
 
-AddToFunc "StartStandardSession"
+DestroyFunc StartStandardSession
+AddToFunc StartStandardSession
 +              I GotoDeskAndPage 0 0 0
 +              I TERM_KOI8
 +              I Wait TERM
 +              I GotoDeskAndPage 0 0 0
 +              I TERM_KOI8
 +              I Wait TERM
@@ -502,24 +481,34 @@ AddToFunc "StartStandardSession"
 +              I TERM_KOI8 -e su -
 +              I Wait TERM
 +              I PaVuControl
 +              I TERM_KOI8 -e su -
 +              I Wait TERM
 +              I PaVuControl
-+              I Wait "Volume Control"
-+              I FireFox
-+              I Wait "*Mozilla Firefox"
++              I Exec exec "$HOME"/current/projects/audio-cdr-video/audio/pa-mic-off
 +              I GotoDeskAndPage 1 0 1
 +              I TERM_KOI8
 +              I Wait TERM
 +              I GotoDeskAndPage 1 0 1
 +              I TERM_KOI8
 +              I Wait TERM
++              I GotoDeskAndPage 1 1 0
++              I TERM_UTF8 -iconic -name term-im-remote
++              I Wait term-im-remote
++              I TERM_KOI8 -geometry 60x25-5-5 -iconic -name term-im-local
++              I Wait term-im-local
 +              I GotoDeskAndPage 2 0 1
 +              I TERM_KOI8 -geometry TERM_GEOM_BIG
 +              I Wait TERM
 +              I GotoDeskAndPage 2 0 1
 +              I TERM_KOI8 -geometry TERM_GEOM_BIG
 +              I Wait TERM
-+              I Gajim
-+              I Wait Gajim
-+              I TERM_UTF8 -iconic -name term-im-remote
-+              I Wait URxvt
-+              I TERM_KOI8 -geometry 60x25-5-5 -iconic -name term-im-local
-+              I Wait URxvt
-+              I GotoDeskAndPage 1 1 0
++              I FireFox
 +              I Schedule 1000 GotoDeskAndPage 0 1 0
 
 +              I Schedule 1000 GotoDeskAndPage 0 1 0
 
+DestroyFunc ResumeFunction
+AddToFunc ResumeFunction
++              I GotoDeskAndPage 0 0 0
++              I TERM_KOI8
++              I Wait TERM
++              I None ("Volume Control") PaVuControl
++              I Exec sleep 10; exec "$HOME"/current/projects/audio-cdr-video/audio/pa-mic-off
++              I Exec "$HOME"/current/projects/xsetbg/print-filename.py | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
++              I Wait gxmessage
++              I Any ("*Mozilla Firefox") GotoDeskAndPage 0 1 0
++              I TestRc (Match) Break
++              I None ("*Mozilla Firefox") FireFox
++              I Schedule 4000 GotoDeskAndPage 0 1 0
 
 ############################################################################
 # COMPLEX FUNCTIONS
 
 ############################################################################
 # COMPLEX FUNCTIONS
@@ -528,47 +517,61 @@ DestroyFunc Center
 AddToFunc Center                I Move 50-50w 50-50w
 +                               I WarpToWindow 74p 18p
 
 AddToFunc Center                I Move 50-50w 50-50w
 +                               I WarpToWindow 74p 18p
 
+DestroyFunc Iconify-and-Raise
 AddToFunc Iconify-and-Raise     I Iconify
 +                               I Raise
 
 AddToFunc Iconify-and-Raise     I Iconify
 +                               I Raise
 
+DestroyFunc Maximize-Func
 AddToFunc Maximize-Func         C Maximize     toggle
 +                               D Maximize     100 100
 
 AddToFunc Maximize-Func         C Maximize     toggle
 +                               D Maximize     100 100
 
+DestroyFunc Move-or-Iconify
 AddToFunc Move-or-Iconify       I Raise
 +                               M Move
 +                               D Iconify
 
 AddToFunc Move-or-Iconify       I Raise
 +                               M Move
 +                               D Iconify
 
+DestroyFunc Move-or-Raise
 AddToFunc Move-or-Raise         I Raise
 +                               M Move
 +                               D Lower
 
 AddToFunc Move-or-Raise         I Raise
 +                               M Move
 +                               D Lower
 
+DestroyFunc Move-or-Raise2
 AddToFunc Move-or-Raise2        M Raise
 +                               M Move
 +                               D Lower
 
 AddToFunc Move-or-Raise2        M Raise
 +                               M Move
 +                               D Lower
 
+DestroyFunc Resize-or-Raise
 AddToFunc Resize-or-Raise       I Raise
 +                               M Resize
 +                               D Lower
 
 AddToFunc Resize-or-Raise       I Raise
 +                               M Resize
 +                               D Lower
 
+DestroyFunc Resize-or-Raise2
 AddToFunc Resize-or-Raise2      M Raise
 +                               M Resize
 +                               D Lower
 
 AddToFunc Resize-or-Raise2      M Raise
 +                               M Resize
 +                               D Lower
 
+DestroyFunc Shadify
 AddToFunc Shadify               D WindowShade
 +                               M Move
 +                               C RaiseLower
 
 AddToFunc Shadify               D WindowShade
 +                               M Move
 +                               C RaiseLower
 
+DestroyFunc warp-or-run
 AddToFunc warp-or-run           I Next [$0 CirculateHit] Iconify -1
 +                               I Next [$0 CirculateHit] Focus
 +                               I None [$0] $1
 
 AddToFunc warp-or-run           I Next [$0 CirculateHit] Iconify -1
 +                               I Next [$0 CirculateHit] Focus
 +                               I None [$0] $1
 
+DestroyFunc MailFunction
 AddToFunc MailFunction          I Next [$0] Iconify -1
 +                               I Next [$0] focus
 +                               I None [$0] Exec exec $0 $1
 
 AddToFunc MailFunction          I Next [$0] Iconify -1
 +                               I Next [$0] focus
 +                               I None [$0] Exec exec $0 $1
 
+DestroyFunc PrintFunction
 AddToFunc PrintFunction         I Raise
 +                               I Exec exec xdpr -id $w
 
 AddToFunc PrintFunction         I Raise
 +                               I Exec exec xdpr -id $w
 
+DestroyFunc Raise-All
+AddToFunc Raise-All           I All Raise
+
 ##############################################################################
 # User-defined functions
 #
 ##############################################################################
 # User-defined functions
 #
@@ -576,24 +579,17 @@ AddToFunc PrintFunction         I Raise
 DestroyFunc PaVuControl
 AddToFunc PaVuControl         I GotoDeskAndPage 0 1 1
 +                             I Exec exec pavucontrol
 DestroyFunc PaVuControl
 AddToFunc PaVuControl         I GotoDeskAndPage 0 1 1
 +                             I Exec exec pavucontrol
++                             I Wait "Volume Control"
 
 changequote([,])
 DestroyFunc Id3Info
 AddToFunc Id3Info             I Exec "$HOME"/lib/audio/mp3/id3info.py "`deadbeef --nowplaying '%F'`" | text-wrap.py -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
 changequote([`], ['])
 
 
 changequote([,])
 DestroyFunc Id3Info
 AddToFunc Id3Info             I Exec "$HOME"/lib/audio/mp3/id3info.py "`deadbeef --nowplaying '%F'`" | text-wrap.py -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
 changequote([`], ['])
 
-#DestroyFunc Audacious
-#AddToFunc Audacious           I GotoDeskAndPage 0 1 1
-#+                             I Exec LC_CTYPE=ru_RU.UTF-8 exec audacious
-
 DestroyFunc DeadBeef
 AddToFunc DeadBeef            I GotoDeskAndPage 0 1 1
 +                             I Exec exec deadbeef
 
 DestroyFunc DeadBeef
 AddToFunc DeadBeef            I GotoDeskAndPage 0 1 1
 +                             I Exec exec deadbeef
 
-DestroyFunc SMPlayer
-AddToFunc SMPlayer            I GotoDeskAndPage 0 1 1
-+                             I Exec exec smplay -no-close-at-end
-
 DestroyFunc Term-Phdru
 AddToFunc Term-Phdru          I GotoDeskAndPage 1 0 1
 +                             I REMOTE_HOST_KOI8(phdru.name, phdru.name)
 DestroyFunc Term-Phdru
 AddToFunc Term-Phdru          I GotoDeskAndPage 1 0 1
 +                             I REMOTE_HOST_KOI8(phdru.name, phdru.name)
@@ -603,8 +599,13 @@ AddToFunc Term-Phdru-Big      I GotoDeskAndPage 1 0 1
 +                             I REMOTE_HOST_KOI8_BIG(phdru.name, phdru.name)
 
 DestroyFunc FireFox
 +                             I REMOTE_HOST_KOI8_BIG(phdru.name, phdru.name)
 
 DestroyFunc FireFox
-AddToFunc FireFox             I GotoDeskAndPage 1 0 0
+AddToFunc FireFox             I Any ("*Mozilla Firefox") Break
++                             I GotoDeskAndPage 1 0 0
 +                             I Exec LC_CTYPE=ru_RU.KOI8-R exec start-browser firefox
 +                             I Exec LC_CTYPE=ru_RU.KOI8-R exec start-browser firefox
++                             I Wait "*Mozilla Firefox"
++                             I All ("*Mozilla Firefox") Lower
++                             I Exec webbrowserX -n file:///home/phd/Internet/WWW/misc/index.html; exec webbrowserX -t file:///home/phd/Internet/WWW/misc/internet.html
++                             I Wait "*Mozilla Firefox"
 
 DestroyFunc Gajim
 AddToFunc Gajim               I GotoDeskAndPage 1 1 0
 
 DestroyFunc Gajim
 AddToFunc Gajim               I GotoDeskAndPage 1 1 0
@@ -614,17 +615,6 @@ DestroyFunc Pidgin
 AddToFunc Pidgin              I GotoDeskAndPage 1 1 0
 +                             I Exec exec pidgin
 
 AddToFunc Pidgin              I GotoDeskAndPage 1 1 0
 +                             I Exec exec pidgin
 
-DestroyFunc Raise-All
-AddToFunc Raise-All           I All (!"FvwmButtons|System|*clock") Raise
-
-DestroyFunc UrgencyFunc
-AddToFunc UrgencyFunc
-+                             I Iconify off
-+                             I ThisWindow ("*Downloads") Break
-+                             I FlipFocus
-+                             I Raise
-+                             I WarpToWindow 5p 5p
-
 ##############################################################################
 # MENU Setup
 #
 ##############################################################################
 # MENU Setup
 #
@@ -647,7 +637,7 @@ AddToMenu Window-Ops    "Window Ops"    Title
 +                       "Refresh Screen" Refresh
 
 # A trimmed down version of "Window Ops", good for binding to decorations
 +                       "Refresh Screen" Refresh
 
 # A trimmed down version of "Window Ops", good for binding to decorations
-DestroyMenu "Window-Ops2"
+DestroyMenu Window-Ops2
 AddToMenu Window-Ops2   "Center"        Center
 +                       "Move"          Move-or-Raise
 +                       "Iconify"       Iconify
 AddToMenu Window-Ops2   "Center"        Center
 +                       "Move"          Move-or-Raise
 +                       "Iconify"       Iconify
@@ -668,7 +658,9 @@ AddToMenu Window-Ops2   "Center"        Center
 AddToMenu Terminals     "Terminals" Title
 +               "Grey term (koi8)" TERM_KOI8
 +               "Grey term (utf8)" TERM_UTF8
 AddToMenu Terminals     "Terminals" Title
 +               "Grey term (koi8)" TERM_KOI8
 +               "Grey term (utf8)" TERM_UTF8
++               "Grey term (koi8,btlt)" TERM_KOI8_BOTLT
 +               "Grey term (koi8,btrt)" TERM_KOI8_BOTRT
 +               "Grey term (koi8,btrt)" TERM_KOI8_BOTRT
++               "Grey term (utf8,btlt)" TERM_UTF8_BOTLT
 +               "Grey term (utf8,btrt)" TERM_UTF8_BOTRT
 +               "Big grey term (koi8)" TERM_KOI8 -geometry TERM_GEOM_BIG
 +                       ""      Nop
 +               "Grey term (utf8,btrt)" TERM_UTF8_BOTRT
 +               "Big grey term (koi8)" TERM_KOI8 -geometry TERM_GEOM_BIG
 +                       ""      Nop
@@ -777,18 +769,22 @@ AddToMenu RootMenu "Root Menu"  Title
 # This menu will fire up some often used programs
 DestroyMenu  Utilities
 AddToMenu Utilities     "Choose one:" Title
 # This menu will fire up some often used programs
 DestroyMenu  Utilities
 AddToMenu Utilities     "Choose one:" Title
++                       "qPDFview" Exec exec qpdfview
 +                       "FBReader" Exec exec fbreader
 +                       "FBReader" Exec exec fbreader
++                       ""       Nop
 +                       "GVim (koi8)" Exec LC_CTYPE=ru_RU.KOI8-R exec gvim
 +                       "GVim (utf8)" Exec LC_CTYPE=ru_RU.UTF-8  exec gvim
 +                       "GVim (koi8)" Exec LC_CTYPE=ru_RU.KOI8-R exec gvim
 +                       "GVim (utf8)" Exec LC_CTYPE=ru_RU.UTF-8  exec gvim
++                       ""       Nop
 +                       "MyRuLb (koi8)" Exec LC_CTYPE=ru_RU.KOI8-R exec "$HOME"/admin/prog/myrulib/myrulib
 +                       "MyRuLb (utf8)" Exec LC_CTYPE=ru_RU.UTF-8  exec "$HOME"/admin/prog/myrulib/myrulib
 +                       "MyRuLb (koi8)" Exec LC_CTYPE=ru_RU.KOI8-R exec "$HOME"/admin/prog/myrulib/myrulib
 +                       "MyRuLb (utf8)" Exec LC_CTYPE=ru_RU.UTF-8  exec "$HOME"/admin/prog/myrulib/myrulib
++                       ""       Nop
 #+                       "XFortune" Exec /usr/games/fortune | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
 #+                       "xbuffy" Exec exec xbuffy -fn 'XBUFFY_FONT' -geometry +0+125 -boxfile mail/misc/.xbuffyrc
 +                       ""       Nop
 +                       "pavucontrol" PaVuControl
 #+                       "XFortune" Exec /usr/games/fortune | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
 #+                       "xbuffy" Exec exec xbuffy -fn 'XBUFFY_FONT' -geometry +0+125 -boxfile mail/misc/.xbuffyrc
 +                       ""       Nop
 +                       "pavucontrol" PaVuControl
-#+                       "audacious"   Audacious
 +                       "DeadBeef"    DeadBeef
 +                       "Id3Info"     Id3Info
 +                       "DeadBeef"    DeadBeef
 +                       "Id3Info"     Id3Info
++                       ""       Nop
 +                       "Gajim"       Gajim
 +                       "Pidgin"      Pidgin
 +                       ""       Nop
 +                       "Gajim"       Gajim
 +                       "Pidgin"      Pidgin
 +                       ""       Nop
@@ -798,7 +794,7 @@ AddToMenu Utilities     "Choose one:" Title
 +                       "Refresh Screen" Refresh
 +                       "xrefresh" Exec exec xrefresh
 +                       ""       Nop
 +                       "Refresh Screen" Refresh
 +                       "xrefresh" Exec exec xrefresh
 +                       ""       Nop
-+                       "xcalc" Exec exec xcalc
+#+                       "xcalc" Exec exec xcalc
 +                       "xclipboard" Exec exec xclipboard
 +                       "xcutsel" Exec exec xcutsel
 #+                       "xman" Exec exec xman -notopbox -geometry +150+102
 +                       "xclipboard" Exec exec xclipboard
 +                       "xcutsel" Exec exec xcutsel
 #+                       "xman" Exec exec xman -notopbox -geometry +150+102
@@ -808,8 +804,8 @@ AddToMenu Utilities     "Choose one:" Title
 DestroyMenu  Browsers
 AddToMenu Browsers      "Choose one:" Title
 +                       "FireFox" FireFox
 DestroyMenu  Browsers
 AddToMenu Browsers      "Choose one:" Title
 +                       "FireFox" FireFox
-+                       "Chromium" Exec LC_CTYPE=ru_RU.KOI8-R exec start-browser chromium
-+                       "Opera" Exec LC_CTYPE=ru_RU.KOI8-R exec start-browser opera
++                       "Chromium" None ("*Chromium") Exec LC_CTYPE=ru_RU.KOI8-R exec start-browser chromium
++                       "Opera" None ("*Opera") Exec LC_CTYPE=ru_RU.KOI8-R exec start-browser opera
 
 # A wide variety of screenlocking options...
 #AddToMenu XlockMenu     "Choose one:" Title
 
 # A wide variety of screenlocking options...
 #AddToMenu XlockMenu     "Choose one:" Title
@@ -849,13 +845,13 @@ changequote([,])
 +                       "XFilename" Exec "$HOME"/current/projects/xsetbg/print-filename.py | text-wrap.py -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
 +                       "XFilename (wrapped)" Exec "$HOME"/current/projects/xsetbg/print-filename.py | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
 +                       ""       Nop
 +                       "XFilename" Exec "$HOME"/current/projects/xsetbg/print-filename.py | text-wrap.py -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
 +                       "XFilename (wrapped)" Exec "$HOME"/current/projects/xsetbg/print-filename.py | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
 +                       ""       Nop
-+                       "Xli (prev.)" Exec fn="`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r -o`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" "$fn"
-+                       "Xli (prev., scaled)" Exec fn="`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r -o`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" -zoom auto "$fn"
-+                       "Open in browser (prev.)" Exec exec webbrowserX -n "`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r -o`"
++                       "Xli (prev.)" Exec fn="`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r 1`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" "$fn"
++                       "Xli (prev., scaled)" Exec fn="`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r 1`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" -zoom auto "$fn"
++                       "Open in browser (prev.)" Exec exec webbrowserX -n "`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r 1`"
 changequote([`], ['])
 changequote([`], ['])
-+                       "Filename (prev.)" Exec exec "$HOME"/current/projects/xsetbg/print-filename.py -e koi8-r -o
-+                       "XFilename (prev.)" Exec "$HOME"/current/projects/xsetbg/print-filename.py -o | text-wrap.py -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
-+                       "XFilename (prev., wrapped)" Exec "$HOME"/current/projects/xsetbg/print-filename.py -o | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
++                       "Filename (prev.)" Exec exec "$HOME"/current/projects/xsetbg/print-filename.py -e koi8-r 1
++                       "XFilename (prev.)" Exec "$HOME"/current/projects/xsetbg/print-filename.py 1 | text-wrap.py -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
++                       "XFilename (prev., wrapped)" Exec "$HOME"/current/projects/xsetbg/print-filename.py 1 | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -
 
 ############################################################################
 # FvwmBacker
 
 ############################################################################
 # FvwmBacker
@@ -873,8 +869,7 @@ changequote([`], ['])
 *FvwmButtons: Back rgb:90/80/90
 
 # Font
 *FvwmButtons: Back rgb:90/80/90
 
 # Font
-*FvwmButtonsFont        BUTTONS_FONT
-*FvwmButtons: Font      BUTTONS_FONT
+*FvwmButtons: Font BUTTONS_FONT
 
 # Geometry-- really likes to pick its own size, but giving a position is OK
 *FvwmButtons: Geometry -1+1
 
 # Geometry-- really likes to pick its own size, but giving a position is OK
 *FvwmButtons: Geometry -1+1
@@ -887,40 +882,27 @@ changequote([`], ['])
 # Background
 #*FvwmButtons: Pixmap fvwm.xpm
 
 # Background
 #*FvwmButtons: Pixmap fvwm.xpm
 
-
 # Define the buttons to use.....
 #*FvwmButtons: Move              arrows2.xpm     Move
 #*FvwmButtons: Kill              skull.xpm       Destroy
 #*FvwmButtons: Quit              nuke.xpm        Popup "Quit-Verify"
 
 # Define the buttons to use.....
 #*FvwmButtons: Move              arrows2.xpm     Move
 #*FvwmButtons: Kill              skull.xpm       Destroy
 #*FvwmButtons: Quit              nuke.xpm        Popup "Quit-Verify"
 
-#*FvwmButtons: (de)Iconify       eyenew.xpm      Iconify
-#*FvwmButtons: Restart eye2.xpm     Restart
-#*FvwmButtons: Xcalc   rcalc.xpm   Exec "Calculator" exec xcalc
-#*FvwmButtons: junk   3dx.xpm     Swallow "xload"  xload -bg \#908090
-#*FvwmButtons: xmter x.xpm            Swallow "xmter" xmter
-#*FvwmButtons: ""  clock.xpm   Swallow "xclock" xclock -bg \#908090 -padding 0
-#*FvwmButtons: "" 3dx.xpm Swallow "Time 3D" t3d -fg \#908090 -mag .3 -wobber 0
-
 #*FvwmButtons: (Swallow XClock 'Exec exec xclock -update 1 -geometry -3000-3000')
 #*FvwmButtons: (Swallow XClock 'Exec exec xclock -update 1 -geometry -3000-3000')
-#*FvwmButtons: news    page.xpm   TERM_KOI8 -title "Tin" -fn 10x20 -fg white -cr white -bg black -e tin
-#*FvwmButtons: Minicom mini-connect.xpm TERM_KOI8 -title "Minicom" -fg white -cr white -bg black -e minicom
-#*FvwmButtons: Real    bell.xpm    Exec cd /opt/audio && exec realplay
-#*FvwmButtons: Kill    rbomb.xpm    Destroy
-
 
 # Buttons
 
 # Buttons
+pushdef(`TERM_KOI8', `Exec "TERM" LC_CTYPE=ru_RU.KOI8-R exec TERM')
+pushdef(`TERM_UTF8', `Exec "URxvt" exec "$HOME"/lib/X11/utf8rxvt')
 *FvwmButtons: (Title Term,     Icon rterm2.xpm,      Action TERM_KOI8)
 *FvwmButtons: (Title UTF-8,    Icon rterm2.xpm,      Action TERM_UTF8)
 *FvwmButtons: (Title Term,     Icon rterm2.xpm,      Action TERM_KOI8)
 *FvwmButtons: (Title UTF-8,    Icon rterm2.xpm,      Action TERM_UTF8)
-*FvwmButtons: (Title phdru,    Icon xterm-sgi.xpm,   Action Term-Phdru)
+*FvwmButtons: (Title phdru,    Icon xterm-sgi.xpm,   Action REMOTE_HOST_KOI8(phdru.name, phdru.name))
+popdef(`TERM_KOI8', `TERM_UTF8')
 
 
-*FvwmButtons: (Title Wallpaper, Icon find1.xpm,        Action Exec $HOME/current/projects/xsetbg/print-filename.py | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -)
-*FvwmButtons: (Title "-1",      Icon find1.xpm,        Action Exec $HOME/current/projects/xsetbg/print-filename.py -o | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -)
+*FvwmButtons: (Title Wallpaper, Icon find1.xpm,        Action Exec "gxmessage" "$HOME"/current/projects/xsetbg/print-filename.py | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -)
+*FvwmButtons: (Title "-1",      Icon find1.xpm,        Action Exec "gxmessage" "$HOME"/current/projects/xsetbg/print-filename.py 1 | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -)
 *FvwmButtons: (Title Next,      Icon Jrecycle.xpm,     Action Exec exec "$HOME"/current/projects/xsetbg/xsetbg-http-force)
 *FvwmButtons: (Title Next,      Icon Jrecycle.xpm,     Action Exec exec "$HOME"/current/projects/xsetbg/xsetbg-http-force)
-*FvwmButtons: (Title pavucontrol, Icon mini.sound.xpm, Action PaVuControl)
+*FvwmButtons: (Title pavucontrol, Icon mini.sound.xpm, Action Exec "Volume Control" exec pavucontrol)
 #*FvwmButtons: (Title Id3Info,  Icon bell.xpm,         Action Id3Info)
 #*FvwmButtons: (Title Id3Info,  Icon bell.xpm,         Action Id3Info)
-#*FvwmButtons: (Title Audacious, Icon bell.xpm,        Action Audacious)
-*FvwmButtons: (Title DeadBeef,  Icon bell.xpm,         Action DeadBeef)
-#*FvwmButtons: (Title SMPlayer,  Icon bell.xpm,        Action SMPlayer)
+*FvwmButtons: (Title DeadBeef,  Icon bell.xpm,         Action Exec "DeaDBeeF-*" exec deadbeef)
 #*FvwmButtons: (Title XLock,     Icon Jxlock.xpm,      Action Exec exec xscreensaver-command -lock)
 
 ############################################################################
 #*FvwmButtons: (Title XLock,     Icon Jxlock.xpm,      Action Exec exec xscreensaver-command -lock)
 
 ############################################################################
@@ -1075,7 +1057,7 @@ changequote([`], ['])
 *FvwmPager: Label 0 System
 *FvwmPager: Label 1 Net
 *FvwmPager: Label 2 Work
 *FvwmPager: Label 0 System
 *FvwmPager: Label 1 Net
 *FvwmPager: Label 2 Work
-*FvwmPager: SmallFont PAGER_FONT
+*FvwmPager: SmallFont SMALL_PAGER_FONT
 
 *FvwmPager: Balloons All
 *FvwmPager: BalloonBack #efe3b5
 
 *FvwmPager: Balloons All
 *FvwmPager: BalloonBack #efe3b5