Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

My personal monorepo: dotfiles, /etc-files, single-file scripts, vim plugins, webexts/userscripts, xmonad config, all that stuff…

License

NotificationsYou must be signed in to change notification settings

liskin/dotfiles

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

titleauthordate
XRANDR-SMART(1) liskin/dotfiles manpages
Tomáš Janoušek
October 2020

xrandr-smart - wrapper around xrandr which allows shell globs in--outputand automatically disables all other outputs

SYNOPSIS

xrandr-smart [xrandr options]

DESCRIPTION

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:

  1. 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.

  2. 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.

EXAMPLES

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}

SEE ALSO

xrandr(1)

https://work.lisk.in/2020/10/11/xrandr-ux.html

COPYRIGHT

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

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp