The time now is Sun 15 Dec 2019, 15:30
All times are UTC - 4 |
Page 12 of 21 [309 Posts] |
Goto page: Previous 1, 2, 3, ..., 10, 11, 12, 13, 14, ..., 19, 20, 21 Next |
Author |
Message |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1948 Location: Japan
|
Posted: Wed 13 Sep 2017, 09:03 Post subject:
|
|
Update 2017-09-13 (see also initial post)
Command line should now work with every Puppy. VTE support has been removed.
This has some advantages:
- Command output in normal text viewer pane often easier to read
- No cutting of output when maximum history lines reached
- Copy & Paste works with familiar shortcuts
Open with last command
That's an option I miss in ROX-Filer. Opens the Commandbox with the last used command instead the default ' $@ '
Command history
ROX-Filer (and every terminal) lets the user scroll through the command history with the Up arrow key.
Theoretically this could be implemented in MMview but would require elaborate code as gtkdialog does not support such behavior. Instead I opted for a lighter and IMO better solution: When the commandbox has focus, pressing Up arrow key will display the command history in the viewer pane. Picking a command from the history involves
- Triple click on command (selects whole line)
- Clean commandbox (by clicking on Clean button at right end of commandbox)
- Middle click in commandbox (pasting selection)
Command templates
I tried to create a user configurable "Frequently Used Commands" menu. Can be done but lacks simplicity. Instead I recommend to create a text file with useful commands, put this file into its own directory and then bookmark this directory. The screenshot shows my oneliners directory as first in the bookmarks list. Clicking on the bookmark will show the contents of the first (= only) file of this directory in the viewer pane. From there I can pick a command just like picking from the command history. Very low-tech but efficient.
As an example the screenshot shows the output of the command
Code: | stat -c $'CHANGED:\t%z\nMODIFIED:\t%y\nACCESSED:\t%x\n' "$@" | sed "s/\..*$//; s/$(date +%Y-%m-%d)/today_____/" | Executing this command with F4 key allows to view comprehensive filedate info for any selected file/directory, much better than chooser's dismal "Modified" column.
Many more oneliners and of course scripts are possible, eventually turning MMview into a customized file manager.
Of course the commandbox can execute any command, not just those related to the selected file. It's very useful for testing and fine-tuning commands since the commands don't scroll away in a convoluted mix of command input and output like in a conventional terminal emulator.
Description |
|
Filesize |
80.22 KB |
Viewed |
1109 Time(s) |

|
Last edited by MochiMoppel on Mon 18 Dec 2017, 21:46; edited 1 time in total
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1948 Location: Japan
|
Posted: Fri 20 Oct 2017, 00:30 Post subject:
|
|
Update 2017-10-20 (see also initial post)
At the start of this thread I was a bit reluctant to implement image scaling. Now I find the 2 available image modes not sufficient. For serious image examination the viewer pane is too small. With this update I introduce quick access to fullscreen display.
Fullscreen modes
A single click on the viewer pane is all it takes to view an image fullscreen (and another click closes fullscreen). Leftclick displays the image in its original size, rightclick fits the image to the screen. Beware that fit-to-screen always tries to fill the screen, i.e. small images will be enlarged.
It is possible to switch between 100% size and fit-to-screen size while in fullscreen mode. Tooltips explain the options.
Description |
|
Filesize |
43.36 KB |
Viewed |
993 Time(s) |

|
Last edited by MochiMoppel on Mon 18 Dec 2017, 21:43; edited 2 times in total
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1749
|
Posted: Fri 20 Oct 2017, 05:42 Post subject:
|
|
Hey Mochi
Just tried the new version in FD and there's a couple of minor issues.
1. The fullscreen doesn't work for me with Compiz.
Quote: | Compiz Error
Exceeded max texture size |
Can be fixed by using the actual dimensions (SCREEN_W & SCREEN_H), instead of 9999x9999.
As for the panel being visible in fullscreen, it's actually not visible in Compiz and Openbox, so far only JWM resists.
But it also can be fixed without the need of wmctrl, by using:
Code: | <window type-hint="6" | https://developer.gnome.org/gdk3/stable/gdk3-Windows.html#GdkWindowTypeHint
2. When I was playing with the above, I switched to another VT and logged-in as a regular user, and noticed that there's still a problem with multiuser-friendliness.
When I launch MM as root, it creates a temp directory /tmp/mm_view with write permissions only for root, so when I run it as a regular user (later or simultaneously), mm_view can't write to that dir.
What about, e.g.:
Code: | TEMPDIR=/tmp/mm_view.${USER} | ?
Thanks &
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1948 Location: Japan
|
Posted: Sat 21 Oct 2017, 23:28 Post subject:
|
|
@SFR: Thanks for your feedback. Very much appreciated.
Quote: | 1. The fullscreen doesn't work for me with Compiz .... Can be fixed by using the actual dimensions (SCREEN_W & SCREEN_H), instead of 9999x9999. | My reason for using 9999: Setting default-height to exact screen height will place bottom part, incl. any horiz. scrollbar, *under* JWM tray, making scrollbar inaccessible. Increasing default-height by only 1 px will put scrollbar above tray, thus value 9999 should be a safe bet until wall size monitors become affordable. JWM is prepared, Compiz is not
Fortunately type-hint="6" makes these deliberations obsolete. I've never had much luck with type-hint since most values change nothing (in JWM) and I had given up trying to get any use out of this attribute. Good to hear that setting the window's property to _NET_WM_WINDOW_TYPE_DOCK works in JWM, Compiz and Openbox. This means that I can remove not only wmctrl support but also the decorated="false" attribute, right?
One annoyance remains: With <vbox scrollable="true"> gtkdialog adds scrollbars even for images that would perfectly fit on the screen without them. If image's size is within 16px of the screen size (= double scrollbar width), scrollbars appear, and their only purpose is to make the image portion viewable that is covered by the scrollbar... Is there any workaround for that?
Quote: | When I launch MM as root, it creates a temp directory /tmp/mm_view with write permissions only for root, so when I run it as a regular user (later or simultaneously), mm_view can't write to that dir | Would it help to create the directory with world write permission? And would there be a way to let any file newly created in that directory inherit this permission? In principle I have no objection to add the user name but I would find it neater to avoid multiple directories.
|
Back to top
|
|
 |
SFR

Joined: 26 Oct 2011 Posts: 1749
|
Posted: Sun 22 Oct 2017, 08:49 Post subject:
|
|
Quote: | I can remove not only wmctrl support but also the decorated="false" attribute, right? |
Yep.
Quote: | Is there any workaround for that? |
Here's what I came up with so far. Comments explain everything, I hope:
Code: | #!/bin/sh
# path to a "fullscreen" image
IMG=
read W H <<< `xwininfo -root | awk 'NR>=8&&NR<=9 {print $2}'`
# works with & without geometry (see below) if we invoke it as a separate instance instead of using 'launch' command
# <action>gtkdialog -p IMAGE_WINDOW_NORMALSIZE</action>
export MAIN='
<button>
<label>Show image</label>
<action>launch:IMAGE_WINDOW_NORMALSIZE</action>
</button>'
export IMAGE_WINDOW_NORMALSIZE='
<window type-hint="6" border-width="0" width-request="'${W}'" height-request="'${H}'">
<eventbox>
<vbox scrollable="true" shadow-type="0" width="'${W}'" height="'${H}'">
<pixmap space-expand="true" space-fill="true">
<input file>'${IMG}'</input>
</pixmap>
</vbox>
</eventbox>
<variable>IMAGE_WINDOW_NORMALSIZE</variable>
<action signal="button-press-event" condition="command_is_true( [[ $PTR_BTN == [12] ]] && echo true )">closewindow:IMAGE_WINDOW_NORMALSIZE</action>
</window>
'
# doesn't work with geometry, but works without it:
gtkdialog -p MAIN
#gtkdialog -p MAIN -G 100x100+0+0 |
Quote: | Would it help to create the directory with world write permission? And would there be a way to let any file newly created in that directory inherit this permission? |
Theoretically using ACL:
https://unix.stackexchange.com/questions/1314/how-to-set-default-file-permissions-for-all-folders-files-in-a-directory
but the '-d' (default) option gives 'operation not supported' in FD...
Quote: | In principle I have no objection to add the user name but I would find it neater to avoid multiple directories. |
You can always have one main dir (/tmp/mm_view) that has 777 and then one subdir per user.
Greetings!
_________________ [O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1948 Location: Japan
|
Posted: Wed 25 Oct 2017, 22:35 Post subject:
|
|
SFR wrote: | Here's what I came up with so far. |
Brilliant ! We enter the wonderful world of scrollable boxes. Suddenly shadow-type, width and height work as advertised. There is a lot the documentation is not telling us. I also noticed that mouse clicks are recognized, so no need anymore for eventboxes.
Yeah, the --geometry option is fine as long as no child windows are launched. This option offers more pain than gain. I was already planning to remove the ability to save the last window position. Now I have one more reason.
Speaking of minor issues: In the newest version I invoke the GUI with exec gtkdialog. Exported variables and functions are pretty big, so I figured it would be a good idea to kill the invoking shell and free the environment from unneeded stuff. Unfortunately this also ends trap and temp files are not cleaned up anymore. I will have to entrust the GUI with the clean-up job.
Normally I prefer to pipe the GUI description to gtkdialog with the -s switch, which would avoid to create a big variable for the main dialog, but this method seems to be unpopular (any disadvantages?) and in case of MMview would solve only part of the problem.
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1948 Location: Japan
|
Posted: Thu 09 Nov 2017, 00:57 Post subject:
|
|
Update 2017-11-09 (see also initial post)
This (hopefully) fixes the issues discussed before and adds a still missing feature.
Fullscreen text
With this new feature any content of the viewer pane can now be displayed fullscreen by right clicking the viewer pane.
A second right click brings the user back to normal mode.
Minor changes
- Multiuser support (thanks SFR)
- Multiple instances support
- Better support for window managers other than JWM (thanks SFR)
- Better display of fullscreen images (thanks SFR)
- Viewer pane background clickable
- Dead link targets displayed in statusbar (requires GNU readlink)
- Better dialog positioning
- Ability to save last window position removed
- Minimal obstructive show-only-once tooltip in fullscreen text
- Revised tooltip texts
- Improved code folding (in Geany)
- Improved memory management
Description |
|
Filesize |
63.14 KB |
Viewed |
804 Time(s) |

|
|
Back to top
|
|
 |
festus

Joined: 14 Jan 2015 Posts: 222
|
Posted: Mon 18 Dec 2017, 11:02 Post subject:
|
|
Hello, MochiMoppel
The last couple of days I've been using "mm_view_20171109" in slacko-700-RC3, with much satisfaction.
For my ease of use, I made it into a pet-package, with its category as "Filesystem".
One thing I do miss is the ability to "right-click, open with" certain apps like pupMD5sum for instance. And other context menu choices.
Another feature that would be helpful, imho, would be, File>New Tab, and perhaps, File>New Window.
The more I use it, the more I like it.
Thank you for creating and working on this useful viewer/filemanager.
bliss,
festus
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1948 Location: Japan
|
Posted: Tue 19 Dec 2017, 21:37 Post subject:
|
|
festus wrote: | The last couple of days I've been using "mm_view_20171109" in slacko-700-RC3, with much satisfaction. | Thank you very much for testing. My old hardware doesn't allow me to test in the latest Puppies, so I particularly appreciate feedback from cutting-edge users. I'm glad to hear that you like it.
Quote: | One thing I do miss is the ability to "right-click, open with" certain apps | I don't Quote: | like pupMD5sum for instance | I don't know this app. If all you need is to know the md5sum: Shortcut Shift+!, type md5sum, press Enter Quote: | And other context menu choices. | Such as?
Quote: | Another feature that would be helpful, imho, would be, File>New Tab, | Tab? Where do you miss tabs? Quote: | and perhaps, File>New Window. | Window of File? You can create a new window of MMview by starting a new instance.
Coming back to Rightclick menu, as it has been requested before: Do you mean Rightclick (with its MIME sensitive options on top) or Shift+Rightclick (the OpenWith submenu with its big section of context and MIME insensitive options)? In other words, if you look at this screenshot, the red part or the green part?
|
Back to top
|
|
 |
festus

Joined: 14 Jan 2015 Posts: 222
|
Posted: Thu 21 Dec 2017, 11:12 Post subject:
|
|
Ok, thanks for the reply.
I am using MMview more now and have gotten more used to to its operation steps, and I like using it very much.
I use it successfully in slacko-6999 & Xenial-7.5(32 & 64 bit)
Thanks and peace to you, my brother MochiMoppel.
bliss,
festus
|
Back to top
|
|
 |
hamoudoudou
Joined: 24 Jul 2014 Posts: 1467 Location: rabat
|
Posted: Fri 05 Jan 2018, 02:53 Post subject:
This app can be very useful .. Mt jumps to MTpaint.. |
|
wonderful ! lost in the dpup stretch menu MMview, what is that.. i am curious..
This app can be very useful .. Mt jumps to MTpaint..
They are so many apps that we even never use...
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1948 Location: Japan
|
Posted: Wed 17 Jan 2018, 09:46 Post subject:
|
|
Update 2018-01-17 (see also initial post)
Some more supported file formats and a - still modest - toolbar
EPUB format for eBooks
This turns MMview into a poor-man's eBook reader.
Selecting an epub file will display some of the eBook's metadata (if provided): Title, Author, Description.
Pushing F1 will open a dialog with a list of all (HTML) files contained in the epub archive. The user may pick a file from this list, which MMview will extract and display in the viewer pane.
Image formats ANI and PCX
With the addition of ANI (animated cursor) and PCX MMview now covers all (?) image formats natively supported by gtkdialog.
These are the formats supported. When extensions are added to the formats they are mandatory (but not case sensitive). Most formats are detected even without an extension.
ANI.ani
BMP
GIF
ICO
JPEG
PCX.pcx
PNG
SVG.svg
TIFF
XPM.xpm
Toolbar
There is no interface to add/remove/manage buttons in this toolbar (and probably never will), but it's easy to edit the TOOLBAR variable in the script (currently line 822)
I seldom use icons and buttons since I prefer keyboard shortcuts so I don't know which buttons would be most suitable for a toolbar. Basically any menu item can be added. I think some more would be OK (which ones?), but I also want to avoid clutter.
Other changes
- Shift+click is gone! I liked this feature to open the default editor but I never liked the code involved to achieve a mouse+keyboard binding, which is not supported in gtkdialog. Now with a button in the toolbar I decided to clean the code. Three different ways to open an editor is enough, no need for a fourth option.
- HTML conversion now supports the <pre> tag
- changed menu 'Exit' and button 'Close' to more commonly used 'Quit'
 |
Description |
|
Filesize |
107.51 KB |
Viewed |
453 Time(s) |

|
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1948 Location: Japan
|
Posted: Fri 23 Feb 2018, 22:26 Post subject:
|
|
I have a strange problem: I can't view a text file when the file contains only 1 byte, e.g. number 0~9.
For such files the file command reports MIME application/octet-stream. MMview ignores this type as it typically indicates binary file content. ROX correctly reports a 1 byte text file as text/plain.
Is anyone able to view a 1-byte text file, probably with a better version of the file command?
|
Back to top
|
|
 |
greengeek

Joined: 20 Jul 2010 Posts: 5624 Location: Republic of Novo Zelande
|
Posted: Sat 24 Feb 2018, 02:36 Post subject:
|
|
I seem to have no problem here (on a Slacko 5.6 derivative). I assume you mean:
- create a text file (i used leafpad) containing a single digit (i entered the digit "1")
- Read that text file using the latest MMview version.
(MMview used Geany to open the file)
Seems to work fine.
Description |
|
Filesize |
87.85 KB |
Viewed |
343 Time(s) |

|
|
Back to top
|
|
 |
step
Joined: 04 May 2012 Posts: 1226
|
Posted: Sat 24 Feb 2018, 15:11 Post subject:
|
|
This is on Fatdog64-721:
Code: |
# cd /tmp
# printf 0 > testfile
mm_view . &
# rox -m testfile
text/plain
# file testfile
testfile: very short file (no magic)
|
mm_view shows and empty pane and detects:
/tmp/testfile │ application/octet-stream; charset=binary
But
Code: |
# printf "0\n" > testfile2
# rox -m testfile2
text/plain
# file testfile2
testfile2: ASCII text
|
mm_view shows "0" and detects:
/tmp/testfile2 │ text/plain; charset=us-ascii
_________________ Fatdog64-810|+Packages|Kodi|gtkmenuplus
|
Back to top
|
|
 |
|
Page 12 of 21 [309 Posts] |
Goto page: Previous 1, 2, 3, ..., 10, 11, 12, 13, 14, ..., 19, 20, 21 Next |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|