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/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/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/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/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/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/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; - }; - } - ]; -}