Skip to main content

mime linux

sudo pacman -S perl-file-mimeinfo

provides mimeopen,mimetype

mimetype .fileextension

example:

$ mimetype.py

.py:   text/x-python
 

pkg xdg-utils   has xdg-open and xdg-mime

xdg-mime query filetype photo.jpeg
xdg-mime query default image/jpeg
xdg-mime default feh.desktop image/jpeg
 env XDG_UTILS_DEBUG_LEVEL=10  xdg-mime query default text/html
 
 
 
 
alt
https://github.com/supplantr/busking
https://aur.archlinux.org/packages/busking-git/ 
cp config $HOME/.config/busking/config
@^(https?://|www\.) = $BROWSER
image/ = imv
video/ = mpv
audio/ = mpv
text/ = nvim::alacritty
application/pdf = zathura
inode/directory = ranger?:alacritty
 
 



src

https://wiki.archlinux.org/title/Xdg-utils

https://man.archlinux.org/man/xdg-mime.1

----------------------------------------------------------------------------------------------------

my new mime for pcmanfm on alpine

 cat .config/mimeapps.list 

[Removed Associations]

[Added Associations]
application/pdf=org.pwmt.zathura.desktop;
audio/mpeg=mpv.desktop;
audio/ogg=mpv.desktop;
audio/aac=mpv.desktop
audio/ac3=mpv.desktop
audio/AMR=mpv.desktop
audio/flac=mpv.desktop
audio/m4a=mpv.desktop
audio/mp1=mpv.desktop
audio/mp2=mpv.desktop
audio/mp3=mpv.desktop
audio/mp4=mpv.desktop
audio/mpeg=mpv.desktop
audio/mpegurl=mpv.desktop
audio/mpg=mpv.desktop
audio/ogg=mpv.desktop
audio/rn-mpeg=mpv.desktop
audio/scpls=mpv.desktop
audio/vnd.rn-realaudio=mpv.desktop
audio/wav=mpv.desktop
audio/x-aac=mpv.desktop
audio/x-ape=mpv.desktop
audio/x-flac=mpv.desktop
audio/x-m4a=mpv.desktop
audio/x-mp1=mpv.desktop
audio/x-mp2=mpv.desktop
audio/x-mp3=mpv.desktop
audio/x-mpeg=mpv.desktop
audio/x-mpegurl=mpv.desktop
audio/x-mpg=mpv.desktop
audio/x-ms-wma=mpv.desktop
audio/x-pls=mpv.desktop
audio/x-pn-realaudio=mpv.desktop
audio/x-pn-windows-pcm=mpv.desktop
audio/x-realaudio=mpv.desktop
audio/x-scpls=mpv.desktop
audio/x-shorten=mpv.desktop
audio/x-tta=mpv.desktop
audio/x-vorbis+ogg=mpv.desktop
audio/x-wav=mpv.desktop
audio/x-wavpack=mpv.desktop
video/mp2t=mpv.desktop
video/mp4=mpv.desktop
video/mpeg=mpv.desktop
video/msvideo=mpv.desktop
video/ogg=mpv.desktop
video/quicktime=mpv.desktop
video/vnd.rn-realvideo=mpv.desktop
video/webm=mpv.desktop
video/x-avi=mpv.desktop
video/x-fli=mpv.desktop
video/x-flv=mpv.desktop
video/x-matroska=mpv.desktop
video/x-mpeg2=mpv.desktop
video/x-mpeg=mpv.desktop
video/x-ms-afs=mpv.desktop
video/x-ms-asf=mpv.desktop
video/x-msvideo=mpv.desktop
video/x-ms-wmv=mpv.desktop
video/x-ms-wmx=mpv.desktop
video/x-ms-wvxvideo=mpv.desktop
video/x-ogm+ogg=mpv.desktop
video/x-theora=mpv.desktop
x-scheme-handler/http=
org.mozilla.firefox.desktop;
x-scheme-handler/https=
org.mozilla.firefox.desktop;
x-scheme-handler/chrome=
org.mozilla.firefox.desktop;
text/html=
org.mozilla.firefox.desktop;
application/x-extension-htm=
org.mozilla.firefox.desktop;
application/x-extension-html=
org.mozilla.firefox.desktop;
application/x-extension-shtml=
org.mozilla.firefox.desktop;
application/xhtml+xml=
org.mozilla.firefox.desktop;
application/x-extension-xhtml=
org.mozilla.firefox.desktop;
application/x-extension-xht=
org.mozilla.firefox.desktop;

[Default Applications]
x-scheme-handler/http=
org.mozilla.firefox.desktop
x-scheme-handler/https=
org.mozilla.firefox.desktop
x-scheme-handler/chrome=
org.mozilla.firefox.desktop
text/html=
org.mozilla.firefox.desktop
application/x-extension-htm=
org.mozilla.firefox.desktop
application/x-extension-html=
org.mozilla.firefox.desktop
application/x-extension-shtml=
org.mozilla.firefox.desktop
application/xhtml+xml=
org.mozilla.firefox.desktop
application/x-extension-xhtml=
org.mozilla.firefox.desktop
application/x-extension-xht=
org.mozilla.firefox.desktop

----------------------------

corresponding files are need in ~/.local/share/applications/

ls .local/share/applications/
foot-server.desktop             gtk3-icon-browser.desktop       mpv.desktop                     pcmanfm.desktop
foot.desktop                    lxshortcut.desktop              org.mozilla.firefox.desktop     userapp-Firefox-6S35G1.desktop
footclient.desktop              mimeinfo.cache                  org.pwmt.zathura.desktop

 copy desktop files from /usr/share/applications if not available 

ls /usr/share/applications/
foot-server.desktop                 htop.desktop                        lxshortcut.desktop                  org.mozilla.firefox-safe.desktop    pcmanfm-desktop-pref.desktop
foot.desktop                        imv-folder.desktop                  mimeinfo.cache                      org.mozilla.firefox.desktop         pcmanfm.desktop
footclient.desktop                  imv.desktop                         mpv.desktop                         org.pwmt.zathura-pdf-mupdf.desktop  xarchiver.desktop
gtk3-icon-browser.desktop           libfm-pref-apps.desktop             nvim.desktop                        org.pwmt.zathura.desktop

 

 

 

 

Comments

Popular posts from this blog

sxhkd volume andbrightness config for dwm on void

xbps-install  sxhkd ------------ mkdir .config/sxhkd cd .config/sxhkd nano/vim sxhkdrc -------------------------------- XF86AudioRaiseVolume         amixer -c 1 -- sset Master 2db+ XF86AudioLowerVolume         amixer -c 1 -- sset Master 2db- XF86AudioMute         amixer -c 1 -- sset Master toggle alt + shift + Escape         pkill -USR1 -x sxhkd XF86MonBrightnessUp          xbacklight -inc 20 XF86MonBrightnessDown          xbacklight -dec 20 ------------------------------------------------------------- amixer -c card_no -- sset Interface volume run alsamixer to find card no and interface names xbps-install -S git git clone https://git.suckless.org/dwm xbps-install -S base-devel libX11-devel libXft-devel libXinerama-devel  vim config.mk # FREETYPEINC = ${X11INC}/freetype2 #comment for non-bsd make clean install   cp config.def.h config.h vim config.h xbps-install -S font-symbola #for emoji on statusbar support     void audio config xbps-i

fix idm integration on chrome

Chrome Browser Integration I do not see IDM extension in Chrome extensions list. How can I install it?  How to configure IDM extension for Chrome? Please note that all IDM extensions that can be found in Google Store are fake and should not be used. You need to install IDM extension manually from IDM installation folder. Read in step 2 how to do it . 1. Please update IDM to the latest version by using  "IDM Help->Check for updates..."  menu item 2.  I don't see  "IDM Integration module"  extension in the list of extensions in  Chrome . How can I install it? Press on  Chrome  menu ( arrow 1  on the image), select  "Settings"  menu item ( arrow 2  on the image) and then select  "Extensions"  tab ( arrow 3  on the image). After this open IDM installation folder ( "C:\Program Files (x86)\Internet Download Manager"  by default,  arrow 4  on the image) and drag and drop  "IDMGCExt.crx"  ( arrow 5  on the image) file int

Hidden Wiki

Welcome to The Hidden Wiki New hidden wiki url 2015 http://zqktlwi4fecvo6ri.onion Add it to bookmarks and spread it!!! Editor's picks Bored? Pick a random page from the article index and replace one of these slots with it. The Matrix - Very nice to read. How to Exit the Matrix - Learn how to Protect yourself and your rights, online and off. Verifying PGP signatures - A short and simple how-to guide. In Praise Of Hawala - Anonymous informal value transfer system. Volunteer Here are five different things that you can help us out with. Plunder other hidden service lists for links and place them here! File the SnapBBSIndex links wherever they go. Set external links to HTTPS where available, good certificate, and same content. Care to start recording onionland's history? Check out Onionland's Museum Perform Dead Services Duties. Introduction Points Ahmia.fi - Clearnet search engine for Tor Hidden Services (allows you