Sway: Difference between revisions

Phobos (talk | contribs)
mNo edit summary
Phobos (talk | contribs)
m Added a section for Home Manager Touchpad config
Line 175: Line 175:
   };
   };
};|name=/etc/nixos/home.nix|lang=nix}}For an on screen display for audio and brightness, check [[swayosd]].
};|name=/etc/nixos/home.nix|lang=nix}}For an on screen display for audio and brightness, check [[swayosd]].
=== Touchpad ===
See the [https://www.mankier.com/5/sway-input sway-input man page] for options.
{{File|3=wayland.windowManager.sway =
  {
    enable = true;
    config.input = {
      "type:touchpad" = {
        # Enables or disables tap for specified input device.
        tap = "enabled";
        # Enables or disables natural (inverted) scrolling for the specified input device.
        natural_scroll = "enabled";
        # Enables or disables disable-while-typing for the specified input device.
        dwt = "enabled";
      };
    };
  };|name=/etc/nixos/home.nix|lang=nix}}


== Troubleshooting ==
== Troubleshooting ==
Line 338: Line 355:


=== Screen sharing with Firefox, Chromium ===
=== Screen sharing with Firefox, Chromium ===
<syntaxhighlight lang="nix">
{{File|3={ pkgs, ... }:
{ pkgs, ... }:
{
{
   # xdg portal + pipewire = screensharing
   # xdg portal + pipewire = screensharing
Line 351: Line 367:
     pulse.enable = true;
     pulse.enable = true;
   };
   };
}
}|name=/etc/nixos/configuration.nix|lang=nix}}{{Tip|Make sure that you do not have conflicting definitions for xdg.portal in Home Manager.}}
</syntaxhighlight>


=== Screen dimming with wl-gammarelay-rs ===
=== Screen dimming with wl-gammarelay-rs ===
Add <code>wl-gammarelay-rs</code> to programs.sway.extraPackages, then add the following to sway config:
Add <code>wl-gammarelay-rs</code> to programs.sway.extraPackages, then add the following to sway config:
<syntaxhighlight>
<syntaxhighlight>