From 861c658590b6191c587bafa29da5174f7057fa47 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Sun, 19 Jan 2025 20:42:47 +0100 Subject: [PATCH] treewide: move styling to their respective modules As a first step towards getting rid of home-manager and going towards a cleaner, more concise configuration, I decided to move back the styling to their respective home-manager modules. Since I'm not planning to share my styling module anymore, as it is very specific to my config, I just decided to merge everything together. commit 078334af4819c2710644017feb8c2b1f2eaf8441 Author: Anthony Rodriguez Date: Sun Jan 19 20:41:14 2025 +0100 treewide: finish moving rest of styling to their respective hm modules commit 57432a9655640f37287b297101b0eb733bfc8c44 Author: Anthony Rodriguez Date: Fri Jan 17 12:13:54 2025 +0100 treewide: move regreet styling out of module commit 6fef9e0a760fcb0cd968e65c0c3585e9aaf93f06 Author: Anthony Rodriguez Date: Fri Jan 17 12:10:33 2025 +0100 treewide: move swaync styling out of module commit 2f4a8433c78d10259c3b45bb4ff35368a619537e Author: Anthony Rodriguez Date: Fri Jan 17 12:06:33 2025 +0100 treewide: move nvf styling out of module commit a31591529804f3428e9d14117e2eac1ac7f1405d Author: Anthony Rodriguez Date: Fri Jan 17 12:02:58 2025 +0100 treewide: move hyprlock styling out of module commit 0fe6f67b20937f515717caa72212f4415ea5d8ac Author: Anthony Rodriguez Date: Fri Jan 17 12:02:49 2025 +0100 modules/nix/core/home-manager: import lib' in extraSpecialArgs commit e09569b921de80edc0355ee0645d99dc7617ad3c Author: Anthony Rodriguez Date: Fri Jan 17 11:55:05 2025 +0100 treewide: move hyprland styling out of module commit eb25ce0c431690c050ac59d47dba6e5528e28181 Author: Anthony Rodriguez Date: Fri Jan 17 11:43:35 2025 +0100 modules/nix/style/modules: remove styling for unused programs commit efb6b91ce19f113fa2b814cebdd6eb7ee97a865a Author: Anthony Rodriguez Date: Fri Jan 17 11:00:54 2025 +0100 treewide: move foot styling out of module commit 4c06a66b5e7a63fbec5179feefdda99755dc9c60 Author: Anthony Rodriguez Date: Fri Jan 17 10:56:05 2025 +0100 treewide: move fish styling out of module commit b3a03e5e9b144bc8e4645fd1b555c1932c4019e8 Author: Anthony Rodriguez Date: Fri Jan 17 10:47:43 2025 +0100 treewide: move discord styling out of module --- modules/hm/default.nix | 12 + modules/hm/programs/default.nix | 1 + .../style/modules => hm/programs}/discord.nix | 17 +- modules/hm/programs/editors/neovim.nix | 397 +++++++++--------- modules/hm/programs/hypr/land/default.nix | 175 ++++---- modules/hm/programs/hypr/lock.nix | 102 ++++- modules/hm/programs/media/default.nix | 6 +- .../programs/media}/tidal-hifi.nix | 17 +- modules/hm/programs/misc.nix | 1 - .../hm/programs/terminal/emulators/foot.nix | 37 +- modules/hm/programs/terminal/shell/fish.nix | 37 ++ .../hm/programs/terminal/shell/starship.nix | 14 + modules/hm/programs/walker.nix | 151 ++++++- modules/hm/programs/waybar.nix | 89 +++- modules/hm/services/default.nix | 1 + .../style/modules => hm/services}/gtk.nix | 16 +- modules/hm/services/swaync/default.nix | 54 ++- modules/nix/core/home-manager.nix | 3 +- modules/nix/default.nix | 1 - modules/nix/services/greetd.nix | 28 +- modules/nix/style/default.nix | 29 -- modules/nix/style/modules/fish.nix | 46 -- modules/nix/style/modules/foot.nix | 45 -- modules/nix/style/modules/fuzzel.nix | 27 -- modules/nix/style/modules/hyprland.nix | 27 -- modules/nix/style/modules/hyprlock.nix | 109 ----- modules/nix/style/modules/niri.nix | 21 - modules/nix/style/modules/nvf.nix | 17 - modules/nix/style/modules/regreet.nix | 21 - modules/nix/style/modules/starship.nix | 27 -- modules/nix/style/modules/swaylock.nix | 47 --- modules/nix/style/modules/swaync.nix | 14 - modules/nix/style/modules/walker.nix | 159 ------- modules/nix/style/modules/waybar.nix | 96 ----- modules/nix/style/modules/zathura.nix | 43 -- 35 files changed, 824 insertions(+), 1063 deletions(-) rename modules/{nix/style/modules => hm/programs}/discord.nix (93%) rename modules/{nix/style/modules => hm/programs/media}/tidal-hifi.nix (96%) rename modules/{nix/style/modules => hm/services}/gtk.nix (62%) delete mode 100644 modules/nix/style/default.nix delete mode 100644 modules/nix/style/modules/fish.nix delete mode 100644 modules/nix/style/modules/foot.nix delete mode 100644 modules/nix/style/modules/fuzzel.nix delete mode 100644 modules/nix/style/modules/hyprland.nix delete mode 100644 modules/nix/style/modules/hyprlock.nix delete mode 100644 modules/nix/style/modules/niri.nix delete mode 100644 modules/nix/style/modules/nvf.nix delete mode 100644 modules/nix/style/modules/regreet.nix delete mode 100644 modules/nix/style/modules/starship.nix delete mode 100644 modules/nix/style/modules/swaylock.nix delete mode 100644 modules/nix/style/modules/swaync.nix delete mode 100644 modules/nix/style/modules/walker.nix delete mode 100644 modules/nix/style/modules/waybar.nix delete mode 100644 modules/nix/style/modules/zathura.nix diff --git a/modules/hm/default.nix b/modules/hm/default.nix index a5aa301..b9f8201 100644 --- a/modules/hm/default.nix +++ b/modules/hm/default.nix @@ -1,6 +1,18 @@ { + lib, + osConfig, + ... +}: let + styleCfg = osConfig.local.style; +in { imports = [ ./programs ./services ]; + + home.pointerCursor = lib.mkIf styleCfg.enable { + inherit (styleCfg.cursorTheme) name package size; + x11.enable = true; + gtk.enable = true; + }; } diff --git a/modules/hm/programs/default.nix b/modules/hm/programs/default.nix index 49f08d0..5319976 100644 --- a/modules/hm/programs/default.nix +++ b/modules/hm/programs/default.nix @@ -6,6 +6,7 @@ ./media ./terminal + ./discord.nix ./games.nix ./gnome.nix ./misc.nix diff --git a/modules/nix/style/modules/discord.nix b/modules/hm/programs/discord.nix similarity index 93% rename from modules/nix/style/modules/discord.nix rename to modules/hm/programs/discord.nix index b24f009..b7523d8 100644 --- a/modules/nix/style/modules/discord.nix +++ b/modules/hm/programs/discord.nix @@ -1,13 +1,15 @@ { lib, - config, + pkgs, + osConfig, ... }: let - cfg = config.local.style; + styleCfg = osConfig.local.style; in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - xdg.configFile."vesktop/themes/midnight-base16.css".text = with cfg.scheme.palette; '' + config = lib.mkIf osConfig.local.profiles.desktop.enable { + home.packages = [pkgs.vesktop]; + xdg.configFile."vesktop/themes/midnight-base16.css".text = with styleCfg.scheme.palette; + lib.mkIf styleCfg.enable '' /** * @name Midnight-base16 * @description A dark, rounded discord theme. Updated to use base16 colors. @@ -30,7 +32,7 @@ in { --font: 'gg sans'; /* top left corner text */ - --corner-text: '${cfg.scheme.name}'; + --corner-text: '${styleCfg.scheme.name}'; /* color of status indicators and window controls */ --online-indicator: ${base0B}; /* change to #23a55a for default green */ @@ -108,6 +110,5 @@ in { fill: var(--text-0) !important; } ''; - } - ]; + }; } diff --git a/modules/hm/programs/editors/neovim.nix b/modules/hm/programs/editors/neovim.nix index 3b78413..dfb6e2d 100644 --- a/modules/hm/programs/editors/neovim.nix +++ b/modules/hm/programs/editors/neovim.nix @@ -4,225 +4,230 @@ pkgs, osConfig, ... -}: { +}: let + styleCfg = osConfig.local.style; +in { imports = [inputs.nvf.homeManagerModules.default]; config = lib.mkIf osConfig.local.profiles.desktop.enable { programs.nvf = { enable = true; - settings.vim = { - viAlias = true; - vimAlias = true; - enableLuaLoader = true; - preventJunkFiles = true; - useSystemClipboard = true; - options = { - tabstop = 4; - autoindent = false; - }; + settings.vim = lib.mkMerge [ + { + viAlias = true; + vimAlias = true; + enableLuaLoader = true; + preventJunkFiles = true; + useSystemClipboard = true; + options = { + tabstop = 4; + autoindent = false; + }; - luaConfigPost = '' - vim.opt.formatoptions:remove('c') - vim.opt.formatoptions:remove('r') - vim.opt.formatoptions:remove('o') - ''; + luaConfigPost = '' + vim.opt.formatoptions:remove('c') + vim.opt.formatoptions:remove('r') + vim.opt.formatoptions:remove('o') + ''; - maps = { - normal = { - "m" = { - silent = true; - action = "make"; - }; # Same as nnoremap m make - "t" = { - silent = true; - action = "Neotree toggle"; + maps = { + normal = { + "m" = { + silent = true; + action = "make"; + }; # Same as nnoremap m make + "t" = { + silent = true; + action = "Neotree toggle"; + }; }; }; - }; - theme = lib.mkDefault { - enable = true; - name = "catppuccin"; - style = "macchiato"; - }; + ui = { + noice.enable = true; + }; + notify.nvim-notify.enable = true; - ui = { - noice.enable = true; - }; - notify.nvim-notify.enable = true; + statusline = { + lualine = { + enable = true; + theme = "auto"; + componentSeparator = { + left = ""; + }; + sectionSeparator = { + left = ""; + right = ""; + }; - statusline = { - lualine = { + activeSection = { + a = [ + '' + { + "mode", + separator = { right = "" }, + right_padding = 2 + } + '' + ]; + b = [ + '' + { + "branch", + icon = '', + separator = { right = "" } + } + '' + ]; + c = [ + '' + "filename" + '' + ]; + x = [ + '' + { + "diagnostics", + sources = {'nvim_lsp', 'nvim_diagnostic', 'nvim_diagnostic', 'vim_lsp', 'coc'}, + symbols = {error = '󰅙 ', warn = ' ', info = ' ', hint = '󰌵 '}, + colored = true, + update_in_insert = false, + always_visible = false, + diagnostics_color = { + color_error = { fg = 'red' }, + color_warn = { fg = 'yellow' }, + color_info = { fg = 'cyan' }, + }, + } + '' + '' + "filetype" + '' + ]; + y = [ + '' + { + "progress", + separator = { left = "" }, + } + '' + '' + '' + ]; + z = [ + '' + { + "location", + separator = { left = "" }, + left_padding = 2 + } + '' + '' + { + "fileformat", + color = {fg='black'}, + symbols = { + unix = '', -- e712 + dos = '', -- e70f + mac = '', -- e711 + }, + } + '' + ]; + }; + + inactiveSection = { + a = [ + '' + "filename" + '' + ]; + z = [ + '' + "location" + '' + ]; + }; + }; + }; + + git.enable = true; + + utility = { + vim-wakatime.enable = true; + surround.enable = true; + motion.leap = { + enable = true; + }; + }; + + lsp = { enable = true; - theme = "auto"; - componentSeparator = { - left = ""; - }; - sectionSeparator = { - left = ""; - right = ""; - }; - - activeSection = { - a = [ - '' - { - "mode", - separator = { right = "" }, - right_padding = 2 - } - '' - ]; - b = [ - '' - { - "branch", - icon = '', - separator = { right = "" } - } - '' - ]; - c = [ - '' - "filename" - '' - ]; - x = [ - '' - { - "diagnostics", - sources = {'nvim_lsp', 'nvim_diagnostic', 'nvim_diagnostic', 'vim_lsp', 'coc'}, - symbols = {error = '󰅙 ', warn = ' ', info = ' ', hint = '󰌵 '}, - colored = true, - update_in_insert = false, - always_visible = false, - diagnostics_color = { - color_error = { fg = 'red' }, - color_warn = { fg = 'yellow' }, - color_info = { fg = 'cyan' }, - }, - } - '' - '' - "filetype" - '' - ]; - y = [ - '' - { - "progress", - separator = { left = "" }, - } - '' - '' - '' - ]; - z = [ - '' - { - "location", - separator = { left = "" }, - left_padding = 2 - } - '' - '' - { - "fileformat", - color = {fg='black'}, - symbols = { - unix = '', -- e712 - dos = '', -- e70f - mac = '', -- e711 - }, - } - '' - ]; - }; - - inactiveSection = { - a = [ - '' - "filename" - '' - ]; - z = [ - '' - "location" - '' - ]; + lspSignature.enable = true; + lspconfig.enable = true; + formatOnSave = true; + mappings = { + addWorkspaceFolder = "wa"; + codeAction = "a"; + goToDeclaration = "gD"; + goToDefinition = "gd"; + hover = "K"; + listImplementations = "gi"; + listReferences = "gr"; + listWorkspaceFolders = "wl"; + nextDiagnostic = "k"; + previousDiagnostic = "j"; + openDiagnosticFloat = "e"; + removeWorkspaceFolder = "wr"; + renameSymbol = "r"; + signatureHelp = ""; }; }; - }; - git.enable = true; - - utility = { - vim-wakatime.enable = true; - surround.enable = true; - motion.leap = { + autocomplete.nvim-cmp = { enable = true; }; - }; - lsp = { - enable = true; - lspSignature.enable = true; - lspconfig.enable = true; - formatOnSave = true; - mappings = { - addWorkspaceFolder = "wa"; - codeAction = "a"; - goToDeclaration = "gD"; - goToDefinition = "gd"; - hover = "K"; - listImplementations = "gi"; - listReferences = "gr"; - listWorkspaceFolders = "wl"; - nextDiagnostic = "k"; - previousDiagnostic = "j"; - openDiagnosticFloat = "e"; - removeWorkspaceFolder = "wr"; - renameSymbol = "r"; - signatureHelp = ""; + autopairs.nvim-autopairs.enable = true; + + languages = { + enableExtraDiagnostics = true; + enableFormat = true; + enableLSP = true; + enableTreesitter = true; + + nix.enable = true; + clang.enable = true; + python.enable = true; + ts.enable = true; + css.enable = true; + typst.enable = true; }; - }; - autocomplete.nvim-cmp = { - enable = true; - }; + treesitter = { + enable = true; + fold = true; + context.enable = true; + grammars = [ + pkgs.vimPlugins.nvim-treesitter.builtGrammars.nix + pkgs.vimPlugins.nvim-treesitter.builtGrammars.c + pkgs.vimPlugins.nvim-treesitter.builtGrammars.python + ]; + }; - autopairs.nvim-autopairs.enable = true; + binds.whichKey.enable = true; + filetree.neo-tree.enable = true; - languages = { - enableExtraDiagnostics = true; - enableFormat = true; - enableLSP = true; - enableTreesitter = true; - - nix.enable = true; - clang.enable = true; - python.enable = true; - ts.enable = true; - css.enable = true; - typst.enable = true; - }; - - treesitter = { - enable = true; - fold = true; - context.enable = true; - grammars = [ - pkgs.vimPlugins.nvim-treesitter.builtGrammars.nix - pkgs.vimPlugins.nvim-treesitter.builtGrammars.c - pkgs.vimPlugins.nvim-treesitter.builtGrammars.python - ]; - }; - - binds.whichKey.enable = true; - filetree.neo-tree.enable = true; - - telescope.enable = true; - }; + telescope.enable = true; + } + (lib.mkIf styleCfg.enable { + theme = { + enable = true; + name = "base16"; + base16-colors = styleCfg.scheme.palette; + }; + }) + ]; }; programs.neovide = { diff --git a/modules/hm/programs/hypr/land/default.nix b/modules/hm/programs/hypr/land/default.nix index e6d9c0e..02d4a77 100644 --- a/modules/hm/programs/hypr/land/default.nix +++ b/modules/hm/programs/hypr/land/default.nix @@ -4,7 +4,10 @@ pkgs, osConfig, ... -}: { +}: let + inherit (builtins) toString; + styleCfg = osConfig.local.style; +in { imports = [./binds.nix]; config = lib.mkIf osConfig.local.modules.hyprland.enable { @@ -35,85 +38,103 @@ systemd.enable = false; - settings = { - xwayland = { - force_zero_scaling = true; - }; - - env = [ - "GDK_SCALE,1" - ]; - - cursor = { - no_hardware_cursors = 1; - }; - - monitor = [ - "eDP-1, preferred, auto, 1.33" - ]; - workspace = [ - "special:terminal, on-created-empty:foot" - "special:mixer_gui, on-created-empty:pavucontrol" - "special:file_manager_gui, on-created-empty:nautilus" - "special:file_manager_tui, on-created-empty:foot -- yazi" - ]; - - windowrulev2 = [ - # fixes fullscreen windows (mostly games) - "stayfocused, initialtitle:^()$, initialclass:^(steam)$" - "minsize 1 1, initialtitle:^()$, initialclass:^(steam)$" - "maximize, initialtitle:^(\S+)$, initialclass:^(steamwebhelper)$" - - "immediate, initialclass:^(steam_app_)(.*)$" - "fullscreen, initialclass:^(steam_app_)(.*)$" - - # inhibit idle on every fullscreen app except games - "idleinhibit always, fullscreen:1,!initialclass:^(steam_app_)(.*)$" - ]; - - render = { - explicit_sync = 1; - explicit_sync_kms = 1; - expand_undersized_textures = false; - }; - - animations = { - enabled = true; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.1"; - animation = [ - "windows, 1, 5, myBezier" - "windowsOut, 1, 5, default, popin 80%" - "windowsMove, 1, 5, default, popin 80%" - "fade, 1, 5, default" - "border, 1, 5, default" - "borderangle, 0, 8, default" - "workspaces, 0" - "specialWorkspace, 0" - ]; - }; - - input = { - kb_options = "compose:ralt"; - touchpad = { - natural_scroll = true; - scroll_factor = 0.8; - tap-to-click = true; - clickfinger_behavior = true; + settings = lib.mkMerge [ + { + xwayland = { + force_zero_scaling = true; }; - }; - gestures = { - workspace_swipe = true; - workspace_swipe_direction_lock = false; - workspace_swipe_cancel_ratio = 0.15; - }; + env = [ + "GDK_SCALE,1" + ]; - misc = { - force_default_wallpaper = 0; - disable_hyprland_logo = true; - middle_click_paste = false; - }; - }; + cursor = { + no_hardware_cursors = 1; + }; + + monitor = [ + "eDP-1, preferred, auto, 1.33" + ]; + workspace = [ + "special:terminal, on-created-empty:foot" + "special:mixer_gui, on-created-empty:pavucontrol" + "special:file_manager_gui, on-created-empty:nautilus" + "special:file_manager_tui, on-created-empty:foot -- yazi" + ]; + + windowrulev2 = [ + # fixes fullscreen windows (mostly games) + "stayfocused, initialtitle:^()$, initialclass:^(steam)$" + "minsize 1 1, initialtitle:^()$, initialclass:^(steam)$" + "maximize, initialtitle:^(\S+)$, initialclass:^(steamwebhelper)$" + + "immediate, initialclass:^(steam_app_)(.*)$" + "fullscreen, initialclass:^(steam_app_)(.*)$" + + # inhibit idle on every fullscreen app except games + "idleinhibit always, fullscreen:1,!initialclass:^(steam_app_)(.*)$" + ]; + + render = { + explicit_sync = 1; + explicit_sync_kms = 1; + expand_undersized_textures = false; + }; + + animations = { + enabled = true; + bezier = "myBezier, 0.05, 0.9, 0.1, 1.1"; + animation = [ + "windows, 1, 5, myBezier" + "windowsOut, 1, 5, default, popin 80%" + "windowsMove, 1, 5, default, popin 80%" + "fade, 1, 5, default" + "border, 1, 5, default" + "borderangle, 0, 8, default" + "workspaces, 0" + "specialWorkspace, 0" + ]; + }; + + input = { + kb_options = "compose:ralt"; + touchpad = { + natural_scroll = true; + scroll_factor = 0.8; + tap-to-click = true; + clickfinger_behavior = true; + }; + }; + + gestures = { + workspace_swipe = true; + workspace_swipe_direction_lock = false; + workspace_swipe_cancel_ratio = 0.15; + }; + + misc = { + force_default_wallpaper = 0; + disable_hyprland_logo = true; + middle_click_paste = false; + }; + } + + (lib.mkIf styleCfg.enable { + env = [ + "HYPRCURSOR_THEME,${styleCfg.cursorTheme.name}" + "HYPRCURSOR_SIZE,${toString styleCfg.cursorTheme.size}" + "XCURSOR_SIZE,${toString styleCfg.cursorTheme.size}" + ]; + general = { + border_size = 4; + "col.active_border" = "rgb(${lib.removePrefix "#" styleCfg.scheme.palette.base0E})"; + }; + decoration = { + rounding = 10; + blur.enabled = true; + }; + }) + ]; }; }; } diff --git a/modules/hm/programs/hypr/lock.nix b/modules/hm/programs/hypr/lock.nix index 477c7b0..b7f09e7 100644 --- a/modules/hm/programs/hypr/lock.nix +++ b/modules/hm/programs/hypr/lock.nix @@ -1,14 +1,114 @@ { lib, + lib', inputs, pkgs, osConfig, ... -}: { +}: let + styleCfg = osConfig.local.style; + rgbaPalette = builtins.mapAttrs (_: c: (lib'.rgba c 1)) styleCfg.scheme.palette; +in { config = lib.mkIf osConfig.local.modules.hyprland.enable { programs.hyprlock = { enable = true; package = inputs.hyprlock.packages.${pkgs.system}.hyprlock; + + settings = lib.mkMerge [ + { + general = { + disable_loading_bar = true; + hide_cursor = true; + }; + } + + (with rgbaPalette; + lib.mkIf styleCfg.enable { + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + label = [ + { + monitor = ""; + text = "Layout: $LAYOUT"; + font_size = 25; + color = base05; + + position = "30, -30"; + halign = "left"; + valign = "top"; + } + { + monitor = ""; + text = "$TIME"; + font_size = 90; + color = base05; + + position = "-30, 0"; + halign = "right"; + valign = "top"; + } + { + monitor = ""; + text = "cmd[update:43200000] date +\"%A, %d %B %Y\""; + font_size = 25; + color = base05; + + position = "-30, -150"; + halign = "right"; + valign = "top"; + } + ]; + + image = { + monitor = ""; + path = "${styleCfg.avatar}"; # Replace with your avatar path + size = 100; + border_color = base0D; + + position = "0, 75"; + halign = "center"; + valign = "center"; + }; + + input-field = [ + { + monitor = ""; + + size = "300, 60"; + outline_thickness = 4; + dots_size = 0.2; + dots_spacing = 0.2; + dots_center = true; + + outer_color = base0D; + inner_color = base02; + font_color = base05; + + fade_on_empty = false; + + # the span elements still use #RRGGBB, so we use scheme directly + placeholder_text = "󰌾 Logged in as $USER"; + + hide_input = false; + check_color = base0D; + fail_color = base08; + + fail_text = "$FAIL ($ATTEMPTS)"; + capslock_color = base0E; + + position = "0, -47"; + halign = "center"; + valign = "center"; + } + ]; + }) + ]; }; }; } diff --git a/modules/hm/programs/media/default.nix b/modules/hm/programs/media/default.nix index 917a9d3..653170e 100644 --- a/modules/hm/programs/media/default.nix +++ b/modules/hm/programs/media/default.nix @@ -4,7 +4,10 @@ osConfig, ... }: { - imports = [./zathura.nix]; + imports = [ + ./tidal-hifi.nix + ./zathura.nix + ]; config = lib.mkIf osConfig.local.profiles.desktop.enable { programs.mpv.enable = true; @@ -13,7 +16,6 @@ pkgs.gthumb pkgs.spotify pkgs.stremio - pkgs.tidal-hifi pkgs.celluloid ]; }; diff --git a/modules/nix/style/modules/tidal-hifi.nix b/modules/hm/programs/media/tidal-hifi.nix similarity index 96% rename from modules/nix/style/modules/tidal-hifi.nix rename to modules/hm/programs/media/tidal-hifi.nix index 4bd0b30..d4d4685 100644 --- a/modules/nix/style/modules/tidal-hifi.nix +++ b/modules/hm/programs/media/tidal-hifi.nix @@ -1,14 +1,16 @@ { lib, - config, + osConfig, + pkgs, ... }: let - cfg = config.local.style; + styleCfg = osConfig.local.style; in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - # based on https://github.com/rose-pine/tidal. adapted to work with base16 colors. - xdg.configFile."tidal-hifi/themes/base16.css".text = with cfg.scheme.palette; '' + config = lib.mkIf osConfig.local.profiles.desktop.enable { + home.packages = [pkgs.tidal-hifi]; + # based on https://github.com/rose-pine/tidal. adapted to work with base16 colors. + xdg.configFile."tidal-hifi/themes/base16.css".text = with styleCfg.scheme.palette; + lib.mkIf styleCfg.enable '' :root { --glass-white-1: ${base05}; --glass-white-1-hover: ${base06}; @@ -190,6 +192,5 @@ in { stroke: var(--wave-color-solid-rainbow-purple-fill) !important; } ''; - } - ]; + }; } diff --git a/modules/hm/programs/misc.nix b/modules/hm/programs/misc.nix index d6dbbca..bc7773c 100644 --- a/modules/hm/programs/misc.nix +++ b/modules/hm/programs/misc.nix @@ -19,7 +19,6 @@ playerctl proton-pass simple-scan - vesktop wl-clipboard ]; diff --git a/modules/hm/programs/terminal/emulators/foot.nix b/modules/hm/programs/terminal/emulators/foot.nix index 685b434..d596e88 100644 --- a/modules/hm/programs/terminal/emulators/foot.nix +++ b/modules/hm/programs/terminal/emulators/foot.nix @@ -3,7 +3,11 @@ config, osConfig, ... -}: { +}: let + styleCfg = osConfig.local.style; + # because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b + palette = builtins.mapAttrs (_: color: lib.removePrefix "#" color) styleCfg.scheme.palette; +in { config = lib.mkIf osConfig.local.modules.hyprland.enable { programs.foot = { enable = true; @@ -13,6 +17,37 @@ font = "monospace:size=14"; shell = "${lib.getExe config.programs.fish.package}"; }; + + colors = with palette; + lib.mkIf styleCfg.enable { + background = base00; + foreground = base05; + + regular0 = base00; + regular1 = base08; + regular2 = base0B; + regular3 = base0A; + regular4 = base0D; + regular5 = base0E; + regular6 = base0C; + regular7 = base05; + + bright0 = base02; + bright1 = base08; + bright2 = base0B; + bright3 = base0A; + bright4 = base0D; + bright5 = base0E; + bright6 = base0C; + bright7 = base07; + + "16" = base09; + "17" = base0F; + "18" = base01; + "19" = base02; + "20" = base04; + "21" = base06; + }; }; }; }; diff --git a/modules/hm/programs/terminal/shell/fish.nix b/modules/hm/programs/terminal/shell/fish.nix index fc66325..142d7eb 100644 --- a/modules/hm/programs/terminal/shell/fish.nix +++ b/modules/hm/programs/terminal/shell/fish.nix @@ -14,6 +14,7 @@ starship module cmd_duration end ''; + styleCfg = osConfig.local.style; in { config = lib.mkIf osConfig.local.profiles.desktop.enable { programs.fish = { @@ -24,7 +25,43 @@ in { set fish_greeting # Disable greeting fish_vi_key_bindings # Enable Vi mode + '' + + lib.optionalString styleCfg.enable + '' + set fish_cursor_default block blink + set fish_cursor_insert line blink + set fish_cursor_replace_one underscore blink + set fish_cursor_visual block + + set -x fish_color_autosuggestion brblack + set -x fish_color_cancel -r + set -x fish_color_command brgreen + set -x fish_color_comment brmagenta + set -x fish_color_cwd green + set -x fish_color_cwd_root red + set -x fish_color_end brmagenta + set -x fish_color_error brred + set -x fish_color_escape brcyan + set -x fish_color_history_current --bold + set -x fish_color_host normal + set -x fish_color_host_remote yellow + set -x fish_color_match --background=brblue + set -x fish_color_normal normal + set -x fish_color_operator cyan + set -x fish_color_param brblue + set -x fish_color_quote yellow + set -x fish_color_redirection bryellow + set -x fish_color_search_match 'bryellow' '--background=brblack' + set -x fish_color_selection 'white' '--bold' '--background=brblack' + set -x fish_color_status red + set -x fish_color_user brgreen + set -x fish_color_valid_path --underline + set -x fish_pager_color_completion normal + set -x fish_pager_color_description yellow + set -x fish_pager_color_prefix 'white' '--bold' '--underline' + set -x fish_pager_color_progress 'brwhite' '--background=cyan' ''; + plugins = [ { name = "fzf"; diff --git a/modules/hm/programs/terminal/shell/starship.nix b/modules/hm/programs/terminal/shell/starship.nix index f70c521..2128b18 100644 --- a/modules/hm/programs/terminal/shell/starship.nix +++ b/modules/hm/programs/terminal/shell/starship.nix @@ -9,6 +9,20 @@ enableTransience = true; settings = { add_newline = true; + + directory = { + style = "bold yellow"; + }; + character = { + format = "$symbol "; + success_symbol = "[➜](bold green)"; + error_symbol = "[✗](bold red)"; + vicmd_symbol = "[](bold green)"; + }; + cmd_duration = { + style = "yellow"; + format = "[ $duration]($style)"; + }; }; }; }; diff --git a/modules/hm/programs/walker.nix b/modules/hm/programs/walker.nix index 7a701da..0b39d60 100644 --- a/modules/hm/programs/walker.nix +++ b/modules/hm/programs/walker.nix @@ -3,7 +3,9 @@ inputs, osConfig, ... -}: { +}: let + styleCfg = osConfig.local.style; +in { imports = [ inputs.walker.homeManagerModules.default ]; @@ -20,6 +22,153 @@ websearch.prefix = "?"; switcher.prefix = "/"; }; + + theme = with styleCfg.scheme.palette; + lib.mkIf styleCfg.enable { + style = '' + @define-color foreground ${base05}; + @define-color background ${base00}; + @define-color accent ${base0E}; + + #window, + #box, + #aiScroll, + #aiList, + #search, + #password, + #input, + #prompt, + #clear, + #typeahead, + #list, + child, + scrollbar, + slider, + #item, + #text, + #label, + #bar, + #sub, + #activationlabel { + all: unset; + } + + #cfgerr { + background: rgba(255, 0, 0, 0.4); + margin-top: 20px; + padding: 8px; + font-size: 1.2em; + } + + #window { + color: @foreground; + } + + #box { + border-radius: 2px; + background: @background; + padding: 32px; + border: 1px solid ${base01}; + box-shadow: + 0 19px 38px rgba(0, 0, 0, 0.3), + 0 15px 12px rgba(0, 0, 0, 0.22); + } + + #search { + box-shadow: + 0 1px 3px rgba(0, 0, 0, 0.1), + 0 1px 2px rgba(0, 0, 0, 0.22); + background: ${base01}; + padding: 8px; + } + + #prompt { + margin-left: 4px; + margin-right: 12px; + color: @foreground; + opacity: 0.2; + } + + #clear { + color: @foreground; + opacity: 0.8; + } + + #password, + #input, + #typeahead { + border-radius: 2px; + } + + #input { + background: none; + } + + #spinner { + padding: 8px; + } + + #typeahead { + color: @foreground; + opacity: 0.8; + } + + #input placeholder { + opacity: 0.5; + } + + child { + padding: 8px; + border-radius: 2px; + } + + child:selected, + child:hover { + background: alpha(@accent, 0.4); + } + + #icon { + margin-right: 8px; + } + + #label { + font-weight: 500; + } + + #sub { + opacity: 0.5; + font-size: 0.8em; + } + + .aiItem { + padding: 10px; + border-radius: 2px; + color: @foreground; + background: @background; + } + + .aiItem.assistant { + background: ${base02}; + } + + .aiItem:hover { + background: alpha(@accent, 0.2); + color: ${base00}; + } + + #activationlabel { + color: @accent; + font-weight: bold; + } + ''; + + layout = { + ui.window.box = { + v_align = "center"; + orientation = "vertical"; + }; + }; + }; }; systemd.user.services.walker = { diff --git a/modules/hm/programs/waybar.nix b/modules/hm/programs/waybar.nix index a7c201d..604a98c 100644 --- a/modules/hm/programs/waybar.nix +++ b/modules/hm/programs/waybar.nix @@ -3,7 +3,10 @@ pkgs, osConfig, ... -}: { +}: let + styleCfg = osConfig.local.style; + betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; +in { config = lib.mkIf osConfig.local.modules.hyprland.enable { programs.waybar = { enable = true; @@ -176,6 +179,90 @@ }; }; }; + + style = with styleCfg.scheme.palette; '' + * { + font-family: "0xProto Nerd Font"; + font-size: 16px; + border-radius: 0px; + border: none; + min-height: 0px; + } + window#waybar { + background: rgba(0,0,0,0); + } + #workspaces { + color: ${base00}; + background: ${base01}; + margin: 4px 4px; + padding: 5px 5px; + border-radius: 16px; + } + #workspaces button { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 16px; + color: ${base00}; + background: linear-gradient(45deg, ${base08}, ${base0D}); + opacity: 0.5; + transition: ${betterTransition}; + } + #workspaces button.active { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 16px; + color: ${base00}; + background: linear-gradient(45deg, ${base08}, ${base0D}); + transition: ${betterTransition}; + opacity: 1.0; + min-width: 40px; + } + #workspaces button:hover { + font-weight: bold; + border-radius: 16px; + color: ${base00}; + background: linear-gradient(45deg, ${base08}, ${base0D}); + opacity: 0.8; + transition: ${betterTransition}; + } + tooltip { + background: ${base00}; + border: 1px solid ${base0E}; + border-radius: 12px; + } + tooltip label { + color: ${base0E}; + } + #window, #pulseaudio, #cpu, #memory, #idle_inhibitor { + font-weight: bold; + margin: 4px 0px; + margin-left: 7px; + padding: 0px 18px; + background: ${base00}; + color: ${base05}; + border-radius: 24px 10px 24px 10px; + } + #network, #battery, + #custom-swaync, #tray, #custom-power { + font-weight: bold; + background: ${base00}; + color: ${base05}; + margin: 4px 0px; + margin-right: 7px; + border-radius: 10px 24px 10px 24px; + padding: 0px 18px; + } + #clock { + font-weight: bold; + color: ${base00}; + background: linear-gradient(90deg, ${base0E}, ${base0C}); + margin: 0px; + padding: 0px 15px 0px 30px; + border-radius: 0px 0px 0px 40px; + } + ''; }; systemd.user.services.waybar = { diff --git a/modules/hm/services/default.nix b/modules/hm/services/default.nix index 39128e4..6bff764 100644 --- a/modules/hm/services/default.nix +++ b/modules/hm/services/default.nix @@ -1,6 +1,7 @@ { imports = [ ./gammastep.nix + ./gtk.nix ./syncthing.nix ./swaync ./udiskie.nix diff --git a/modules/nix/style/modules/gtk.nix b/modules/hm/services/gtk.nix similarity index 62% rename from modules/nix/style/modules/gtk.nix rename to modules/hm/services/gtk.nix index 7320c3c..f8c184e 100644 --- a/modules/nix/style/modules/gtk.nix +++ b/modules/hm/services/gtk.nix @@ -1,20 +1,19 @@ { lib, - config, + osConfig, ... }: let - cfg = config.local.style; - inherit (cfg) scheme; + styleCfg = osConfig.local.style; in { - home-manager.sharedModules = lib.mkIf cfg.enable [ - { + config = with styleCfg; + lib.mkIf styleCfg.enable { gtk = rec { enable = true; iconTheme = { - inherit (cfg.gtk.iconTheme) name package; + inherit (gtk.iconTheme) name package; }; theme = { - inherit (cfg.gtk.theme) name package; + inherit (gtk.theme) name package; }; gtk3.extraConfig = { @@ -24,6 +23,5 @@ in { }; dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-${scheme.variant}"; - } - ]; + }; } diff --git a/modules/hm/services/swaync/default.nix b/modules/hm/services/swaync/default.nix index f96130f..6d512f0 100644 --- a/modules/hm/services/swaync/default.nix +++ b/modules/hm/services/swaync/default.nix @@ -1,33 +1,41 @@ { lib, + lib', osConfig, ... }: let - inherit (builtins) readFile; + styleCfg = osConfig.local.style; in { config = lib.mkIf osConfig.local.modules.hyprland.enable { - services.swaync = { - enable = true; - style = readFile ./style.css; - settings = { - positionX = "right"; - positionY = "top"; - layer = "overlay"; - control-center-layer = "top"; - layer-shell = true; - cssPriority = "application"; - control-center-margin-top = 0; - control-center-margin-bottom = 0; - control-center-margin-right = 0; - control-center-margin-left = 0; - notification-2fa-action = true; - notification-inline-replies = false; - notification-icon-size = 64; - notification-body-image-height = 100; - notification-body-image-width = 200; - }; - }; - # systemd.user.services.swaync.Service.Environment = "WAYLAND_DISPLAY=wayland-1"; + services.swaync = lib.mkMerge [ + { + enable = true; + settings = { + positionX = "right"; + positionY = "top"; + layer = "overlay"; + control-center-layer = "top"; + layer-shell = true; + cssPriority = "application"; + control-center-margin-top = 0; + control-center-margin-bottom = 0; + control-center-margin-right = 0; + control-center-margin-left = 0; + notification-2fa-action = true; + notification-inline-replies = false; + notification-icon-size = 64; + notification-body-image-height = 100; + notification-body-image-width = 200; + }; + } + + (lib.mkIf styleCfg.enable { + style = + lib'.generateGtkColors lib styleCfg.scheme.palette + + builtins.readFile ./style.css; + }) + ]; + systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce ""; }; } diff --git a/modules/nix/core/home-manager.nix b/modules/nix/core/home-manager.nix index c8befd6..bae18aa 100644 --- a/modules/nix/core/home-manager.nix +++ b/modules/nix/core/home-manager.nix @@ -5,6 +5,7 @@ ... }: let inherit (config.local.systemVars) username; + lib' = import ../../../shared/lib inputs.nixpkgs.lib; in { imports = [ inputs.home-manager.nixosModules.default @@ -16,7 +17,7 @@ in { useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = {inherit inputs;}; + extraSpecialArgs = {inherit inputs lib';}; sharedModules = [../../hm]; }; diff --git a/modules/nix/default.nix b/modules/nix/default.nix index ab88cb6..8c116a5 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -3,6 +3,5 @@ ./core ./programs ./services - ./style ]; } diff --git a/modules/nix/services/greetd.nix b/modules/nix/services/greetd.nix index df70a0d..81df572 100644 --- a/modules/nix/services/greetd.nix +++ b/modules/nix/services/greetd.nix @@ -1,8 +1,8 @@ { - config, - inputs, lib, + inputs, pkgs, + config, ... }: # thanks https://git.jacekpoz.pl/poz/niksos/src/commit/f8d5e7ccd9c769f7c0b564f10dff419285e75248/modules/services/greetd.nix @@ -10,6 +10,8 @@ let inherit (lib) getExe getExe'; inherit (inputs.hyprland.packages.${pkgs.stdenv.system}) hyprland; + styleCfg = config.local.style; + hyprctl = getExe' hyprland "hyprctl"; Hyprland = getExe' hyprland "Hyprland"; @@ -46,9 +48,25 @@ in { }; }; - programs.regreet = { - enable = true; - }; + programs.regreet = lib.mkMerge [ + { + enable = true; + } + + (lib.mkIf styleCfg.enable { + theme = { + inherit (styleCfg.gtk.theme) name package; + }; + + cursorTheme = { + inherit (styleCfg.cursorTheme) name package; + }; + + iconTheme = { + inherit (styleCfg.gtk.iconTheme) name package; + }; + }) + ]; security.pam.services = { greetd.enableGnomeKeyring = true; diff --git a/modules/nix/style/default.nix b/modules/nix/style/default.nix deleted file mode 100644 index bce44b0..0000000 --- a/modules/nix/style/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - inputs, - config, - lib, - ... -}: let - inherit (lib) mkIf; - - cfg = config.local.style; -in { - imports = - [ - inputs.niri.nixosModules.niri - inputs.hyprland.nixosModules.default - ] - ++ lib.filesystem.listFilesRecursive ./modules; - - config = mkIf cfg.enable { - home-manager.sharedModules = [ - { - home.pointerCursor = { - inherit (cfg.cursorTheme) name package size; - x11.enable = true; - gtk.enable = true; - }; - } - ]; - }; -} diff --git a/modules/nix/style/modules/fish.nix b/modules/nix/style/modules/fish.nix deleted file mode 100644 index 24fe0de..0000000 --- a/modules/nix/style/modules/fish.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - programs.fish.interactiveShellInit = '' - set fish_cursor_default block blink - set fish_cursor_insert line blink - set fish_cursor_replace_one underscore blink - set fish_cursor_visual block - - set -x fish_color_autosuggestion brblack - set -x fish_color_cancel -r - set -x fish_color_command brgreen - set -x fish_color_comment brmagenta - set -x fish_color_cwd green - set -x fish_color_cwd_root red - set -x fish_color_end brmagenta - set -x fish_color_error brred - set -x fish_color_escape brcyan - set -x fish_color_history_current --bold - set -x fish_color_host normal - set -x fish_color_host_remote yellow - set -x fish_color_match --background=brblue - set -x fish_color_normal normal - set -x fish_color_operator cyan - set -x fish_color_param brblue - set -x fish_color_quote yellow - set -x fish_color_redirection bryellow - set -x fish_color_search_match 'bryellow' '--background=brblack' - set -x fish_color_selection 'white' '--bold' '--background=brblack' - set -x fish_color_status red - set -x fish_color_user brgreen - set -x fish_color_valid_path --underline - set -x fish_pager_color_completion normal - set -x fish_pager_color_description yellow - set -x fish_pager_color_prefix 'white' '--bold' '--underline' - set -x fish_pager_color_progress 'brwhite' '--background=cyan' - ''; - } - ]; -} diff --git a/modules/nix/style/modules/foot.nix b/modules/nix/style/modules/foot.nix deleted file mode 100644 index d35e4ae..0000000 --- a/modules/nix/style/modules/foot.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - programs.foot.settings.colors = let - # because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b - palette = builtins.mapAttrs (_: color: lib.removePrefix "#" color) cfg.scheme.palette; - in - with palette; { - background = base00; - foreground = base05; - - regular0 = base00; - regular1 = base08; - regular2 = base0B; - regular3 = base0A; - regular4 = base0D; - regular5 = base0E; - regular6 = base0C; - regular7 = base05; - - bright0 = base02; - bright1 = base08; - bright2 = base0B; - bright3 = base0A; - bright4 = base0D; - bright5 = base0E; - bright6 = base0C; - bright7 = base07; - - "16" = base09; - "17" = base0F; - "18" = base01; - "19" = base02; - "20" = base04; - "21" = base06; - }; - } - ]; -} diff --git a/modules/nix/style/modules/fuzzel.nix b/modules/nix/style/modules/fuzzel.nix deleted file mode 100644 index 2cdf86a..0000000 --- a/modules/nix/style/modules/fuzzel.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; - inherit (cfg) scheme; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - programs.fuzzel.settings = { - main = { - font = "sans-serif:size=16"; - }; - colors = with scheme.palette; { - background = "${base01}f2"; - text = "${base05}ff"; - match = "${base0E}ff"; - selection = "${base03}ff"; - selection-text = "${base06}ff"; - selection-match = "${base0E}ff"; - border = "${base0E}ff"; - }; - }; - } - ]; -} diff --git a/modules/nix/style/modules/hyprland.nix b/modules/nix/style/modules/hyprland.nix deleted file mode 100644 index d0a21bd..0000000 --- a/modules/nix/style/modules/hyprland.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - wayland.windowManager.hyprland.settings = { - env = [ - "HYPRCURSOR_THEME,phinger-cursors-light" - "HYPRCURSOR_SIZE,32" - "XCURSOR_SIZE,32" - ]; - general = { - border_size = 4; - "col.active_border" = "rgb(${lib.removePrefix "#" cfg.scheme.palette.base0E})"; - }; - decoration = { - rounding = 10; - blur.enabled = true; - }; - }; - } - ]; -} diff --git a/modules/nix/style/modules/hyprlock.nix b/modules/nix/style/modules/hyprlock.nix deleted file mode 100644 index 7d9dddc..0000000 --- a/modules/nix/style/modules/hyprlock.nix +++ /dev/null @@ -1,109 +0,0 @@ -{ - lib, - lib', - config, - ... -}: let - cfg = config.local.style; - - # hyprlock takes colors such as rgb[a](r, g, b [, a]) - rgbaPalette = builtins.mapAttrs (_: c: (lib'.rgba c 1)) cfg.scheme.palette; -in { - config.home-manager.sharedModules = with rgbaPalette; - lib.mkIf cfg.enable [ - { - programs.hyprlock = { - settings = { - background = [ - { - path = "screenshot"; - blur_passes = 3; - blur_size = 8; - } - ]; - - general = { - disable_loading_bar = true; - hide_cursor = true; - }; - - label = [ - { - monitor = ""; - text = "Layout: $LAYOUT"; - font_size = 25; - color = base05; - - position = "30, -30"; - halign = "left"; - valign = "top"; - } - { - monitor = ""; - text = "$TIME"; - font_size = 90; - color = base05; - - position = "-30, 0"; - halign = "right"; - valign = "top"; - } - { - monitor = ""; - text = "cmd[update:43200000] date +\"%A, %d %B %Y\""; - font_size = 25; - color = base05; - - position = "-30, -150"; - halign = "right"; - valign = "top"; - } - ]; - - image = { - monitor = ""; - path = "${cfg.avatar}"; # Replace with your avatar path - size = 100; - border_color = base0D; - - position = "0, 75"; - halign = "center"; - valign = "center"; - }; - - input-field = [ - { - monitor = ""; - - size = "300, 60"; - outline_thickness = 4; - dots_size = 0.2; - dots_spacing = 0.2; - dots_center = true; - - outer_color = base0D; - inner_color = base02; - font_color = base05; - - fade_on_empty = false; - - # the span elements still use #RRGGBB, so we use scheme directly - placeholder_text = "󰌾 Logged in as $USER"; - - hide_input = false; - check_color = base0D; - fail_color = base08; - - fail_text = "$FAIL ($ATTEMPTS)"; - capslock_color = base0E; - - position = "0, -47"; - halign = "center"; - valign = "center"; - } - ]; - }; - }; - } - ]; -} diff --git a/modules/nix/style/modules/niri.nix b/modules/nix/style/modules/niri.nix deleted file mode 100644 index a25b136..0000000 --- a/modules/nix/style/modules/niri.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - programs.niri = { - settings = { - layout.focus-ring.active.color = cfg.scheme.palette.base0D; - cursor = { - inherit (cfg.cursorTheme) size; - theme = cfg.cursorTheme.name; - }; - }; - }; - } - ]; -} diff --git a/modules/nix/style/modules/nvf.nix b/modules/nix/style/modules/nvf.nix deleted file mode 100644 index 93be707..0000000 --- a/modules/nix/style/modules/nvf.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - programs.nvf.settings.vim.theme = { - enable = true; - name = "base16"; - base16-colors = cfg.scheme.palette; - }; - } - ]; -} diff --git a/modules/nix/style/modules/regreet.nix b/modules/nix/style/modules/regreet.nix deleted file mode 100644 index 1fb8866..0000000 --- a/modules/nix/style/modules/regreet.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.programs.regreet = lib.mkIf cfg.enable { - theme = { - inherit (cfg.gtk.theme) name package; - }; - - cursorTheme = { - inherit (cfg.cursorTheme) name package; - }; - - iconTheme = { - inherit (cfg.gtk.iconTheme) name package; - }; - }; -} diff --git a/modules/nix/style/modules/starship.nix b/modules/nix/style/modules/starship.nix deleted file mode 100644 index b0d0007..0000000 --- a/modules/nix/style/modules/starship.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - programs.starship.settings = { - directory = { - style = "bold yellow"; - }; - character = { - format = "$symbol "; - success_symbol = "[➜](bold green)"; - error_symbol = "[✗](bold red)"; - vicmd_symbol = "[](bold green)"; - }; - cmd_duration = { - style = "yellow"; - format = "[ $duration]($style)"; - }; - }; - } - ]; -} diff --git a/modules/nix/style/modules/swaylock.nix b/modules/nix/style/modules/swaylock.nix deleted file mode 100644 index b5e13c7..0000000 --- a/modules/nix/style/modules/swaylock.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.home-manager.sharedModules = with cfg.scheme.palette; - lib.mkIf cfg.enable [ - { - programs.swaylock.settings = { - inside-color = base01; - line-color = base01; - ring-color = base05; - text-color = base05; - - inside-clear-color = base0A; - line-clear-color = base0A; - ring-clear-color = base00; - text-clear-color = base00; - - inside-caps-lock-color = base03; - line-caps-lock-color = base03; - ring-caps-lock-color = base00; - text-caps-lock-color = base00; - - inside-ver-color = base0D; - line-ver-color = base0D; - ring-ver-color = base00; - text-ver-color = base00; - - inside-wrong-color = base08; - line-wrong-color = base08; - ring-wrong-color = base00; - text-wrong-color = base00; - - caps-lock-bs-hl-color = base08; - caps-lock-key-hl-color = base0D; - bs-hl-color = base08; - key-hl-color = base0D; - - separator-color = "#00000000"; # transparent - layout-bg-color = "#00000050"; # semi-transparent black - }; - } - ]; -} diff --git a/modules/nix/style/modules/swaync.nix b/modules/nix/style/modules/swaync.nix deleted file mode 100644 index b4e517c..0000000 --- a/modules/nix/style/modules/swaync.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - lib, - lib', - ... -}: let - cfg = config.local.style; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - services.swaync.style = lib'.generateGtkColors lib cfg.scheme.palette; - } - ]; -} diff --git a/modules/nix/style/modules/walker.nix b/modules/nix/style/modules/walker.nix deleted file mode 100644 index d891b4d..0000000 --- a/modules/nix/style/modules/walker.nix +++ /dev/null @@ -1,159 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - programs.walker = with cfg.scheme.palette; { - theme = { - style = '' - @define-color foreground ${base05}; - @define-color background ${base00}; - @define-color accent ${base0E}; - - #window, - #box, - #aiScroll, - #aiList, - #search, - #password, - #input, - #prompt, - #clear, - #typeahead, - #list, - child, - scrollbar, - slider, - #item, - #text, - #label, - #bar, - #sub, - #activationlabel { - all: unset; - } - - #cfgerr { - background: rgba(255, 0, 0, 0.4); - margin-top: 20px; - padding: 8px; - font-size: 1.2em; - } - - #window { - color: @foreground; - } - - #box { - border-radius: 2px; - background: @background; - padding: 32px; - border: 1px solid ${cfg.scheme.palette.base01}; - box-shadow: - 0 19px 38px rgba(0, 0, 0, 0.3), - 0 15px 12px rgba(0, 0, 0, 0.22); - } - - #search { - box-shadow: - 0 1px 3px rgba(0, 0, 0, 0.1), - 0 1px 2px rgba(0, 0, 0, 0.22); - background: ${cfg.scheme.palette.base01}; - padding: 8px; - } - - #prompt { - margin-left: 4px; - margin-right: 12px; - color: @foreground; - opacity: 0.2; - } - - #clear { - color: @foreground; - opacity: 0.8; - } - - #password, - #input, - #typeahead { - border-radius: 2px; - } - - #input { - background: none; - } - - #spinner { - padding: 8px; - } - - #typeahead { - color: @foreground; - opacity: 0.8; - } - - #input placeholder { - opacity: 0.5; - } - - child { - padding: 8px; - border-radius: 2px; - } - - child:selected, - child:hover { - background: alpha(@accent, 0.4); - } - - #icon { - margin-right: 8px; - } - - #label { - font-weight: 500; - } - - #sub { - opacity: 0.5; - font-size: 0.8em; - } - - .aiItem { - padding: 10px; - border-radius: 2px; - color: @foreground; - background: @background; - } - - .aiItem.assistant { - background: ${cfg.scheme.palette.base02}; - } - - .aiItem:hover { - background: alpha(@accent, 0.2); - color: ${cfg.scheme.palette.base00}; - } - - #activationlabel { - color: @accent; - font-weight: bold; - } - ''; - - layout = { - ui.window.box = { - v_align = "center"; - orientation = "vertical"; - }; - }; - }; - }; - } - ]; -} diff --git a/modules/nix/style/modules/waybar.nix b/modules/nix/style/modules/waybar.nix deleted file mode 100644 index c1dadfe..0000000 --- a/modules/nix/style/modules/waybar.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; - betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - programs.waybar.style = with cfg.scheme.palette; '' - * { - font-family: "0xProto Nerd Font"; - font-size: 16px; - border-radius: 0px; - border: none; - min-height: 0px; - } - window#waybar { - background: rgba(0,0,0,0); - } - #workspaces { - color: ${base00}; - background: ${base01}; - margin: 4px 4px; - padding: 5px 5px; - border-radius: 16px; - } - #workspaces button { - font-weight: bold; - padding: 0px 5px; - margin: 0px 3px; - border-radius: 16px; - color: ${base00}; - background: linear-gradient(45deg, ${base08}, ${base0D}); - opacity: 0.5; - transition: ${betterTransition}; - } - #workspaces button.active { - font-weight: bold; - padding: 0px 5px; - margin: 0px 3px; - border-radius: 16px; - color: ${base00}; - background: linear-gradient(45deg, ${base08}, ${base0D}); - transition: ${betterTransition}; - opacity: 1.0; - min-width: 40px; - } - #workspaces button:hover { - font-weight: bold; - border-radius: 16px; - color: ${base00}; - background: linear-gradient(45deg, ${base08}, ${base0D}); - opacity: 0.8; - transition: ${betterTransition}; - } - tooltip { - background: ${base00}; - border: 1px solid ${base0E}; - border-radius: 12px; - } - tooltip label { - color: ${base0E}; - } - #window, #pulseaudio, #cpu, #memory, #idle_inhibitor { - font-weight: bold; - margin: 4px 0px; - margin-left: 7px; - padding: 0px 18px; - background: ${base00}; - color: ${base05}; - border-radius: 24px 10px 24px 10px; - } - #network, #battery, - #custom-swaync, #tray, #custom-power { - font-weight: bold; - background: ${base00}; - color: ${base05}; - margin: 4px 0px; - margin-right: 7px; - border-radius: 10px 24px 10px 24px; - padding: 0px 18px; - } - #clock { - font-weight: bold; - color: ${base00}; - background: linear-gradient(90deg, ${base0E}, ${base0C}); - margin: 0px; - padding: 0px 15px 0px 30px; - border-radius: 0px 0px 0px 40px; - } - ''; - } - ]; -} diff --git a/modules/nix/style/modules/zathura.nix b/modules/nix/style/modules/zathura.nix deleted file mode 100644 index 070d67a..0000000 --- a/modules/nix/style/modules/zathura.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; - inherit (cfg) scheme; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - programs.zathura.options = { - default-fg = scheme.palette.base01; - default-bg = scheme.palette.base00; - - completion-bg = scheme.palette.base01; - completion-fg = scheme.palette.base0D; - completion-highlight-bg = scheme.palette.base0D; - completion-highlight-fg = scheme.palette.base07; - - statusbar-fg = scheme.palette.base04; - statusbar-bg = scheme.palette.base02; - - notification-bg = scheme.palette.base00; - notification-fg = scheme.palette.base07; - notification-error-bg = scheme.palette.base00; - notification-error-fg = scheme.palette.base08; - notification-warning-bg = scheme.palette.base00; - notification-warning-fg = scheme.palette.base0A; - - inputbar-fg = scheme.palette.base07; - inputbar-bg = scheme.palette.base00; - - recolor = false; - recolor-keephue = false; - recolor-lightcolor = scheme.palette.base00; - recolor-darkcolor = scheme.palette.base06; - - highlight-color = scheme.palette.base0A; - highlight-active-color = scheme.palette.base0D; - }; - } - ]; -}