From c41aab707a51597bfc5cc77003aeb624aea1489e Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Tue, 18 Jun 2024 04:49:58 +0300 Subject: [PATCH] wip system-wide catppuccin theme --- flake.lock | 101 ++++--- flake.nix | 1 + profiles/applications/home-apps.nix | 43 +++ profiles/applications/kitty.nix | 75 +++--- profiles/{workspace => applications}/mako.nix | 8 +- profiles/applications/packages.nix | 6 +- profiles/applications/rofi.nix | 2 +- profiles/applications/zathura.nix | 23 -- profiles/themes.nix | 2 +- profiles/workspace/catppuccin.nix | 123 +++++++++ profiles/workspace/cursor.nix | 2 +- profiles/workspace/gtk.nix | 70 +---- profiles/workspace/hyprland/default.nix | 4 +- profiles/workspace/kde.nix | 41 +++ profiles/workspace/kde/default.nix | 123 --------- profiles/workspace/waybar/default.nix | 252 +++++++++++++----- roles/desktop.nix | 3 +- 17 files changed, 525 insertions(+), 354 deletions(-) create mode 100644 profiles/applications/home-apps.nix rename profiles/{workspace => applications}/mako.nix (79%) delete mode 100644 profiles/applications/zathura.nix create mode 100644 profiles/workspace/catppuccin.nix create mode 100644 profiles/workspace/kde.nix delete mode 100644 profiles/workspace/kde/default.nix diff --git a/flake.lock b/flake.lock index 1f8e3dc..66817e8 100644 --- a/flake.lock +++ b/flake.lock @@ -177,6 +177,24 @@ "type": "github" } }, + "catppuccin-vsc": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1716179347, + "narHash": "sha256-DPiP4yLRcPgWgrnCC/tRp5vUk9teZIfsCT2r8jr1V8A=", + "owner": "catppuccin", + "repo": "vscode", + "rev": "b7a8806f7532a091b0170f281dbc7f35c3fc7761", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "vscode", + "type": "github" + } + }, "crane": { "inputs": { "nixpkgs": [ @@ -201,7 +219,7 @@ "deploy-rs": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "utils": "utils" }, "locked": { @@ -223,7 +241,7 @@ "cachix": "cachix", "flake-compat": "flake-compat_5", "nix": "nix_2", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "pre-commit-hooks": "pre-commit-hooks" }, "locked": { @@ -248,7 +266,7 @@ "flake-compat" ], "nix": "nix", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "poetry2nix": "poetry2nix", "pre-commit-hooks": [ "devenv", @@ -877,7 +895,7 @@ }, "hyprlang_2": { "inputs": { - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "systems": "systems_6" }, "locked": { @@ -1018,7 +1036,7 @@ "flake-compat": "flake-compat_6", "flake-utils": "flake-utils_6", "nix": "nix_3", - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1669478601, @@ -1087,7 +1105,7 @@ "nix-direnv": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_12", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -1167,7 +1185,7 @@ }, "nix-index-database": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1715483403, @@ -1235,7 +1253,7 @@ "nix_3": { "inputs": { "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "nixpkgs-regression": "nixpkgs-regression_3" }, "locked": { @@ -1445,6 +1463,22 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1669378442, + "narHash": "sha256-nm+4PN0A4SnV0SzEchxrMyKPvI3Ld/aoom4PnHeHucs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0faaf0a9bb6dedb69bfd43ac06fb27fadc476c51", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { "locked": { "lastModified": 1715266358, "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", @@ -1460,7 +1494,7 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_12": { "locked": { "lastModified": 1717868076, "narHash": "sha256-c83Y9t815Wa34khrux81j8K8ET94ESmCuwORSKm2bQY=", @@ -1476,7 +1510,7 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_13": { "locked": { "lastModified": 1718160348, "narHash": "sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus=", @@ -1492,7 +1526,7 @@ "type": "github" } }, - "nixpkgs_13": { + "nixpkgs_14": { "locked": { "lastModified": 1717112898, "narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=", @@ -1541,6 +1575,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1702272962, "narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=", @@ -1556,7 +1606,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1692808169, "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", @@ -1572,7 +1622,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1713361204, "narHash": "sha256-TA6EDunWTkc5FvDCqU3W2T3SFn0gRZqh6D/hJnM02MM=", @@ -1588,7 +1638,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1708475490, "narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=", @@ -1604,7 +1654,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1657693803, "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", @@ -1620,22 +1670,6 @@ "type": "github" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1669378442, - "narHash": "sha256-nm+4PN0A4SnV0SzEchxrMyKPvI3Ld/aoom4PnHeHucs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0faaf0a9bb6dedb69bfd43ac06fb27fadc476c51", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.05", - "repo": "nixpkgs", - "type": "github" - } - }, "poetry2nix": { "inputs": { "flake-utils": "flake-utils_3", @@ -1724,7 +1758,7 @@ "flake-compat": "flake-compat_9", "flake-parts": "flake-parts_3", "libnbtplusplus": "libnbtplusplus", - "nixpkgs": "nixpkgs_13", + "nixpkgs": "nixpkgs_14", "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { @@ -1752,6 +1786,7 @@ "base16-tokyonight-scheme": "base16-tokyonight-scheme", "cassowary": "cassowary", "catppuccin": "catppuccin", + "catppuccin-vsc": "catppuccin-vsc", "deploy-rs": "deploy-rs", "devenv": "devenv", "disko": "disko", @@ -1767,7 +1802,7 @@ "nix-fast-build": "nix-fast-build", "nix-vscode-marketplace": "nix-vscode-marketplace", "nixos-generators": "nixos-generators", - "nixpkgs": "nixpkgs_12", + "nixpkgs": "nixpkgs_13", "nixpkgs-master": "nixpkgs-master", "nixpkgs-stable": "nixpkgs-stable_3", "prismlauncher": "prismlauncher", diff --git a/flake.nix b/flake.nix index 14730cf..302e794 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; catppuccin.url = "github:catppuccin/nix"; + catppuccin-vsc.url = "github:catppuccin/vscode"; deploy-rs.url = "github:serokell/deploy-rs"; devenv.url = "github:cachix/devenv"; disko = { diff --git a/profiles/applications/home-apps.nix b/profiles/applications/home-apps.nix new file mode 100644 index 0000000..15237d8 --- /dev/null +++ b/profiles/applications/home-apps.nix @@ -0,0 +1,43 @@ +{ config, pkgs, lib, ... }: { + # TODO: settings? + home-manager.users.${config.mainuser} = { + programs = { + bat = { + enable = true; + # config = {}; + extraPackages = with pkgs.bat-extras; [ batdiff batgrep batman batwatch ]; + # syntaxes = {}; + # themes = {}; + }; + fzf.enable = true; + fzf.enableZshIntegration = true; + gitui = { + enable = true; + # keyConfig = ''''; + }; + micro = { + enable = true; + # settings = {}; + }; + zathura = { + enable = true; + extraConfig = '' + set selection-clipboard clipboard + ''; + # mappings = {}; + # options = {}; + }; + zsh.syntaxHighlighting.enable = true; + }; + }; + + defaultApplications = { + pdf = let + home = config.home-manager.users.${config.mainuser}; + zathura-pkg = home.programs.zathura.package; + in { + cmd = lib.getExe zathura-pkg; + desktop = "zathura"; + }; + }; +} \ No newline at end of file diff --git a/profiles/applications/kitty.nix b/profiles/applications/kitty.nix index 2da9053..7113052 100644 --- a/profiles/applications/kitty.nix +++ b/profiles/applications/kitty.nix @@ -10,43 +10,46 @@ in home-manager.users.${config.mainuser} = { programs.kitty = { enable = true; - font.name = "${thm.fonts.mono.family} ${thm.fontSizes.small.str}"; + # font.package = ; + font.name = thm.fonts.mono.family; + font.size = thm.fontSizes.small.int; + shellIntegration.enableZshIntegration = true; settings = { - foreground = "#${thm.base05-hex}"; - background = "#${thm.base00-hex}"; - selection_background = "#${thm.base05-hex}"; - selection_foreground = "#${thm.base00-hex}"; - url_color = "#${thm.base04-hex}"; - active_border_color = "#${thm.base03-hex}"; - inactive_border_color = "#${thm.base01-hex}"; - active_tab_background = "#${thm.base00-hex}"; - active_tab_foreground = "#${thm.base05-hex}"; - inactive_tab_background = "#${thm.base01-hex}"; - inactive_tab_foreground = "#${thm.base04-hex}"; - tab_bar_background = "#${thm.base01-hex}"; - cursor = "#${thm.base05-hex}"; - color0 = "#${thm.base00-hex}"; - color1 = "#${thm.base08-hex}"; - color2 = "#${thm.base0B-hex}"; - color3 = "#${thm.base0A-hex}"; - color4 = "#${thm.base0D-hex}"; - color5 = "#${thm.base0E-hex}"; - color6 = "#${thm.base0C-hex}"; - color7 = "#${thm.base05-hex}"; - color8 = "#${thm.base03-hex}"; - color9 = "#${thm.base08-hex}"; - color10 = "#${thm.base0B-hex}"; - color11 = "#${thm.base0A-hex}"; - color12 = "#${thm.base0D-hex}"; - color13 = "#${thm.base0E-hex}"; - color14 = "#${thm.base0C-hex}"; - color15 = "#${thm.base07-hex}"; - color16 = "#${thm.base09-hex}"; - color17 = "#${thm.base0F-hex}"; - color18 = "#${thm.base01-hex}"; - color19 = "#${thm.base02-hex}"; - color20 = "#${thm.base04-hex}"; - color21 = "#${thm.base06-hex}"; + # foreground = "#${thm.base05-hex}"; + # background = "#${thm.base00-hex}"; + # selection_background = "#${thm.base05-hex}"; + # selection_foreground = "#${thm.base00-hex}"; + # url_color = "#${thm.base04-hex}"; + # active_border_color = "#${thm.base03-hex}"; + # inactive_border_color = "#${thm.base01-hex}"; + # active_tab_background = "#${thm.base00-hex}"; + # active_tab_foreground = "#${thm.base05-hex}"; + # inactive_tab_background = "#${thm.base01-hex}"; + # inactive_tab_foreground = "#${thm.base04-hex}"; + # tab_bar_background = "#${thm.base01-hex}"; + # cursor = "#${thm.base05-hex}"; + # color0 = "#${thm.base00-hex}"; + # color1 = "#${thm.base08-hex}"; + # color2 = "#${thm.base0B-hex}"; + # color3 = "#${thm.base0A-hex}"; + # color4 = "#${thm.base0D-hex}"; + # color5 = "#${thm.base0E-hex}"; + # color6 = "#${thm.base0C-hex}"; + # color7 = "#${thm.base05-hex}"; + # color8 = "#${thm.base03-hex}"; + # color9 = "#${thm.base08-hex}"; + # color10 = "#${thm.base0B-hex}"; + # color11 = "#${thm.base0A-hex}"; + # color12 = "#${thm.base0D-hex}"; + # color13 = "#${thm.base0E-hex}"; + # color14 = "#${thm.base0C-hex}"; + # color15 = "#${thm.base07-hex}"; + # color16 = "#${thm.base09-hex}"; + # color17 = "#${thm.base0F-hex}"; + # color18 = "#${thm.base01-hex}"; + # color19 = "#${thm.base02-hex}"; + # color20 = "#${thm.base04-hex}"; + # color21 = "#${thm.base06-hex}"; enable_audio_bell = false; confirm_os_window_close = 0; }; diff --git a/profiles/workspace/mako.nix b/profiles/applications/mako.nix similarity index 79% rename from profiles/workspace/mako.nix rename to profiles/applications/mako.nix index cf4dce6..8898ebb 100644 --- a/profiles/workspace/mako.nix +++ b/profiles/applications/mako.nix @@ -19,10 +19,10 @@ height = 80; defaultTimeout = 10000; maxVisible = 10; - backgroundColor = "#${theme.base00-hex}AA"; - textColor = "#${theme.base05-hex}"; - borderColor = "#${theme.base0D-hex}AA"; - progressColor = "over #${theme.base0B-hex}"; + # backgroundColor = "#${theme.base00-hex}AA"; + # textColor = "#${theme.base05-hex}"; + # borderColor = "#${theme.base0D-hex}AA"; + # progressColor = "over #${theme.base0B-hex}"; iconPath = "${theme.iconPackage}/share/icons/${theme.iconTheme}"; maxIconSize = 24; }; diff --git a/profiles/applications/packages.nix b/profiles/applications/packages.nix index 9661116..01d3da5 100644 --- a/profiles/applications/packages.nix +++ b/profiles/applications/packages.nix @@ -5,7 +5,7 @@ with config.deviceSpecific; { home-manager.users.${config.mainuser} = { home.packages = with pkgs; [ # --- cli --- - bat + # bat comma curl curlie @@ -32,8 +32,8 @@ with config.deviceSpecific; { usbutils zip # --- tui --- - bottom - micro + # bottom + # micro ncdu procs # --- gui --- diff --git a/profiles/applications/rofi.nix b/profiles/applications/rofi.nix index 69c7ffd..30fd6c9 100644 --- a/profiles/applications/rofi.nix +++ b/profiles/applications/rofi.nix @@ -15,7 +15,7 @@ in package = pkgs.rofi-wayland; font = "${thm.fonts.mono.family} ${thm.fontSizes.header.str}"; terminal = config.defaultApplications.term.cmd; - theme = "${themeFile}"; + # theme = "${themeFile}"; }; }; } \ No newline at end of file diff --git a/profiles/applications/zathura.nix b/profiles/applications/zathura.nix deleted file mode 100644 index b17149e..0000000 --- a/profiles/applications/zathura.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config, lib, ... }: -let - home = config.home-manager.users.${config.mainuser}; - zathura-pkg = home.programs.zathura.package; -in{ - defaultApplications = { - pdf = { - cmd = lib.getExe zathura-pkg; - desktop = "zathura"; - }; - }; - - home-manager.users.${config.mainuser} = { - programs.zathura = { - enable = true; - extraConfig = '' - set selection-clipboard clipboard - ''; - # mappings = {}; - # options = {}; - }; - }; -} \ No newline at end of file diff --git a/profiles/themes.nix b/profiles/themes.nix index e5e1000..ee551b6 100644 --- a/profiles/themes.nix +++ b/profiles/themes.nix @@ -66,7 +66,7 @@ cursorPackage = pkgs.bibata-cursors-tokyonight; # cursorPackage = pkgs.bibata-cursors; - cursorSize = 16; + cursorSize = 24; cursorTheme = "Bibata-Modern-TokyoNight"; }; }; diff --git a/profiles/workspace/catppuccin.nix b/profiles/workspace/catppuccin.nix new file mode 100644 index 0000000..d59a94b --- /dev/null +++ b/profiles/workspace/catppuccin.nix @@ -0,0 +1,123 @@ +{ config, pkgs, lib, inputs, ... }: +let + thm = config.lib.base16.theme; + # this capitalizes the first letter in a string. + mkUpper = + str: + (lib.toUpper (builtins.substring 0 1 str)) + + (builtins.substring 1 (builtins.stringLength str) str); + + accent = config.home-manager.users.${config.mainuser}.catppuccin.accent; + flavor = config.home-manager.users.${config.mainuser}.catppuccin.flavor; + size = "standard"; # "standard" "compact" + tweaks = [ "normal" ]; # "black" "rimless" "normal" + flavorUpper = mkUpper flavor; + accentUpper = mkUpper accent; + sizeUpper = mkUpper size; + gtkTheme = if flavor == "latte" then "Light" else "Dark"; +in +{ + home-manager.users.${config.mainuser} = rec { + imports = [ inputs.catppuccin.homeManagerModules.catppuccin ]; + qt.style.catppuccin.enable = true; + qt.style.catppuccin.apply = true; + services.mako.catppuccin.enable = true; + programs = { + bat.catppuccin.enable = true; + bottom.enable = true; + bottom.catppuccin.enable = true; + fzf.catppuccin.enable = true; + gitui.catppuccin.enable = true; + glamour.catppuccin.enable = true; + kitty.catppuccin.enable = true; + micro.catppuccin.enable = true; + mpv.catppuccin.enable = true; + rofi.catppuccin.enable = true; + zathura.catppuccin.enable = true; + zsh.syntaxHighlighting.enable = true; + zsh.syntaxHighlighting.catppuccin.enable = true; + waybar.catppuccin.enable = true; + waybar.catppuccin.mode = "createLink"; + + vscode = { + extensions = let + ext-vscode = inputs.nix-vscode-marketplace.extensions.${pkgs.system}.vscode-marketplace; + in [ + ext-vscode.alexdauenhauer.catppuccin-noctis + ext-vscode.catppuccin.catppuccin-vsc-icons + (inputs.catppuccin-vsc.packages.${pkgs.system}.catppuccin-vsc.override { + accent = accent; + boldKeywords = false; + italicComments = false; + italicKeywords = false; + extraBordersEnabled = false; + workbenchMode = "flat"; + bracketMode = "dimmed"; + colorOverrides = { + mocha = { + base = "#1c1c2d"; + mantle = "#191925"; + crust = "#151511"; + }; + }; + customUIColors = { + "statusBar.foreground" = "accent"; + }; + }) + ]; + userSettings = { + "gopls.ui.semanticTokens" = lib.mkForce true; + "editor.semanticHighlighting.enabled" = lib.mkForce true; + "terminal.integrated.minimumContrastRatio" = lib.mkForce 1; + "window.titleBarStyle" = lib.mkForce "custom"; + "workbench.colorTheme" = lib.mkForce "Catppuccin ${flavorUpper}"; + "workbench.iconTheme" = lib.mkForce "catppuccin-${flavor}"; + }; + }; + }; + + wayland.windowManager.hyprland.extraConfig = '' + exec-once=hyprctl setcursor catppuccin-${flavor}-${accent}-cursors ${toString thm.cursorSize} + ''; + + # GTK + gtk = { + enable = true; + theme = { + name = "Catppuccin-${flavorUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}"; + package = pkgs.catppuccin-gtk.override { + inherit tweaks; + accents = [ accent ]; + variant = flavor; + }; + }; + cursorTheme = { + name = "catppuccin-${flavor}-${accent}-cursors"; + package = pkgs.catppuccin-cursors.${flavor + accentUpper}; + }; + iconTheme = { + name = "Papirus-${gtkTheme}"; + package = pkgs.catppuccin-papirus-folders.override { inherit accent flavor; }; + }; + font = { + name = "${thm.fonts.main.family}"; + size = thm.fontSizes.normal.int; + }; + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + gtk4.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + }; + home.sessionVariables.GTK_THEME = gtk.theme.name; + }; + + themes.base16.extraParams = { + iconTheme = lib.mkForce "Papirus-${gtkTheme}"; + iconPackage = lib.mkForce (pkgs.catppuccin-papirus-folders.override { inherit accent flavor; }); + cursorPackage = lib.mkForce (pkgs.catppuccin-cursors.${flavor + accentUpper}); + cursorTheme = lib.mkForce "catppuccin-${flavor}-${accent}-cursors"; + cursorSize = lib.mkForce 24; + }; +} \ No newline at end of file diff --git a/profiles/workspace/cursor.nix b/profiles/workspace/cursor.nix index ad485c8..2fbcb00 100644 --- a/profiles/workspace/cursor.nix +++ b/profiles/workspace/cursor.nix @@ -9,7 +9,7 @@ in { home-manager.users.${config.mainuser} = { home.pointerCursor = { package = thm.cursorPackage; - name = "Bibata-Modern-TokyoNight"; + name = thm.cursorTheme; size = thm.cursorSize; gtk.enable = true; x11.enable = true; diff --git a/profiles/workspace/gtk.nix b/profiles/workspace/gtk.nix index a60b101..399c2c9 100644 --- a/profiles/workspace/gtk.nix +++ b/profiles/workspace/gtk.nix @@ -1,69 +1,9 @@ -{ pkgs, config, inputs, ... }: -let - thm = config.lib.base16.theme; -in { - nixpkgs.overlays = [ - (_self: _super: { - generated-gtk-theme = - pkgs.callPackage "${inputs.rycee}/pkgs/materia-theme" { - configBase16 = { - name = "Generated"; - kind = "dark"; - colors = { - base00.hex.rgb = "${thm.base00-hex}"; - base01.hex.rgb = "${thm.base01-hex}"; - base02.hex.rgb = "${thm.base02-hex}"; - base03.hex.rgb = "${thm.base03-hex}"; - base04.hex.rgb = "${thm.base04-hex}"; - base05.hex.rgb = "${thm.base05-hex}"; - base06.hex.rgb = "${thm.base06-hex}"; - base07.hex.rgb = "${thm.base07-hex}"; - base08.hex.rgb = "${thm.base08-hex}"; - base09.hex.rgb = "${thm.base09-hex}"; - base0A.hex.rgb = "${thm.base0A-hex}"; - base0B.hex.rgb = "${thm.base0B-hex}"; - base0C.hex.rgb = "${thm.base0C-hex}"; - base0D.hex.rgb = "${thm.base0D-hex}"; - base0E.hex.rgb = "${thm.base0E-hex}"; - base0F.hex.rgb = "${thm.base0F-hex}"; - }; - }; - }; - }) - ]; +{ pkgs, config, lib, ... }: + +{ gtk.iconCache.enable = true; programs.dconf.enable = true; services.dbus.packages = with pkgs; [ dconf gcr ]; - home-manager.users.${config.mainuser} = { - gtk = { - enable = true; - iconTheme = { - name = "${thm.iconTheme}"; - package = thm.iconPackage; - }; - # theme = { - # name = "Generated"; - # package = pkgs.generated-gtk-theme; - # }; - theme = { - name = "RosePine-Main-BL"; - package = pkgs.rosepine-gtk-theme; - }; - font = { - name = "${thm.fonts.main.family}"; - size = thm.fontSizes.normal.int; - }; - gtk3.extraConfig = { - gtk-application-prefer-dark-theme = 1; - }; - gtk4.extraConfig = { - gtk-application-prefer-dark-theme = 1; - }; - }; - # home.sessionVariables.GTK_THEME = "Generated"; - home.sessionVariables.GTK_THEME = "RosePine-Main-BL"; - }; - persist.state.homeDirectories = [ - ".config/dconf" - ]; + + persist.state.homeDirectories = [ ".config/dconf" ]; } diff --git a/profiles/workspace/hyprland/default.nix b/profiles/workspace/hyprland/default.nix index 333028c..0fb0ed4 100644 --- a/profiles/workspace/hyprland/default.nix +++ b/profiles/workspace/hyprland/default.nix @@ -78,8 +78,8 @@ in with config.deviceSpecific; with lib; { } decoration { rounding=0 - active_opacity=0.92 - inactive_opacity=0.75 + active_opacity=0.95 + inactive_opacity=0.85 fullscreen_opacity=1.0 drop_shadow=true shadow_range=12 diff --git a/profiles/workspace/kde.nix b/profiles/workspace/kde.nix new file mode 100644 index 0000000..fa15664 --- /dev/null +++ b/profiles/workspace/kde.nix @@ -0,0 +1,41 @@ +{ pkgs, lib, config, ... }: +with config.lib.base16.theme; { + services.dbus.packages = + [ pkgs.systemd iconPackage ]; + services.udev.packages = [ pkgs.libmtp pkgs.media-player-info ]; + + qt.enable = true; + + environment.sessionVariables = { + KDEDIRS = + "/run/current-system/sw:/run/current-system/sw/share/kservices5:/run/current-system/sw/share/kservicetypes5:/run/current-system/sw/share/kxmlgui5"; + }; + home-manager.users.${config.mainuser} = { + qt.style.name = "kvantum"; + + xdg.configFile."kdeglobals".text = lib.generators.toGitINI { + General = { + # ColorScheme = "Generated"; + # Name = "Generated"; + fixed = "${fonts.mono.family},${fontSizes.small.str},-1,5,50,0,0,0,0,0"; + font = "${fonts.main.family},${fontSizes.small.str},-1,5,50,0,0,0,0,0"; + menuFont = "${fonts.main.family},${fontSizes.small.str},-1,5,50,0,0,0,0,0"; + shadeSortColumn = true; + smallestReadableFont = + "${fonts.main.family},${fontSizes.minimal.str},-1,5,57,0,0,0,0,0,Medium"; + toolBarFont = "${fonts.main.family},${fontSizes.small.str},-1,5,50,0,0,0,0,0"; + }; + KDE = { + DoubleClickInterval = 400; + ShowDeleteCommand = true; + SingleClick = false; + StartDragDist = 4; + StartDragTime = 500; + WheelScrollLines = 3; + contrast = 4; + # widgetStyle = "Breeze"; + }; + Icons = { Theme = "${fonts.icon.family}"; }; + }; + }; +} diff --git a/profiles/workspace/kde/default.nix b/profiles/workspace/kde/default.nix deleted file mode 100644 index a7ba977..0000000 --- a/profiles/workspace/kde/default.nix +++ /dev/null @@ -1,123 +0,0 @@ -{ pkgs, lib, config, ... }: -with config.lib.base16.theme; { - services.dbus.packages = - [ pkgs.systemd iconPackage ]; - services.udev.packages = [ pkgs.libmtp pkgs.media-player-info ]; - - qt.enable = false; - - environment.sessionVariables = { - KDEDIRS = - "/run/current-system/sw:/run/current-system/sw/share/kservices5:/run/current-system/sw/share/kservicetypes5:/run/current-system/sw/share/kxmlgui5"; - }; - home-manager.users.${config.mainuser} = { - xdg.configFile."kdeglobals".text = lib.generators.toGitINI { - "Colors:Button" = { - BackgroundAlternate = base01-hex; - BackgroundNormal = base01-hex; - DecorationFocus = base02-hex; - DecorationHover = base02-hex; - ForegroundActive = base05-hex; - ForegroundInactive = base01-hex; - ForegroundLink = base0D-hex; - ForegroundNegative = base08-hex; - ForegroundNeutral = base09-hex; - ForegroundNormal = base05-hex; - ForegroundPositive = base0B-hex; - ForegroundVisited = base03-hex; - }; - "Colors:Complementary" = { - BackgroundAlternate = base01-hex; - BackgroundNormal = base03-hex; - DecorationFocus = base02-hex; - DecorationHover = base02-hex; - ForegroundActive = base09-hex; - ForegroundInactive = base01-hex; - ForegroundLink = base0D-hex; - ForegroundNegative = base08-hex; - ForegroundNeutral = base0A-hex; - ForegroundNormal = base05-hex; - ForegroundPositive = base0B-hex; - ForegroundVisited = base02-hex; - }; - "Colors:Selection" = { - BackgroundAlternate = base0D-hex; - BackgroundNormal = base0D-hex; - DecorationFocus = base0D-hex; - DecorationHover = base0D-hex; - ForegroundActive = base05-hex; - ForegroundInactive = base05-hex; - ForegroundLink = base0D-hex; - ForegroundNegative = base08-hex; - ForegroundNeutral = base09-hex; - ForegroundNormal = base05-hex; - ForegroundPositive = base0B-hex; - ForegroundVisited = base02-hex; - }; - "Colors:Tooltip" = { - BackgroundAlternate = base01-hex; - BackgroundNormal = base00-hex; - DecorationFocus = base02-hex; - DecorationHover = base02-hex; - ForegroundActive = base02-hex; - ForegroundInactive = base01-hex; - ForegroundLink = base0D-hex; - ForegroundNegative = base08-hex; - ForegroundNeutral = base09-hex; - ForegroundNormal = base05-hex; - ForegroundPositive = base0B-hex; - ForegroundVisited = base03-hex; - }; - "Colors:View" = { - BackgroundAlternate = base01-hex; - BackgroundNormal = base00-hex; - DecorationFocus = base02-hex; - DecorationHover = base02-hex; - ForegroundActive = base02-hex; - ForegroundInactive = base01-hex; - ForegroundLink = base0D-hex; - ForegroundNegative = base08-hex; - ForegroundNeutral = base09-hex; - ForegroundNormal = base05-hex; - ForegroundPositive = base0B-hex; - ForegroundVisited = base03-hex; - }; - "Colors:Window" = { - BackgroundAlternate = base01-hex; - BackgroundNormal = base00-hex; - DecorationFocus = base02-hex; - DecorationHover = base02-hex; - ForegroundActive = base02-hex; - ForegroundInactive = base01-hex; - ForegroundLink = base0D-hex; - ForegroundNegative = base08-hex; - ForegroundNeutral = base09-hex; - ForegroundNormal = base05-hex; - ForegroundPositive = base0B-hex; - ForegroundVisited = base03-hex; - }; - General = { - ColorScheme = "Generated"; - Name = "Generated"; - fixed = "${fonts.mono.family},${fontSizes.small.str},-1,5,50,0,0,0,0,0"; - font = "${fonts.main.family},${fontSizes.small.str},-1,5,50,0,0,0,0,0"; - menuFont = "${fonts.main.family},${fontSizes.small.str},-1,5,50,0,0,0,0,0"; - shadeSortColumn = true; - smallestReadableFont = - "${fonts.main.family},${fontSizes.minimal.str},-1,5,57,0,0,0,0,0,Medium"; - toolBarFont = "${fonts.main.family},${fontSizes.small.str},-1,5,50,0,0,0,0,0"; - }; - KDE = { - DoubleClickInterval = 400; - ShowDeleteCommand = true; - SingleClick = false; - StartDragDist = 4; - StartDragTime = 500; - WheelScrollLines = 3; - contrast = 4; - widgetStyle = "Breeze"; - }; - Icons = { Theme = "${fonts.icon.family}"; }; - }; - }; -} diff --git a/profiles/workspace/waybar/default.nix b/profiles/workspace/waybar/default.nix index 5b0a59e..33fb2a8 100644 --- a/profiles/workspace/waybar/default.nix +++ b/profiles/workspace/waybar/default.nix @@ -1,97 +1,227 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: +let + thm = config.lib.base16.theme; +in with config.deviceSpecific; { home-manager.users.${config.mainuser}.programs.waybar = { enable = true; - style = builtins.readFile ./style.css; + # style = builtins.readFile ./style.css; systemd.enable = true; systemd.target = "hyprland-session.target"; settings = { mainBar = { layer = "top"; position = "top"; - margin = "10 10 0 8"; - modules-left = [ "wlr/workspaces" ]; - modules-right = if isLaptop then [ - "cpu" - "disk" - "temperature" - "custom/mem" - "backlight" + # margin = "8 8 0 8"; + modules-left = [ + "hyprland/workspaces" + # "wireplumber" + ] ++ lib.optionals isLaptop [ "battery" - "clock" - "tray" - ] else [ - "cpu" - "disk" - "temperature" - "custom/mem" - "clock" - "tray" + "backlight" ]; + modules-center = [ "hyprland/window" ]; + modules-right = [ + "tray" + "disk" + "cpu" + # "temperature" + "memory" + "clock" + ]; + backlight = { + device = "intel_backlight"; + format = "{percent}% {icon}"; + format-icons = [ "" "" "" "" "" "" "" ]; + # min-length = 7; + }; + battery = { + interval = 60; + states = { + warning = 30; + critical = 15; + }; + format = "{icon} {capacity}%"; + format-charging = "󱐌 {capacity}%"; + format-icons = [ + "" + "" + "" + "" + "" + ]; + on-update = "$HOME/.config/waybar/scripts/check_battery.sh"; + }; + clock = { + format = "{:%a, %d %b, %H:%M}"; + tooltip-format = "{calendar}"; + calendar = { + mode = "month"; + mode-mon-col = 4; + weeks-pos = "right"; + on-scroll = 1; + on-click-right = "mode"; + format = { + months = "{}"; + days = "{}"; + weeks = "W{}"; + weekdays = "{}"; + today = "{}"; + }; + }; + }; cpu = { interval = 4; - format = "{usage}%"; + format = "      {usage}%"; }; disk = { interval = 60; - format = "{free}"; + format = "      {free}%"; path = "/home"; }; - "custom/separator" = { - format = "|"; - interval = "once"; - tooltip = false; + "hyprland/window" = { + max-length = 64; }; - "wlr/workspaces" = { + "hyprland/workspaces" = { format = "{icon}"; on-click = "activate"; + disable-scroll = true; format-icons = { "10" = "0"; "Messengers" = "Msg"; "Music" = "Mus"; }; }; + memory = { + format = "     {used}GiB"; + interval = 4; + }; temperature = { + # "hwmon-path" = "/sys/class/hwmon/hwmon0/temp1_input"; critical-threshold = 80; - format = "{temperatureC}°C {icon}"; - format-icons = [ "" "" "" "" "" ]; - tooltip = false; - }; - "custom/mem" = { - format = "{} "; - interval = 3; - exec = "${pkgs.procps}/bin/free -h | ${pkgs.gawk}/bin/awk '/Mem:/{printf $7}'"; - tooltip = false; - }; - backlight = { - device = "intel_backlight"; - format = "{percent}% {icon}"; - format-icons = [ "" "" "" "" "" "" "" ]; - min-length = 7; - }; - battery = { - states = { - warning = 30; - critical = 15; - }; - format = "{capacity}% {icon}"; - format-charging = "{capacity}% "; - format-plugged = "{capacity}% "; - format-alt = "{time} {icon}"; - format-icons = [ - "" "" "" "" "" "" "" "" "" "" - ]; - on-update = "$HOME/.config/waybar/scripts/check_battery.sh"; - }; - clock = { - format = "{:%a, %d %b, %H:%M}"; - tooltip-format = "{:%Y %B}\n{calendar}"; + format = "\uf4f5     {temperatureC}°C"; + format-critical = "{temperatureC}°C"; + interval = 4; }; tray = { - icon-size = 16; - spacing = 0; + icon-size = 12; + spacing = 6; + }; + wireplumber = { + scroll-step = 5; + format = "{icon} {volume}%"; + format-muted = "\ueee8   Muted"; + format-bluetooth = "\uf282 {volume}%"; + on-click-right = "blueman-manager"; + format-icons = [ "\uf026 " "\uf027 " "\uf028 " ]; + on-click = "pavucontrol"; }; }; }; + style = let + accent = "lavender"; + in '' + @import "catppuccin.css"; + + * { + font-family: + "${thm.fonts.mono.family}", + feather; + font-weight: 500; + font-size: 11pt; + color: @text; + } + + /* main waybar */ + window#waybar { + padding: 0; + margin: 0; + /* background: rgba(26, 27, 38, 0.7); */ + background: @base; + } + + /* when hovering over modules */ + tooltip { + background: @base; + border-radius: 5%; + } + + #workspaces button { + padding: 2px; + } + + /* Sets active workspace to have a solid line on the bottom */ + #workspaces button.active { + border-bottom: 2px solid @${accent}; + border-radius: 0; + margin-top: 2px; + transition: all 0.5s ease-in-out; + } + + /* More workspace stuff for highlighting on hover */ + #workspaces button.focused { + color: @subtext0; + } + + #workspaces button.urgent { + color: #f7768e; + } + + #workspaces button:hover { + background: @crust; + color: @text; + } + + /* Sets background, padding, margins, and borders for (all) modules */ + #workspaces, + #clock, + #window, + #temperature, + #disk, + #cpu, + #memory, + #network, + #wireplumber, + #tray, + #backlight, + #battery { + /* background: rgba(26, 27, 38, 0); */ + background: @base; + padding: 0 10px; + border: 0; + } + + #workspaces { + padding-right: 0px; + } + + /* Hide window module when not focused on window or empty workspace */ + window#waybar.empty #window { + padding: 0; + margin: 0; + opacity: 0; + } + + /* Set up rounding to make these modules look like separate pills */ + #tray { + color: @${accent}; + border-radius: 12px; + margin-right: 4px; + } + + #window { + border-radius: 12px; + } + + /* close right side of bar */ + #temperature { + border-radius: 12px 0 0 12px; + } + + /* close left side of bar */ + #battery { + border-radius: 0 12px 12px 0; + } + ''; }; } \ No newline at end of file diff --git a/roles/desktop.nix b/roles/desktop.nix index 13b491d..a047401 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -14,6 +14,7 @@ email firefox gamemode + home-apps kitty mangohud mpv @@ -23,7 +24,6 @@ steam vscode waydroid - zathura # aria2 cursor @@ -44,5 +44,6 @@ vpn vscode-server + catppuccin ]; }