From 0ad6f4baa9088b1884d3fd95231296a93ede2e53 Mon Sep 17 00:00:00 2001 From: Siddhesh Gunjal Date: Fri, 24 May 2024 13:43:07 +0530 Subject: [PATCH 1/2] create --- config.jsonc | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ setup.sh | 7 ++++++ 2 files changed, 78 insertions(+) create mode 100644 config.jsonc diff --git a/config.jsonc b/config.jsonc new file mode 100644 index 0000000..41b1b92 --- /dev/null +++ b/config.jsonc @@ -0,0 +1,71 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "type": "builtin", + "color": + { + "1": "white", + "2": "cyan" + } + }, + "display": { + "separator": "  ", + "color": "cyan" + }, + "modules": [ + { + "type": "custom", // HardwareStart + "format": "┌─────────── \u001b[1mHardware Information\u001b[0m ───────────┐" // `\u001b` is `\033`, or `\e` + }, + { + "type": "host", + "key": " 󰌢" + }, + { + "type": "cpu", + "key": " " + }, + { + "type": "gpu", + "key": " " + }, + { + "type": "display", + "key": " 󱄄" + }, + { + "type": "memory", + "key": " " + }, + { + "type": "custom", // SoftwareStart + "format": "├─────────── \u001b[1mSoftware Information\u001b[0m ───────────┤" + }, + { + "type": "os", + "key": " " // Just get your distro's logo off nerdfonts.com, + }, + { + "type": "kernel", + "key": " ", + "format": "{1} {2}" + }, + { + "type": "wm", + "key": " " + }, + { + "type": "shell", + "key": " " + }, + { + "type": "custom", // InformationEnd + "format": "└────────────────────────────────────────────┘" + }, + { + "type": "colors", + "paddingLeft": 2, + "symbol": "circle" + } + ] +} diff --git a/setup.sh b/setup.sh index fcfa011..8b4b769 100755 --- a/setup.sh +++ b/setup.sh @@ -117,6 +117,10 @@ install_additional_dependencies() { sudo apt install -y trash-cli bat meld jpico } +create_fastfetch_config() { + fastfetch --gen-config +} + linkConfig() { ## Get the correct user home directory. USER_HOME=$(getent passwd ${SUDO_USER:-$USER} | cut -d: -f6) @@ -134,6 +138,8 @@ linkConfig() { ## Make symbolic link. ln -svf ${GITPATH}/.bashrc ${USER_HOME}/.bashrc ln -svf ${GITPATH}/starship.toml ${USER_HOME}/.config/starship.toml + echo -e "${YELLOW}Linking custom fastfetch config file...${RC}" + ln -svf ${GITPATH}/config.jsonc ${USER_HOME}/.config/fastfetch/config.jsonc } checkEnv @@ -141,6 +147,7 @@ installDepend installStarship installZoxide install_additional_dependencies +create_fastfetch_config if linkConfig; then echo -e "${GREEN}Done!\nrestart your shell to see the changes.${RC}" From 7538c07019dfc13d4554bb00390990c1ec69b440 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Fri, 28 Jun 2024 20:01:31 -0500 Subject: [PATCH 2/2] Update config.jsonc --- config.jsonc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config.jsonc b/config.jsonc index 41b1b92..3ffd91c 100644 --- a/config.jsonc +++ b/config.jsonc @@ -58,6 +58,21 @@ "type": "shell", "key": " " }, + { + "type": "custom", + "format": "|────────────────────\u001b[1mUptime / Age\u001b[0m────────────────────|" + }, + { + "type": "command", + "key": " OS Age ", + "keyColor": "magenta", + "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days" + }, + { + "type": "uptime", + "key": " Uptime ", + "keyColor": "magenta" + }, { "type": "custom", // InformationEnd "format": "└────────────────────────────────────────────┘"