Quick and simple tray icon menu for changing the monitor layout. A great companion to ARandR tool.
Quick and simple tray icon menu for changing the monitor layout. A great companion to ARandR tool.
Demonstration video on YouTube:
TODO: Update these requirements to the latest Python 3.x version. See also TODO.md.
arandr
.xrandr
with the appropriate commands. The script will be saved in ~/.screenlayout/
.sudo apt-get install python-appindicator python-gtk2 python-xdg arandr
arandr-indicator.py
and save it anywhere.chmod +x arandr-indicator.py
to make it executable../arandr-indicator.py
to execute it.To define an icon for any ~/.screenlayout/*.sh
script, just add a line containing META:ICON = "icon-name-here"
anywhere in the first 512 bytes of the file. The actual requirements are:
META:ICON
string,=
(equals sign),~/.screenlayout/
.~/.screenlayout/
).~
).The need for this tool started with my girlfriend's laptop.
The code organization was inspired by indicator-chars, written by Tobias Schlitt.
Since the files in ~/.screenlayout/*.sh
are just shell scripts, they can do more than calling xrandr
to setup the monitors. They can also configure PulseAudio to redirect audio to the HDMI port. Try the following commands:
pacmd set-card-profile 0 output:hdmi-stereo+input:analog-stereo
pacmd set-card-profile 0 output:analog-stereo+input:analog-stereo
pacmd list-cads
pavucontrol
Read more: