See the Old README below for general usage.
TL;DR: configuration file is now called mimi.conf instead of mime.conf
Since XDG Base Directory specifications indicate $XDG_CONFIG_HOME/program/program.conf
,
in this fork I've renamed the configuration file's location from
mime.conf
to mimi.conf
($XDG_CONFIG_HOME
is usually ~/.config
, in case you didn't know).
See issue #3 for details; thanks to @vaygr for bringing up this issue.
I have added the following:
menu
programs in alternative to dmenu
, by setting the MENU
and MENUARGS
configuration variable. MENU
has to be an executable, and also compatible with dmenu
's -p
flag;
i.e. for rofi
use MENU: rofi -dmenu
. If MENU
is not set AND dmenu
is not available, a notification is sent to the user.mailto
, spotify
and tg
(telegram) URI protocols via the x-scheme-handler
mimetype(!)$EDITOR
)Exec
field of .desktop
files$PATH
are now correctly listed when choosing an opener from ${ MENU:-dmenu}
I have also collected a few commits from some other forks, which allow for shell interactive usage and handling of HTML urls' #section
suffixes.
If you think of something (i.e. a protocol) that mimi should be able to handle, feel free to open an issue!
I have also added a drop-in replacement for the xdg-email
script, part of the common xdg-utils
package, because some applications (such as chromium
) use it to handle the
mailto
protocol.
This script simply calls xdg-open
(aka mimi
) instead.
! This is a comment
TERM: st
! Default option
MENU: dmenu
# This is also a comment
audio/: mpv
video/: mpv
image/: sxiv
pdf: zathura
# Environmental variables also work
application/json: $TERMINAL -e $EDITOR
text/html: chromium
text/xml: chromium
application/xhtml_xml: chromium
x-scheme-handler/http: chromium
x-scheme-handler/https: chromium
x-scheme-handler/ftp: chromium
x-scheme-handler/about = chromium
x-scheme-handler/unknown = chromium
! vim: ft = xdefaults
TERM
variable is not executable (i.e. if it is set to st-256color
), you might want to set TERM: yourterminal
in your mimi.conf
.MENU
and MENUARGS
in order to use a dmenu alternative. For instance, to use rofi
:
MENU: rofi
MENUARGS: -dmenu
Note that MENUARGS
can also be used to pass additional arguments to dmenu
, but you will need to define the MENU
variable in order for these to be parsed. Additionally,
if MENUARGS
contains more than one argument, these should be separated by a colon :
. For instance:
MENU: dmenu
MENUARGS: -b:-i:-f
git clone https://github.com/BachoSeven/mimi.git
xdg-open
and xdg-email
, just do sudo make install
. Alternatively, add the scripts to your PATH and make them executable.file
is in your PATH, it is required by the scripts.You can find the following handy packages conflicting with xdg-utils
: