Skip to content

Autorandr

services.autorandr.defaultTarget

Fallback if no monitor layout can be detected. See the docs (https://github.com/phillipberndt/autorandr/blob/v1.0/README.md#how-to-use) for further reference.

Type: string

Default

"default"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.enable

Whether to enable handling of hotplug and sleep events by autorandr. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.hooks

Global hook scripts Type: submodule

Default

{ }

Example

{postswitch = {"notify-i3" = "${pkgs.i3}/bin/i3-msg restart";"change-background" = readFile ./change-background.sh;"change-dpi" = '' case "$AUTORANDR_CURRENT_PROFILE" in default) DPI=120 ;; home) DPI=192 ;; work) DPI=144 ;; *) echo "Unknown profle: $AUTORANDR_CURRENT_PROFILE" exit 1 esac echo "Xft.dpi: $DPI" | ${pkgs.xorg.xrdb}/bin/xrdb -merge '';};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.hooks.postswitch

Postswitch hook executed after mode switch. Type: attribute set of strings concatenated with "\n"

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.hooks.predetect

Predetect hook executed before autorandr attempts to run xrandr.

Type: attribute set of strings concatenated with "\n"

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.hooks.preswitch

Preswitch hook executed before mode switch. Type: attribute set of strings concatenated with "\n"

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.ignoreLid

Treat outputs as connected even if their lids are closed Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.matchEdid

Match displays based on edid instead of name Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles

Autorandr profiles specification. Type: attribute set of (submodule)

Default

{ }

Example

{"work" = {fingerprint = {eDP1 = "<EDID>";DP1 = "<EDID>";};config = {eDP1.enable = false;DP1 = {enable = true;crtc = 0;primary = true;position = "0x0";mode = "3840x2160";gamma = "1.0:0.909:0.833";rate = "60.00";rotate = "left";};};hooks.postswitch = readFile ./work-postswitch.sh;};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config

Per output profile configuration. Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.crtc

Output video display controller. Type: null or (unsigned integer, meaning >=0)

Default

null

Example

0

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.dpi

Output DPI configuration. Type: null or (positive integer, meaning >0)

Default

null

Example

96

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.enable

Whether to enable the output. Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.gamma

Output gamma configuration. Type: string

Default

""

Example

"1.0:0.909:0.833"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.mode

Output resolution. Type: string

Default

""

Example

"3840x2160"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.position

Output position Type: string

Default

""

Example

"5760x0"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.primary

Whether output should be marked as primary Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.rate

Output framerate. Type: string

Default

""

Example

"60.00"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.rotate

Output rotate configuration. Type: null or one of "normal", "left", "right", "inverted"

Default

null

Example

"left"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.scale

Output scale configuration.

Either configure by pixels or a scaling factor. When using pixel method the {manpage}xrandr(1) option --scale-from will be used; when using factor method the option --scale will be used.

This option is a shortcut version of the transform option and they are mutually exclusive.

Type: null or (submodule)

Default

null

Example

{x = 1.25;y = 1.25;}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.scale.method

Output scaling method. Type: one of "factor", "pixel"

Default

"factor"

Example

"pixel"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.scale.x

Horizontal scaling factor/pixels. Type: floating point number or (positive integer, meaning >0)

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.scale.y

Vertical scaling factor/pixels. Type: floating point number or (positive integer, meaning >0)

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.config.<name>.transform

Refer to {manpage}xrandr(1) for the documentation of the transform matrix.

Type: null or (3×3 matrix of floating point numbers)

Default

null

Example

[[ 0.6 0.0 0.0 ][ 0.0 0.6 0.0 ][ 0.0 0.0 1.0 ]]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.fingerprint

Output name to EDID mapping. Use autorandr --fingerprint to get current setup values.

Type: attribute set of string

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.hooks

Profile hook scripts. Type: submodule

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.hooks.postswitch

Postswitch hook executed after mode switch. Type: attribute set of strings concatenated with "\n"

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.hooks.predetect

Predetect hook executed before autorandr attempts to run xrandr.

Type: attribute set of strings concatenated with "\n"

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix

services.autorandr.profiles.<name>.hooks.preswitch

Preswitch hook executed before mode switch. Type: attribute set of strings concatenated with "\n"

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autorandr.nix