summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/tweaker/bin
diff options
context:
space:
mode:
authorBob Igo <bob@stormlogic.com>2009-07-09 19:30:00 (GMT)
committerBob Igo <bob@stormlogic.com>2009-07-09 19:30:00 (GMT)
commita5b339ba4f1340e2dbe435d780d49545a81bdebb (patch)
treed3df5374d307136aed8eeb9ecd620a0d4c5e7b88 /abs/core-testing/tweaker/bin
parent510f73d6026771c088f2b7e2bfcc8b4a8296f8d6 (diff)
downloadlinhes_pkgbuild-a5b339ba4f1340e2dbe435d780d49545a81bdebb.zip
linhes_pkgbuild-a5b339ba4f1340e2dbe435d780d49545a81bdebb.tar.gz
linhes_pkgbuild-a5b339ba4f1340e2dbe435d780d49545a81bdebb.tar.bz2
bringing smplayer into keymap tweaks
Diffstat (limited to 'abs/core-testing/tweaker/bin')
-rwxr-xr-xabs/core-testing/tweaker/bin/twk_keymap.sh61
1 files changed, 28 insertions, 33 deletions
diff --git a/abs/core-testing/tweaker/bin/twk_keymap.sh b/abs/core-testing/tweaker/bin/twk_keymap.sh
index 2aa38ee..c7f4093 100755
--- a/abs/core-testing/tweaker/bin/twk_keymap.sh
+++ b/abs/core-testing/tweaker/bin/twk_keymap.sh
@@ -32,40 +32,35 @@
# Pause || p
# Stop [] ESC
-#Make xine use keymappings that get along with mplayer, MythMusic, and ATI remote button mappings.
-#NOTE: "Prior" is PageUp and "Next" is PageDown
-#if [[ -f $MYTH_HOME/.xine/keymap ]]; then
-# sed -i "/Mute {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/MrlBrowser {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/NextMrl {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/PriorMrl {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/AudioVideoDecay+ {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/ToggleLoopMode {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/PlaylistStop {$/{N; s/key = .*/key = VOID/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/Mute {$/{N; N; s/modifier = .*/modifier = none/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/Quit {$/{N; s/key = .*/key = Escape/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/^Menu {$/{N; s/key = .*/key = m/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/Play {$/{N; s/key = .*/key = l/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/Pause {$/{N; s/key = .*/key = p/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/SeekRelative+60 {$/{N; s/key = .*/key = Next/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/SeekRelative-60 {$/{N; s/key = .*/key = Prior/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/Volume+ {$/{N; s/key = .*/key = ]/; }" $MYTH_HOME/.xine/keymap
-# sed -i "/Volume- {$/{N; s/key = .*/key = [/; }" $MYTH_HOME/.xine/keymap
-#else
-# mkdir -p $MYTH_HOME/.xine/
-# /bin/cp $KNOPPMYTH_SHARE/xine_keymap $MYTH_HOME/.xine/keymap
-#fi
-#chown -fR mythtv:mythtv $MYTH_HOME/.xine
-
-
-#Make mplayer use keymappings that get along with xine, MythMusic, and ATI remote button mappings.
+#Make mplayer use keymappings that are compatible with other media player keymappings.
#NOTE: PGUP is PageUp and PGDWN is PageDown
-if [[ -f /etc/mplayer/input.conf ]]; then
- sed -i "s/^PGUP .*/PGUP seek -60/" /etc/mplayer/input.conf
- sed -i "s/^PGDWN .*/PGDWN seek +60/" /etc/mplayer/input.conf
- sed -i "s/^p .*/p pause/" /etc/mplayer/input.conf
- sed -i "s/^l .*/l pause/" /etc/mplayer/input.conf
+MPLAYER_CONF=/etc/mplayer/input.conf
+if [[ -f $MPLAYER_CONF ]]; then
+ sed -i "s/^PGUP .*/PGUP seek -60/" $MPLAYER_CONF
+ sed -i "s/^PGDWN .*/PGDWN seek +60/" $MPLAYER_CONF
+ sed -i "s/^p .*/p pause/" $MPLAYER_CONF
+ sed -i "s/^l .*/l pause/" $MPLAYER_CONF
else
- echo "ERROR: /etc/mplayer/input.conf is missing, which is unexpected."
+ echo "ERROR: $MPLAYER_CONF is missing, which is unexpected."
exit -1
fi
+
+#Do the same for smplayer
+SMPLAYER_CONF=/home/mythtv/.config/smplayer/smplayer.ini
+if [[ -f $SMPLAYER_CONF ]]; then
+ echo "INFO: $SMPLAYER_CONF found; tweaking now"
+else
+ echo "INFO: $SMPLAYER_CONF is missing; installing full version, then (re-)tweaking"
+ sudo -u mythtv mkdir -p /home/mythtv/.config/smplayer/
+ /bin/cp $TWEAKER_ROOT/fs$SMPLAYER_CONF $SMPLAYER_CONF
+fi
+sed -i "s/rewind3=.*/rewind3=PgUp/" $SMPLAYER_CONF
+sed -i "s/forward3=.*/forward3=PgDown/" $SMPLAYER_CONF
+sed -i "s/quit=.*/quit=Esc/" $SMPLAYER_CONF
+sed -i "s/pause=.*/pause=P/" $SMPLAYER_CONF
+sed -i "s/play=.*/play=L/" $SMPLAYER_CONF
+# Remove conflicting keybindings
+sed -i "s/stop=.*/stop=/" $SMPLAYER_CONF
+sed -i "s/play_or_pause=.*/play_or_pause=/" $SMPLAYER_CONF
+sed -i "s/exit_fullscreen=.*/exit_fullscreen=/" $SMPLAYER_CONF
+sed -i "s/pl_play=.*/pl_play=/" $SMPLAYER_CONF