How to show MRU Most Recently Used Documents on Start Menu?

Booting, installing, newbie
Message
Author
musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#31 Post by musher0 »

Hi, folks.

Already an update. This one is good for monocores.

The only change is that the full path of the opera history file is searched
only the first time, and then saved to a temp file. The next times, the
script looks for this temp file instead of doing a full find procedure. It
saves a couple of seconds every time, in other words the menu shows
up immediately after the initial run hic-cup.

Notes concerning the pic.
* If you've cleaned your opera history, this is how the menu will look.
And that's fine.

* If you create or edit a "new" pic with mtpaint (if mtpaint thinks it's new),
the name of the pic will go in Miss X. Belle's log. So here you have two
mentions of a defaultmediaplayer picture, one from Miss Belle's log, the
other one from mtpaint's history. And that's fine.

General note :
I still need translators for those strings. Anyone hearing the "calling"? :)
Thanks in advance.

BFN.

musher0

~~~~~~~~~~~~~

Code: Select all

#!/bin/sh
# ~/my-applications/ae/MRUD-lst.sh
#
# Réf./Ref. : openbox.org/wiki/Openbox:Pipemenus:recentfilesxbel
# Merci au groupe openbox et à stu91 du forum Puppy pour le tuyau.
#
# Adapté(ed) par / by musher0 pour / for aemenu, fin /end of oct. - début /beg. of nov. 2012
# Rév. : 15 oct. 2013, 16 nov. 2013 (MRUD-lst.sh, v. 0.3)
# Rév. : 11 juin / June 2014 (v.0.4a; this version)
#
# Dé(e)penda(e)nc(i)es : aemenu, replaceit & ~/.local/share/recently-used.xbel or /ou ~/.recently-used.xbel
#
# Other / Autres : opera & mtpaint
# Will work without those two, but warnings will appear. /
# Va fonctionner sans, mais des avertissements s'afficheront.

####

# Préparation pour aemenu
export AEM="/root/my-applications/ae"
[ ! -d $AEM ] && mkdir $AEM
# pour .recently-used.xbel
[ ! -f /root/.recently-used.xbel ] && ln -s /root/.local/share/recently-used.xbel /root/.recently-used.xbel
# Langues (pour le titre)
case ${LANG%_*} in
	 ca) DOCREC="Documents recents"
	 	EFF="Erase this list"
		EDT="Edit this menu";;
	 en) DOCREC="Recent Documents"
		EFF="Erase this list"
		EDT="Edit this menu";;
	 es) DOCREC="Documentos recientes"
	 	EFF="Erase this list"
		EDT="Edit this menu";;
	 fi) DOCREC="Viimeisimmät tiedostot"
	 	EFF="Erase this list"
		EDT="Edit this menu";;
	 fr) DOCREC="Documents récents"
		EFF="Effacer la liste"
		EDT="Éditer ce menu";;
#	 gr) DOCREC="Π
Attachments
MRUD-lst.sh.zip
Same script as above, zipped.
(2.71 KiB) Downloaded 304 times
recents(edited).jpg
(17.24 KiB) Downloaded 530 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#32 Post by Puppus Dogfellow »

no response from script on a precise 5.5 install (earlier version just correctly opened a docx file)

musher, is the browser history part necessary? the browsers themselves can manage that... i'd rather have access to recently opened files and folders regardless of their classification...

not sure if that makes your workload any easier, though. so xbel doesn't list all you've opened or visited? ...guess it's sort of interesting to see what i was looking at the last time i used opera...

...take it back. it just popped up after a big delay. it's much slower than earlier versions but it's asking me about run actions, which is an improvement...subsequent activations are quicker...isn't aware of many existing set run actions or they've been lost some how...will fiddle around with it more later...

:D

...appears to be working flawlessly in precise 5.7.1...and precise 5.5.

performance in 5.6.1 is much improved, but it still seems to not keep track as well as in 5.5. or 5.7.1...some recently visited files (.xbel and .xml) didn't show up on the list...and it warned me it wouldn't work if i didn't have opera set as my default browser. no such warning with 5.5 or 5.7; i suppose i have chrome set as default in the former because that's what it used to open the links...pretty sure the other two are set to firefox...nope, 5.7.1 is set as seamonkey...links didn't show up as an option in 561...maybe it's a firefox thing (that one is definitely set to FF as default browser).

on the subject of browsers, i think a favorites section on the list would be better for most users. the history part is largely redundant and this way you get to set five or so home pages; comment the script so that users could just enter their choice of browser and site in the appropriate space. it makes it feel more like a tool and less like something that's checking up on you that way.

my two cents. i'm already pretty pleased with it. gave it an icon (going on the menu eventually) and everything.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#33 Post by musher0 »

Many thanks for the feedback, Puppus_D.

I might just remove the "not-opera" warning... If the default browser does
not have a +/- plaint text type history, I might just skip the section. Then,
there will be less question marks blinking above the user's head.

Adding a favorites section is already possible in aragon's take on aemenu
(he called it "Simple Puppy Menu 3" [not sure about the version number,
it's been awhile]). Maybe I could import / adapt that.

So it would become a "Recents and Favs" panel, eh?! We're getting
windowish, now, aren't we? :D

Nice thought, psychologically, adding a "Favorites" section. Thanks for the
idea.

TWUL.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#34 Post by Puppus Dogfellow »

musher0 wrote:Many thanks for the feedback, Puppus_D.

I might just remove the "not-opera" warning... If the default browser does
not have a +/- plaint text type history, I might just skip the section. Then,
there will be less question marks blinking above the user's head.

Adding a favorites section is already possible in aragon's take on aemenu
(he called it "Simple Puppy Menu 3" [not sure about the version number,
it's been awhile]). Maybe I could import / adapt that.

So it would become a "Recents and Favs" panel, eh?! We're getting
windowish, now, aren't we? :D

Nice thought, psychologically, adding a "Favorites" section. Thanks for the
idea.

TWUL.

musher0
you're welcome for the feedback, musher. i like the script and use it often. i have discovered, i think, the reason why it seemed to perform so inconsistently for me at times--it can't handle files or folders with spaces in the name. is this correct?

i was about to write that the favorites aspect can be taken care of through "editer ce menu," but the text editor just failed to open when i clicked it on my 561 machine. doesn't have that problem on the precise 5.5 and 571 installations...

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#35 Post by musher0 »

Hmm... You have an "Editer ce menu" entry in your Recent menu?

The script is supposed to recognize the LANG variable of the user.
If you have en_US or en_UK, etc. the entry should read "Edit this menu"...

Please do an

Code: Select all

echo $LANG
in a terminal on your machine and tell me the results. Thanks.

I should have a "Tower of Babel" machine.... But I know only
English and French. Shucks. :)

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#36 Post by Puppus Dogfellow »

musher0 wrote:Hmm... You have an "Editer ce menu" entry in your Recent menu?

The script is supposed to recognize the LANG variable of the user.
If you have en_US or en_UK, etc. the entry should read "Edit this menu"...

Please do an

Code: Select all

echo $LANG
in a terminal on your machine and tell me the results. Thanks.

I should have a "Tower of Babel" machine.... But I know only
English and French. Shucks. :)

musher0
en_US.UTF-8

erase and recent are in english. an older version had the former as effacer cette liste (or something like that--my french is quite poor :lol: ).

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#37 Post by musher0 »

Thanks, Puppus_D. I'll rework that.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#38 Post by musher0 »

There you go, Puppus_D.

Version 04b. I had forgotten to insert the proper variable at the "edit this menu" line. I apologize for any inconvenience.

BFN.

musher0
Attachments
MRUD-lst-04b.sh.zip
Variable entries should now show up properly in French and English.
There is still a need for translators for the other Western languages,
though. Thanks in advance.
(2.72 KiB) Downloaded 275 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#39 Post by Puppus Dogfellow »

musher0 wrote:There you go, Puppus_D.

Version 04b. I had forgotten to insert the proper variable at the "edit this menu" line. I apologize for any inconvenience.

BFN.

musher0
musher, can you confirm what i wrote about the spaces in the file names?

the french is actually less of an inconvenience...
:)

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#40 Post by Puppus Dogfellow »

mrudicon.png

made an icon for your script, musher0. bleu, blanc, et rouge in honor of your province and my favorite hockey team. transparent background, r and d for recent documents. easily converted back to invisible template with mtpaint for any who like the script but not the icon.

:)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#41 Post by musher0 »

Hi, Puppus_D.

Thanks for the icon. How do you download it? It seems to be embedded
in a flash thing? Opera says it can go back or forward, but not save it?

In any case, I appear to be idle, but I'm not. I have had power supply
problems on my back-up computer. I learned to unmount it and clean it.
It partially worked (the heat went down), but I finally decided to install a
brand new one because a shaky power supply is a fire hazard. Learned a
couple of things in the process, including demystification of the power
supply box! (It's so easy to change when you know how!)

Back to "Recents": I don't know how useful that would be, but I was
thinking of adding the recent bash history as well, so that the user can
recall terminal scripts and such.

BFN.

musher0
Last edited by musher0 on Wed 22 Apr 2015, 21:36, edited 1 time in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#42 Post by Puppus Dogfellow »

musher0 wrote:Hi, Puppus_D.

Thanks for the icon. How do you download it? It seems to be embedded
in a flash thing? Opera says it can go back or forward, but not save it?

In any case, I appear to be idle, but I'm not. I have had power supply
problems on my back-up computer. I learned to unmount it and clean it.
I it partially worked (the heat went down), but I finally decided to install a
brand new one because a shaky power supply is a fire hazard. Learned a
couple of things in the process, including demystification of the power
supply box! (It's so easy to change when you know how!)

Back to "Recents": I don't know how useful that would be, but I was
thinking of adding the recent bash history as well, so that the user can
recall terminal scripts and such.

BFN.

musher0
i was thrown off on how to download an image from google drive at first as well--the interface is different for some reason. you should be seeing a down arrow in the upper left--that's what you click to get the option to either download or (sometimes?) open with an external program.

the separate script entry is a cool idea--i actually found myself opening scripts with geany to be able to activate them from your program--as long as the script's permissions are set to execute, it works. i haven't yet tried to shift + click them to see if they open as text, which is default rox behavior, if i'm not mistaken. a separate entry makes all that all easier and more intuitive, so go for it. the more you get into puppy and use it, the more you see how great these little additions are and the more you come to rely on them (and the more they pile up). a user who hasn't yet gotten into the habit of scouring for convenience, so to speak, wouldn't be adversely affected. other than the work you personally would have to do, i see no downside.

:)

and you're welcome for the icon--thank you for the script.

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#43 Post by johnywhy »

Hello, using xfce now. Some xfce puppies have the MRU, but not Carolina-Vanguard-R2.
http://murga-linux.com/puppy/viewtopic.php?t=96863

Anyone know how to add it? The MRU menu is available in the xfce places plugin, which is available by itself, or (i believe) part of the xfce goodies package.
http://www.linuxquestions.org/questions ... ce-711915/
http://goodies.xfce.org/projects/panel- ... ces-plugin

Anybody know how to install either the places plugin or the goodies package on Carolina pup?

EDIT: Never mind, it's already available in the "Places" panel widget on Vanguard :)

Thx!
[b]Now[/b]: X-Tahr 2.0! StretchDog! DevuanDog!
[b]Tops[/b]: TarhNOP Vlina-R2 Racy
[b]Used[/b]: Puppeee Precise Lucid Wary Tahrpup Quirky Slacko MacPup Saluki Puppy Studio LxPupTarh Lina-Lite Lina
[i]i ♥ Puppy[/i]

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#44 Post by musher0 »

Hello all.

Please find attached a completely redone script to display and recall your
most recent files and directories.


In this version, I focused on files, but in so doing I discovered an easy
way to also access a good many of the directories we have used recently.
I tried to illustrate that in the screen captures.

A lot is new:
  • -- use of vovchik's remake of aemenu (with pango, which allows colors
    and spacings, and not only various fonts but also various weights and
    sizes of fonts.

    -- presented in sub-folders (please see screen caps) instead of in one go

    -- help message and description

    -- some theming -- from dark to clear and vice versa

    -- calling of GTK-chtheme as needed

    -- harmonization with my Weather-in-the-World and DefaultMenu scripts
    (but you don't need those two other scripts to use this MRUF/MRUD utility)

    -- access and display of the bash history in less. From there, you can use
    less's "bang" feature (shift-!) to recall them in a less window, on the spot

    -- access and display of the mtpaint history

    -- apps contained in the "xbel" history presented in their own sub-menu

    -- possibility to clean up history files from: "xbel", mtpaint , bash, even
    the old opera (+/- v. 12.16), independently from one another.
Speaking of browsers, I looked for a way to access the history files of
the Mozilla family of browsers from the outside. It's possible, but requires
a sqlite engine, which I thought was too involved for a simple script like
this. The moral of this story is that the best way to clean up your Firefox,
Pale Moon or SeaMonkey histories is from within those browsers, IMO.

Please test and tell me what you think. Although I invested a lot of time
and research in this script, there is still room for improvement, no doubt.

About the pet archive:
-- AFAIK, all the dependencies are in it.
-- At installation time, an icon for the MRUF-lst script is placed
automatically in the middle of your desktop. You can then drag it
wherever you wish.

Finally, a word to WhineDose refugees: all things considered, this script
does a good job, IMHO, of jogging your memory and Puppy's, about your
recent ramblings. But do not expect it to behave in a way even remotely
similar to the "Recents" utility that exists on WhineDose. It's a different
approach, and... Linux IS NOT WhineDose!

Enjoy! :)

~~~~~~~~~~
P.S. The 0.6 version that was here has been updated to the 0.7 version,
which is on the next page, 3-4 posts down. The general appearance has
not changed however, so the screenshots are still valid. BFN. musher0
Attachments
MRUF-lst_2016-09-04.jpg
The "General" sub-menu extracted from "xbel" history file. Shows 18 files,
and then also extracts the directories for easy access.
(92.78 KiB) Downloaded 261 times
MRUF-lst_2016-09-04(1).jpg
Same, but for pictures that you have loaded in mtpaint
(48.59 KiB) Downloaded 252 times
MRUF-lst_2016-09-04(2).jpg
A short help paragraph, plus the description of the script.
(71.59 KiB) Downloaded 251 times
MRUF-lst_2016-09-04(3).jpg
The simple "dress-up" or theming sub-division
(24.95 KiB) Downloaded 255 times
Last edited by musher0 on Sun 04 Sep 2016, 22:26, edited 1 time in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#45 Post by Mike Walsh »

Morning, musher0.

'Recent documents' is not something I ever made a great deal of use of, back in my Windows days.....but I can see it would have its uses!

Coupla questions, if I may?

1) Which window managers does this work with? I primarily use either JWM or XFCE, although I do have one that employs Openbox; ETP's 'Chromebook' Pup, v.1.

2) Does this work with all file managers, or just ROX? I'm thinking of Thunar, y'see.....mainly in rg66's X-series, of which I use X-Slacko and X-Precise.

Thanks!


Mike. :wink:

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#46 Post by musher0 »

Mike Walsh wrote:Morning, musher0.

'Recent documents' is not something I ever made a great deal of use of, back in my Windows days.....but I can see it would have its uses!

Coupla questions, if I may?

1) Which window managers does this work with? I primarily use either JWM or XFCE, although I do have one that employs Openbox; ETP's 'Chromebook' Pup, v.1.

2) Does this work with all file managers, or just ROX? I'm thinking of Thunar, y'see.....mainly in rg66's X-series, of which I use X-Slacko and X-Precise.

Thanks!

Mike. :wink:
Morning', Mike!

This script will work with any window manager as long as vovchik's
aemenu-pango is in the path. That I have personally tested: echinus,
jwm, pekwm, icewm, wmx, and aewm (this last: obviously, since
aemenu was designed for it).

As to working with Thumar or other file managers, avoid the last
sub-menu, marked "ROX-dirs", and the MRUD's sub-sections.

The first two sub-menus are based on ~/.recently-used.xbel or
~/.local/share/recently-used.xbel, the general history file for all
debian/ubuntu type distros; the sub-menu for opera URLs is based on,
well, ... opera(!); the images sub-menu is based on the mtpaint
config/history file; and the bash part is based on the .bash_history file.

I think I can safely say that 50% (?) of this MRUF script can be used with
another file manager, because not all of the script relies on ROX.

Since you mention those FM's, I suppose I could generalize and introduce
a FileMNGR variable, except I don't know if Thumar, PCMan, Dolphin and
cousins can launch a file or a program in the background, like ROX does.
I simply have no experience of them. Does anybody know? Anybody can
fill me in?

(BTW, now that I've discovered a "format", any app that has a history
could be processed in the same way. Any suggestion off the top of your
mind? :) )

~~~~~~~~
About using an MRUF/MRUD utility or not:
it's a matter of personal habit, I suppose. As for me, I find it quite
convenient: no more file digging to find what I put where, I turn to my
MRUF/MRUD script. It saves me time and frustration.

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#47 Post by Mike Walsh »

Hi, musher0.

O-kayyy. I'm in 'Chromepup' now (that's what I call it!); ROX, JWM and Openbox is the combination. I appear to have /.local/share/recently-used.xbel, though not /.recently-used.xbel. Does it matter which, as long as I have one or the other?

I noticed a bit farther back in the thread (page1, stu91.....4 years ago, actually!), there is mention of a app posted on the then extant Crunchbang forum, specifically for Openbox. Did you ever give this one a try, by any chance? (I've got yours sitting in my Apps directory already, but I want to try that one on a JWM-based Pup.) I just happened to be in 'Chromepup' today (which uses Openbox), and.....I was just curious, really.

I will confess, although I don't need such a thing in the normal course of events, there are occasions when I really need to do a bit of serious digging.....and I've got that many years-worth of files. Which haven't always been as well-organised as I'd like, y'know?


Mike. :wink:

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#48 Post by bigpup »

musher0,

Thanks for the update and improvements to MRUF-lst!

Hope you posted this as a program in the "Additional Software" section of the forum.
Sure seems like something to post there :idea:

Not sure how many people are going to see it, 3 pages into a posting in "Beginners Help".
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#49 Post by musher0 »

Mike Walsh wrote:Hi, musher0.

O-kayyy. I'm in 'Chromepup' now (that's what I call it!); ROX, JWM and Openbox is the combination. I appear to have /.local/share/recently-used.xbel, though not /.recently-used.xbel. Does it matter which, as long as I have one or the other?

I noticed a bit farther back in the thread (page1, stu91.....4 years ago, actually!), there is mention of a app posted on the then extant Crunchbang forum, specifically for Openbox. Did you ever give this one a try, by any chance? (I've got yours sitting in my Apps directory already, but I want to try that one on a JWM-based Pup.) I just happened to be in 'Chromepup' today (which uses Openbox), and.....I was just curious, really.

I will confess, although I don't need such a thing in the normal course of events, there are occasions when I really need to do a bit of serious digging.....and I've got that many years-worth of files. Which haven't always been as well-organised as I'd like, y'know?

Mike. :wink:
Hello again Mike

Yeah, stu91 tipped us off about their solution at the time.

I'd have to go back and check how much of their code subsists in this
version! 8) They gave me a model and off I went!!!

It doesn't matter which XBelle ;) your Puppy has!

But your remark this morning got my fingers itching :) and I ended up with
this "file-manager-agnostic" version. (Please see attached.) So now it
shouldn't matter which file manager you use nor which window manager
you use: you can use this script. With the warning not to use the "ROX-
dirs" section if your FM is Dolphin, for ex.


This version relies entirely on jemimah's xdg-open and/or on BK's default-
handler (we Puppy-ists are lucky to have two launchers, aren't we!) to
show the files in the lists. I also shaved 1 kb off the size of the script by
using more variables.

It's safer than the previous version -- this one will show a script in leafpad
rather that execute it. I like it better that way: if the user wants to re-run
something, then it's his responsibility -- not mine -- if it blows anything up
on his computer or erases a precious file.

Image management has been improved. Clicking on the name of an image
shows it in the viewer not in mtpaint. Again playing it safe here, although
I'll grant you that it wouldn't be as bad as re-running a remove script... :(

Finally, If you don't have the old opera installed, in this version, the opera
URLs won't be displayed at all. Simply a note telling you to manage your
visited sites in your default browser.

There you have it. Do not enjoy, do not pass GO, do not collect US$200! 8)

TWYL.

~~~~~~~~~~
Edit: Please find the latest version a couple of post down. Thanks.
Last edited by musher0 on Mon 05 Sep 2016, 20:58, edited 1 time in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#50 Post by musher0 »

bigpup wrote:musher0,

Thanks for the update and improvements to MRUF-lst!

Hope you posted this as a program in the "Additional Software" section of the forum.
Sure seems like something to post there :idea:

Not sure how many people are going to see it, 3 pages into a posting in "Beginners Help".
Hello bigpup.

Thanks for condescending to visit this lowly "Beginners" thread!!! :lol:

In any case, I cut the pear in half, I half-followed your advice: there is now
an advertisement of this thread and of my new script in the "additional
software" section.

And an explanation, there, of why it's staying here, in this thread.

Sorry for any ruffled feathers.

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply