home-manager icon indicating copy to clipboard operation
home-manager copied to clipboard

sway: indent sway configuration options

Open lulu-berlin opened this issue 1 year ago • 1 comments
trafficstars

The sway configuration maps attrsets into configuration blocks in the sway configuration files (typically ~/.config/sway/config).

The options nested inside curly braces are usually indented with 2 spaces, like is the case for mode (see: modeStr in modules/services/window-managers/i3-sway/lib/functions.nix).

Nonetheless, some other configuration blocks are not indented, so it results looking like this:

output "eDP-1" {
position 0 0
resolution 1536x960@120Hz
}

rather than:

output "eDP-1" {
  position 0 0
  resolution 1536x960@120Hz
}

This PR fixes the indentation for input, output and seat.

Description

Checklist

  • [x] Change is backwards compatible.

  • [X] Code formatted with ./format.

  • [X] Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • [X] Test cases updated/added. See example.

  • [X] Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • [ ] Added myself as module maintainer. See example.

Maintainer CC

@SebTM @alexarice @rycee

lulu-berlin avatar Aug 25 '24 21:08 lulu-berlin

I have no idea why the macos test is failing and I don't have a macos machine to test it on.

If this failure is related to my PR and not just a flaky test, I'll be happy to adapt my PR to fix it, but I don't know what I'm supposed to do.

lulu-berlin avatar Aug 26 '24 11:08 lulu-berlin

I have no idea why the macos test is failing and I don't have a macos machine to test it on.

Don't think it's related they fail on masteras well ✌🏻

SebTM avatar Sep 04 '24 14:09 SebTM

Thanks for the reassurance, @SebTM. :slightly_smiling_face:

Do you have any feedback on my PR?

lulu-berlin avatar Sep 04 '24 15:09 lulu-berlin

Seems fine. I can't merge due to the build failure as it's a required job and I can't override that, will have to wait for @rycee.

sumnerevans avatar Sep 04 '24 16:09 sumnerevans

Thank you, @sumnerevans! :pray:

lulu-berlin avatar Sep 04 '24 18:09 lulu-berlin

Thanks! Merged to master now 🙂

rycee avatar Sep 06 '24 12:09 rycee

Thank you, @rycee!

lulu-berlin avatar Sep 06 '24 16:09 lulu-berlin