mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
fix: screen sharing on wayland; add:safeeyes
this did not work due to a missing/wrong implementation of pipewire and xdg-portal. Now screensharing works in Microsoft Teams, Firefox as well as Discord. This also adds the safeeyes service.
This commit is contained in:
parent
dfe2c3922d
commit
5bb6e6038e
13 changed files with 231 additions and 43 deletions
|
|
@ -121,7 +121,7 @@
|
|||
startup = [
|
||||
|
||||
{ command = "nextcloud --background"; }
|
||||
{ command = "discord --start-minimized"; }
|
||||
{ command = "vesktop --start-minimized"; }
|
||||
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
||||
{ command = "ANKI_WAYLAND=1 anki"; }
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ in
|
|||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
checkConfig = false; # delete this line once SwayFX is fixed upstream
|
||||
package = lib.mkIf config.swarselsystems.isNixos pkgs.swayfx;
|
||||
package = lib.mkIf config.swarselsystems.isNixos null;
|
||||
systemd = {
|
||||
enable = true;
|
||||
xdgAutostart = true;
|
||||
|
|
@ -112,6 +112,7 @@ in
|
|||
Return = "mode default";
|
||||
Right = "resize grow width 10 px or 10 ppt";
|
||||
Up = "resize shrink height 10 px or 10 ppt";
|
||||
Tab = "move position center, resize set width 50 ppt height 50 ppt";
|
||||
};
|
||||
};
|
||||
defaultWorkspace = "workspace 1:一";
|
||||
|
|
@ -147,7 +148,7 @@ in
|
|||
{ title = "(?:Open|Save) (?:File|Folder|As)"; }
|
||||
{ title = "^Add$"; }
|
||||
{ title = "com-jgoodies-jdiskreport-JDiskReport"; }
|
||||
{ app_id = "discord"; }
|
||||
{ app_id = "vesktop"; }
|
||||
{ window_role = "pop-up"; }
|
||||
{ window_role = "bubble"; }
|
||||
{ window_role = "dialog"; }
|
||||
|
|
@ -212,7 +213,7 @@ in
|
|||
{
|
||||
command = "resize set width 60 ppt height 60 ppt, sticky enable";
|
||||
criteria = {
|
||||
app_id = "discord";
|
||||
app_id = "vesktop";
|
||||
};
|
||||
}
|
||||
{
|
||||
|
|
@ -255,23 +256,26 @@ in
|
|||
in
|
||||
"
|
||||
exec_always autotiling
|
||||
set $exit \"exit: [s]leep, [p]oweroff, [r]eboot, [l]ogout\"
|
||||
set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\"
|
||||
mode $exit {
|
||||
|
||||
bindsym --to-code {
|
||||
s exec \"systemctl suspend\", mode \"default\"
|
||||
l exec \"swaylock --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize && systemctl suspend \", mode \"default \"
|
||||
p exec \"systemctl poweroff\"
|
||||
r exec \"systemctl reboot\"
|
||||
l exec \"swaymsg exit\"
|
||||
u exec \"swaymsg exit\"
|
||||
|
||||
Return mode \"default\"
|
||||
Escape mode \"default\"
|
||||
${modifier}+x mode \"default\"
|
||||
${modifier}+Escape mode \"default\"
|
||||
}
|
||||
}
|
||||
|
||||
exec systemctl --user import-environment
|
||||
|
||||
|
||||
|
||||
${swayfxSettings}
|
||||
|
||||
";
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
programs.waybar = {
|
||||
|
||||
enable = true;
|
||||
# systemd.enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "sway-sessions.target";
|
||||
};
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
modules-left = [ "sway/workspaces" "custom/outer-right-arrow-dark" "sway/window" ];
|
||||
modules-center = [ "sway/mode" "custom/configwarn" ];
|
||||
modules-center = [ "sway/mode" "custom/configwarn" "custom/nix-updates" ];
|
||||
"sway/mode" = {
|
||||
format = "<span style=\"italic\" font-weight=\"bold\">{}</span>";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,8 +14,10 @@
|
|||
|
||||
keyboard.qmk.enable = true;
|
||||
|
||||
|
||||
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
enable = lib.mkIf (!config.services.pipewire.enable) true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
|
||||
|
|
|
|||
14
profiles/common/nixos/pipewire.nix
Normal file
14
profiles/common/nixos/pipewire.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
_: {
|
||||
security.rtkit.enable = true; # this is required for pipewire real-time access
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
audio.enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
4
profiles/common/nixos/safeeyes.nix
Normal file
4
profiles/common/nixos/safeeyes.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
_:
|
||||
{
|
||||
services.safeeyes.enable = true;
|
||||
}
|
||||
26
profiles/common/nixos/sway.nix
Normal file
26
profiles/common/nixos/sway.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
package = pkgs.swayfx;
|
||||
wrapperFeatures = {
|
||||
base = true;
|
||||
gtk = true;
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--unsupported-gpu"
|
||||
];
|
||||
|
||||
extraSessionCommands = ''
|
||||
export XDG_SESSION_DESKTOP=sway
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export QT_QPA_PLATFORM=wayland-egl
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export MOZ_DISABLE_RDD_SANDBOX=1
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
19
profiles/common/nixos/xdg-portal.nix
Normal file
19
profiles/common/nixos/xdg-portal.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config = {
|
||||
common = {
|
||||
default = "wlr";
|
||||
};
|
||||
};
|
||||
wlr.enable = true;
|
||||
wlr.settings.screencast = {
|
||||
output_name = "eDP-1";
|
||||
chooser_type = "simple";
|
||||
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue