xmodmap .xmodmap
or something similar? I don't think the file would be processed automatically, according to xmodmap(1) (unless lumina has some extra feature in this regard).#!/usr/bin/env perl
use strict;
# get output of "xinput list"
my $xinp = `xinput list`;
# get the sysmouse id
(my $smid) = $xinp =~ /^.*sysmouse\s+id=(\d)\s+.*$/gm;
# now get info for sysmouse device
$xinp = `xinput list $smid`;
# get the information in the "Button labels" line
(my $bl) = $xinp =~ /^\s+Button labels:\s(.*)$/gm;
# separate the button descriptions
my @btnt = split(/\"\s\"/, $bl);
# now get the button map
my @bmap = split(' ', `xinput get-button-map $smid`);
# build the command string to be executed
my $cmd = "xinput set-button-map $smid";
for (my $bid = 0; $bid < scalar @bmap; $bid++) {
$cmd .= ' ' . ($btnt[$bid] =~ /.*Wheel.*/ ? '0' : $bmap[$bid]);
}
# finally turn off the wheels :)
`$cmd`;
I do not really understand what you mean.
Do you want to reverse mouse wheel scroll direction?
In this case you might want to modify the perl script I wrote to disable the mouse wheel:
Perl:#!/usr/bin/env perl use strict; # get output of "xinput list" my $xinp = `xinput list`; # get the sysmouse id (my $smid) = $xinp =~ /^.*sysmouse\s+id=(\d)\s+.*$/gm; # now get info for sysmouse device $xinp = `xinput list $smid`; # get the information in the "Button labels" line (my $bl) = $xinp =~ /^\s+Button labels:\s(.*)$/gm; # separate the button descriptions my @btnt = split(/\"\s\"/, $bl); # now get the button map my @bmap = split(' ', `xinput get-button-map $smid`); # build the command string to be executed my $cmd = "xinput set-button-map $smid"; for (my $bid = 0; $bid < scalar @bmap; $bid++) { $cmd .= ' ' . ($btnt[$bid] =~ /.*Wheel.*/ ? '0' : $bmap[$bid]); } # finally turn off the wheels :) `$cmd`;
(I wrote that script to disable the wheel scrolling, because it scrolls by itself due to the cat hair in the optical sensors. Which is very annoying.)
You might adapt the script to swap the wheel scroll directions.
Edit: The code snippet is marked as "Perl", and the coloring shows that the forums' software's syntax coloring is not really functional
Just to clarify, did you actually runxmodmap .xmodmap
or something similar? I don't think the file would be processed automatically, according to xmodmap(1) (unless lumina has some extra feature in this regard).
# xmodmap .xmodmap
xmodmap: unable to open file '.xmodmap' for reading
xmodmap: 1 error encountered, aborting.
ls .xmodmap
your terminal should echo .xmodmap. Then running xmodmap .xmodmap
should work, too. startx
, addingxmodmap .xmodmap &
From the prompt I assume you were running as root at this time, so maybe you were in the wrong directory (perhaps root's home folder)? You should run the command as the user running X (which shouldn't be root). If you runls .xmodmap
your terminal should echo .xmodmap. Then runningxmodmap .xmodmap
should work, too.
Once that works, you can try to run the command automatically at startup. If you usestartx
, adding
to .xinitrc before the command that runs your window manager or desktop environment might do the trick. Many DEs also have some feature to run commands automatically when starting.Bash:xmodmap .xmodmap &
From the prompt I assume you were running as root at this time, so maybe you were in the wrong directory (perhaps root's home folder)? You should run the command as the user running X (which shouldn't be root). If you runls .xmodmap
your terminal should echo .xmodmap. Then runningxmodmap .xmodmap
should work, too.
Once that works, you can try to run the command automatically at startup. If you usestartx
, adding
to .xinitrc before the command that runs your window manager or desktop environment might do the trick. Many DEs also have some feature to run commands automatically when starting.Bash:xmodmap .xmodmap &