nwg-piotr / sway-save-outputs

Script to save current sway outputs configuration to a text file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sway-save-outputs

This simple script is intended to use on sway Wayland compositor together with output management software like wdisplays. The latter offers a great GUI to config and apply changes, but doesn't save it anywhere: I'm using Sway, why aren't my display settings saved when I log out?. A possible workaround is:

  1. In sway config include outputs configuration from an external file:
include ~/.config/sway/outputs
  1. run wdisplays, and this scripts afterwards:

wdisplays && sway-save-outputs

The script reads the current output configuration, with a little help from the python-i3ipc module (dependency!), and saves it to ~/.config/sway/outputs.

Arguments

$ sway-save-outputs -h
usage: sway-save-outputs [-h] [-f FILE] [-v]

options:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  full path to save outputs to; default:
                        /home/piotr/.config/sway/outputs
  -v, --version         display version information

About

Script to save current sway outputs configuration to a text file


Languages

Language:Python 82.0%Language:Shell 18.0%