nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
7.2k stars 1.85k forks source link

Sway: Ignores home.keyboard #3795

Open DamienCassou opened 1 year ago

DamienCassou commented 1 year ago

Are you following the right branch?

Is there an existing issue for this?

Issue description

The sway module doesn't configure the keyboard the way it is set in home.keyboard.

Home Manager allows for a high-level keyboard configuration, e.g.,

{
  home.keyboard = {
    layout = "us";
    variant = "colemak";
    options = ["ctrl:nocaps"];
  };
}

Such a configuration has no impact on Sway. I would expect setting home.keyboard would make Sway configured with this keyboard.

Workaround: Sway's handling of keyboard can be configured with something like:

{
  input = {
    "*" = {
      xkb_layout = "us";
      xkb_variant = "colemak";
      xkb_options = "ctrl:nocaps";
    };
  };
}

Would it make sense to generate the above Sway configuration from home.keyboard?

Maintainer CC

@alexarice @sumnerevans @SebTM @oxalica

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.1.18-200.fc37.x86_64, Fedora Linux, 37 (Workstation Edition), nobuild`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.1`
 - channels(root): `"nixpkgs"`
 - channels(temp): `"home-manager, nixpxkgs"`
 - channels(cassou): `"home-manager-22.11.tar.gz, nixpkgs"`
 - nixpkgs: `/home/cassou/Documents/projects/nix-system/nixpkgs`
stale[bot] commented 1 year ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

DamienCassou commented 1 year ago

This is still a problem but if maintainers are not willing to give feedback I'm fine closing the issue.

sumnerevans commented 1 year ago

If there is a clear translation, then sure, we can generate that from home.keyboard. I do worry about the options part as it seems like it's a string in the sway config. How do you translate the list to that?

Also, instead of * it should be type:keyboard so that things such as YubiKeys don't get caught in whatever layout you are using.

stale[bot] commented 1 year ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

SebTM commented 1 year ago

How do you translate the list to that?

It seems like you can just comma separate it // https://unix.stackexchange.com/questions/571885/how-to-toggle-keyboard-layout-in-sway-from-the-shell

stale[bot] commented 11 months ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

ambroisie commented 11 months ago

Not stale.

stale[bot] commented 8 months ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

sliedes commented 3 months ago

Still relevant.