feat(sway-desktop): set up for screensharing of headless outputs

This commit is contained in:
steveej 2024-10-09 00:02:32 +02:00
parent a78bc5488b
commit 9d9ec38477
3 changed files with 44 additions and 1 deletions

View file

@ -1,3 +1,20 @@
/*
TODO: create helper scripts for sharing of a screen portion
```
# this will create a new output named HEADLESS-<n>. <n> increments by 1 with each invocation even if the output is `unplug`ged.
swaymsg create_output
# find the name and the workspace number
swaymsg -t get_outputs | jq '.[] | select(.name | test("HEADLESS-.*")) | (.name, .current_workspace)'
swaymsg output HEADLESS-1 mode 1920@108060Hz
# mirror the headless workspace on the current one
nix run nixpkgs\#wl-mirror -- HEADLESS-1
# shift windows to the workspace and switch the focus to it
*/
{
pkgs,
config,

View file

@ -22,7 +22,14 @@
layer = "top";
position = "bottom";
height = 30;
output = ["*"];
output =
# hide the bar on HEADDLESS displays as i use them only for screensharing
(
builtins.genList (i: "!HEADLESS-${builtins.toString i}") 99
)
++ [
"*"
];
# output = [
# "eDP-1"
# "DP-*"