]> git.phdru.name Git - dotfiles.git/commitdiff
Fix(xli): Fix window title
authorOleg Broytman <phd@phdru.name>
Wed, 15 Nov 2023 16:33:31 +0000 (19:33 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 15 Nov 2023 16:33:31 +0000 (19:33 +0300)
`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
.mc/menu

index 1747ffb5bac9db0242c8cbdcdf348f08a50bb4a4..c19893097d9b9fba4531ee800703cb152e059edf 100644 (file)
@@ -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 -
index 08fce495a3f6a5989b7ae6de4d664b7a2fbc3d95..c2198c8978457c3e3ae2b81f25ad519b2ef36151 100644 (file)
--- 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