X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=blobdiff_plain;f=.fvwm%2Fmain.m4;h=8e7c740d554987f64e61a16d6698db271ab97610;hp=6f444fd2f1821d3fc2886b377adc687ece971534;hb=HEAD;hpb=bac126baf5e9630f5b153d6fe78c4c443c85e334 diff --git a/.fvwm/main.m4 b/.fvwm/main.m4 index 6f444fd..8e7c740 100644 --- a/.fvwm/main.m4 +++ b/.fvwm/main.m4 @@ -13,13 +13,13 @@ dnl Echo dimension divert(-1) 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(`LARGE_FONT', `xft:Sans:size=18') -define(`HUGE_FONT', `xft:Sans:size=20') -define(`GIGANTIC_FONT', `xft:Sans:size=22') +define(`VERY_SMALL_FONT', `"xft:Liberation Mono:size=10"') +define(`SMALL_FONT', `"xft:Liberation Mono:size=12"') +define(`MEDIUM_FONT', `"xft:Liberation Mono:size=14"') +define(`BIG_FONT', `"xft:Liberation Mono:size=16"') +define(`LARGE_FONT', `"xft:Liberation Mono:size=18"') +define(`HUGE_FONT', `"xft:Liberation Mono:size=20"') +define(`GIGANTIC_FONT', `"xft:Liberation Mono:size=22"') dnl Bold TT fonts define(`SMALL_BOLD_FONT', SMALL_FONT`:Bold') @@ -67,7 +67,7 @@ define(`TERM_GEOM_BOTRT', TERM_GEOM`-0-0') define(`TERM_GEOM_BIG', ifelse(eval(WIDTH < 1024), 1, `96x30', - eval(WIDTH < 1920), 1, `112x32+2-0', `119x32+1-0')) + eval(WIDTH < 1920), 1, `112x32+2-0', `127x32+1-0')) define(`TERM', `urxvt') @@ -290,10 +290,6 @@ Style "FvwmPager" Layer 2 # Terminals Style "*term" Icon term.xpm Style "*rxvt" Icon term.xpm -Style "term-im-local" Icon pidgin-menu.xpm -Style "term-im-remote" Icon rcalc2.xpm -Style "term-im-*" IconBox 630 -75 -2 -2, IconGrid 200 80 -Style "term-im-*" StartsOnPage 1 1 0, StartIconic # Browsers' windows Style "Certificate Manager" PositionPlacement Center @@ -302,16 +298,8 @@ Style "*Mozilla*" PositionPlacement +0 -0 Style "*Chromium*" PositionPlacement +0 -0 -# IM -Style "Gajim" PositionPlacement +0 -0 -Style "* - Gajim" MinOverlapPercentPlacement -# Pidgin -Style "Buddy List" PositionPlacement +0 -0 -Style "*Pidgin*" MinOverlapPercentPlacement - -# (S)MPlayer -Style "*MPlayer*" Layer 6, PositionPlacement 250p 100p -Style "*mpv" Layer 6, PositionPlacement 250p 100p +# Video player(s) +Style "*mpv" Layer 6, PositionPlacement 200p 150p Style "*clock" !Title, Sticky, WindowListSkip, Color Black/#40c040, NeverFocus, PositionPlacement 50-50w +1p, Layer 2 Style "deadbeef" PositionPlacement -0 -0 @@ -517,7 +505,7 @@ AddToFunc RestartFunction DestroyFunc UrgencyFunc AddToFunc UrgencyFunc + I Iconify off -+ I ThisWindow ("*Downloads|Skype") Break ++ I ThisWindow ("*Downloads|Skype") Break 1 + I FlipFocus + I Raise + I WarpToWindow 5p 5p @@ -536,7 +524,6 @@ AddToFunc StartStandardSession + I TERM_KOI8_BIG + I Wait TERM + I FireFox -+ I GotoDeskAndPage 0 1 1 DestroyFunc ResumeFunction AddToFunc ResumeFunction @@ -549,7 +536,7 @@ AddToFunc ResumeFunction + I XsetbgFilename + I Wait gxmessage + I Any ("*Mozilla Firefox") GotoDeskAndPage 0 1 1 -+ I TestRc (Match) Break ++ I TestRc (Match) Break 1 + I None ("*Mozilla Firefox") FireFox ############################################################################ @@ -625,30 +612,38 @@ AddToFunc PaVuControl I GotoDeskAndPage 0 1 1 + I Exec exec cgmem_nice 200 pavucontrol + I Wait "Volume Control" -changequote([,])dnl DestroyFunc Id3Info -AddToFunc Id3Info I Exec "$HOME"/lib/audio/mp3/id3info.py "`audtool --current-song-filename`" | text-wrap.py | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - -changequote([`], ['])dnl +AddToFunc Id3Info I Exec "$HOME"/lib/audio/mp3/id3info.py "$(audtool --current-song-filename)" | text-wrap.py | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - -DestroyFunc Term3Hosts -AddToFunc Term3Hosts I GotoDeskAndPage 1 1 2 +DestroyFunc Term2HostsHome +AddToFunc Term2HostsHome I GotoDeskAndPage 1 1 2 ++ I PipeRead 'test -n "$(ip address show tun0 up 2>/dev/null)" || test -n "$(ip address show wg0 up 2>/dev/null)" || { echo Exec exec gxmessage -buttons Ok -default Ok "ERROR: Cannot find tun0/wg0 interfaces!"; echo Wait gxmessage; echo Break 1; }' + I TERM_KOI8_SSH_SCREEN(iskra-aviel.phdru.name, iskra) + I Wait TERM -+ I TERM_KOI8_BOTRT_SSH_SCREEN(oper.med.ru, oper) -+ I Wait TERM + I GotoDeskAndPage 1 0 1 + I TERM_KOI8_SSH_SCREEN(-D 1080 phdru.name, phdru.name) + I Wait TERM + I GotoDeskAndPage 1 1 2 DestroyFunc FireFox -AddToFunc FireFox I Any ("*Mozilla Firefox") Break +AddToFunc FireFox I Any ("*Mozilla Firefox") Break 1 + I GotoDeskAndPage 1 0 0 + I Exec LC_CTYPE=ru_RU.KOI8-R exec cgmem_nice 4000 start-browser firefox -P phd + I Wait "*Mozilla Firefox" -+ I Exec LC_CTYPE=ru_RU.KOI8-R exec cgmem_nice 4000 firefox --new-window -+ I Wait "*Mozilla Firefox" -+ I Next ("*Mozilla Firefox") Iconify true + +DestroyFunc SuspendFireFox +AddToFunc SuspendFireFox I Exec exec pkill -STOP firefox ++ I All ("*Mozilla Firefox") Iconify True + +DestroyFunc ResumeFireFox +AddToFunc ResumeFireFox I Exec exec pkill -CONT firefox ++ I All ("*Mozilla Firefox") Iconify False + +DestroyFunc Chromium +AddToFunc Chromium I Any ("*Chromium") Break 1 ++ I GotoDeskAndPage 1 1 0 ++ I Exec LC_CTYPE=ru_RU.KOI8-R exec cgmem_nice 2000 start-browser chromium ++ I Wait "*Chromium" DestroyFunc Gajim AddToFunc Gajim I GotoDeskAndPage 1 1 0 @@ -745,7 +740,7 @@ AddToMenu TermColors "Term Colors" Title + "Term: white/black" TERM_KOI8 -fg white -cr white -bg black AddToMenu Systems "Systems" Title -+ "Iskra+Oper+Phdru" Term3Hosts ++ "Iskra+Phdru" Term2HostsHome + "" Nop pushdef(`TERM_KOI8', `Exec LC_CTYPE=ru_RU.KOI8-R exec TERM -xrm "*Page: 1 1 1"')dnl pushdef(`TERM_RU_UTF8', `Exec LC_CTYPE=ru_RU.UTF-8 exec TERM -name URxvt -xrm "*Page: 1 1 1"')dnl @@ -753,11 +748,6 @@ pushdef(`TERM_RU_UTF8', `Exec LC_CTYPE=ru_RU.UTF-8 exec TERM -name URxvt -xrm "* + MENU_TERM_UTF8_BOTLT_SSH(iskra-aviel.phdru.name, iskra) + MENU_TERM_KOI8_BIG_SSH(iskra-aviel.phdru.name, ISKRA) + "" Nop -+ MENU_TERM_KOI8_BOTRT_SSH_SCREEN(oper.med.ru, oper) -+ MENU_TERM_UTF8_BOTRT_SSH(oper.med.ru, oper) -+ MENU_TERM_KOI8_BIG_SSH(oper.med.ru, OPER) -popdef(`TERM_KOI8', `TERM_RU_UTF8')dnl -+ "" Nop pushdef(`TERM_KOI8', `Exec LC_CTYPE=ru_RU.KOI8-R exec TERM -xrm "*Page: 1 0 1"')dnl pushdef(`TERM_RU_UTF8', `Exec LC_CTYPE=ru_RU.UTF-8 exec TERM -name URxvt -xrm "*Page: 1 0 1"')dnl + MENU_TERM_KOI8_SSH_SCREEN(phdru.name, phdru) @@ -769,8 +759,6 @@ popdef(`TERM_KOI8', `TERM_RU_UTF8')dnl AddToMenu FvwmCommands "Fvwm Commands" Title + "Restart" Restart + "Raise all" Raise-All -#+ "Restart Fvwm2" Restart fvwm2 -#+ "Start Fvwm" Restart fvwm + "Fvwm Setup" Popup FvwmSetup + "Fvwm Modules" Popup FvwmModules + "" Nop @@ -858,8 +846,10 @@ AddToMenu Utilities "Choose one:" Title DestroyMenu Browsers AddToMenu Browsers "Choose one:" Title + "FireFox" FireFox -+ "Chromium" None ("*Chromium") Exec LC_CTYPE=ru_RU.KOI8-R exec cgmem_nice 2000 start-browser chromium -+ "Opera" None ("*Opera") Exec LC_CTYPE=ru_RU.KOI8-R exec cgmem_nice 2000 start-browser opera ++ "Suspend FireFox" SuspendFireFox ++ "Resume FireFox" ResumeFireFox ++ "" Nop ++ "Chromium" Chromium # A wide variety of screenlocking options... #AddToMenu XlockMenu "Choose one:" Title @@ -876,14 +866,17 @@ AddToMenu Browsers "Choose one:" Title #+ "Blank" Exec exec xlock -mode blank AddToMenu XScreenSaverMenu "Choose mode:" Title -+ "Blank Screen Now" Exec exec xscreensaver-command -activate -+ "Lock Screen Now" Exec exec xscreensaver-command -lock -+ "Screen Saver Demo" Exec exec xscreensaver-command -demo -+ "Screen Saver Preferences" Exec exec xscreensaver-command -prefs -+ "Reinitialize Screen Saver" Exec exec xscreensaver-command -restart ++ "Blank Screen via xset" Exec xset dpms force off +#+ "Blank Screen Now" Exec exec xscreensaver-command --suspend ++ "Activate A Hack Now" Exec exec xscreensaver-command --activate ++ "Lock Screen Now" Exec exec xscreensaver-command --lock ++ "" Nop ++ "Screen Saver Demo" Exec exec xscreensaver-demo ++ "Screen Saver Settings" Exec exec xscreensaver-settings + "" Nop -+ "Kill Screen Saver" Exec exec xscreensaver-command -exit ++ "Kill Screen Saver" Exec exec xscreensaver-command --exit + "Launch Screen Saver" Exec exec xscreensaver ++ "Reinitialize Screen Saver" Exec exec xscreensaver-command --restart AddToMenu XSetBgMenu "XSetBg" Title + "Change wallpaper" Exec exec "$HOME"/current/projects/xsetbg/xsetbg-force @@ -891,18 +884,16 @@ AddToMenu XSetBgMenu "XSetBg" Title + "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/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`" ++ "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 cgmem_nice 4000 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 | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - + "XFilename (wrapped)" XSetbgFilename + "" Nop -+ "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([`], [']) ++ "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 cgmem_nice 4000 webbrowserX -n "$($HOME/current/projects/xsetbg/print-filename.py -e koi8-r 1)" + "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 | 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 | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - @@ -954,7 +945,6 @@ pushdef(`TERM_KOI8', `Exec "TERM" LC_CTYPE=ru_RU.KOI8-R exec TERM -xrm "*Page: 1 popdef(`TERM_KOI8')dnl pushdef(`TERM_KOI8', `Exec "TERM" LC_CTYPE=ru_RU.KOI8-R exec TERM -xrm "*Page: 1 1 1"')dnl *FvwmButtons: (Title "iskra (k8,s)", Icon xterm-sgi.xpm, Action TERM_KOI8_SSH_SCREEN(iskra-aviel.phdru.name, iskra)) -*FvwmButtons: (Title "oper (k8,s)", Icon xterm-linux.xpm, Action TERM_KOI8_BOTRT_SSH_SCREEN(oper.med.ru, oper)) popdef(`TERM_KOI8')dnl *FvwmButtons: (Title Wallpaper, Icon find1.xpm, Action Exec "gxmessage" "$HOME"/current/projects/xsetbg/print-filename.py | text-wrap.py -w TEXT_WIDTH -s | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -) @@ -962,7 +952,7 @@ popdef(`TERM_KOI8')dnl *FvwmButtons: (Title Next, Icon Jrecycle.xpm, Action Exec exec "$HOME"/current/projects/xsetbg/xsetbg-http-force) #*FvwmButtons: (Title pavucontrol, Icon mini.sound.xpm, Action Exec "Volume Control" exec cgmem_nice 200 pavucontrol) #*FvwmButtons: (Title Id3Info, Icon bell.xpm, Action Id3Info) -*FvwmButtons: (Title Skype, Icon skypeforlinux.png, Action Exec "Skype" FvwmCommand "GotoDeskAndPage 0 0 1" && BROWSER=firefox exec cgmem_nice 2000 skypeforlinux) +#*FvwmButtons: (Title Skype, Icon skypeforlinux.png, Action Exec "Skype" FvwmCommand "GotoDeskAndPage 0 0 1" && BROWSER=firefox exec cgmem_nice 2000 skypeforlinux) *FvwmButtons: (Title AudioPlayer, Icon bell.xpm, Action Exec "deadbeef" LC_CTYPE=ru_RU.KOI8-R FvwmCommand "GotoDeskAndPage 0 1 1" && exec cgmem_nice 400 deadbeef) #*FvwmButtons: (Title XLock, Icon Jxlock.xpm, Action Exec exec xscreensaver-command -lock)