Change values using xmlstarlet.
This commit is contained in:
parent
d4094e4884
commit
5cd5b3f8ef
|
|
@ -3,6 +3,8 @@
|
|||
apt-get -y install rox-filer
|
||||
apt-get -y install xmlstarlet
|
||||
|
||||
# Make changes to Options, menus2 using xmlstarlet at the bottom of this script.
|
||||
|
||||
DEST=/etc/skel
|
||||
ROXFILER_HOME=${DEST}/.config/rox.sourceforce.net
|
||||
MIMETYPES=${ROXFILER_HOME}/MIME-types
|
||||
|
|
@ -14,74 +16,92 @@ 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 "$@"
|
||||
|
|
@ -90,6 +110,22 @@ EOF
|
|||
# Options
|
||||
# The Options and menus2 file are not created until first run
|
||||
|
||||
#
|
||||
cat > ${ROXFILER_HOME}/ROX-Filer/Bookmarks.xml <<'EOF'
|
||||
<?xml version="1.0"?>
|
||||
<bookmarks>
|
||||
<bookmark title="/opt/tor-browser_en-US/Browser/Downloads">/opt/tor-browser_en-US/Browser/Downloads</bookmark>
|
||||
</bookmarks>
|
||||
EOF
|
||||
|
||||
|
||||
cat > ${ROXFILER_HOME}/ROX-Filer/Bookmarks.xml <<'EOF'
|
||||
<?xml version="1.0"?>
|
||||
<groups>
|
||||
<group name="1"><directory>/var/tmp</directory></group>
|
||||
</groups>
|
||||
EOF
|
||||
|
||||
cat > ${ROXFILER_HOME}/ROX-Filer/Options <<'EOF'
|
||||
<?xml version="1.0"?>
|
||||
<Options>
|
||||
|
|
@ -263,7 +299,12 @@ cat > ${ROXFILER_HOME}/ROX-Filer/menus2 <<'EOF'
|
|||
; (gtk_accel_path "<filer>/File/Count" "")
|
||||
EOF
|
||||
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='display_inherit_options']" -v '1' ${ROXFILER_HOME}/ROX-Filer/Options
|
||||
# Changes display_dir_colour from #000080 to #3399FF e17 blue
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='display_dir_colour']" -v '#3399FF' ${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='display_inherit_options']" -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
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='menu_xterm']" -v 'terminology' ${ROXFILER_HOME}/ROX-Filer/Options
|
||||
xmlstarlet edit -L -u "/Options/Option[@name='dnd_uri_handler']" -v 'x-terminal-emulator -e wget -c $1' ${ROXFILER_HOME}/ROX-Filer/Options
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue