X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.fvwm%2Fphd.m4;h=92bb46ddeb54b3c3133916441e678e391302087d;hb=2adc4c6da99fb7ac84faa2b3cbac4653104c27b9;hp=b62a3e82631b3122c403a257a3458849f140f814;hpb=fe672c1fbe169131f2fd2f8bfefac69c437c3ad4;p=dotfiles.git diff --git a/.fvwm/phd.m4 b/.fvwm/phd.m4 index b62a3e8..92bb46d 100644 --- a/.fvwm/phd.m4 +++ b/.fvwm/phd.m4 @@ -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 This is to prevent FvwmM4 to shadow $HOME undefine(`HOME') - 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') @@ -37,35 +33,32 @@ define(`LARGE_FONT', `xft:Sans:size=18') 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 -define(`TITLE_FONT', `MEDIUM_FONT') - -define(`ICON_FONT', `LARGE_FONT') - - 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 +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 < 1920), 1, `SMALL_FONT', `BIG_FONT'dnl +)) 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:Helvetica:size=16',dnl +ifelse(eval(WIDTH < 1920), 1, `xft:Helvetica:size=18', `xft:Helvetica:size=22'dnl +))dnl ) define(`IDENT_FONT', MENU_FONT) define(`WIN_LIST_FONT', MENU_FONT) @@ -74,37 +67,36 @@ define(`ICON_BOX_FONT', MENU_FONT) 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,dnl +ifelse(eval(WIDTH < 1920), 1, 75, `80'dnl +))dnl ) -define(`MESSAGE_FONT', `Nimbus Sans L 18')'dnl +define(`MESSAGE_FONT', `Nimbus Sans L 18')dnl 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',dnl +ifelse(eval(WIDTH < 1920), 1, `80x30', `80x32'dnl +))dnl ) -define(`TERM_GEOM_BOTRT', -`ifelse(eval(WIDTH < 1024), 1, `80x25-0-0',dnl -`ifelse(eval(WIDTH < 1920), 1, `80x30-0-0', `80x32-0-0'dnl -)')'dnl -) +define(`TERM_GEOM_BOTLT', `TERM_GEOM+0-0')dnl +define(`TERM_GEOM_BOTRT', `TERM_GEOM-0-0')dnl 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',dnl +ifelse(eval(WIDTH < 1920), 1, `112x32', `126x35'dnl +))dnl ) 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') @@ -117,12 +109,20 @@ define(`REMOTE_HOST_KOI8_MENU', "$2 (koi8)" REMOTE_HOST_KOI8($1, $2)dnl ) +define(`REMOTE_HOST_KOI8_BOTLT', +TERM_KOI8_BOTLT -title "$2" -n "$2" -e ssh -4 "$1"dnl +) + define(`REMOTE_HOST_KOI8_BOTRT', TERM_KOI8_BOTRT -title "$2" -n "$2" -e ssh -4 "$1"dnl ) +define(`REMOTE_HOST_KOI8_BOTLT_MENU', +"$2 (koi8,btlt)" REMOTE_HOST_KOI8_BOTLT($1, $2)dnl +) + define(`REMOTE_HOST_KOI8_BOTRT_MENU', -"$2 (koi8)" REMOTE_HOST_KOI8_BOTRT($1, $2)dnl +"$2 (koi8,btrt)" REMOTE_HOST_KOI8_BOTRT($1, $2)dnl ) define(`REMOTE_HOST_UTF8', @@ -133,12 +133,20 @@ define(`REMOTE_HOST_UTF8_MENU', "$2 (utf8)" REMOTE_HOST_UTF8($1, $2)dnl ) +define(`REMOTE_HOST_UTF8_BOTLT', +TERM_UTF8_BOTLT -e ssh -4 "$1"dnl +) + define(`REMOTE_HOST_UTF8_BOTRT', TERM_UTF8_BOTRT -e ssh -4 "$1"dnl ) +define(`REMOTE_HOST_UTF8_BOTLT_MENU', +"$2 (utf8,btlt)" REMOTE_HOST_UTF8_BOTLT($1, $2)dnl +) + define(`REMOTE_HOST_UTF8_BOTRT_MENU', -"$2 (utf8)" REMOTE_HOST_UTF8_BOTRT($1, $2)dnl +"$2 (utf8,btrt)" REMOTE_HOST_UTF8_BOTRT($1, $2)dnl ) define(`REMOTE_HOST_KOI8_BIG', @@ -148,6 +156,7 @@ TERM_KOI8 -geometry TERM_GEOM_BIG -title "$2" -n "$2" -e ssh -4 "$1"dnl define(`REMOTE_HOST_KOI8_BIG_MENU', "$2 (koi8)" REMOTE_HOST_KOI8_BIG($1, $2)dnl ) +divert ########################################################################## @@ -168,7 +177,7 @@ Style * Color Black/#60a0c0 # 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 @@ -210,7 +219,7 @@ Style * SloppyFocus ClickTime 250 # if the window occupies less than n% of the screen, draw it opaque -OpaqueMoveSize 5 +OpaqueMoveSize 100 # Do not flip pages on the edge of the screen, but allow to move windows EdgeScroll 0 0 @@ -481,8 +490,8 @@ AddToFunc "StartStandardSession" + I TERM_KOI8 + I Wait TERM + I GotoDeskAndPage 0 0 1 -+ I TERM_KOI8 -geometry 38x30+0-0 -+ I Wait TERM ++ I TERM_UTF8 -geometry 38x30+0-0 ++ I Wait URxvt + I GotoDeskAndPage 0 1 0 + I TERM_KOI8 -e su - + I Wait TERM @@ -490,6 +499,9 @@ AddToFunc "StartStandardSession" + I Wait "Volume Control" + I FireFox + I Wait "*Mozilla Firefox" ++ I GotoDeskAndPage 1 0 1 ++ I TERM_KOI8 ++ I Wait TERM + I GotoDeskAndPage 2 0 1 + I TERM_KOI8 -geometry TERM_GEOM_BIG + I Wait TERM @@ -818,26 +830,26 @@ AddToMenu XScreenSaverMenu "Choose mode:" Title + "Kill Screen Saver" Exec exec xscreensaver-command -exit AddToMenu XSetBgMenu "XSetBg" Title -+ "Change wallpaper" Exec exec "$HOME"/admin/prog/xsetbg/xsetbg-force -+ "Start" Exec exec "$HOME"/admin/prog/xsetbg/xsetbg-http-start -+ "Stop" Exec exec "$HOME"/admin/prog/xsetbg/xsetbg-http-stop -+ "Restart" Exec exec "$HOME"/admin/prog/xsetbg/xsetbg-http-restart ++ "Change wallpaper" Exec exec "$HOME"/current/projects/xsetbg/xsetbg-force ++ "Start" Exec exec "$HOME"/current/projects/xsetbg/xsetbg-http-start ++ "Stop" Exec exec "$HOME"/current/projects/xsetbg/xsetbg-http-stop ++ "Restart" Exec exec "$HOME"/current/projects/xsetbg/xsetbg-http-restart + "" Nop changequote([,]) -+ "Xli" Exec fn="`$HOME/admin/prog/xsetbg/print-filename.py -e koi8-r`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" "$fn" -+ "Xli (scaled)" Exec fn="`$HOME/admin/prog/xsetbg/print-filename.py -e koi8-r`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" -zoom auto "$fn" -+ "Open in browser" Exec exec webbrowserX -n "`$HOME/admin/prog/xsetbg/print-filename.py -e koi8-r`" -+ "Filename" Exec exec "$HOME"/admin/prog/xsetbg/print-filename.py -e koi8-r -+ "XFilename" Exec "$HOME"/admin/prog/xsetbg/print-filename.py | text-wrap.py -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - -+ "XFilename (wrapped)" Exec "$HOME"/admin/prog/xsetbg/print-filename.py | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - ++ "Xli" Exec fn="`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" "$fn" ++ "Xli (scaled)" Exec fn="`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" -zoom auto "$fn" ++ "Open in browser" Exec exec webbrowserX -n "`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r`" ++ "Filename" Exec exec "$HOME"/current/projects/xsetbg/print-filename.py -e koi8-r ++ "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/admin/prog/xsetbg/print-filename.py -e koi8-r -o`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" "$fn" -+ "Xli (prev., scaled)" Exec fn="`$HOME/admin/prog/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/admin/prog/xsetbg/print-filename.py -e koi8-r -o`" ++ "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`" changequote([`], [']) -+ "Filename (prev.)" Exec exec "$HOME"/admin/prog/xsetbg/print-filename.py -e koi8-r -o -+ "XFilename (prev.)" Exec "$HOME"/admin/prog/xsetbg/print-filename.py -o | text-wrap.py -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - -+ "XFilename (prev., wrapped)" Exec "$HOME"/admin/prog/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 -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 - ############################################################################ # FvwmBacker @@ -845,7 +857,7 @@ changequote([`], [']) #*FvwmBacker: Command (Desk 0, Page * *) -solid DarkCyan #*FvwmBacker: Command (Desk 1, Page * *) -solid steelblue #*FvwmBacker: Command (Desk 2, Page * *) -solid midnightblue -*FvwmBacker: Command (Desk *, Page * *) Exec exec "$HOME"/admin/prog/xsetbg/xsetbg-http-change +*FvwmBacker: Command (Desk *, Page * *) Exec exec "$HOME"/current/projects/xsetbg/xsetbg-http-change ############################################################################ # FvwmButtons @@ -895,9 +907,9 @@ changequote([`], [']) *FvwmButtons: (Title UTF-8, Icon rterm2.xpm, Action TERM_UTF8) *FvwmButtons: (Title phdru, Icon xterm-sgi.xpm, Action Term-Phdru) -*FvwmButtons: (Title Wallpaper, Icon find1.xpm, Action Exec $HOME/admin/prog/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/admin/prog/xsetbg/print-filename.py -o | 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"/admin/prog/xsetbg/xsetbg-http-force) +*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 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 Id3Info, Icon bell.xpm, Action Id3Info) #*FvwmButtons: (Title Audacious, Icon bell.xpm, Action Audacious)