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

replace use of which with command -v in i3 scripts #6363

Merged
merged 1 commit into from Mar 1, 2015

Conversation

anderspapitto
Copy link
Contributor

I haven't tested it, but it is modeled off of bjornfor@74d6315

@cillianderoiste
Copy link
Member

@anderspapitto if you haven't tested this, what issue does it solve?

@peti
Copy link
Member

peti commented Feb 22, 2015

It would be really good to test whether these changes actually work, i.e. the commit message should describe the problem that currently exists. As it is, applying this patches comes with the clear risk of unintended consequences of applying it, but there's no clear advantage to be gained.

@anderspapitto
Copy link
Contributor Author

The motivation for this patch is that when using i3, if the "which" package is not installed (at system or user level) the i3-sensible-* programs will fail. As a result of this, the keybinding for "spawn a terminal" will have no effect, which is pretty confusing until you figure it out.

An alternative approach would be to make i3 depend on "which" at runtime. However I followed the lead of the linked patch in preferring to remove the dependency.

I have also since tested this patch. I am not sure how to have the systemwide services.xserver.windowManager use my local i3 definition, so instead I did this

built and installed my modified i3

nix-env -i i3 -f /path/to/my/nixpkgs/checkout/default.nix

uninstalled which

sudo sed -i 's/which/# which/' /etc/nixos/configuration.nix
sudo nixos-rebuild switch

tested that i3-sensible-terminal and family still work without which

i3-sensible-terminal

uninstalled my modified i3

nix-env -e i3

confirmed that i3-sensible-terminal now fails (without my patch)

i3-sensible-terminal

@peti
Copy link
Member

peti commented Mar 1, 2015

Thanks a lot for the detailed description of the change!

peti added a commit that referenced this pull request Mar 1, 2015
replace use of `which` with `command -v` in i3 scripts
@peti peti merged commit d8a5864 into NixOS:master Mar 1, 2015
@anderspapitto anderspapitto mentioned this pull request Jun 5, 2015
@Ericson2314 Ericson2314 mentioned this pull request Apr 26, 2020
10 tasks
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.

None yet

3 participants