Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

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

Output management utility for sway and Hyprland.

License

NotificationsYou must be signed in to change notification settings

nwg-piotr/nwg-displays

Repository files navigation

nwg-shell logo

nwg-displays


This application is a part of thenwg-shell project.

Nwg-displays is an output management utility forsway andHyprlandWayland compositor, inspired by wdisplays and wlay. The program 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 and Hyprland only.

screenshot

Installation

Install from your linux distribution repository if possible.

Packaging status

Otherwise, clone this repository and run theinstall.sh script.

Dependencies

  • gtk-layer-shell
  • gtk3
  • python
  • python-gobject
  • python-i3ipc
  • python-build (make)
  • python-installer (make)
  • python-setuptools (make)
  • python-wheel (make)

Usage

$  nwg-displays -husage: nwg-displays [-h] [-m MONITORS_PATH] [-n NUM_WS] [-v]options:  -h, --help            show this help message and exit  -m MONITORS_PATH, --monitors_path MONITORS_PATH                        path to save the monitors.conf file to, default: ~/.config/hypr/monitors.conf  -n NUM_WS, --num_ws NUM_WS                        number of Workspaces in use, default: 10  -v, --version         display version information

sway

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-1workspace 2 output DP-1workspace 3 output DP-1workspace 4 output eDP-1workspace 5 output eDP-1workspace 6 output eDP-1workspace 7 output HDMI-A-1workspace 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.

Hyprland

Monitors:

Instead of configuring as described in Wiki, insert this line:

source = ~/.config/hypr/monitors.conf

Default workspace andBinding workspaces to a monitor:

Insert:

source = ~/.config/hypr/workspaces.conf

Do not setdisable_autoreload true in Hyprland settings, or you'll have to reload Hyprland manually after applying chages.

Settings

The runtime configuration file is placed in your config directory, like~/.config/nwg-displays/config.It's a simple JSON 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 high-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.

[8]ページ先頭

©2009-2025 Movatter.jp