|
|
@ -1,8 +1,8 @@
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
exec &>/var/log/gnome-keyboard-toogle-configure.log
|
|
|
|
exec &>/var/log/gnome-keyboard-toggle-configure.log
|
|
|
|
|
|
|
|
|
|
|
|
SERVICE_NAME='gnome-keyboard-toogle-configure.service'
|
|
|
|
SERVICE_NAME='gnome-keyboard-toggle-configure.service'
|
|
|
|
|
|
|
|
|
|
|
|
GSCHEMA_FILE='/usr/share/glib-2.0/schemas/org.gnome.desktop.wm.keybindings.gschema.override'
|
|
|
|
GSCHEMA_FILE='/usr/share/glib-2.0/schemas/org.gnome.desktop.wm.keybindings.gschema.override'
|
|
|
|
|
|
|
|
|
|
|
@ -35,7 +35,7 @@ systemctl disable $SERVICE_NAME
|
|
|
|
[ -z "$SWITCH_INPUT_OPT" ] && exit
|
|
|
|
[ -z "$SWITCH_INPUT_OPT" ] && exit
|
|
|
|
|
|
|
|
|
|
|
|
if [ -f $GSCHEMA_FILE ]; then
|
|
|
|
if [ -f $GSCHEMA_FILE ]; then
|
|
|
|
TMP_FILE=$(mktemp /tmp/gnome-keyboard-toogle-configure_XXXXXXXXX)
|
|
|
|
TMP_FILE=$(mktemp /tmp/gnome-keyboard-toggle-configure_XXXXXXXXX)
|
|
|
|
sed "s/switch-input-source-backward.*$/switch-input-source-backward=${SWITCH_INPUT_OPT}/g" $GSCHEMA_FILE >$TMP_FILE || exit 1
|
|
|
|
sed "s/switch-input-source-backward.*$/switch-input-source-backward=${SWITCH_INPUT_OPT}/g" $GSCHEMA_FILE >$TMP_FILE || exit 1
|
|
|
|
mv -f $TMP_FILE $GSCHEMA_FILE
|
|
|
|
mv -f $TMP_FILE $GSCHEMA_FILE
|
|
|
|
else
|
|
|
|
else
|