From b78a6fa7c96895dfde29cf1c639bc64b3b5a63cc Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 30 May 2024 15:10:19 -0400 Subject: oops, lots of updates - got it working on beryl and my new framework laptop - refactored stuff in the process - added some catppuccin theme stuff --- lib/linux.nix | 164 ++++------------------------------------------------------ 1 file changed, 11 insertions(+), 153 deletions(-) (limited to 'lib/linux.nix') diff --git a/lib/linux.nix b/lib/linux.nix index e80b71f..ba0fbdf 100644 --- a/lib/linux.nix +++ b/lib/linux.nix @@ -2,24 +2,9 @@ let inherit (import ./const.nix) fontSize homedir gpgid; - base16-scheme = "atelier-sulphurpool"; - base16-scheme-filename = lib.strings.concatStrings (lib.strings.splitString "-" base16-scheme); - theme = lib.removeSuffix "\n" (builtins.readFile "${homedir}/.local/share/xtheme"); - xresourcesFile = "${pkgs.base16}/xresources/base16-${base16-scheme-filename}.${theme}.256.xresources"; - - # used in polybar and dunst - colors = { # derived from spacemacs - "dark" = { - highlight = "#5d4d7a"; - background = "#292b2e"; - foreground = "#b2b2b2"; - }; - "light" = { - highlight = "#67b11d"; - background = "#f6f1e1"; - foreground = "#655370"; - }; - }; + inherit (import ./theme.nix { inherit pkgs lib; }) + theme colors base16-scheme base16-scheme-filename + xresourcesFile; xmonadPackages = self: [ self.xmonad-contrib #self.taffybar # fails to build @@ -30,6 +15,10 @@ in { imports = [ ./common.nix + + # nix-channel --add https://github.com/catppuccin/nix/archive/main.tar.gz catppuccin + # + ]; home = { pointerCursor = { @@ -100,6 +89,10 @@ in zathura ]; }; + + #catppuccin.flavor = "latte"; + #catppuccin.enable = true; + fonts.fontconfig.enable = true; gtk.enable = false; # this fails because of some missing service file @@ -140,141 +133,6 @@ in postExec = "${pkgs.notmuch}/bin/notmuch new"; }; - polybar = { - # https://github.com/0x746866/dots/blob/master/polybar/config - enable = true; - config = { - "bar/top" = { - background = colors."${theme}".background; - font-0 = "FiraSans:size=${toString fontSize}"; - font-1 = "Font Awesome 5:pixelsize=11;1"; - font-2 = "MaterialIcons:size=10:antialias=false;2"; - foreground = colors."${theme}".foreground; - height = "30"; - module-margin = 1; - modules-center = "date"; - modules-left = ["ewmh" "volume-bar"]; - modules-right = [ "battery" "cpu" "mem" "temp" ]; - monitor = "\${env:MONITOR:HDMI-2}"; - monitor-fallback = "\${env:MONITOR:eDP-1}"; - radius = 0; - separator = "|"; - tray-background = colors."${theme}".background; - tray-detached = false; - tray-maxsize = 16; - tray-offset-x = 0; - tray-offset-y = 0; - tray-padding = 0; - tray-position = "right"; - tray-scale = 1; - width = "100%"; - }; - "module/ewmh" = { - type = "internal/xworkspaces"; - label-active-foreground = "#fff"; - }; - "module/date" = { - type = "internal/date"; - internal = 5; - date = "%Y.%m.%d"; - time = "%H.%M"; - label = "%date%..%time%"; - }; - "module/battery" = { - type = "internal/battery"; - battery = "BAT0"; - adapter = "AC"; - full-at = 99; - }; - "module/volume-bar" = { - type = "internal/alsa"; - master-soundcard = "hw:1"; - bar-volume-font = 2; - bar-volume-width = 9; - format-volume = ""; - label-volume = " .) "; - label-muted = " .) mute"; - label-volume-foreground = colors.${theme}.foreground; - format-muted-foreground = colors.${theme}.foreground; - bar-volume-foreground-0 = colors.${theme}.foreground; - bar-volume-foreground-1 = colors.${theme}.foreground; - bar-volume-foreground-2 = colors.${theme}.foreground; - bar-volume-foreground-3 = colors.${theme}.foreground; - bar-volume-foreground-4 = colors.${theme}.foreground; - bar-volume-foreground-5 = colors.${theme}.foreground; - bar-volume-foreground-6 = colors.${theme}.foreground; - bar-volume-gradient = true; - bar-volume-indicator = "•"; - bar-volume-fill = "•"; - bar-volume-empty = "·"; - bar-volume-empty-foreground = colors.${theme}.foreground; - }; - "module/ethernet" = { - type = "internal/network"; - interface = "enp1s0"; - label-connected = "eth up: %upspeed:9% down: %downspeed%"; - label-disconnected = "no eth"; - }; - "module/wifi" = { - type = "internal/network"; - interface = "wlan1"; - label-connected = "wifi up: %upspeed% down: %downspeed%"; - label-disconnected = "no wifi"; - }; - "module/cpu" = { - type = "internal/cpu"; - interval = 3; - format-padding = 1; - format = "