Script to enable / disable horizontal scroll in Ubuntu

0

Some programs do not work well with the horizontal scroll in Ubuntu, such as Netbeans and Astah ( Question on the topic ).

An alternative is to enable / disable the horizontal scroll through a script.

    
asked by anonymous 28.03.2014 / 23:57

1 answer

1

The alternative I found for horizontal scroll does not get in the way of using these programs is a script to enable / disable.

Create the / usr / local / bin / hs_disable

DEVICE_NAME='ETPS/2 Elantech Touchpad'
PROP_NAME='Synaptics Two-Finger Scrolling'

xinput set-int-prop "$DEVICE_NAME" "$PROP_NAME" 8 1 0
if [[ $? -eq 0 ]] ; then
  notify-send "Script" "Horizontal Scrolling Disabled" -i /usr/share/pixmaps/touchpad_disabled.png -t 5000
else
  notify-send "Script" "Error disabling horizontal scroll." -i /usr/share/pixmaps/Cancel-icon.png -t 5000
fi

Create the / usr / local / bin / hs_enable

DEVICE_NAME='ETPS/2 Elantech Touchpad'
PROP_NAME='Synaptics Two-Finger Scrolling'

xinput set-int-prop "$DEVICE_NAME" "$PROP_NAME" 8 1 1
if [[ $? -eq 0 ]] ; then
  notify-send "Script" "Horizontal Scrolling Enabled" -i /usr/share/pixmaps/touchpad.png -t 5000
else
  notify-send "Script" "Error enabling horizontal scroll." -i /usr/share/pixmaps/Cancel-icon.png -t 5000
fi

Execute chmod + x in both files to allow execution

    
28.03.2014 / 23:57