You are not logged in.
Pages: 1
Good evening,
I have a question about xfce4-popup-places plugin: Is it possible to add a launcher configured as xfce4-popup-places in whiskermenu without adding this plugin to panel ? I tested and it only works if the plugin is added to panel.
I have asked in Ubuntu forum if is it possible to add to whiskermenu right pane an item to display Recent Opened Files/Documents, but the answer was: Not possible, so I tried to add the Places plugin in whiskermenu as a launcher but t only works if the plugin is added to Panel.
OS: Xubuntu 16.04.6
Thanks, vladi
Offline
Hello and welcome.
Unfortunately, the xfce4-places plugin needs to be running (added to the panel) for that command to work. There are 2 options available to you if you don't want the plugin visible on the panel:
Create a second panel, add the plugin to that panel and then set the panel to "Always Hide". The plugin won't be visible but the command will still work.
--
Use the program zenity to create your own list of recently opened documents, create a desktop file for it and add it to the menu.. All of your recent documents are stored in the ~/.local/share/recently-used.xbel file. For this option, do the following:
a. With root privileges, create the file /usr/local/bin/zrecent with the following content:
#!/bin/bash
RECENTS=$(cat ~/.local/share/recently-used.xbel | grep bookmark\ href | cut -d '"' -f2 | sed -e 's/file...//g')
ANS=$(zenity --width 500 \
--height 500 \
--list \
--text="" \
--title="Recent Files List" \
--column="Select a file..." \
$RECENTS)
if [ -f $ANS ] || [ -d $ANS ]
then
exo-open $ANS
else
zenity --info --width 200 --text="File/Directory no longer exists"
fi
.
b. Make the file executable:
sudo chmod +x /usr/local/bin/zrecent
.
c. Create the ~/.local/share/applications/zrecent.desktop file with the following content:
[Desktop Entry]
Name=Recent Files
Comment=Recently opened files
GenericName=Recent files
Exec=zrecent
Icon=document-open-recent
Terminal=false
StartupNotify=true
Type=Application
Categories=Utility;GTK;
The item will now show up in the Accessories section.
Double-click the file/directory that you want to open and the script will use "exo-open" to open it with the default program.
Note: this requires the zenity package to be installed.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
@Toz thanks for quick and accurate reply. I'll try with zenity. That's a pity whiskermenu doesn't have it by default.
Offline
l like #1. that can be a panel in general to run many things in the background that don't make sense for my own background system (everything runs under a shell).
Offline
Is there an alternative to 1. and 2. ?
As you can see here:
https://bugs.launchpad.net/ubuntu/+sour … ug/1472376
https://bugzilla.xfce.org/show_bug.cgi?id=12050
~/.local/share/recently-used.xbel does not work reliable.
Just open a featherpad file within thunar, then change anything in it. Save it.
You will not find it in ~/.local/share/recently-used.xbel now.
Just open a *.png within thunar. Close it. You will not find it in ~/.local/share/recently-used.xbel.
I had instaled this plug-in (variant 1). But it is unusable for me in this case.
So I am looking for an alternative.
Offline
#!/bin/bash RECENTS=$(cat ~/.local/share/recently-used.xbel | grep bookmark\ href | cut -d '"' -f2 | sed -e 's/file...//g') ANS=$(zenity --width 500 \ --height 500 \ --list \ --text="" \ --title="Recent Files List" \ --column="Select a file..." \ $RECENTS) if [ -f $ANS ] || [ -d $ANS ] then exo-open $ANS else zenity --info --width 200 --text="File/Directory no longer exists" fi
Thank you, I would like to use this zenity script. But I can not, because it looks like this way the path text has the wrong format.
For example:
.../My Folder/...
looks like this and is not guilty:
.../My%20Folder/...
------------------------------------
In addition:
It would be nice, if we could copy any selected file from this "zenity window" into the clipboard.
Last edited by Tabespe (2020-10-21 20:40:30)
Offline
For example:
.../My Folder/...
looks like this and is not guilty:
.../My%20Folder/...
Thats the way its presented in the xbel file. This script just reads and presents the name as it exists.
In addition:
It would be nice, if we could copy any selected file from this "zenity window" into the clipboard.
Zenity doesn't appear to support this.
The above script didn't work for me. Here is the updated version:
#!/bin/bash
RECENTS=$(cat ~/.local/share/recently-used.xbel | grep bookmark\ href | cut -d '"' -f2 | sed -e 's/file...//g')
ANS=$(zenity --width 500 \
--height 500 \
--list \
--text="" \
--title="Recent Files List" \
--column="Select a file..." \
$RECENTS)
ANS="$(echo $ANS | sed -e 's/%20/ /g')"
if [ ! "$ANS" == "" ]; then
if [ -f "$ANS" ]; then
exo-open "$ANS"
else
zenity --info --width 200 --text="File no longer exists"
fi
fi
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Wow, great. Thank you. Does this also work for "ü", "ä", and "ö" ?
Where can we change the amount of entries we want to have in the list "recently opened documents" (~/.local/share/recently-used.xbel), when I do not want to use xfce4-places plugin?
Last edited by Tabespe (2020-10-22 12:51:31)
Offline
Pages: 1
[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 553.3 KiB (Peak: 570.59 KiB) ]