From bcf28f0a088411ec2fa956ad7a79b7287b5ca1eb Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 9 Feb 2022 19:48:36 -0800 Subject: home-manager: let's try to configure polybar There's a few things missing (my binaries for the wifi and battery, at a minimum), but that's fine for now. --- users/fcuny/i3.nix | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'users/fcuny') diff --git a/users/fcuny/i3.nix b/users/fcuny/i3.nix index b3ac043..cea7897 100644 --- a/users/fcuny/i3.nix +++ b/users/fcuny/i3.nix @@ -8,10 +8,17 @@ in xsession.windowManager.i3 = { enable = true; config = { + modified = mod; terminal = "${pkgs.alacritty}/bin/alacritty"; + window = { + titlebar = false; + border = 2; + }; keybindings = lib.mkOptionDefault { "${mod}+r" = "exec --no-startup-id ${pkgs.rofi}/bin/rofi -show drun"; + "${mod}+l" = "exec ${pkgs.systemd}/bin/loginctl lock-session"; }; + bars = [ ]; }; }; @@ -26,19 +33,21 @@ in }; }; + config.xdg.configFile."polybar/aptos.ini".source = ../../configs/polybar/aptos.ini; + config.xdg.configFile."polybar/carmel.ini".source = ../../configs/polybar/carmel.ini; + config.xdg.configFile."polybar/modules/battery.ini".source = ../../configs/polybar/modules/battery.ini; + config.xdg.configFile."polybar/modules/bluetooth.ini".source = ../../configs/polybar/modules/bluetooth.ini; + config.xdg.configFile."polybar/modules/colors.ini".source = ../../configs/polybar/modules/colors.ini; + config.xdg.configFile."polybar/modules/date.ini".source = ../../configs/polybar/modules/date.ini; + config.xdg.configFile."polybar/modules/i3.ini".source = ../../configs/polybar/modules/i3.ini; + config.xdg.configFile."polybar/modules/mpd.ini".source = ../../configs/polybar/modules/mpd.ini; + config.xdg.configFile."polybar/modules/pulseaudio.ini".source = ../../configs/polybar/modules/pulseaudio.ini; + config.xdg.configFile."polybar/modules/wired.ini".source = ../../configs/polybar/modules/wired.ini; + config.xdg.configFile."polybar/modules/wireless.ini".source = ../../configs/polybar/modules/wireless.ini; + services.polybar = { enable = true; package = pkgs.polybarFull; - script = ""; - config = { - "bar/main" = { - background = "#000000"; - foreground = "#fafafa"; - }; - "module/pulseaudio" = { - type = "internal/pulseaudio"; - use-ui-max = false; - }; - }; + script = "polybar --config=${config.xdg.configFile."polybar/config".source}/${config.hostname}.conf &"; }; } -- cgit 1.4.1