Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 31 Oct 2014, 02:24
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
How to show MRU Most Recently Used Documents on Start Menu?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Author Message
johnywhy

Joined: 20 Aug 2011
Posts: 353

PostPosted: Sun 21 Aug 2011, 14:23    Post_subject:  How to show MRU Most Recently Used Documents on Start Menu?
Sub_title: like Winblows
 

hi

is there a way to display my most recently used files on my Puppy menu?

thanks
Back to top
View user's profile Send_private_message 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Sun 21 Aug 2011, 15:29    Post_subject:  

MRU is Many Regrets Unable Wink
Blow it all away.

It has been addressed before and I never saw a solution.
Altho theoretically something can be developed for this.
A tip: there is a .recently-used.xbel file in /root.
Most programs have that function in the file menu and I think they use that file.

_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send_private_message 
musher0


Joined: 04 Jan 2009
Posts: 4278
Location: Gatineau (Qc), Canada

PostPosted: Thu 11 Oct 2012, 07:33    Post_subject:  

Hello.

Béèm answered johnwhy's question with his usual philosophical wisdom Smile .

So here's my attempt, in view that Puppy does not seem to have a MRU utility per se.

(béèm, if you're reading this from where you are, the info provided by ~/.recently-used was really too skimpy for me.)

Code:
#!/bin/sh
# /$MBINS/lstMRU.sh
# Save this script in /root/my-applications/bin
# par musher0, 11 oct. 2012
####

MBINS=~/my-applications/bin
# Modèle : `ls -u1F | grep "*" | head -n 5 | uniq -ui | sort`

rm -f ~/my-applications/bin/MRUprog.lst

cd /usr/local/bin
ls -u1F | grep "*" | head -n 5 | uniq -ui | sort > $MBINS/14+

cd /usr/bin
ls -u1F | grep "*" | head -n 5 | uniq -ui | sort >> $MBINS/14+

cd /usr/share/applications
ls -u1F | grep "*" | head -n 5 | uniq -i | sort >> $MBINS/14+

cd /usr/local/share/applications
ls -u1F | grep "*" | head -n 5 | uniq -i | sort >> $MBINS/14+

cd ~
cat ~/.bash_history | tail -n 5 | uniq -i | sort >> $MBINS/14+

cd $MBINS
ls -u1F | grep "*" | head -n 5 | uniq -i | sort >> $MBINS/14+

# replaceit --input=14+ "*" ""
# enable the above if you have the replaceit utility

uniq -ui 14+ | sort > MRUprog.lst
rm -f 14+-
urxvt +sb -g 41x27+300+150 -e less -N -~ -M MRUprog.lst


The script above simply lists the five appplications you used last in each of six Puppy directories where executables are commonly stored. Theoretically that's 30 programs, but the uniq program removes the double entries, so you may have a listing of less than 30 programs.

The result is sort of a fuzzy-logic reminder to back-track on what you've done on your computer in the past couple of days.

Useful for people with short memories (e.g. moi), and perhaps for menu or rxvt listings.

Improvements to my code are welcome.

The unavoidable screenshot is attached.

Enjoy.
MRU_list_for_Puppy.jpg
 Description   
 Filesize   31.56 KB
 Viewed   840 Time(s)

MRU_list_for_Puppy.jpg


_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
puppyluvr


Joined: 06 Jan 2008
Posts: 3214
Location: Chickasha Oklahoma

PostPosted: Thu 11 Oct 2012, 07:45    Post_subject:  

Very Happy Hello,
User Warmock is working on Navig8or here:
http://www.murga-linux.com/puppy/viewtopic.php?t=66008
If one could graphically integrate something like musher0`s above script into it,
you would have a menu that was very windoze like.. (eww LOL)

_________________
Close the Windows, and open your eyes, to a whole new world
http://puppylinuxstuff.meownplanet.net/puppyluvr/
Puppy Linux Users Group on Facebook

Puppy since 2.15CE...
Back to top
View user's profile Send_private_message Visit_website 
johnywhy

Joined: 20 Aug 2011
Posts: 353

PostPosted: Thu 11 Oct 2012, 08:01    Post_subject:  

This is very cool, really great!

tho in my OP i was actually looking for most recently opened files, not programs. Yes I know programs are files, but I mean files which are not programs.

_________________
asus X502C notebook pc
Back to top
View user's profile Send_private_message 
stu91


Joined: 06 Aug 2012
Posts: 145
Location: England. Dpup. Dell Inspiron 1501

PostPosted: Thu 11 Oct 2012, 08:40    Post_subject:  

You can with Openbox windows manager yes - via a pipe menu.



This script was posted on crunchbang forum by user johnraff but it works on Puppy ok.
recently_opened_menu.gz
Description  remove fake .gz extension and make script executable
gz

 Download 
Filename  recently_opened_menu.gz 
Filesize  3.07 KB 
Downloaded  429 Time(s) 
Back to top
View user's profile Send_private_message 
johnywhy

Joined: 20 Aug 2011
Posts: 353

PostPosted: Thu 11 Oct 2012, 08:57    Post_subject:  

Thanks.

I guess this is totally dependent on which window manager you're using, right?

_________________
asus X502C notebook pc
Back to top
View user's profile Send_private_message 
stu91


Joined: 06 Aug 2012
Posts: 145
Location: England. Dpup. Dell Inspiron 1501

PostPosted: Thu 11 Oct 2012, 09:03    Post_subject:  

johnywhy wrote:
Thanks.

I guess this is totally dependent on which window manager you're using, right?


Yes the above posted script is only for Openbox windows manager.
Back to top
View user's profile Send_private_message 
musher0


Joined: 04 Jan 2009
Posts: 4278
Location: Gatineau (Qc), Canada

PostPosted: Thu 11 Oct 2012, 10:05    Post_subject:  

johnywhy wrote:
This is very cool, really great!

tho in my OP i was actually looking for most recently opened files, not programs. Yes I know programs are files, but I mean files which are not programs.


Your wish is my command! Laughing (See inside script for remarks.)

Code:
#!/bin/sh
# /$MBINS/lstMRUD.sh
# Save in ~/my-applications/bin
# "Should" :-) list the 30 last docs or non-program files you
# used or perused in the ~/my-documents folder.
# musher0, 11 oct. 2012
####
# variable
MDOCS=~/my-documents

# script
cd $MDOCS

rm -f $MDOCS/MRUD.lst # remove previous list

ls -Bt1 * | head -n 15 | sort > ~/30+
# list alphabetically 15 last files you used last in ~/my-documents proper

ls -Bt1 */* | head -n 15 | sort >> ~/30+
# list alphabetically the 15 files you used last in ~my-documents/< various subdirs that may be there >

# clean up a bit
uniq -ui  ~/30+ | sort > MRUD.lst # remove any double entries
rm -f  ~/30+ # remove the work file

# display the new MRUD list
urxvt +sb -g 45x32+300+150 -e less -M -N -~ MRUD.lst

### 30 ###


Erratum: the ls command above has been corrected to "ls -Bt1" ( was "ls -Bu1"). This makes the time be calculated from today. Sorry about that; please reload this corrected version.

You're partially on your own if your documents are not in ~/my-documents. Meaning: you'd have to change the MDOCS variable to point to a different documents folder.

Enjoy!
MRUD_list_for_Puppy.jpg
 Description   
 Filesize   59.47 KB
 Viewed   746 Time(s)

MRUD_list_for_Puppy.jpg


_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)

Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
musher0


Joined: 04 Jan 2009
Posts: 4278
Location: Gatineau (Qc), Canada

PostPosted: Thu 11 Oct 2012, 10:10    Post_subject:  

@stu91. Thanks for the reference.
I might try to adapt that little robot on pekwm.

BFN.

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
musher0


Joined: 04 Jan 2009
Posts: 4278
Location: Gatineau (Qc), Canada

PostPosted: Thu 11 Oct 2012, 10:13    Post_subject:  

johnywhy wrote:
Thanks.

I guess this is totally dependent on which window manager you're using, right?


Well, some wm's don't have the capacity at all, which is why I wrote these little scripts that can be used from the command line.

PS. Not just wm's. Some panels, such as lxpanel, have it too.

BFN.

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)

Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
musher0


Joined: 04 Jan 2009
Posts: 4278
Location: Gatineau (Qc), Canada

PostPosted: Thu 11 Oct 2012, 10:14    Post_subject:  

puppyluvr wrote:
Very Happy Hello,
User Warmock is working on Navig8or here:
http://www.murga-linux.com/puppy/viewtopic.php?t=66008
If one could graphically integrate something like musher0`s above script into it,
you would have a menu that was very windoze like.. (eww LOL)


Hi.

I'll have a look at it.

BFN.

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
musher0


Joined: 04 Jan 2009
Posts: 4278
Location: Gatineau (Qc), Canada

PostPosted: Sun 04 Nov 2012, 03:37    Post_subject:  

Hi, people.

Here is a cleaner and more limited MRUD script, inspired by a pipemenu for openbox. Thanks to stu91 for the tip. It's more limited in the sense that it detects only documents, not scripts or programs.

This one uses BK's defaultlauncher, rather than xdg-open or the ROX mime-types, to relaunch the documents. I added a couple of filetypes to the launcher, so that odt and gnumeric files are recognized.

It contains an attempt at internationalization and some UTF-8 conversions.

It has its own *.desktop file, so a menu entry should appear under "Documents" in any wm, even if this initial release is based on aemenu.

Created on lupu 5.25 retro. I'm sort of counting on you people to tell me on which other puppies it works.

It is a 0.1 version, in other words, "beta". Any constructive comment or improvement suggestion is welcome.

Screen capture is here: http://murga-linux.com/puppy/viewtopic.php?p=662352#662352

Code:
#!/bin/sh
# Titre et emplacement : /root/my-applications/ae/MRUD-lst.sh
# Dérivé de http://openbox.org/wiki/Openbox:Pipemenus:recentfilesxbel
# Merci au groupe openbox et à stu91 pour le tuyau.
# Adapté par musher0 pour aemenu, fin oct. - début nov. 2012
# Dépendances : aemenu, replaceit, /root/.recently-used.xbel (actif)
####
# set -xv # pour le débogage

# Préparation pour aemenu
export AEM="/root/my-applications/ae"
[ ! -d /root/my-applications/ae ] && mkdir $AEM

# Langues (pour le titre)
case ${LANG%_*} in
    ca) DOCREC="Documents recents";;
    en) DOCREC="Recent Documents";;
    es) DOCREC="Documentos recientes";;
    fi) DOCREC="Viimeisimmät tiedostot";;
    fr) DOCREC="Documents récents";;
#    gr) DOCREC="Πρόσφατα Έγγραφα"
# Désactivé car il faudrait aussi traiter les accents en grec (ci-dessous).
    it) DOCREC="Documenti recenti";;
    pl) DOCREC="Ostatnie dokumenty";;
    pt) DOCREC="Documentos recentes";;
    ro) DOCREC="Documente recente";;
esac

echo "cmd \"> $DOCREC <\" \"\"" > $AEM/recents
echo "cmd \"~~~~~~~~~~~~~~~\" \"\"" >> $AEM/recents

# Coeur du script d'origine # Merci au groupe openbox (cf ci-dessus).
cat ~/.recently-used.xbel | grep file:/// | tail -n15 | cut -d "\"" -f 2 > $AEM/MRUD.lst
# J'ai enlevé : "| tac" de l'original. # m0

# Adaptation pour lancement avec les types "mime" de rox
# ou le defaultlauncher de Puppy, plutôt qu'avec xdg-open
R="replaceit --input=$AEM/MRUD.lst"
$R "file:///" "/"
$R "/initrd/mnt/dev_save" "/mnt/home"
# Code html
$R "&amp;" "&"
$R "&apos;" "'"

# The following lines to translate UTF-8 XML code to regular accented characters;
# you may comment these lines if you are using only English.
# Traduction du codage XML pour les accents.
$R "%C2%A0" " "
$R "%C2%A1" "¡"
$R "%C2%A2" "¢"
$R "%C2%A3" "£"
$R "%C2%A4" "¤"
$R "%C2%A5" "¥"
$R "%C2%A6" "¦"
$R "%C2%A7" "§"
$R "%C2%A8" "¨"
$R "%C2%A9" "©"
$R "%C2%AA" "ª"
$R "%C2%AB" "«"
$R "%C2%AC" "¬"
$R "%C2%AD" " "
$R "%C2%AE" "®"
$R "%C2%AF" "¯"
$R "%C2%B0" "°"
$R "%C2%B1" "±"
$R "%C2%B2" "²"
$R "%C2%B3" "³"
$R "%C2%B4" "´"
$R "%C2%B5" "µ"
$R "%C2%B6" "¶"
$R "%C2%B7" "·"
$R "%C2%B8" "¸"
$R "%C2%B9" "¹"
$R "%C2%BA" "º"
$R "%C2%BB" "»"
$R "%C2%BC" "¼"
$R "%C2%BD" "½"
$R "%C2%BE" "¾"
$R "%C2%BF" "¿"
$R "%C3%80" "À"
$R "%C3%81" "Á"
$R "%C3%82" "Â"
$R "%C3%83" "Ã"
$R "%C3%84" "Ä"
$R "%C3%85" "Å"
$R "%C3%86" "Æ"
$R "%C3%87" "Ç"
$R "%C3%88" "È"
$R "%C3%89" "É"
$R "%C3%8A" "Ê"
$R "%C3%8B" "Ë"
$R "%C3%8C" "Ì"
$R "%C3%8D" "Í"
$R "%C3%8E" "Î"
$R "%C3%8F" "Ï"
$R "%C3%90" "Ð"
$R "%C3%91" "Ñ"
$R "%C3%92" "Ò"
$R "%C3%93" "Ó"
$R "%C3%94" "Ô"
$R "%C3%95" "Õ"
$R "%C3%96" "Ö"
$R "%C3%97" "×"
$R "%C3%98" "Ø"
$R "%C3%99" "Ù"
$R "%C3%9A" "Ú"
$R "%C3%9B" "Û"
$R "%C3%9C" "Ü"
$R "%C3%9D" "Ý"
$R "%C3%9E" "Þ"
$R "%C3%9F" "ß"
$R "%C3%A0" "à"
$R "%C3%A1" "á"
$R "%C3%A2" "â"
$R "%C3%A3" "ã"
$R "%C3%A4" "ä"
$R "%C3%A5" "å"
$R "%C3%A6" "æ"
$R "%C3%A7" "ç"
$R "%C3%A8" "è"
$R "%C3%A9" "é"
$R "%C3%AA" "ê"
$R "%C3%AB" "ë"
$R "%C3%AC" "ì"
$R "%C3%AD" "í"
$R "%C3%AE" "î"
$R "%C3%AF" "ï"
$R "%C3%B0" "ð"
$R "%C3%B1" "ñ"
$R "%C3%B2" "ò"
$R "%C3%B3" "ó"
$R "%C3%B4" "ô"
$R "%C3%B5" "õ"
$R "%C3%B6" "ö"
$R "%C3%B7" "÷"
$R "%C3%B8" "ø"
$R "%C3%B9" "ù"
$R "%C3%BA" "ú"
$R "%C3%BB" "û"
$R "%C3%BC" "ü"
$R "%C3%BD" "ý"
$R "%C3%BE" "þ"
$R "%C3%BF" "ÿ"
# Liste de conversion ci-dessus tirée de http://jeppesn.dk/utf-8.html

# Exemple de ma hiérarchie de documents | Example of my documents hierarchy
# (Dés)activer si vous n'en avez pas besoin. | (De)activate if you don't need it.
$R "/root/my-documents/clients" "/mnt/home/clients"
$R "/root/my-documents/boulot" "/mnt/home/boulot"

# If you have moved the "my-documents" folder to mnt/home
# Remove the "#" sign. | Enlevez le dièse si vous avez déménagé
# le répertoire "my-documents" dans /mnt/home.
# $R "/root/my-documents" "/mnt/home/my-documents"
# $R "/root/mes-documents" "/mnt/home/mes-documents"

sort -fu --output=$AEM/MRUD.tri $AEM/MRUD.lst
uniq -u $AEM/MRUD.tri > $AEM/MRUD.lst  # Fonctionne ! :-)

# Du script d'origine # Merci au groupe openbox (cf ci-dessus).
while read line
do 
file=$(echo "$line")
name=$(echo -en "$file" | sed 's,.*/,,' | sed 's/%20/ /g')

# Mettre des adaptations pour divers gest. de fen. ici.
# Adaptation par musher0 pour aemenu et Puppy | Toutou
echo "cmd \"$name\" \"defaulthandler $line\"" >> $AEM/recents
done < $AEM/MRUD.lst

# Pour le débogage
# echo "cmd \"~~~~~~~~~~~~~~~\" \"\"" >> $AEM/recents
# echo "cmd \"Éditer ce menu\" \"leafpad $AEM/recents\"" >> $AEM/recents

# Nettoyage
rm -f $AEM/MRUD.lst
rm -f $AEM/MRUD.tri

# Lancement d'aemenu
$AEM/aemenu -rc $AEM/recents
# set +xv # pour le débogage
## Fin ##
MRUD-0.1.pet
Description 
pet

 Download 
Filename  MRUD-0.1.pet 
Filesize  16.85 KB 
Downloaded  355 Time(s) 

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
musher0


Joined: 04 Jan 2009
Posts: 4278
Location: Gatineau (Qc), Canada

PostPosted: Sun 17 Nov 2013, 03:01    Post_subject:
Sub_title: Version 03
 

Hello.

Please find attached v. 03. Basically, the changes concern line 14:
Code:
[ ! -f /root/.recently-used.xbel ] && ln -s /root/.local/share/recently-used.xbel /root/.recently-used.xbel


Since, in newer Puppies, the recently-used.xbel file is in folder
/root/.local/share, a link was needed.

Enjoy!

musher0
MRUD-0.3.pet
Description 
pet

 Download 
Filename  MRUD-0.3.pet 
Filesize  17.04 KB 
Downloaded  96 Time(s) 

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
musher0


Joined: 04 Jan 2009
Posts: 4278
Location: Gatineau (Qc), Canada

PostPosted: Sat 24 May 2014, 22:08    Post_subject:  

Hello, all.

Please find attached my most recent take on this.
Like the versions above, it requires aemenu.

Enjoy!

musher0
MRUD-lst.sh.zip
Description  Latest version of the script.
zip

 Download 
Filename  MRUD-lst.sh.zip 
Filesize  2.24 KB 
Downloaded  56 Time(s) 
MRUD-0.3+date.jpg
 Description   
 Filesize   18.12 KB
 Viewed   185 Time(s)

MRUD-0.3+date.jpg


_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1375s ][ Queries: 13 (0.0310s) ][ GZIP on ]