Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7
My personal monorepo: dotfiles, /etc-files, single-file scripts, vim plugins, webexts/userscripts, xmonad config, all that stuff…
License
liskin/dotfiles
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
title | author | date |
---|---|---|
XRANDR-SMART(1) liskin/dotfiles manpages | Tomáš Janoušek | October 2020 |
xrandr-smart - wrapper around xrandr which allows shell globs in--output
and automatically disables all other outputs
xrandr-smart [xrandr options]
xrandr-smart
improves the user experience of thexrandr
command-line andmakes it easier to write generic layout scripts without harcoding outputnames. It works in two steps:
For every
--output
, treat the argument as an extended shell glob (see"Pattern Matching" inbash
(1)) — with optional disambiguation index (seelater) — and find the uniqueconnected output that matches.Fail otherwise.For every other output (connected or disconnected) not mentioned by any
--output
option, append--output out --off
to disable it.
Disambiguation index syntax:glob#n
selectsn
-th output matchingglob
.
Vertical layout, external monitor above laptop display:
function layout-vertical { xrandr-smart --output 'eDP-*' --auto \ --output '!(eDP-*)' --auto --above 'eDP-*'}
Horizontal layout, external monitor to the right of laptop display:
function layout-horizontal { xrandr-smart --output 'eDP-*' --auto \ --output '!(eDP-*)' --auto --right-of 'eDP-*'}
Both external monitor/projector and laptop display showing the same:
function layout-clone { xrandr-smart --output 'eDP-*' --auto \ --output '!(eDP-*)' --auto --same-as 'eDP-*'}
Disable laptop display, use external monitor only (useful for games):
function layout-extonly { xrandr-smart --output '!(eDP-*)' --auto}
Triangle layout, two external monitors side-by-side and laptop display beneaththem:
function layout-triangle { xrandr-smart --output '!(eDP-*)#0' --mode 1920x1080 --pos 0x0 \ --output '!(eDP-*)#1' --mode 1920x1080 --pos 1920x0 \ --output 'eDP-*' --mode 1920x1080 --pos 960x1080 --primary}
xrandr
(1)
https://work.lisk.in/2020/10/11/xrandr-ux.html
Copyright © 2021 Tomáš Janoušek
License: MIT. Seehttps://github.com/liskin/dotfiles/blob/home/LICENSE.
About
My personal monorepo: dotfiles, /etc-files, single-file scripts, vim plugins, webexts/userscripts, xmonad config, all that stuff…
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.