From 139e36a39353d9821e773743ed4e796d8c96a58d Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 2 May 2014 02:27:33 +0200 Subject: i3: Factor out conky configuration for i3bar. Now we're generating full conky config files and we now have a new conky.nix, which generates shell scripts for the left and right screens, that run conky with the right configuration files. Signed-off-by: aszlig --- modules/i3/default.nix | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'modules/i3/default.nix') diff --git a/modules/i3/default.nix b/modules/i3/default.nix index 99849bf4..bbfe4658 100644 --- a/modules/i3/default.nix +++ b/modules/i3/default.nix @@ -1,36 +1,28 @@ { pkgs, config, ... }: +with pkgs.lib; + { services.xserver.windowManager = { default = "i3"; i3.enable = true; - i3.configFile = with pkgs.lib; pkgs.substituteAll ({ + i3.configFile = let + conky = import ./conky.nix { + inherit pkgs; + }; + in pkgs.substituteAll ({ name = "i3.conf"; src = ./i3.conf; - inherit (pkgs) conky dmenu xterm pvolctrl; + inherit (pkgs) dmenu xterm pvolctrl; inherit (pkgs.xorg) xsetroot; + leftHead = head config.services.xserver.xrandrHeads; rightHead = last config.services.xserver.xrandrHeads; - primaryNetInterface = "enp0s25"; - - conkyrc = pkgs.writeText "conkyrc" '' - cpu_avg_samples 2 - net_avg_samples 2 - no_buffers yes - out_to_console yes - out_to_ncurses no - out_to_stderr no - extra_newline no - update_interval 1.0 - uppercase no - use_spacer none - pad_percents 3 - use_spacer left - TEXT - ''; + leftConky = conky.left; + rightConky = conky.right; } // (let # Workaround for Synergy: we need to have polarizing heads. leftHead = head config.services.xserver.xrandrHeads; -- cgit 1.4.1