You are not logged in.
A simple dmenu-based file manager.
Screenshots:
Download: http://aur.archlinux.org/packages.php?ID=24386
Let me know if I can improve/correct anything.
Last edited by Wintervenom (2009-03-03 10:21:20)
Offline
Nice so far. One thing, which is personal pref more than anything, can you have .dmenfm go in ~/.config instead of ~/? I might be wrong in thinking this, but that seems to be the place config files should go.
dnyy in IRC & Urban Terror
Offline
Nice idea, thank you! I use dwm and dmenu, and usually I just use bash for file management, but this works great for simple tasks
One thing though, how do you change the default apps? I don't want my images to be opened in GIMP by default...
Sin? What's all this about sin?
Offline
nice. i like it. how can i change colors?
Offline
I will try it out in a moment. I don't want to install exo though. Is all exo does determine what program to run on the file based on its name?
Offline
Whoah! Looks like a nice one
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
nice. i like it. how can i change colors?
Change the line in the script that sets the dmenu_params:
dmenu_params="-i -b -nb #000000 -nf #9999CC -sb #000066"
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
Can I move it to the top of the screen? and I cannot use "urxvtc -e vim" as my editor
Great work though!
EDIT: Got it to the top
Last edited by djnm (2009-03-03 16:01:36)
br0tat0chip in #archlinux and on freenode
Offline
Nice little tool.... Can we have an option to open the current directory in a file browser? An option like [open] after [preferences], selecting which will open the current directory in a file browser...
Offline
Looks great, will definitely try out.
Just out of curiosity: Would it be possible to use MIME types for choosing an application to open files with? (Or , for that matter, any other external app which doesn't depend on some kind of DE?)
Offline
I converted .pyfmiirc to a bash script that does what you want.
It can take over all view, edit and exec tasks
#! /bin/bash
#usage: ./autoprogramselector (view|edit|exec) filename
if [ $1 = help -o $1 = "-h" -o $1 = "--help" ]; then grep -E '^(#|view|edit|exec)' $0; exit 0; fi
if [ $# -ne 2 ]; then echo wrong usage; exit 1; fi
#source
if [[ $2 =~ \.([ch]|txt|sh|s)$ ]]; then
view="gvim $2"
edit="gvim $2"
exec=""
#man
elif [[ $2 =~ \.[0-9](\.gz)?$ ]]; then
view="xman $2"
edit="gvim $2"
exec="xman $2"
#archive
elif [[ $2 =~ \.(tar|gz|rar|zip|7z|lha|bz2|tgz)$ ]]; then
view="atool -l $2"
edit=""
exec="atool -x $2"
#video
elif [[ $2 =~ \.(mkv|mpe?g|avi|mp4|wmv|rmvb|as[fx]|divx|vob|ogm|ra?m|flv|part|iso)$ ]]; then
view="mplayer $2"
edit=""
exec="mplayer $2"
#audio
elif [[ $2 =~ \.(mp3|wav|ogg)$ ]]; then
view="mplayer $2"
edit=""
exec="mplayer $2"
#torrent
elif [[ $2 =~ \.torrent ]]; then
view=""
edit=""
exec=""
#pdf
elif [[ $2 =~ \.(pdf|ps)$ ]]; then
view="xpdf $2"
edit=""
exec="xpdf $2"
#image
elif [[ $2 =~ \.(jpe?g|png|gif|tiff|bmp|icon)$ ]]; then
view="feh $2"
edit="mtpaint $2"
exec="feh $2"
#html
elif [[ $2 =~ \.(html?|swf)$ ]]; then
view="firefox $2"
edit="gvim $2"
exec="firefox $2"
#document
elif [[ $2 =~ \.(doc|rtf)$ ]]; then
view=""
edit=""
exec="abiword $2"
#windows
elif [[ $2 =~ \.exe$ ]]; then
view=""
edit=""
exec="wine $2"
#regular file
else
view="gvim $2"
edit="gvim $2"
exec="gvim $2"
fi
#executable (overrides)
if [ -x "$2" ]; then
exec="$2"
fi
#make it so
if [ -n "${!1}" ]; then
setsid setsid ${!1}
fi
EDIT NB: the setsid setsid is not good for console, but it is good for using it from an X11 app.
Last edited by Procyon (2009-03-03 18:37:31)
Offline
Updated. Now, you can change the executor to something other than exo-open or gnome-open to have another program deal with opening files in the applications you want them to. You can also write plug-ins to extend functionality a bit. Dmen will look for these in $XDG_CONFIG_HOME/dmenfm/plugins in three directories: browser (appended to the file browser -- you probably want to put brackets around the filenames of these), operations (appended to the operations menu), and preferences (appended to preferences menu). The file name of the plug-in will be what is displayed in the respective menu. Plug-ins are source'd, so they can use Dmen's variables.
### Changelog #####################################################
# 0.1.0 # * Initial version #
# 0.1.1 # + Option 'Open last used dir' #
# # + Options 'Always open dirs' and 'Always open files' #
# 0.1.2 # + Config moved to $XDG_CONFIG_HOME #
# # + Options for dmenu styling #
# # + Option to change executor #
# # + Option to open file manager in current directory #
# # + Plugins support #
###################################################################
Last edited by Wintervenom (2009-03-04 08:39:07)
Offline
Thanks a bunch for stickin' it in ~/.config, you have no idea how much I wish every app would do that.
dnyy in IRC & Urban Terror
Offline
Here's a few plug-in to try.
#!/bin/bash
### Application Launch Plug-in for DmenFM ##########################
# Version 0.1.0 by Scott Garrett <wintervenom [(a)] archlinux.us> #
####################################################################
### Description ####################################################
# An application launcher that allows you choose by application or #
# executable name. #
# The executor you have set must know how to open *.desktop files. #
####################################################################
### To Use... ######################################################
# Place this plug-in in "$XDG_CONFIG_HOME/dmenfm/plugins/browser". #
####################################################################
apps_dir='/usr/share/applications'
opt=$(((grep -h "^Name=" $apps_dir/*.desktop | sed 's:Name=::'); dmenu_path) | $menu)
if [ "$opt" ]; then
file=$(grep -l "^Name=$opt$" $apps_dir/*.desktop)
if [ $file ]; then
if [[ $(echo "$file" | wc -l) > 1 ]]; then
file="$apps_dir/$(echo "$file" | sed "s:${apps_dir}/::" | $menu -p "Which $opt?")"
fi
if [ "$executor" ] && which "$executor" &> /dev/null; then
exec "$executor" "$file" &
unset file
elif which exo-open &> /dev/null; then
exo-open "$file"
unset file
elif gnome-open &> /dev/null; then
gnome-open "$file"
unset file
else
xmessage 'No executor found. Set one in [Preferences].'
fi
else
which "$opt" &> /dev/null && exec "$opt" &
unset file
fi
fi
#!/bin/bash
### Secure Delete Plug-in for DmenFM ###############################
# Version 0.1.0 by Scott Garrett <wintervenom [(a)] archlinux.us> #
####################################################################
### Description ####################################################
# Uses 'srm' to securely erase files and directories. #
####################################################################
### To Use... ######################################################
# Place plug-in in "$XDG_CONFIG_HOME/dmenfm/plugins/operations". #
####################################################################
if which srm &> /dev/null; then
opt=$(echo "No
Yes: DoD (7-pass)
Yes: BSD (3-pass)
Yes: single pass" | $menu -p "Secure delete <$file>?")
[[ "$opt" =~ 'Yes' ]] && srm -rf $([[ "$opt" =~ 'DoD' ]] && echo '-D') $([[ "$opt" =~ 'BSD' ]] && echo '-P') $([[ "$opt" =~ 'single' ]] && echo '-s') "$file"
else
echo 'OK' | $menu -p 'This requires the srm utility.'
fi
#!/bin/bash
### Gompload Plug-in for DmenFM ####################################
# Version 0.1.0 by Scott Garrett <wintervenom [(a)] archlinux.us> #
####################################################################
### Description ####################################################
# Uploads files to Omploader using gompload (gomploader). #
####################################################################
### To Use... ######################################################
# Place plug-in in "$XDG_CONFIG_HOME/dmenfm/plugins/operations". #
####################################################################
opt=$(echo -e "No\nYes" | $menu -p "Gompload <$file>?")
if [[ "$opt" == "Yes" ]]; then
if which gompload &> /dev/null; then
gompload "$file"
else
echo 'OK' | $menu -p 'This requires gompload(er) utility.'
fi
fi
#!/bin/bash
### Clear File Plug-in for DmenFM ##################################
# Version 0.1.0 by Scott Garrett <wintervenom [(a)] archlinux.us> #
####################################################################
### Description ####################################################
# Clears file contents. *** Recursive on directories. *** #
####################################################################
### To Use... ######################################################
# Place plug-in in "$XDG_CONFIG_HOME/dmenfm/plugins/operations". #
####################################################################
opt=$(echo -e "No\nYes" | $menu -p "Clear <$file>?")
if [[ "$opt" == "Yes" ]]; then
if [ -d "$file" ]; then
find "$file" -type f | while read dfile; do
echo > "$dfile"
done
else
echo > "$file"
fi
fi
Last edited by Wintervenom (2009-03-04 09:18:10)
Offline
koch wrote:nice. i like it. how can i change colors?
Change the line in the script that sets the dmenu_params:
dmenu_params="-i -b -nb #000000 -nf #9999CC -sb #000066"
thanks, found it. i was blind.
new features look very nice.
Offline
Wow, awesome! Thanks for implementing. Now I just need some equally awesome executor...
Dmenfm, enjoy your stay on my harddisk.
Offline
Amazing! Can't believe you've done all this using a single bash script.
Also, Is there any chance for utf-8 support? Currently, file name with non-latin character in it is all mess up.
Offline
Amazing! Can't believe you've done all this using a single bash script.
Also, Is there any chance for utf-8 support? Currently, file name with non-latin character in it is all mess up.
You have to select a font that has iso10646 e.g. "-*-fixed-medium-r-normal-*-15-*"
Offline
To be added or changed in version 0.1.3:
- "Set font" option added (forgot to put that back in, sorry)
- Run as administrator
- Shortcuts
- Localization support
- Application launcher will be built-in
- Better plug-in support
- Global plug-ins directory will be added (this would let you install them from the AUR)
Might get added to 0.1.3:
- Media management (won't depend on HAL, but will use it if it is available)
- Filter by file name/type
Possible future plug-ins:
- Browse for files on web pages and FTP directories
- Browse network shares (this might or might not make it to 0.1.3)
- Window management
Last edited by Wintervenom (2009-03-08 00:39:26)
Offline
Great work. I like it a lot. Just installed it and am using it in my dwm and wmii both.
The only issue is that i have to change the Default on bottom every time i switch WMs
But I am still weighing my options between dwm and wmii.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Great work. I like it a lot. Just installed it and am using it in my dwm and wmii both.
The only issue is that i have to change the Default on bottom every time i switch WMs
But I am still weighing my options between dwm and wmii.
A bit offtopic, but have you tried XMonad ?
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
Inxsible wrote:Great work. I like it a lot. Just installed it and am using it in my dwm and wmii both.
The only issue is that i have to change the Default on bottom every time i switch WMs
But I am still weighing my options between dwm and wmii.
A bit offtopic, but have you tried XMonad ?
No I haven't. dwm and wmii are the only tiling WMs that i have tried. I did try awesome from the repos, but unfortunately i couldn't do much with it so I removed it thinking I would try the git version...but havent come around to it yet, because i got busy with dwm/wmii
Do you use xmonad? what are the advantages over other tiling wm. I do not know haskell, but I can definitely read any code. Maybe this is better discussed in another thread.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
When I try to open a txt file, it does not do anything, but when I click edit, it opens it up in my editor (geany). How can I also use the Open function to open files as well.
and to the mods: Could you make this a sticky?
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Great work. I like it a lot. Just installed it and am using it in my dwm and wmii both.
The only issue is that i have to change the Default on bottom every time i switch WMs
But I am still weighing my options between dwm and wmii.
Have you tried changing the defaults directly in the script? Worked for me.
Sin? What's all this about sin?
Offline
Great script !
I would like the directories to appear with a "/" at the end , like the output of 'ls | dmenu'. How can I do that ?
Offline