Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Here’s a script that checks the mouse brand and adjusts the xset settings accordingly:
- #one liner vesrion : MOUSE_NAME=$(xinput list --name-only | grep -i 'mouse'); if echo "$MOUSE_NAME" | grep -qi 'SIGMACHIP'; then xset m 2 7; elif echo "$MOUSE_NAME" | grep -qi 'Microsoft'; then xset m 3 8; else xset m 3 8; fi
- bash
- Αντιγραφή κώδικα
- #!/bin/bash
- # Get the name of the mouse (assuming there's only one device)
- MOUSE_NAME=$(xinput list --name-only | grep -i 'mouse')
- # Check if the mouse is of brand "XXXXX" (case-insensitive match)
- if echo "$MOUSE_NAME" | grep -qi 'SIGMACHIP'; then
- # If it's brand SIGMACHIP (Powertech), set acceleration to 2 and threshold to 7
- xset m 2 7
- else if echo "$MOUSE_NAME" | grep -qi 'Microsoft'; then
- xset m 3 8
- else
- # If it's another mouse, set acceleration to 3 and threshold to 8
- xset m 3 8
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement