diff --git a/config.jsonc b/config.jsonc new file mode 100644 index 0000000..3ffd91c --- /dev/null +++ b/config.jsonc @@ -0,0 +1,86 @@ +{ + "$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", + "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": "└────────────────────────────────────────────┘" + }, + { + "type": "colors", + "paddingLeft": 2, + "symbol": "circle" + } + ] +} diff --git a/setup.sh b/setup.sh index 65482af..0b93242 100755 --- a/setup.sh +++ b/setup.sh @@ -189,6 +189,10 @@ install_additional_dependencies() { esac } +create_fastfetch_config() { + fastfetch --gen-config +} + linkConfig() { ## Get the correct user home directory. USER_HOME=$(getent passwd ${SUDO_USER:-$USER} | cut -d: -f6) @@ -206,6 +210,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 @@ -213,6 +219,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}"