From 5bf4a00b13f54a9b9ed6f88f56fb45e2ad6e1926 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 13 Aug 2022 20:33:53 +0200 Subject: [PATCH] meowmeow --- modules/desktop.nix | 123 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/modules/desktop.nix b/modules/desktop.nix index 42ece83..887a3c4 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -90,6 +90,7 @@ in with lib; { enable = true; package = pkgs.i3-gaps; config = { + bars = []; terminal = "kitty"; workspaceAutoBackAndForth = true; # Startup {{{ @@ -257,6 +258,128 @@ in with lib; { }; }; # }}} + # Polybar {{{ + services.polybar = { + enable = true; + + script = "pkill polybar; polybar & disown"; + settings = { + colors = { + background = "#282828"; + background-alt = "#3c3836"; + foreground = "#ebdbb2"; + primary = "#d65d0e"; + secondary = "#fe8019"; + alert = "#cc241d"; + disabled = "#504945"; + }; + "bar/status" = { + # Style + width = "100%"; + height = "24px"; + radius = 0; + tray-position = "enter"; + background = "\${colors.background}"; + foreground = "\${colors.foreground}"; + line-size = "4px"; + border-color = "#00000000"; + padding-left = 0; + padding-right = 1; + module-margin = 1; + separator = "|"; + separator-foreground = "\${colors.disabled}"; + font-0 = "FiraMono Nerd Font"; + modules-left = "xworkspaces xwindow"; + modules-right = "memory cpu wlan battery date"; + cursor-click = "pointer"; + cursor-scroll = "ns-resize"; + enable-ipc = true; + wm-restack = "i3"; + override-redirect = false; + }; + + "module/xworkspaces" = { + type = "internal/xworkspaces"; + label-active = ""; + label-active-padding = 1; + label-occupied = ""; + label-occupied-padding = 1; + label-urgent = ""; + label-urgent-foreground = "\${colors.alert}"; + label-urgent-padding = 1; + label-empty = ""; + label-empty-foreground = "\${colors.disabled}"; + label-empty-padding = 1; + }; + + "module/xwindow" = { + type = "internal/xwindow"; + label = "%title:0:60:...%"; + }; + + "module/memory" = { + type = "internal/memory"; + interval = 2; + format-prefix = "﬙ "; + format-prefix-foreground = "\${colors.primary}"; + label = "%percentage_used:2%%"; + }; + + "module/cpu" = { + type = "internal/cpu"; + interval = "2"; + format-prefix = " "; + format-prefix-foreground = "\${colors.primary}"; + label = "%percentage:2%%"; + }; + + "network-base" = { + type = "internal/network"; + interval = 5; + format-connected = ""; + format-disconnected = ""; + label-disconnected = "%{F#F0C674}%ifname%%{F#707880} disconnected"; + }; + + "module/wlan" = { + "inherit" = "network-base"; + interface-type = "wireless"; + label-connected = "%{F#F0C674}%ifname%%{F-} %essid% %local_ip%"; + }; + + "module/battery" = { + type = "internal/battery"; + poll-interval = 5; + full-at = 96; + battery = "BAT0"; + adapter = "ADP1"; + time-format = "%H:%M"; + label-charging = "%percentage%% %time%"; + format-charging = ""; + label-discharging = "%percentage%% %time%"; + format-discharging = " "; + label-full = "%percentage%%"; + format-full = " "; + label-low = "%percentage%%"; + format-low = " "; + ramp.capacity = [ "" "" "" "" "" "" "" "" "" "" ]; + }; + + "module/date" = { + type = "internal/date"; + interval = 1; + date = "%Y-%m-%d %H:%M:%S"; + label = "%date%"; + label-foreground = "\${colors.foreground}"; + }; + + "settings" = { + screenchange-reload = true; + pseudo-transparency = true; + }; + }; + }; + # }}} }; }; }