MochiMoppel wrote:bothers me too..smokey01 wrote:Each time a file is touched the filename is boldedWell, only the "access" and "change" timestamps are changed, not the important "modified" timestamp. So far I regarded it more as a nuisance, to be fixed on a rainy day when everything else is fixed.and the date of the file is changed to the current date.
Now that you mentioned it I investigated and found the culprit. The behavior is caused in the fill_statusbar function by the -p option of the file command:I used this option because I thought it would preserve the existing file dates
- MIME=$(file --separator " │ " -ip "$vCHOOSER" 2>&1)
if [[ "$MIME" = *│*x-symlink* ]];then
echo -n $vCHOOSER " ➡" $(file --separator " │ " -ip "$(realpath "$vCHOOSER")" 2>&1)It obviously means that the time of access by the command is preserved with a new timestamp ... on files, not of files. Sorry, lost in translation. I will update the script.The manual wrote:-p, --preserve-date preserve access times on files
Building MMview, a universal file viewer
I knew you could do it.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Not by many people The script would stop to work. No major Puppy knows "defaultfilemanager". My script also uses rox options which I don't expect to work with any other file manager.peebee wrote:If you could consider changing rox to defaultfilemanager then that would be appreciated
Instead may I suggest that you fix your scripts. You are not using ROX-Filer and the error message in your screenshot is not triggered by ROX-Filer. In your case the command rox "$vCHOOSER" , which of course works fine with the "real" ROX, calls a wrapper script which points to pcmanfm. You need to use proper quoting in this script .... or you could simple symlink to defaultfilemanager, where you did the quoting right, hence no problems with defaultfilemanager.
Just an idea, how about using xdg-open instead rox?
Would the resulting behavior stay the same?
EDIT: Just tried the new version and big images are now scaled down and small images stay normal, that's awesome!
Would the resulting behavior stay the same?
EDIT: Just tried the new version and big images are now scaled down and small images stay normal, that's awesome!
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]
The X series of pups have a modified rox file in /usr/local/bin that uses exo-open, maybe this will give you a clue to make something workable.peebee wrote:If you could consider changing rox to defaultfilemanager then that would be appreciated - thanks.MochiMoppel wrote:*Which* errors? Spaces in file names shouldn't be a problem, but if you don't use rox then of course the script may not work properly.Peebee wrote:Doubling clicking an item with spaces in the file name gives errors.....
I would like to include this facility in the next LxPupSc.....
Code: Select all
#!/bin/sh
# redirect rox calls to thunar
CURRENTWM="`cat /etc/windowmanager`"
if [ "$CURRENTWM" = "jwm" ]; then
exec /usr/local/apps/ROX-Filer/AppRun "$@"
else
if [ $# -eq 0 ];then
exo-open /root
exit
fi
if [ "$1" = "-D" ];then
exit
fi
if [ "$3" = "-d" ] || [ "$3" = "-x" ];then
exo-open "$2"
exit
fi
if [ "$1" = "-d" ];then
shift
exo-open "$@"
exit
fi
if [ -d "$1" ];then
exo-open "$@"
exit
fi
fi
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Hi MochiMoppel, If I click a symbolic link to a text file the view pane is blank. Is it a limitation of the chooser GTK widget? Thanks for this script.
edit: MochiMoppel followed up by PM. the problem is identified and solved.
edit: MochiMoppel followed up by PM. the problem is identified and solved.
Last edited by step on Sat 11 Feb 2017, 19:08, edited 1 time in total.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]
Thanks for the pointers - they led me to make other beneficial changes.....MochiMoppel wrote:....You need to use proper quoting in this script .... or you could simple symlink to defaultfilemanager, where you did the quoting right, hence no problems with defaultfilemanager.
LxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
New features in update 2017-02-12 (see also initial post)
Menu bar (shortcut F10)
Offers keyboard access for all and shortcuts for most functions.
Usage messages for executables
Most binaries in the various bin directories display a short usage message when the user typesinto a console. Sometimes it should rather be -help, -h or nothing at all... no rules ... hit and pray.
The script tries --help and -help and displays the output in the viewer pane. Most of the times it succeeds. It's a convenient way to get an idea what all these little programs are about.
Since this function executes a file and not just reads it, it is available only on demand (shortcut F1) .
The function contains some safeguards against "rogue" utilities:
- Works only for programs which contain the string 'usage:'
- Runs the program in a tiny console window
- Kills the console automatically, latest after 0.5 sec.
Directory tree size
The script displays the disk usage of a directory tree (command du -hs ). Symlinks and directories containing only zero size files are displayed as 0, completely empty directories are displayed as empty.
Can be a bit slow for very large directories but generally the speed is acceptable.
Window size and position
The script now remembers its last size and position on screen if the user closes the window with the Close button or the (new) keyboard shortcut Ctrl+Q.
Menu bar (shortcut F10)
Offers keyboard access for all and shortcuts for most functions.
Usage messages for executables
Most binaries in the various bin directories display a short usage message when the user types
Code: Select all
<filename> --help
The script tries --help and -help and displays the output in the viewer pane. Most of the times it succeeds. It's a convenient way to get an idea what all these little programs are about.
Since this function executes a file and not just reads it, it is available only on demand (shortcut F1) .
The function contains some safeguards against "rogue" utilities:
- Works only for programs which contain the string 'usage:'
- Runs the program in a tiny console window
- Kills the console automatically, latest after 0.5 sec.
Directory tree size
The script displays the disk usage of a directory tree (command du -hs ). Symlinks and directories containing only zero size files are displayed as 0, completely empty directories are displayed as empty.
Can be a bit slow for very large directories but generally the speed is acceptable.
Window size and position
The script now remembers its last size and position on screen if the user closes the window with the Close button or the (new) keyboard shortcut Ctrl+Q.
Love the way the viewer displays the size when you singleclick a directory. Very handy.
I do have a problem with it not displaying some text files. Is this due to my locale or the encoding selection or something? I can read the file pci.ids but not the file usb.ids
See attached pic:
I do have a problem with it not displaying some text files. Is this due to my locale or the encoding selection or something? I can read the file pci.ids but not the file usb.ids
See attached pic:
- Attachments
-
- textfile_no_display.jpg
- (77.3 KiB) Downloaded 647 times
Dear MochiMoppel,
It is getting better all the time. One thing I miss, though, from an earlier version is:
I wonder whether that could not be an option that could be set in the menu.
With kind regards,
vovchik
It is getting better all the time. One thing I miss, though, from an earlier version is:
Code: Select all
ctl=`file -b "$vCHOOSER"|awk -v mw="$MAXUNSCALED_X" -v mh="$MAXUNSCALED_Y" '{if ($(NF-2)*$NF!=0){if ($(NF-2)<=mw&&$NF<=mh){z=1} else z=2;print z;}}'`
and
ctl=`exiv2 -ps "$vCHOOSER"|awk -v mw="$MAXUNSCALED_X" -v mh="$MAXUNSCALED_Y" 'NR==4&&NF>3{if ($(NF-2)*$NF!=0){if ($(NF-2)<=mw&&$NF<=mh){z=1} else z=2;print z;}}'`
in the case statement and this in the gtkdialog part:
<width>'$MAXUNSCALED_X'</width><height>'$MAXUNSCALED_X'</height>
With kind regards,
vovchik
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
No.Yes.No.greengeek wrote:I do have a problem with it not displaying some text files. Is this due to my locale or the encoding selection or something?
I have included support for iso-8859-1 in my private edition but didn't include it in the posted version. Given that it requires an extra utility and that it is not widely used I thought I should wait until I know if there is demand for it. I also have no clue what other encodings need support, so if anyone can enlighten me I would be grateful.
There is no way to enable any rightclick action since chooser's built-in rightclick dialog can't be removed/customized.greengeek wrote:Is there any way to enable a rightclick "open with" menu in the chooser widget?
It was never included in an earlier version. Of course you are free to implement some1's code if it suits your needs. I still prefer dejan555's solution.vovchik wrote:One thing I miss, though, from an earlier version is:
Convert iso-encodings to UTF 8.
Inject this as a case-statement,fx. after the ascii-case
Inject this as a case-statement,fx. after the ascii-case
Code: Select all
*charset=iso-*)
iconv -f "ISO_${vSTATUSBAR##*=iso-}" -t UTF-8 "$vCHOOSER" > $MSGFILE
ln -fsn "$MSGFILE" $FILELNK
;;
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
- fabrice_035
- Posts: 765
- Joined: Mon 28 Apr 2014, 17:54
- Location: Bretagne / France
Hi,
Nice idea, but i found a problem with ffprobe and MKV files, show nothing.
[edit]
found solution, add octet-stream for support MKV files
bye.
Nice idea, but i found a problem with ffprobe and MKV files, show nothing.
[edit]
found solution, add octet-stream for support MKV files
Code: Select all
*│*audio*|*│*video*|*octet-stream*|*'.mp3 '*|*'.ogg '*)
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Yes, you can, but you shouldn'tfabrice_035 wrote:found solution, add octet-stream for support MKV filesCode: Select all
*│*audio*|*│*video*|*octet-stream*|*'.mp3 '*|*'.ogg '*)
octet-stream can be anything. It only tells you that it's a binary. It shouldn't be used in the case statement.
Instead you should use the file extension.
So far I didn't give much attention to videos.
With autoplay enabled you can hear them....not much fun
If you put the following case before the *│*audio*|*│*video*|*'.mp3 '*|*'.ogg '*) case you can actually see them. They will appear in a small external window. Sorry, no way to embed them in gtkdialog:
Code: Select all
*│*video*|*'.mkv '*)
if (( $AUTOPLAY )) ;then
ffplay -x 320 -y 180 -i "$vCHOOSER" &
echo -n $! > $PID_FFP
fi
ffprobe "$vCHOOSER" > $MSGFILE
ln -fsn $MSGFILE $FILELNK
;;
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
New features in update 2017-03-10 (see also initial post)
Image scaling
Based on some1's proposal this solution removes most of my initial concerns and includes some improvements:
- Scaled or unscaled display can be set in the new Preferences menu (vovchik, I heard you )
- The selected mode becomes effective immediately. No restart required.
- A new text label indicates if the displayed image is scaled or not
- The scale is determined by the intial window size.Though it can't be changed dynamically by resizing the window during a session, it can be changed by resizing the window, followed by a restart (the last window size is saved and used as default for the restart)
- The image is loaded only by the notebook page used for display, not for both pixmap pages
Autoplay
Autoplay for audio and video files is implemented and can be enabled via the Preferences menu. The chosen setting takes effect immediately.
New file formats
Some new file formats and codesets are supported.
Image scaling
Based on some1's proposal this solution removes most of my initial concerns and includes some improvements:
- Scaled or unscaled display can be set in the new Preferences menu (vovchik, I heard you )
- The selected mode becomes effective immediately. No restart required.
- A new text label indicates if the displayed image is scaled or not
- The scale is determined by the intial window size.Though it can't be changed dynamically by resizing the window during a session, it can be changed by resizing the window, followed by a restart (the last window size is saved and used as default for the restart)
- The image is loaded only by the notebook page used for display, not for both pixmap pages
Autoplay
Autoplay for audio and video files is implemented and can be enabled via the Preferences menu. The chosen setting takes effect immediately.
New file formats
Some new file formats and codesets are supported.
- Attachments
-
- mm_quickview_20170310.png
- (130.06 KiB) Downloaded 338 times