An open API service indexing awesome lists of open source software.

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.

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.