https://github.com/malted/monitor-manager
A bash script to quickly change the orientation of a monitor using mouse buttons.
https://github.com/malted/monitor-manager
xorg
Last synced: 3 months ago
JSON representation
A bash script to quickly change the orientation of a monitor using mouse buttons.
- Host: GitHub
- URL: https://github.com/malted/monitor-manager
- Owner: malted
- License: cc0-1.0
- Created: 2021-02-24T16:37:18.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-07-18T23:34:21.000Z (almost 4 years ago)
- Last Synced: 2025-03-06T12:46:54.714Z (over 1 year ago)
- Topics: xorg
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Monitor-Manager
## A bash script to quickly change the orientation of an external monitor using extra mouse buttons.
### Setup
```
sudo pacman -S xorg-xrandr xorg-xinput xorg-xev
git clone https://github.com/ma1ted/Monitor-Manager.git
cd Monitor-Manager
chmod +x ./rotate-monitor.sh
```
* Then set the script to run on startup.
---
* `xinput --list`
* Find the ID corresponding to your mouse and change the value of `MOUSE_ID` accordingly.
---
* `xev`
* Gets the button ID's for the mouse buttons you intend to use.
* The logitech G203 has two side buttons with (in my case) ID's 8 & 9, which have been used here.
---
* `xrandr`
* Gets the names of the displays you want to control.
* `SECONDARY_MONITOR` is the name of the display you intend to rotate.
---
#### Note;
* Using key press events instead of mouse button press events require changing the `xinput` query ID (`MOUSE_ID`).
* Swap the mouse device ID with the correct keyboard device ID.
* Swap the mouse button ID's with the correct keys ID's.
### Only tested for KDE Plasma on Arch Linux.