From e82d9087f42522efdba3a1070db4a5ac80601e36 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 8 Aug 2024 16:50:50 -0400 Subject: [PATCH] fastfetch: nixify config --- .../apps/fastfetch/config.jsonc | 115 ------------------ homeManagerModules/apps/fastfetch/config.nix | 106 ++++++++++++++++ homeManagerModules/apps/fastfetch/default.nix | 2 +- 3 files changed, 107 insertions(+), 116 deletions(-) delete mode 100644 homeManagerModules/apps/fastfetch/config.jsonc create mode 100644 homeManagerModules/apps/fastfetch/config.nix diff --git a/homeManagerModules/apps/fastfetch/config.jsonc b/homeManagerModules/apps/fastfetch/config.jsonc deleted file mode 100644 index 249cd821..00000000 --- a/homeManagerModules/apps/fastfetch/config.jsonc +++ /dev/null @@ -1,115 +0,0 @@ -// Load with --load-config examples/2.jsonc -// Note that you must replace the image path to an existing image to display it. - -{ - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", - "logo": { - "padding": { - "bottom": 2, - } - }, - "display": { - "separator": " -> " - }, - "modules": [ - { - "type": "custom", - "format": "\u001b[90m┌────────────────────────────────────────────────────────────┐" - }, - { - "type": "title", - "keyWidth": 10 - }, - { - "type": "custom", - "format": "\u001b[90m└────────────────────────────────────────────────────────────┘" - }, - { - "type": "custom", - "format": " \u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[38m \u001b[39m  \u001b[38m \u001b[37m \u001b[36m \u001b[35m \u001b[34m \u001b[33m \u001b[32m \u001b[31m \u001b[90m" - }, - { - "type": "custom", - "format": "\u001b[90m┌────────────────────────────────────────────────────────────┐" - }, - { - "type": "os", - "key": " OS", - "keyColor": "yellow" - }, - { - "type": "shell", - "key": "│ └", - "keyColor": "yellow" - }, - { - "type": "wm", - "key": " DE/WM", - "keyColor": "blue" - }, - { - "type": "theme", - "key": "│ ├󰉼", - "keyColor": "blue" - }, - { - "type": "terminal", - "key": "│ ├", - "keyColor": "blue" - }, - { - "type": "wallpaper", - "key": "│ └󰸉", - "keyColor": "blue" - }, - { - "type": "host", - "key": "󰌢 PC", - "keyColor": "green" - }, - { - "type": "cpu", - "key": "│ ├󰻠", - "keyColor": "green" - }, - { - "type": "memory", - "key": "│ ├󰑭", - "keyColor": "green" - }, - { - "type": "disk", - "key": "│ ├", - "keyColor": "green" - }, - { - "type": "display", - "key": "│ └󰍹", - "keyColor": "green" - }, - { - "type": "battery", - "key": "│ ├", - "keyColor": "green" - }, - { - "type": "player", - "key": " SND", - "keyColor": "cyan" - }, - { - "type": "media", - "key": "│ └󰝚", - "keyColor": "cyan" - }, - { - "type": "custom", - "format": "\u001b[90m└────────────────────────────────────────────────────────────┘" - }, - "break", - { - "type": "custom", - "format": " \u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[38m \u001b[39m  \u001b[38m \u001b[37m \u001b[36m \u001b[35m \u001b[34m \u001b[33m \u001b[32m \u001b[31m \u001b[90m" - } - ] -} diff --git a/homeManagerModules/apps/fastfetch/config.nix b/homeManagerModules/apps/fastfetch/config.nix new file mode 100644 index 00000000..7726eec6 --- /dev/null +++ b/homeManagerModules/apps/fastfetch/config.nix @@ -0,0 +1,106 @@ +{ + "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; + display = {separator = " -> ";}; + logo = {padding = {bottom = 2;};}; + modules = [ + { + format = "┌────────────────────────────────────────────────────────────┐"; + type = "custom"; + } + { + keyWidth = 10; + type = "title"; + } + { + format = "└────────────────────────────────────────────────────────────┘"; + type = "custom"; + } + { + format = "                    "; + type = "custom"; + } + { + format = "┌────────────────────────────────────────────────────────────┐"; + type = "custom"; + } + { + key = " OS"; + keyColor = "yellow"; + type = "os"; + } + { + key = "│ └"; + keyColor = "yellow"; + type = "shell"; + } + { + key = " DE/WM"; + keyColor = "blue"; + type = "wm"; + } + { + key = "│ ├󰉼"; + keyColor = "blue"; + type = "theme"; + } + { + key = "│ ├"; + keyColor = "blue"; + type = "terminal"; + } + { + key = "│ └󰸉"; + keyColor = "blue"; + type = "wallpaper"; + } + { + key = "󰌢 PC"; + keyColor = "green"; + type = "host"; + } + { + key = "│ ├󰻠"; + keyColor = "green"; + type = "cpu"; + } + { + key = "│ ├󰑭"; + keyColor = "green"; + type = "memory"; + } + { + key = "│ ├"; + keyColor = "green"; + type = "disk"; + } + { + key = "│ └󰍹"; + keyColor = "green"; + type = "display"; + } + { + key = "│ ├"; + keyColor = "green"; + type = "battery"; + } + { + key = " SND"; + keyColor = "cyan"; + type = "player"; + } + { + key = "│ └󰝚"; + keyColor = "cyan"; + type = "media"; + } + { + format = "└────────────────────────────────────────────────────────────┘"; + type = "custom"; + } + "break" + { + format = "                    "; + type = "custom"; + } + ]; +} diff --git a/homeManagerModules/apps/fastfetch/default.nix b/homeManagerModules/apps/fastfetch/default.nix index b38a5cf8..c74440f0 100644 --- a/homeManagerModules/apps/fastfetch/default.nix +++ b/homeManagerModules/apps/fastfetch/default.nix @@ -6,6 +6,6 @@ }: { config = lib.mkIf config.ar.home.apps.fastfetch.enable { home.packages = [pkgs.fastfetch]; - xdg.configFile."fastfetch/config.jsonc".source = ./config.jsonc; + xdg.configFile."fastfetch/config.jsonc".text = lib.generators.toJSON {} (import ./config.nix); }; }