feat(sway-desktop): set up for screensharing of headless outputs
This commit is contained in:
parent
a78bc5488b
commit
05fd1bed80
3 changed files with 42 additions and 1 deletions
|
@ -1,3 +1,18 @@
|
|||
/*
|
||||
TODO: create helper scripts for sharing of a screen portion
|
||||
```
|
||||
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,
|
||||
|
|
|
@ -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-*"
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue