Re: MX Fluxbox versus other Window Managers and Desktop Envioroments
Posted: Fri Jul 31, 2020 6:39 am
I'll take a look, thanks. Not sure ATM how much use it would be, for me at least, but will find out.
Support for MX and antiX Linux distros
http://www.forum.mxlinux.org/
@PPC: Ohhh, I like that one, it works great.PPC wrote: Fri Jul 31, 2020 6:06 am <snip>
... Is there any interest in also adding one of my previous suggestions- a "Recent files" menu entry?
Since Fb does not have dynamic menus, this can only, to my knowledge, be done using a script. I have one written, but I got some feedback in the antiX forum and it does not work well in non Latin characters ( cyrilic in particular)...
For anyone wanting to test that script, it's below (just paste the code into a text file called something like "recent_files.sh", save it, make it executable and run it. You can, of course add it to the menu, create a shortcut idesk icon, or a dock icon, so it can be easily accessible...
Code: Select all
#!/bin/bash ### Recent files window- by PPC, 13/1/2020, for use with antiX and MX-fluxbox #GPL licence- do what you want with this, but please keep lines about the author, date and licence # works on any system with yad and xdg-open installed, optionally: exo-open (see exceptions to the general rule, when launching files, near the end. # https://pastebin.com/fSDPR9E1 #Parse the file that stores the recent used files, send output to recent0.txt awk -F"file://|\" " '/file:\/\// {print $2}' ~/.local/share/recently-used.xbel > ~/.recent0.txt #reverse contents order, so last file comes first, and so on... tac ~/.recent0.txt > ~/.recent.txt #function to decode file name (from %20 instead of spaces, etc, from https://unix.stackexchange.com/questions/159253/decoding-url-encoding-percent-encoding urldecode() { local url_encoded="${1//+/ }" printf '%b' "${url_encoded//%/\\x}" } # Use a undecorated Yad window to select file to be executed EXEC=$(yad --title="Recent files" --undecorated --width=450 --height=400 --center --separator=" " --list --column=" Recent Files:" < ~/.recent.txt) #do decoding on the file name, just in case it has spaces or special characters that come up as %xx decoded=$(urldecode $EXEC) # general rule: open selected file with the aplication used for its file type openwith=xdg-open ###Exceptions to the general rule: LibreOffice Writer ".odt" files - check extension and force it to open with lowriter; also more exceptions: like open ".sh" files for edition and run ".desktop" files instead of editing them check=$(echo -n $EXEC | tail -c 3) if [ "$check" == "odt" ]; then openwith=lowriter ; fi #this solves bug opening odt files with spaces if [ "$check" == ".sh" ]; then openwith=exo-open ; fi if [ "$check" == "top" ]; then openwith=exo-open ; fi #add quotes to the file name, just in case it has spaces EXEC2="'"$decoded"'" #launch the selected file run=$(echo $openwith $EXEC2) eval $run
Code: Select all
if [ "`head -c 2 infile`" = "#!" ]; then openwith=exo-open ; fi
Code: Select all
DATESINCE="today - <some number of days>"
Code: Select all
#for shell scripts without extension
shebang=$(grep -q == "#!")
if [ "$shebang" == "0" ]; then openwith=xdg-open ; fi