Add MIME-types.
This commit is contained in:
parent
25f1e9a386
commit
0228991446
|
|
@ -3,11 +3,93 @@
|
|||
apt-get -y install rox-filer
|
||||
apt-get -y install xmlstarlet
|
||||
|
||||
ROXFILER_HOME=$HOME/.config/rox.sourceforce.net
|
||||
MIMETYPES=${ROXFILER_HOME}/MIME-types
|
||||
mkdir -p ${ROXFILER_HOME}/ROX-Filer/
|
||||
mkdir -p ${MIMETYPES}
|
||||
|
||||
# Mime types
|
||||
cat > $MIMETYPES/application_msword <<EOF
|
||||
#! /bin/sh
|
||||
exec libreoffice "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/application_pdf <<EOF
|
||||
#! /bin/sh
|
||||
exec atril "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/application_vnd.openxmlformats-officedocument.spreadsheetml.sheet <<EOF
|
||||
#! /bin/sh
|
||||
exec libreoffice "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/application_vnd.openxmlformats-officedocument.wordprocessingml.document <<EOF
|
||||
#! /bin/sh
|
||||
exec libreoffice "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/application_vnd.rar <<EOF
|
||||
#! /bin/sh
|
||||
exec xarchiver "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/application_x-kicad-pcb <<EOF
|
||||
#! /bin/sh
|
||||
exec kicad "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/application_x-kicad-project <<EOF
|
||||
#! /bin/sh
|
||||
exec kicad "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/application_zip <<EOF
|
||||
#! /bin/sh
|
||||
exec xarchiver "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/audio_mp4 <<EOF
|
||||
#! /bin/sh
|
||||
exec mpv --force-window "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/audio_mpeg <<EOF
|
||||
#! /bin/sh
|
||||
exec mpv --force-window "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/audio_x-m4b <<EOF
|
||||
#! /bin/sh
|
||||
exec mpv --force-window "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/image_jpeg <<EOF
|
||||
#! /bin/sh
|
||||
exec geeqie "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/image_png <<EOF
|
||||
#! /bin/sh
|
||||
exec geeqie "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/text_x-csrc <<EOF
|
||||
#! /bin/sh
|
||||
exec /opt/arduino/arduino-1.8.10 "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/video_mp4 <<EOF
|
||||
#! /bin/sh
|
||||
exec mpv --force-window "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/video_webm <<EOF
|
||||
#! /bin/sh
|
||||
exec mpv --force-window "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/video_x-matroska <<EOF
|
||||
#! /bin/sh
|
||||
exec mpv --force-window "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/video_x-ms-wmv <<EOF
|
||||
#! /bin/sh
|
||||
exec mpv --force-window "$@"
|
||||
EOF
|
||||
cat > $MIMETYPES/video_x-msvideo <<EOF
|
||||
#! /bin/sh
|
||||
exec mpv --force-window "$@"
|
||||
EOF
|
||||
|
||||
# Options
|
||||
# The Options and menus2 file are not created until first run
|
||||
mkdir -p ~/.config/rox.sourceforge.net/ROX-Filer/
|
||||
|
||||
cat > ~/.config/rox.sourceforge.net/ROX-Filer/Options <<'EOF'
|
||||
cat > ${ROXFILER_HOME}/ROX-Filer/Options <<'EOF'
|
||||
<?xml version="1.0"?>
|
||||
<Options>
|
||||
<Option name="display_dir_colour">#000080</Option>
|
||||
|
|
@ -110,7 +192,7 @@ cat > ~/.config/rox.sourceforge.net/ROX-Filer/Options <<'EOF'
|
|||
</Options>
|
||||
EOF
|
||||
|
||||
cat > ~/.config/rox.sourceforge.net/ROX-Filer/menus2 <<'EOF'
|
||||
cat > ${ROXFILER_HOME}/ROX-Filer/menus2 <<'EOF'
|
||||
; rox GtkAccelMap rc-file -*- scheme -*-
|
||||
; this file is an automated accelerator map dump
|
||||
;
|
||||
|
|
@ -180,7 +262,7 @@ cat > ~/.config/rox.sourceforge.net/ROX-Filer/menus2 <<'EOF'
|
|||
; (gtk_accel_path "<filer>/File/Count" "")
|
||||
EOF
|
||||
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='display_inherit_options']" -v '1' ~/.config/rox.sourceforge.net/ROX-Filer/Options
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='display_dirs_first']" -v '1' ~/.config/rox.sourceforge.net/ROX-Filer/Options
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='filer_view_type']" -v '1' ~/.config/rox.sourceforge.net/ROX-Filer/Options
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='menu_xterm']" -v 'xfce4-terminal' ~/.config/rox.sourceforge.net/ROX-Filer/Options
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='display_inherit_options']" -v '1' ${ROXFILER_HOME}/ROX-Filer/Options
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='display_dirs_first']" -v '1' ${ROXFILER_HOME}/ROX-Filer/Options
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='filer_view_type']" -v '1' ${ROXFILER_HOME}/ROX-Filer/Options
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='menu_xterm']" -v 'xfce4-terminal' ${ROXFILER_HOME}/ROX-Filer/Options
|
||||
|
|
|
|||
Loading…
Reference in New Issue