1

how to display the recently used programmes (not files, that is implemented)?

  • I am looking for:

  • a function / script or so to do the job.

  • How I would like to have the problem solved is something on those lines: To have a button to just being able to one-click on it, on the desktop.

Can anyone help please?

Simon Sudler
  • 3,771
  • 3
  • 20
  • 33
Rolfi
  • 11
  • 1
  • 1
    Well... What is not a program? I guess any list of recently used programs would be incomplete. If you rely on the command-line you can use the shell history. – Quasímodo Oct 04 '20 at 20:28
  • Why the Gnome tag? Are you asking about only Gnome programs or did you use that tag because you use Gnome Desktop? – Quasímodo Oct 04 '20 at 20:29
  • 1
    @ Rolfi Can you please check my updated answer below; If it doesn't work, reply and explain what went wrong //Regards! – William Martens Oct 11 '20 at 18:19

1 Answers1

1

EDIT:

Would this work?

get_recently_used(){
 find "${1:-.}" -type f -printf '%TY-%Tm-%Td %TH:%TM %P\n' 2>/dev/null | sort | tail -n "${2:-10}";
}

For those who don't want this to be enabled: This should work, (if I'm not wrong?)

gsettings set org.gnome.desktop.privacy remember-recent-files false
gsettings set org.gnome.desktop.privacy remember-app-usage false
gsettings set org.gnome.desktop.privacy recent-files-max-age 0
William Martens
  • 953
  • 4
  • 18
  • Probably related..(unsure) (Although this is about how to prevent the file from being created, It's still worth reading, maybe some in the future will find it helpful) https://askubuntu.com/questions/269858/how-do-i-prevent-the-file-recently-used-xbel-from-being-created – William Martens Oct 04 '20 at 19:35
  • 1
    This is only valid for GTK applications. – Quasímodo Oct 04 '20 at 20:25
  • Yeah, you're right, Didn't thought about that. My bad – William Martens Oct 04 '20 at 20:31
  • 1
    No problem, this is certainly useful for many Ubuntu users, for which this solution may get close to what OP asks (which is in fact probably an impossibility anyway). Still I think it is worth the mention. – Quasímodo Oct 04 '20 at 20:32
  • @Quasímodo I've updated my answer – William Martens Oct 11 '20 at 18:41