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

@ -40,6 +40,25 @@ in {
wlr = {
enable = true;
settings = {
screencast = {
chooser_type = "dmenu";
# display the output as a list in favor of the default mouse selection
chooser_cmd = lib.getExe (pkgs.writeShellApplication {
name = "chooser_cmd";
runtimeInputs = [
pkgs.sway
pkgs.jq
pkgs.fuzzel
pkgs.gnused
];
text = ''
swaymsg -t get_outputs | jq '.[] | "\(.name)@\(.current_mode.width)x\(.current_mode.height) on \(.model)"' | sed 's/"//g' | fuzzel -d | sed 's/@.*//'
'';
});
max_fps = 30;
};
};
};
# keep the behaviour in < 1.17, which uses the first portal implementation found in lexicographical order, use the following: