]> git.phdru.name Git - dotfiles.git/blobdiff - .fvwm/phd.m4
.fvwmrc: put FvwmButtons, FvwmPager and xclock to lower level
[dotfiles.git] / .fvwm / phd.m4
index 083b3e5bab771b6b9174ed5ef98934a41481868d..3f8b1b098dd80ec6efc38019282d070e65873985 100644 (file)
@@ -54,8 +54,8 @@ define(`BUTTONS_FONT', PAGER_FONT)
 
 
 define(`MENU_FONT',
-ifelse(eval(WIDTH < 1024), 1, `xft:Helvetica:size=16',
-       eval(WIDTH < 1920), 1, `xft:Helvetica:size=18', `xft:Helvetica:size=22'))
+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)
@@ -79,20 +79,20 @@ define(`TERM_GEOM_BOTRT', TERM_GEOM`-0-0')
 
 define(`TERM_GEOM_BIG',
 ifelse(eval(WIDTH < 1024), 1, `96x30',
-       eval(WIDTH < 1920), 1, `112x32', `126x35'))
+       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_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',
-TERM_KOI8 -title "$2" -n "$2" -e ssh -4 "$1")
+`TERM_KOI8 -title "$2" -n "$2" -e ssh -4 "$1"')
 
 define(`REMOTE_HOST_KOI8_MENU',
 "$2 (koi8)" REMOTE_HOST_KOI8($1, $2))
@@ -101,7 +101,7 @@ define(`REMOTE_HOST_KOI8_BOTLT',
 TERM_KOI8_BOTLT -title "$2" -n "$2" -e ssh -4 "$1")
 
 define(`REMOTE_HOST_KOI8_BOTRT',
-TERM_KOI8_BOTRT -title "$2" -n "$2" -e ssh -4 "$1")
+`TERM_KOI8_BOTRT -title "$2" -n "$2" -e ssh -4 "$1"')
 
 define(`REMOTE_HOST_KOI8_BOTLT_MENU',
 "$2 (koi8,btlt)" REMOTE_HOST_KOI8_BOTLT($1, $2))
@@ -232,7 +232,8 @@ Style * BorderWidth 5, HandleWidth 5, Icon unknown1.xpm
 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
@@ -259,7 +260,7 @@ Style "*Pidgin*"        MinOverlapPercentPlacement
 # (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
@@ -480,8 +481,7 @@ AddToFunc StartStandardSession
 +              I TERM_KOI8 -e su -
 +              I Wait TERM
 +              I PaVuControl
-+              I Wait "Volume Control"
-+              I FireFox-Wait
++              I Exec exec "$HOME"/current/projects/audio-cdr-video/audio/pa-mic-off
 +              I GotoDeskAndPage 1 0 1
 +              I TERM_KOI8
 +              I Wait TERM
@@ -494,7 +494,7 @@ AddToFunc StartStandardSession
 +              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
 
 DestroyFunc ResumeFunction
@@ -502,12 +502,14 @@ AddToFunc ResumeFunction
 +              I GotoDeskAndPage 0 0 0
 +              I TERM_KOI8
 +              I Wait TERM
-+              I PaVuControl
-+              I Wait "Volume Control"
-+              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 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 None ("*Mozilla Firefox") FireFox-Wait
-+              I GotoDeskAndPage 0 1 0
++              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
@@ -569,7 +571,7 @@ AddToFunc PrintFunction         I Raise
 +                               I Exec exec xdpr -id $w
 
 DestroyFunc Raise-All
-AddToFunc Raise-All           I All (!"FvwmButtons|System|*clock") Raise
+AddToFunc Raise-All           I All Raise
 
 ##############################################################################
 # User-defined functions
@@ -578,24 +580,17 @@ AddToFunc Raise-All           I All (!"FvwmButtons|System|*clock") Raise
 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([`], ['])
 
-#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 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)
@@ -608,10 +603,9 @@ DestroyFunc FireFox
 AddToFunc FireFox             I Any ("*Mozilla Firefox") Break
 +                             I GotoDeskAndPage 1 0 0
 +                             I Exec LC_CTYPE=ru_RU.KOI8-R exec start-browser firefox
-
-DestroyFunc FireFox-Wait
-AddToFunc FireFox-Wait        I Any ("*Mozilla Firefox") Break
-+                             I 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
@@ -665,7 +659,9 @@ AddToMenu Window-Ops2   "Center"        Center
 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 (utf8,btlt)" TERM_UTF8_BOTLT
 +               "Grey term (utf8,btrt)" TERM_UTF8_BOTRT
 +               "Big grey term (koi8)" TERM_KOI8 -geometry TERM_GEOM_BIG
 +                       ""      Nop
@@ -774,18 +770,22 @@ AddToMenu RootMenu "Root Menu"  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
++                       ""       Nop
 +                       "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
++                       ""       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
-#+                       "audacious"   Audacious
 +                       "DeadBeef"    DeadBeef
 +                       "Id3Info"     Id3Info
++                       ""       Nop
 +                       "Gajim"       Gajim
 +                       "Pidgin"      Pidgin
 +                       ""       Nop
@@ -795,7 +795,7 @@ AddToMenu Utilities     "Choose one:" Title
 +                       "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
@@ -846,13 +846,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
-+                       "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([`], ['])
-+                       "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
@@ -870,8 +870,7 @@ changequote([`], ['])
 *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
@@ -889,33 +888,22 @@ changequote([`], ['])
 #*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: 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
+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 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 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 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)
 
 ############################################################################