diff options
author | obadz <obadz-git@obadz.com> | 2016-06-19 23:50:14 +0100 |
---|---|---|
committer | obadz <obadz-git@obadz.com> | 2016-06-19 23:52:14 +0100 |
commit | 0243ccfbffaffa8cac669f5b80c28ee4bb5334e6 (patch) | |
tree | 571bd66d1ca6a955a0c527175da4c6a60a1fd988 /nixos | |
parent | 6e0b40af6050f004fd545690dc8e4ce97e4e2ebb (diff) | |
download | nixpkgs-0243ccfbffaffa8cac669f5b80c28ee4bb5334e6.tar nixpkgs-0243ccfbffaffa8cac669f5b80c28ee4bb5334e6.tar.gz nixpkgs-0243ccfbffaffa8cac669f5b80c28ee4bb5334e6.tar.bz2 nixpkgs-0243ccfbffaffa8cac669f5b80c28ee4bb5334e6.tar.lz nixpkgs-0243ccfbffaffa8cac669f5b80c28ee4bb5334e6.tar.xz nixpkgs-0243ccfbffaffa8cac669f5b80c28ee4bb5334e6.tar.zst nixpkgs-0243ccfbffaffa8cac669f5b80c28ee4bb5334e6.zip |
i3 & xfce modules: add extraSessionCommands for WM-specific user-defined xsession lines
Could be extended to other window managers/desktops as well
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/xfce.nix | 10 | ||||
-rw-r--r-- | nixos/modules/services/x11/window-managers/i3.nix | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix index 4c4e3d96798..634d2a39576 100644 --- a/nixos/modules/services/x11/desktop-managers/xfce.nix +++ b/nixos/modules/services/x11/desktop-managers/xfce.nix @@ -33,6 +33,14 @@ in default = false; description = "Don't install XFCE desktop components (xfdesktop, panel and notification daemon)."; }; + + extraSessionCommands = mkOption { + default = ""; + type = types.lines; + description = '' + Shell commands executed just before XFCE is started. + ''; + }; }; }; @@ -45,6 +53,8 @@ in bgSupport = true; start = '' + ${cfg.extraSessionCommands} + # Set GTK_PATH so that GTK+ can find the theme engines. export GTK_PATH="${config.system.path}/lib/gtk-2.0:${config.system.path}/lib/gtk-3.0" diff --git a/nixos/modules/services/x11/window-managers/i3.nix b/nixos/modules/services/x11/window-managers/i3.nix index aea0a898678..cfe9439b688 100644 --- a/nixos/modules/services/x11/window-managers/i3.nix +++ b/nixos/modules/services/x11/window-managers/i3.nix @@ -15,12 +15,21 @@ let If left at the default value, $HOME/.i3/config will be used. ''; }; + extraSessionCommands = mkOption { + default = ""; + type = types.lines; + description = '' + Shell commands executed just before i3 is started. + ''; + }; }; i3config = name: pkg: cfg: { services.xserver.windowManager.session = [{ inherit name; start = '' + ${cfg.extraSessionCommands} + ${pkg}/bin/i3 ${optionalString (cfg.configFile != null) "-c \"${cfg.configFile}\"" } & |