Skip to content

sway: Make onChange script use cfg.package if set#2937

Merged
berbiche merged 1 commit intonix-community:masterfrom
mgurlitz:sway-onchange-cfg-package
May 6, 2022
Merged

sway: Make onChange script use cfg.package if set#2937
berbiche merged 1 commit intonix-community:masterfrom
mgurlitz:sway-onchange-cfg-package

Conversation

@mgurlitz
Copy link
Copy Markdown
Contributor

@mgurlitz mgurlitz commented May 4, 2022

Description

On some machines, pkgs.sway is not usable and the wayland.windowManager.sway.package config can be used to substitute a working version. However pkgs.sway is still used for the onChange script, so the user may end up with two copies of sway installed or a broken build if pkgs.sway doesn't work.

Now if the package option is overriden, the onChange script will call swaymsg without pulling in pkgs.sway.

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all.
    I attempted this and was given an error "attribute 'shellDryRun' missing" in modules/programs/bash.nix

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

Copy link
Copy Markdown
Member

@berbiche berbiche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

Comment thread modules/services/window-managers/i3-sway/sway.nix
@mgurlitz mgurlitz force-pushed the sway-onchange-cfg-package branch from 7b7639f to b71da8f Compare May 5, 2022 22:46
@mgurlitz mgurlitz force-pushed the sway-onchange-cfg-package branch from b71da8f to 16287bc Compare May 5, 2022 23:04
Copy link
Copy Markdown
Member

@berbiche berbiche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@berbiche berbiche merged commit 538343b into nix-community:master May 6, 2022
@rycee
Copy link
Copy Markdown
Member

rycee commented May 6, 2022

@mgurlitz When checking "Commit messages are formatted like …" please make sure that the commit message actually follows the pattern. The checklist is intended to help the reviewer, not mislead them.

@mgurlitz
Copy link
Copy Markdown
Contributor Author

mgurlitz commented May 6, 2022

@rycee My sincere apologies! I had it right in the original PR and then stomped it when fixing the comment from berbiche.

@mgurlitz mgurlitz deleted the sway-onchange-cfg-package branch May 6, 2022 08:25
@berbiche
Copy link
Copy Markdown
Member

berbiche commented May 6, 2022

This is also my mistake, I didn't double check the commit message from the web interface 😕

@rycee
Copy link
Copy Markdown
Member

rycee commented May 6, 2022

No worries. Mainly something to keep in mind 🙂

jevy pushed a commit to jevy/home-manager that referenced this pull request Jul 1, 2022
@teto teto mentioned this pull request Aug 22, 2022
7 tasks
teto pushed a commit to teto/home-manager that referenced this pull request Aug 22, 2022
spacekookie pushed a commit to spacekookie/home-manager that referenced this pull request Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants