Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undistract-me: init at unstable-2020-08-09 #120800

Merged
merged 3 commits into from
May 3, 2021

Conversation

kira-bruneau
Copy link
Contributor

Motivation for this change

Closes #119879

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
    No binary files, enabled with:
    programs.bash.undistract-me.enable = true;
    
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@r-rmcgibbo
Copy link

Result of nixpkgs-review pr 120800 at a6e326e3 run on x86_64-linux 1

1 package built successfully:
  • undistract-me
19 suggestions:
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/share/sounds/freedesktop' doesn't match anything in file 'preexec.bash'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'date' doesn't match anything in file 'undistract-me.sh'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'notify-send' doesn't match anything in file 'undistract-me.sh'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/share/sounds/freedesktop' doesn't match anything in file 'undistract-me.sh'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'xprop' doesn't match anything in file 'preexec.bash'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'xprop' doesn't match anything in file 'undistract-me.sh'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'cut ' doesn't match anything in file 'undistract-me.sh'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'basename' doesn't match anything in file 'undistract-me.sh'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'notify-send' doesn't match anything in file 'preexec.bash'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'sed' doesn't match anything in file 'long-running.bash'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'dirname' doesn't match anything in file 'undistract-me.sh'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'paplay' doesn't match anything in file 'preexec.bash'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'date' doesn't match anything in file 'preexec.bash'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern '/usr/share/undistract-me' doesn't match anything in file 'preexec.bash'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'paplay' doesn't match anything in file 'undistract-me.sh'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'basename' doesn't match anything in file 'preexec.bash'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'cut ' doesn't match anything in file 'long-running.bash'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'dirname' doesn't match anything in file 'preexec.bash'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    
  • warning: stale-substitute

    Stale substituteInPlace detected.
    substituteStream(): WARNING: pattern 'sed' doesn't match anything in file 'undistract-me.sh'
    Near pkgs/shells/bash/undistract-me/default.nix:63:0:

       |
    63 |     description = "Notifies you when long-running terminal commands complete";
       | ^
    

nixos/modules/programs/bash/bash.nix Outdated Show resolved Hide resolved
nixos/modules/programs/bash/bash.nix Outdated Show resolved Hide resolved
pkgs/shells/bash/undistract-me/xwayland.patch Outdated Show resolved Hide resolved
nixos/modules/programs/bash/bash.nix Outdated Show resolved Hide resolved
nixos/modules/programs/bash/bash.nix Outdated Show resolved Hide resolved
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

github redirects those links now to a shorter one.

pkgs/shells/bash/undistract-me/default.nix Outdated Show resolved Hide resolved
pkgs/shells/bash/undistract-me/default.nix Outdated Show resolved Hide resolved
@lukegb
Copy link
Contributor

lukegb commented May 3, 2021

Interesting! I'm not sure if the existing bash module is the right place for this - it might make more sense for this to be a separate module which then adds to promptInit.

@mweinelt Any thoughts? :P

@mweinelt
Copy link
Member

mweinelt commented May 3, 2021

Looks bash-specific, I'm using auto-notify on zsh: https://github.com/MichaelAquilina/zsh-auto-notify

@lukegb
Copy link
Contributor

lukegb commented May 3, 2021

My argument is that the undistract-me logic would be better served in e.g. nixos/modules/programs/bash/undistract-me.nix rather than in nixos/modules/programs/bash/bash.nix.

@mweinelt
Copy link
Member

mweinelt commented May 3, 2021

I have no strong opinion here, probably better if there were multiple plugins packaged like this, but other than that?

@kira-bruneau
Copy link
Contributor Author

My argument is that the undistract-me logic would be better served in e.g. nixos/modules/programs/bash/undistract-me.nix rather than in nixos/modules/programs/bash/bash.nix.

@lukegb Oh yeah, that's a good idea. Especially since it has its own sub-configuration. Would we also want to do the same thing for bashCompletion & lsColors, even though they only have an enable option?

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented May 3, 2021

@lukegb @mweinelt I separated all the bash prompt plugins into separate modules, what do you think? I decided to add a new internal promptPluginInit option, since if promptInit is manually defined, it would override the plugin init.

@lukegb
Copy link
Contributor

lukegb commented May 3, 2021

Tidy! I like it :)

@lukegb lukegb merged commit 0f39652 into NixOS:master May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Packaging request: undistract-me
6 participants