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

nixos/exwm: allow custom Emacs load script #62104

Merged
merged 1 commit into from Nov 29, 2020
Merged

Conversation

Vizaxo
Copy link

@Vizaxo Vizaxo commented May 27, 2019

Add config option services.xserver.windowManager.exwm.loadScript,
which is passed to Emacs (as the -l option) to load after the user's init file.

Motivation for this change

This allows me to specify that (exwm-enable) should be run on the exwm Emacs instance, without putting it in my general Emacs config.

Things done

Tested on my NixOS box, both with default configuration (leaves everything as it currently is), and with example configuration (adding (exwm-enable)).

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Add config option services.xserver.windowManager.exwm.loadScript,
which is passed to Emacs (as the -l option) to load after the user's init file.
@adisbladis
Copy link
Member

What's the use-case for this?

@Vizaxo
Copy link
Author

Vizaxo commented Sep 1, 2019

What's the use-case for this?

It allows some Emacs init code to be conditionally run depending on whether or not Emacs is launched from the command line or as the window manager, without having to make any changes to the init file.

Currently, the only conditional option is whether to enable the default config or not. I don't use the default config, so I've set the load script to just initialise exwm and the rest of the configuration is done in my init file.

@moritzschaefer
Copy link
Contributor

I am at the moment struggling to get a system tray running with EXWM on NixOS (any hints/alternatives appreciated).

This PR would solve my problems elegantly, since the EXWM docs say, one should require the exwm-system-tray before exwm itself.

I'd appreciate a merge

@stale
Copy link

stale bot commented Nov 9, 2020

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 9, 2020
@moritzschaefer
Copy link
Contributor

@Stale, I don't see a reason why this PR does not get attention. Defaults are not changed and at the moment, the system is just not flexible enough.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 9, 2020
@Vizaxo
Copy link
Author

Vizaxo commented Nov 10, 2020

@Stale, I don't see a reason why this PR does not get attention. Defaults are not changed and at the moment, the system is just not flexible enough.

@moritzschaefer Thanks for pinging this again; I'd also like a merge (I'm currently using this commit rebased on top of a local nixpkgs repo). Not sure exactly if there's anything else I need to do, or if there are any maintainers we can ping to get this looked at (I can't see any maintainers listed in the source file).

@moritzschaefer
Copy link
Contributor

We can try to ping @jonringer or @SuperSandro2000.

@jonringer
Copy link
Contributor

you rang?

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

preserves old behavior, but allows for extensibility

cc @ryantm who is an emacs user (I'm a dirty vim plebeian)

@ryantm ryantm merged commit cb42d08 into NixOS:master Nov 29, 2020
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.

None yet

6 participants