From 89e541f288b1ef68f29051096037a6952c2b3607 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 13 Oct 2022 07:43:48 +0200 Subject: [PATCH] remove polybar --- nixos/system/desktop/home-manager/i3.nix | 169 +++++------------------ 1 file changed, 36 insertions(+), 133 deletions(-) diff --git a/nixos/system/desktop/home-manager/i3.nix b/nixos/system/desktop/home-manager/i3.nix index 633095a..7f057e6 100644 --- a/nixos/system/desktop/home-manager/i3.nix +++ b/nixos/system/desktop/home-manager/i3.nix @@ -75,6 +75,10 @@ in } # { command = "systemctl --user restart polybar"; always = true; notification = false; } ]; + fonts = { + names = [ "Terminus" ]; + size = 9.0; + }; bars = [{ mode = "hide"; @@ -116,6 +120,37 @@ in }; }; }]; + colors = with colorTheme; { + background = background; + focused = { + background = blue; + border = blue; + childBorder = blue; + indicator = blue; + text = foreground; + }; + focusedInactive = { + background = base01; + border = base01; + childBorder = base02; + indicator = base02; + text = foreground; + }; + unfocused = { + background = base02; + border = base02; + childBorder = base02; + indicator = base02; + text = foreground; + }; + urgent = { + background = orange; + border = orange; + childBorder = background; + indicator = background; + text = foreground; + }; + }; keybindings = { "${cfg.config.modifier}+Return" = "exec ${cfg.config.terminal}"; "${cfg.config.modifier}+Shift+q" = "exit"; @@ -181,142 +216,10 @@ in # like vimperator "${cfg.config.modifier}+grave" = "exec ${pkgs.i3-easyfocus}/bin/i3-easyfocus"; - - # hide and show polybar - # enable-ipc = true; <-- is needed for this command - #"${cfg.config.modifier}+grave" = "exec ${pkgs.polybar}/bin/polybar-msg cmd toggle"; - #"${cfg.config.modifier}+equal" = "exec ${pkgs.polybar}/bin/polybar-msg cmd toggle"; }; }; + }; - # polybar - services.polybar = { - enable = false; - #package = pkgs.polybar.override { - # i3Support = true; - # #alsaSupport = true; - # iwSupport = true; - # pulseSupport = true; - # #githubSupport = true; - #}; - package = pkgs.polybarFull; - config = { - "bar/top" = { - - # needed for polybar-msg cmd toggle - enable-ipc = true; - - width = "100%"; - - # Background ARGB color (e.g. #f00, #ff992a, #ddff1023) - background = colorTheme.background; - - # Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023) - foreground = colorTheme.foreground; - - radius = 0; - - overline-size = 0; - overline-color = colorTheme.background; - underline-size = 3; - underline-color = colorTheme.background; - - border-size = 0; - - # Padding (number of spaces, pixels, or points) to add at the beginning/end of - # the bar - padding = 0; - module-margin = 1; - - modules-center = "date battery"; - modules-left = "i3"; - - tray-position = "right"; - - }; - "module/i3" = { - type = "internal/i3"; - - # Available tokens: - # %mode% - label-mode = "%mode%"; - label-mode-background = colorTheme.red; - label-mode-padding = 2; - - # Available tokens: - # %name% - # %icon% - # %index% - # %output% - label-focused = "%index%"; - label-focused-underline = colorTheme.red; - label-focused-padding = 1; - - # Available tokens: - # %name% - # %icon% - # %index% - # %output% - label-unfocused = "%index%"; - label-unfocused-padding = 1; - - # Available tokens: - # %name% - # %icon% - # %index% - # %output% - label-visible = "%index%"; - label-visible-underline = colorTheme.yellow; - label-visible-padding = 1; - - # Available tokens: - # %name% - # %icon% - # %index% - # %output% - label-urgent = "%index%"; - label-urgent-padding = 1; - }; - "module/date" = { - type = "internal/date"; - internal = 5; - date = "%Y-%m-%d"; - time = "%H:%M"; - label = "%date% %time%"; - }; - "module/battery" = { - type = "internal/battery"; - - # This is useful in case the battery never reports 100% charge - # Default: 100 - full-at = 99; - - # format-low once this charge percentage is reached - # Default: 10 - # New in version 3.6.0 - low-at = 5; - - # Use the following command to list batteries and adapters: - # $ ls -1 /sys/class/power_supply/ - battery = "BAT0"; - adapter = "AC"; - - # If an inotify event haven't been reported in this many - # seconds, manually poll for new values. - # - # Needed as a fallback for systems that don't report events - # on sysfs/procfs. - # - # Disable polling by setting the interval to 0. - # - # Default: 5 - poll-interval = 5; - }; - }; - script = '' - polybar top & - ''; - }; }; }