From 932ce22686bfac2c6a457d2774ce384ff0285ee4 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 15 Nov 2023 19:33:31 +0300 Subject: [PATCH] Fix(xli): Fix window title `xli` cuts long names on the 1st dot instead of the last. It seems it recognizes everything after the 1st dot as a filename extension. To fix replace all dots with underscores. --- .fvwm/main.m4 | 14 +++++++------- .mc/menu | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.fvwm/main.m4 b/.fvwm/main.m4 index 1747ffb..c198930 100644 --- a/.fvwm/main.m4 +++ b/.fvwm/main.m4 @@ -614,7 +614,7 @@ AddToFunc PaVuControl I GotoDeskAndPage 0 1 1 + I Exec exec cgmem_nice 200 pavucontrol + I Wait "Volume Control" -changequote([,])dnl +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 @@ -887,18 +887,18 @@ 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" +changequote(`[[[',`]]]')dnl ++ "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" ++ "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`" -changequote([`], [']) +changequote([`], ['])dnl + "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 - diff --git a/.mc/menu b/.mc/menu index 08fce49..c2198c8 100644 --- a/.mc/menu +++ b/.mc/menu @@ -117,11 +117,11 @@ e Edit image(s) + t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t = t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ i View image(s) scaled - xli -title "`echo %s | sed 's/ /_/g'`" -zoom auto %s & + xli -title "`echo %s | sed 's/[ .]/_/g'`" -zoom auto %s & + t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ | t t I View image(s) full size - xli -title "`echo %s | sed 's/ /_/g'`" %s & + xli -title "`echo %s | sed 's/[ .]/_/g'`" %s & + t lr & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|pbm|PBM|ppm|PPM|png|PNG|xbm|xpm)$ I Identify image -- 2.39.5