Giter Site home page Giter Site logo

nwg-displays's Introduction

nwg-displays

Output management utility for sway Wayland compositor, inspired by wdisplays and wlay.

This program is a part of the nwg-shell project.

Packaging status

nwg-displays is expected to:

  • provide an intuitive GUI to manage multiple displays;
  • apply settings;
  • save outputs configuration to a text file;
  • save workspace -> output assignments to a text file;
  • support sway only.

2022-03-12-110614_screenshot

Usage

$ nwg-displays -h
usage: nwg-displays [-h] [-g] [-o OUTPUTS_PATH] [-n NUM_WS] [-v]

options:
  -h, --help            show this help message and exit
  -g, --generic_names   use Generic output names
  -o OUTPUTS_PATH, --outputs_path OUTPUTS_PATH
                        path to save Outputs config to, default: /home/piotr/.config/sway/outputs
  -n NUM_WS, --num_ws NUM_WS
                        number of Workspaces in use, default: 8
  -v, --version         display version information

The configuration saved to a file may be easily used in the sway config:

...
include ~/.config/sway/outputs
...

The program also saves the ~/.config/sway/workspaces file, which defines the workspace -> output associations.

workspace 1 output DP-1
workspace 2 output DP-1
workspace 3 output DP-1
workspace 4 output eDP-1
workspace 5 output eDP-1
workspace 6 output eDP-1
workspace 7 output HDMI-A-1
workspace 8 output HDMI-A-1

You may include it in the sway config file, instead of editing associations manually:

...
include ~/.config/sway/workspaces
...

Use --generic_names if your output names happen to be different on every restart, e.g. when you use Thunderbolt outputs.

Use --num_ws if you use workspaces in a number other than 8.

Settings

The runtime configuration file is placed in your config directory, like ~/.config/nwg-displays/config. It's a simple jsnon file:

{
  "view-scale": 0.15,
  "snap-threshold": 10,
  "indicator-timeout": 500
}
  • view-scale does not need to be changed manually. The GUI takes care of that.
  • snap-threshold specifies the flush margin of widgets representing displays. I added this value just in case, as I have no hi DPI display to test the stuff on.
  • indicator-timeout determines how long (in milliseconds) the overlay identifying screens should be visible. Set 0 to turn overlays off.

nwg-displays's People

Contributors

nwg-piotr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.