mirror of
https://github.com/ChrisTitusTech/mybash.git
synced 2026-04-05 03:58:32 +00:00
Merge pull request #51 from siddheshgunjal/main
Added custom fastfetch config (Similar to yours)
This commit is contained in:
86
config.jsonc
Normal file
86
config.jsonc
Normal file
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
7
setup.sh
7
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}"
|
||||
|
||||
Reference in New Issue
Block a user