Building MMview, a universal file viewer
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Update 2018-11-01 (see also initial post)
This update emulates the "Open With..." menu of ROX-Filer, aka Right-click options. Actually it's Shift+RightClick.
In MMview the "Open With... " menu item can be selected from the"File" menu or with the mouse by middle-clicking a file in the tree list (right-clicking would not be an option as it can't be configured).
By default MMview searches applications in directory /root/.config/rox.sourceforge.net/SendTo.
This is the same directory from which ROX-Filer constructs its Shift+RightClick menu.
As in ROX-Filer this menu is MIME type sensitive and - if properly maintained ! - only offers applications for the specific MIME type of a selected file. The menu is devided into up to 3 MIME type sections (see screenshot).
This makes it possible for a user to increase MMview's functionality while making it easier for me to keep MMview simple. The screenshot shows an example (of my private setup): Middle-clicking on a JPEG file provides as first item the option to rotate the image. Would be difficult to integrate such option in the normal MMview menu as it doesn't fit anywhere. As my script uses the tool jpegtran, which only works for JPEG files, such menu in MMview would have to be disabled for non-JPEG files. A lot of work. Here the "Open With... " menu comes to the rescue as the upper section is visible only when a JPEG file is selected.
Two differences between ROX-Filer and MMview:
- MMview uses Xdialog to keep the code small and efficient, resulting in a "frugal" look & feel ... no icons! Double-click instead of single-click to select an item.
- MMview tries to emulate ROX-Filer and I can't guarantee that it always succeeds. I haven't found problems so far but that doesn't mean much.
Have fun!
This update emulates the "Open With..." menu of ROX-Filer, aka Right-click options. Actually it's Shift+RightClick.
In MMview the "Open With... " menu item can be selected from the"File" menu or with the mouse by middle-clicking a file in the tree list (right-clicking would not be an option as it can't be configured).
By default MMview searches applications in directory /root/.config/rox.sourceforge.net/SendTo.
This is the same directory from which ROX-Filer constructs its Shift+RightClick menu.
As in ROX-Filer this menu is MIME type sensitive and - if properly maintained ! - only offers applications for the specific MIME type of a selected file. The menu is devided into up to 3 MIME type sections (see screenshot).
This makes it possible for a user to increase MMview's functionality while making it easier for me to keep MMview simple. The screenshot shows an example (of my private setup): Middle-clicking on a JPEG file provides as first item the option to rotate the image. Would be difficult to integrate such option in the normal MMview menu as it doesn't fit anywhere. As my script uses the tool jpegtran, which only works for JPEG files, such menu in MMview would have to be disabled for non-JPEG files. A lot of work. Here the "Open With... " menu comes to the rescue as the upper section is visible only when a JPEG file is selected.
Two differences between ROX-Filer and MMview:
- MMview uses Xdialog to keep the code small and efficient, resulting in a "frugal" look & feel ... no icons! Double-click instead of single-click to select an item.
- MMview tries to emulate ROX-Filer and I can't guarantee that it always succeeds. I haven't found problems so far but that doesn't mean much.
Have fun!
- Attachments
-
- MMview_MiddleClick_menu.jpg
- (96.74 KiB) Downloaded 1263 times
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Update 2019-04-09 (see also initial post)
After covering plain text files, audio/video and - at great length - image files there is one category MMview doesn't yet support: the "raw" display of binary files. Starting with this update I'll add some tools which to my knowledge don't exist in Puppy and which will make the forensic analysis of binary "black boxes" easier.
I also experiment with a multifunctional button, allowing one button to perform up to 9 different actions.
Hexdump
This is the classic hexdump -C command, but with a twist: There are only 10 hex values in a row and the offsets at the left are displayed in decimal and not hexadecimal. Limiting a row to 10 values should make it easier to relate ASCIIs on the right to their hex values on the left. Offsets in dec instead of hex are much more useful when it comes to using commands like head and dd. They are also much easier to grasp. My brain doesn't like hex.
Since hexdumps can be huge, time consuming and can cause a temporary freeze, display in the viewer pane is limited to 10KB
Hexdump in Leafpad
Alternatively hexdump can be redirected to leafpad. This is done in the background and therefore does not disrupt MMview. *Theoretically* there is no size limit.
Hexview
I don't know if this name makes sense. It's a special hexdump format which I created to analyze corrupted text files. When an ASCII control character somehow finds its way into a text file, the MIME format turns to application/octet-stream and the file becomes unreadable (for a text editor). Finding this one toxic character with a normal hexdump is like searching for a needle in a haystack. With the hexview format this character becomes visible immediately. There are much more uses for this format, e.g. when analyzing content and format of binary wordprocessor formats like MS Word .doc files.
Note that this view is displayed with line wrapping by default.
Hexview in Leafpad
Same functionality as in "Hexdump in Leafpad"
Convert text string
Strictly speaking this is a tool and not a view option as it does not relate to the selected file, but it is created with hexdump and is immensely useful, so I put it here.
It can answer simple questions, e.g. what the last letter of MochiMoppel might be, or reveal that Oops is a 6-letter word or detect the components of ( ͡° ͜ʖ ͡°) ,rufwoof's lenny face. It is also possible to paste multiline text selections into the entry field and analyze line endings and whitespaces.
Multifunction button
Used with a 3-button mouse the HEX button can trigger 6 different actions (see tooltip). 9 would be possible and theoretically much more, but I figure that 9 is the practical limit for this feature. Which action is triggered is determined by the duration after which the mouse button is released. After 0.3 sec and up to 1 sec the press action is triggered (the 0.3 sec can be changed with the THRESHOLD variable).
I don't know if users find this useful. Needs a bit of practice. Anyway, all actions (except for the help display) are also accessible from the "View" menu.
Other changes
I deleted the "Preferences" menu and moved the only remaining item (Vertical layout) into the "View" menu.
After covering plain text files, audio/video and - at great length - image files there is one category MMview doesn't yet support: the "raw" display of binary files. Starting with this update I'll add some tools which to my knowledge don't exist in Puppy and which will make the forensic analysis of binary "black boxes" easier.
I also experiment with a multifunctional button, allowing one button to perform up to 9 different actions.
Hexdump
This is the classic hexdump -C command, but with a twist: There are only 10 hex values in a row and the offsets at the left are displayed in decimal and not hexadecimal. Limiting a row to 10 values should make it easier to relate ASCIIs on the right to their hex values on the left. Offsets in dec instead of hex are much more useful when it comes to using commands like head and dd. They are also much easier to grasp. My brain doesn't like hex.
Since hexdumps can be huge, time consuming and can cause a temporary freeze, display in the viewer pane is limited to 10KB
Hexdump in Leafpad
Alternatively hexdump can be redirected to leafpad. This is done in the background and therefore does not disrupt MMview. *Theoretically* there is no size limit.
Hexview
I don't know if this name makes sense. It's a special hexdump format which I created to analyze corrupted text files. When an ASCII control character somehow finds its way into a text file, the MIME format turns to application/octet-stream and the file becomes unreadable (for a text editor). Finding this one toxic character with a normal hexdump is like searching for a needle in a haystack. With the hexview format this character becomes visible immediately. There are much more uses for this format, e.g. when analyzing content and format of binary wordprocessor formats like MS Word .doc files.
Note that this view is displayed with line wrapping by default.
Hexview in Leafpad
Same functionality as in "Hexdump in Leafpad"
Convert text string
Strictly speaking this is a tool and not a view option as it does not relate to the selected file, but it is created with hexdump and is immensely useful, so I put it here.
It can answer simple questions, e.g. what the last letter of MochiMoppel might be, or reveal that Oops is a 6-letter word or detect the components of ( ͡° ͜ʖ ͡°) ,rufwoof's lenny face. It is also possible to paste multiline text selections into the entry field and analyze line endings and whitespaces.
Multifunction button
Used with a 3-button mouse the HEX button can trigger 6 different actions (see tooltip). 9 would be possible and theoretically much more, but I figure that 9 is the practical limit for this feature. Which action is triggered is determined by the duration after which the mouse button is released. After 0.3 sec and up to 1 sec the press action is triggered (the 0.3 sec can be changed with the THRESHOLD variable).
I don't know if users find this useful. Needs a bit of practice. Anyway, all actions (except for the help display) are also accessible from the "View" menu.
Other changes
I deleted the "Preferences" menu and moved the only remaining item (Vertical layout) into the "View" menu.
- Attachments
-
- binary_options.jpg
- (180.4 KiB) Downloaded 1068 times
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Tips & Tricks No.1
In the future I intend to throw in a couple of tips & tricks that I find noteworthy. I might also add some code snippets from my personal edition that will enhance the functionality but which I have no intention to add to the officially posted version.
Code folding
Someone kindly pointed me to the newest edition of Smokey's newsletter, which to my surprise contains a full code listing of MMview. Just for the record: I didn't write or suggested this contribution. I don't mind either.
1463 lines of code - this is heavy stuff for the readers and looks intimidating, even to me. Though I try my best to keep the code short I also like to keep everything in one file, which over time adds to quite an amount of bytes.
The trick to make this code digestible without losing one's sanity is code folding. In Geany it's Menu Document -> Fold All. This will shrink the whole stuff to just 47 lines and is the first thing I do whenever I open the script. It allows to examine/edit only the sections of interest. Code folding further applies to the case statements in functions view_instantly and view_on_demand. Code folding is achieved by surrounding the sections that should fold with curly braces.
In the future I intend to throw in a couple of tips & tricks that I find noteworthy. I might also add some code snippets from my personal edition that will enhance the functionality but which I have no intention to add to the officially posted version.
Code folding
Someone kindly pointed me to the newest edition of Smokey's newsletter, which to my surprise contains a full code listing of MMview. Just for the record: I didn't write or suggested this contribution. I don't mind either.
1463 lines of code - this is heavy stuff for the readers and looks intimidating, even to me. Though I try my best to keep the code short I also like to keep everything in one file, which over time adds to quite an amount of bytes.
The trick to make this code digestible without losing one's sanity is code folding. In Geany it's Menu Document -> Fold All. This will shrink the whole stuff to just 47 lines and is the first thing I do whenever I open the script. It allows to examine/edit only the sections of interest. Code folding further applies to the case statements in functions view_instantly and view_on_demand. Code folding is achieved by surrounding the sections that should fold with curly braces.
- Attachments
-
- mmview_folded.png
- (72.45 KiB) Downloaded 983 times
Congratulation and thanks for MMview and thanks for improving it.MochiMoppel wrote:After covering plain text files, audio/video and - at great length - image files there is one category MMview doesn't yet support: the "raw" display of binary files. Starting with this update I'll add some tools which to my knowledge don't exist in Puppy and which will make the forensic analysis of binary "black boxes" easier.
I also experiment with a multifunctional button, allowing one button to perform up to 9 different actions.
Using it in Quirky Beaver 8.7.1 is a pleasure.
I tried many viewers and in one particular case I found MMview really handy. Newer versions of Firefox browser offer an option to save a web page as a picture and that is often much longer than a single screen size. I found MMview is the best of all viewers that i tried when viewing web page contents saved in picture format. With a single left click inside the picture MMview properly maximizes it to a screen width and shows scrollbar when needed. With another single left click inside the picture MMview restores the picture to a previous size. When viewing a web page picture with MMview I sometimes forget that I’m not working with browser.
From my experience with using MMview there is only one and only issue left to be solved to use it as default viewer and this is:MochiMoppel wrote:In the future I intend to throw in a couple of tips & tricks that I find noteworthy. I might also add some code snippets from my personal edition that will enhance the functionality but which I have no intention to add to the officially posted version.
How to click a file name in Rox and pass it to MMview to open it?
Is there a trick to do that?
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Have fun! I'm sure you will find plenty of room for improvement. And thanks for the encouragement.Lobster wrote: I will be studying the code ...
I'm glad to hear that you like and actually use the script.Leon wrote:From my experience with using MMview there is only one and only issue left to be solved to use it as default viewer and this is:
How to click a file name in Rox and pass it to MMview to open it?
Is there a trick to do that?
I don't quite agree that there is only one issue left
What you describe is not possible with the chooser widget. To be more precise: It would be possible to pass a filename to MMview and show the file content in the viewer, but it would not be possible to select the corresponding filename in the file list programmatically (a limitation of the chooser widget) . This would lead to an irritating status where the viewer content is not the content of the highlighted file in the list. If you are interested in such odd behavior I can provide the code but I don't think that I should implement it. It surely will be perceived as a bug.
My best advise is to keep MMview open and drag the filename from ROX-Filer to the MMview file list. This is the only way to have the chooser widget select a specific file (apart from manual selection). This also changes automatically to the relevant directory. I find this method pretty neat. Too bad that there is no other way to do that.
Thank you for the explanation and for the suggestion.MochiMoppel wrote:What you describe is not possible with the chooser widget. To be more precise: It would be possible to pass a filename to MMview and show the file content in the viewer, but it would not be possible to select the corresponding filename in the file list programmatically (a limitation of the chooser widget) . This would lead to an irritating status where the viewer content is not the content of the highlighted file in the list. If you are interested in such odd behavior I can provide the code but I don't think that I should implement it. It surely will be perceived as a bug.
My best advise is to keep MMview open and drag the filename from ROX-Filer to the MMview file list. This is the only way to have the chooser widget select a specific file (apart from manual selection). This also changes automatically to the relevant directory. I find this method pretty neat. Too bad that there is no other way to do that.
Yes, I’m interested.MochiMoppel wrote:If you are interested in such odd behavior I can provide the code
I could configure Rox right click to open two different versions of MMview.
I agree.MochiMoppel wrote:but I don't think that I should implement it. It surely will be perceived as a bug.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
-
- Posts: 807
- Joined: Mon 12 Oct 2009, 17:11
I am not complaining nor fault-finding. This is only the off the cuff comments of a first time user of mmview.
I confess that I save web pages as html. At least 90% of the files on my system are .html.
It is perhaps logical that mmview shows an .html file in html code format, but unfortunately, most times I would want to see it in a browser.
The middle panel which has a fixed width is invariably too small for the file names. Mochi tries to overcome this by providing tool tips that display the full path. Commendable, but I'd much prefer resizable middle and right panels.
I have mmview.sh in /root/my-applications.bin. Just for the heck of it, I thought I'd allow emelfm2 to call it to display a text file. It did, but emelfm2 showed the following in its output pane.
Mochi, I'm just including this in case you think it is worth your while. No need to pursue on my behalf. A thought came to mind just now. Maybe emelfm2 needs mmview.sh %f. I'll check.
I'll continue to play with it intermittently. Thanks for the contribution.
I confess that I save web pages as html. At least 90% of the files on my system are .html.
It is perhaps logical that mmview shows an .html file in html code format, but unfortunately, most times I would want to see it in a browser.
The middle panel which has a fixed width is invariably too small for the file names. Mochi tries to overcome this by providing tool tips that display the full path. Commendable, but I'd much prefer resizable middle and right panels.
I have mmview.sh in /root/my-applications.bin. Just for the heck of it, I thought I'd allow emelfm2 to call it to display a text file. It did, but emelfm2 showed the following in its output pane.
Code: Select all
>mmview.sh "where_maffs_are (ordered).txt" (16030)
sh: line 3: echo: write error: Broken pipe
I'll continue to play with it intermittently. Thanks for the contribution.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]
MochiMoppel, I now test the Dpup Stretch-7.5 RC4, which has mm-view in the menu. I like it very much! Could you please make room for an About menu item, or include some text elsewhere, showing which version is used?
BTW, I am aware of the date shown in the code and name.
BTW, I am aware of the date shown in the code and name.
True freedom is a live Puppy on a multisession CD/DVD.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
I'm very grateful for Leon's contribution because it pushed me to try again the seemingly impossible: to startup the chooser widget with a specific file and not just with a file's directory. Judging from my conversation with him it seems to work.
Well, I know that it does not always work, but even in cases where it doesn't work the result is better, at least not worse than the current situation.
The solution requires xdotool, a tool that I try to avoid because of its unreliability. Before implementing it into MMview I would appreciate if people try this out and report any bad effects or incompatibilities. Faster machines than mine or newer distribution may have a negative impact.
Basically there is only one line to add at the very end of the script:
I also added a small sleep of 0.2sec. When gtkdialog receives the "map-event" signal the dialog window is not yet displayed, so there is a danger that typing starts before the window is ready. Increasing the sleep may help to make typing more reliable.
No harm is done when xdotool is not installed. MMview will work as before. The line is processed only once at startup and only when a filename was passed. Has practically zero impact on performance.
If this change works reasonably well for most users I see very interesting implications. You can try this by changing line 1193 to
Well, I know that it does not always work, but even in cases where it doesn't work the result is better, at least not worse than the current situation.
The solution requires xdotool, a tool that I try to avoid because of its unreliability. Before implementing it into MMview I would appreciate if people try this out and report any bad effects or incompatibilities. Faster machines than mine or newer distribution may have a negative impact.
Basically there is only one line to add at the very end of the script:
- <action signal="delete-event">lastrites_cleanup save</action>
<action signal="map-event">[[ -f "'$1'" && $(type -p xdotool) ]] && { F="'$1'"; F=${F##*/}; [[ ${#F} == $(printf "$F"|wc -c) ]] && D=12 || D=200; xdotool sleep .2 type --delay $D "$F" && xdotool key Escape F5 ;}&</action>
</window>
I also added a small sleep of 0.2sec. When gtkdialog receives the "map-event" signal the dialog window is not yet displayed, so there is a danger that typing starts before the window is ready. Increasing the sleep may help to make typing more reliable.
No harm is done when xdotool is not installed. MMview will work as before. The line is processed only once at startup and only when a filename was passed. Has practically zero impact on performance.
If this change works reasonably well for most users I see very interesting implications. You can try this by changing line 1193 to
- <action>lastrites_save;exec "$APP_PATH" "$vCHOOSER" &</action>
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Update 2019-07-02 (see also initial post)
Some small changes and fixes.
UTF-16 codepoints
"Convert text string" dialog now also generates each character's Unicode UTF-16 codepoint
Knowing a character's codepoint makes it possible to
1) find the name/meaning/pronunciation of this character and many more characteristics. Just input the codepoint in its usual notation U+nnnn into any internet search engine.
2) type the character on the keyboard. E.g. to produce the first letter in the screenshot type Ctrl+Shift+U223c
Note that a Unicode character's bytestring (e.g \xe2\x8b\x83) is also important because it makes it possible to
1) count a character's bytes
2) search/replace this character with command line tools like sed
3) print this character (e.g. using echo command: echo -e '\xe2\x8b\x83') even in older bash versions
File selection with xdotool
Explained in previous post. I didn't receive any complaints and take it as an indication that I can savely add it to the code.
Tooltip bug
Seems to be yet another bug in JWM2.3. The "tooltip" in text fullscreen mode is actually a gtkdialog window. I invented this "fake" tooltip because I found the normal tooltip too annoying as there would be no way to make it disappear in fullscreen mode. The window is supposed to close when it loses focus, e.g. when user clicks anywhere outside the tooltip, latest when the user right-clicks to leave fullscreen mode. In JWM 2.3 it doesn't and the tooltip stays on while in older versions and perhaps in other window managers it works correctly. As a workaround the tooltip now appears under the mouse pointer and does not rely anymore on the "focus-out-event" signal
Other changes
- Fixed an issue with junk metadata in raw images produced by Canon EOS 750D
- Last used directory and window size now always and "officially" saved on exit (was supposed to be saved only when user closed with Ctrl+Q or Quit button and worked this way in earlier versions. A bug caused the current "always save" behavior and I figured that some users may like it this way).
Some small changes and fixes.
UTF-16 codepoints
"Convert text string" dialog now also generates each character's Unicode UTF-16 codepoint
Knowing a character's codepoint makes it possible to
1) find the name/meaning/pronunciation of this character and many more characteristics. Just input the codepoint in its usual notation U+nnnn into any internet search engine.
2) type the character on the keyboard. E.g. to produce the first letter in the screenshot type Ctrl+Shift+U223c
Note that a Unicode character's bytestring (e.g \xe2\x8b\x83) is also important because it makes it possible to
1) count a character's bytes
2) search/replace this character with command line tools like sed
3) print this character (e.g. using echo command: echo -e '\xe2\x8b\x83') even in older bash versions
File selection with xdotool
Explained in previous post. I didn't receive any complaints and take it as an indication that I can savely add it to the code.
Tooltip bug
Seems to be yet another bug in JWM2.3. The "tooltip" in text fullscreen mode is actually a gtkdialog window. I invented this "fake" tooltip because I found the normal tooltip too annoying as there would be no way to make it disappear in fullscreen mode. The window is supposed to close when it loses focus, e.g. when user clicks anywhere outside the tooltip, latest when the user right-clicks to leave fullscreen mode. In JWM 2.3 it doesn't and the tooltip stays on while in older versions and perhaps in other window managers it works correctly. As a workaround the tooltip now appears under the mouse pointer and does not rely anymore on the "focus-out-event" signal
Other changes
- Fixed an issue with junk metadata in raw images produced by Canon EOS 750D
- Last used directory and window size now always and "officially" saved on exit (was supposed to be saved only when user closed with Ctrl+Q or Quit button and worked this way in earlier versions. A bug caused the current "always save" behavior and I figured that some users may like it this way).
- Attachments
-
- UTF-16_codepoints.png
- (49.36 KiB) Downloaded 467 times
Thanks for the update to MMview.
For your consideration, it seems recent Woof-CE builds have Busybox v1.30.1 and the usage syntax has changed for the 'timeout' utility -- i.e., the -t switch is no longer supported (replaced by the standalone numerical value for seconds).
BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary.
Usage: timeout [-t SECS] [-s SIG] PROG ARGS
MMview line #230: MESSAGE=$(busybox timeout -t1 du -hs "$vCHOOSER")
BusyBox v1.30.1 (2019-04-24 21:49:26 UTC) multi-call binary.
Usage: timeout [-s SIG] SECS PROG ARGS
MMview line #230: MESSAGE=$(busybox timeout 1 du -hs "$vCHOOSER")
https://github.com/puppylinux-woof-CE/w ... 225a9415b8
Best Regards
For your consideration, it seems recent Woof-CE builds have Busybox v1.30.1 and the usage syntax has changed for the 'timeout' utility -- i.e., the -t switch is no longer supported (replaced by the standalone numerical value for seconds).
BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary.
Usage: timeout [-t SECS] [-s SIG] PROG ARGS
MMview line #230: MESSAGE=$(busybox timeout -t1 du -hs "$vCHOOSER")
BusyBox v1.30.1 (2019-04-24 21:49:26 UTC) multi-call binary.
Usage: timeout [-s SIG] SECS PROG ARGS
MMview line #230: MESSAGE=$(busybox timeout 1 du -hs "$vCHOOSER")
https://github.com/puppylinux-woof-CE/w ... 225a9415b8
Best Regards
[color=blue][b][url=http://www.smokey01.com/radky/PupMates.html]PupMates[/url][/b][/color]
I just downloaded version 20190702.gz but seem unable to find how/where to activate "view hidden files".
I am pretty sure I have used it in previous versions (within "view" menu i thought) but cannot see it now.
Any tips please?
cheers!
EDIT : Sorry - ignore that request. I had not maximised the mmview window so had no whitespace within the file list to rightclick anywhere.
EDIT 2 : Actually - now that I have clicked "show hidden files" I now have no way to see any whitespace to turn "show hidden files" off.
Any way to include that option in the "View" menu?
I am pretty sure I have used it in previous versions (within "view" menu i thought) but cannot see it now.
Any tips please?
cheers!
EDIT : Sorry - ignore that request. I had not maximised the mmview window so had no whitespace within the file list to rightclick anywhere.
EDIT 2 : Actually - now that I have clicked "show hidden files" I now have no way to see any whitespace to turn "show hidden files" off.
Any way to include that option in the "View" menu?
- Attachments
-
- no_whitespace_in_filepane.jpg
- (57.27 KiB) Downloaded 284 times
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
@radky: Oh boy. That has the potential to break every existing script using the timeout command. In almost all Puppies timeout is symlinked to busybox, requiring the now defunct -t option.
I'll adjust MMview to make it compatible with whatever busybox version is used:
@greengeek: Why would you need whitespace? Just rightclick any item in the list.
I'll adjust MMview to make it compatible with whatever busybox version is used:
Code: Select all
[[ $(busybox timeout 2>&1) = *-t* ]] && export TOPT=-t
.
.
MESSAGE=$(busybox timeout $TOPT 1 du -hs "$vCHOOSER")
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
I bet hardly anybody has an idea what else is possible.greengeek wrote:Ahhh yes. My apologies. I had no idea that was possible.
The GtkFileChooserDialog contains lots of built in but poorly documented keyboard shortcuts.
For example Ctrl+H toggles "View hidden files" on/off (this shortcut is now "taken" in MMview by the hexdump command, but I think I should restore it with the next update. You can still try it in older versions or in Geany's "Open" dialog).
Or try Alt+Home. Or avoid Alt+S (opens Search box... I should block it).
My favorite is F8, followed by any of keys Up,Down,Left,Right,Home,End,PageUp,PageDown. Neat, isn't it? Not extremely useful, but it shows how the developers of GTK -sometimes - care for details.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
With a properly designed GTK theme you would immediately see something just by pressing F8, without pressing some of the arrow keys I mentioned.tallboy wrote:Uhh, what should happen when F8 is pressed, followed by an arrow key?
Your chooser would have a separator between the left "Places" pane and the file tree with a dotted handle in the middle. This separator would get focus and you should see it because its color changes. Figuring then out what the arrow keys are supposed to do is not difficult.
With an inferior theme you will see nothing.
Are you by any chance using the "Polished-Blue" theme? The author ("I don't know a ton about gtk themes") managed to eliminate the handle and the visible focus change indicator.
To get the handle back delete or comment out the lines
Code: Select all
image
{
function = HANDLE
file = "bump.png"
border = { 2, 2, 2, 2 }
stretch = TRUE
}