Skip to content

Instantly share code, notes, and snippets.

@jney
Created August 13, 2012 12:55
Show Gist options
  • Save jney/3340401 to your computer and use it in GitHub Desktop.
Save jney/3340401 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
my $device_id = $ARGV[0];
`xinput list-props ${device_id}` =~ /Synaptics Off \((\d+)\).*(\d)/;
my $param_id = $1;
my $param_status = abs($2 - 1);
system("xinput", "set-prop", $device_id, $param_id, $param_status);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment