#include "fastfetch.h" #include "fastfetch_config.h" #include "util/FFvaluestore.h" #include #include #include #include #include #define FASTFETCH_DEFAULT_STRUCTURE "Title:Seperator:OS:Host:Kernel:Uptime:Packages:Shell:Resolution:DE:WM:Theme:Icons:Font:Terminal:TerminalFont:CPU:GPU:Memory:Disk:Battery:Locale:Break:Colors" #define FASTFETCH_DEFAULT_CONFIG \ "## Fastfetch configuration\n" \ "## Put arguments here to make them permanently.\n" \ "## Direct arguments will overwrite the corresponding ones in this files\n" \ "## Each line is whitespace trimmed on beginn and end.\n" \ "## Empty lines or lines starting with # are ignored.\n" \ "## There are more arguments possible than listed here, take a look at fastfetch --help!\n" \ "## This version of the file was shipped with "FASTFETCH_PROJECT_VERSION".\n" \ "## Use fastfetch --print-default-config > ~/.config/fastfetch/config.conf to generate a new one with current defaults.\n" \ "\n" \ "## General options:\n" \ "# --structure "FASTFETCH_DEFAULT_STRUCTURE"\n" \ "# --spacer 4\n" \ "# --seperator \": \"\n" \ "# --offsetx 0\n" \ "# --recache false\n" \ "# --show-errors false\n" \ "\n" \ "## Logo options:\n" \ "# --color-logo true\n" \ "\n" \ "## OS options:\n" \ "# --os-architecture true\n" \ "\n" \ "## Host options:\n" \ "# --host-version true\n" \ "\n" \ "## Kernel options:\n" \ "# --kernel-release true\n" \ "# --kernel-version false\n" \ "\n" \ "## Packages options:\n" \ "# --packages-combined false\n" \ "# --packages-combined-names true\n" \ "# --packages-pacman true\n" \ "# --packages-flatpak true\n" \ "\n" \ "## Shell options:\n" \ "# --shell-path false\n" \ "\n" \ "## Resolution options:\n" \ "# --resolution-refreshrate true\n" \ "# --resolution-libX11 libX11.so\n"\ "# --resolution-libXrandr libXrandr.so\n" \ "\n" \ "## Battery options:\n" \ "# --battery-manufacturer true\n" \ "# --battery-model true\n" \ "# --battery-technology true\n" \ "# --battery-capacity true\n" \ "# --battery-status true\n" //Things only needed by fastfetch typedef struct FFdata { FFvaluestore valuestore; char structure[2048]; char logoName[32]; } FFdata; static inline void printHelp() { puts( "Usage: fastfetch \n" "\n" "Informative options:\n" " -h, --help: shows this message and exits\n" " -h , --help : shows help for a specific command and exits\n" " -v --version: prints the version of fastfetch and exits\n" " --list-logos: list available logos and exits\n" " --print-logos: shows available logos and exits\n" " --print-default-config: prints the default config and exits\n" "\n" "General options:\n" " --structure : sets the structure of the fetch. Must be a colon seperated list of keys\n" " --set : hard set the value of an key\n" " -c , --color : sets the color of the keys. Must be a linux console color code (+)\n" " --spacer : sets the distance between logo and text\n" " -s , --seperator : sets the seperator between key and value. Default is a colon with a space\n" " -x , --offsetx : sets the x offset. Can be negative to cut the logo, but no more than logo width.\n" " --show-errors : print occuring errors\n" " -r --recache : if set to true, no cached values will be used\n" "\n" "Logo options:\n" " -l , --logo : sets the shown logo. Also changes the main color accordingly\n" " --color-logo : if set to false, the logo will be black / white\n" "\n" "OS options:\n" " --os-architecture : Show the architecture of the os\n" " --os-format : Provide the printf format string for os output (+)\n" "\n" "Host options:\n" " --host-version : Show the version of the host platform, if possible. Most likely, this will be the BIOS version\n" " --host-format : Provide the printf format string for host output (+)\n" "\n" "Kernel options:\n" " --kernel-release : Shows the release of the kernel\n" " --kernel-version : Shows the build version of the kernel\n" "\n" "Packages options:\n" " --packages-combined : Show the sum of all packages\n" " --packages-combined-names : Show the names of the package managers after the sum if in packages-combined mode\n" " --packages-pacman : Count pacman packages\n" " --packages-flatpak : Count flatpak packages\n" " --packages-format : Provide the printf format string for packages output (+)\n" "\n" "Shell options:\n" " --shell-path : Show the full path of the shell\n" "\n" "Resolution optins:\n" " --resolution-refreshrate : Show the refresh rate of the monitor\n" " --resolution-libX11 : Set the path to the x11 library to load\n" " --resolution-libXrandr : Set the path to the xrandr library to load\n" " --resolution-format : Provide the printf format string for resolution output (+)\n" "\n" "Battery options:\n" " --battery-manufacturer : Show the manufacturer of the battery, if possible\n" " --battery-model : Show the model of the battery, if possible\n" " --battery-technology : Show the technology of the battery, if possible\n" " --battery-capacity : Show the capacity of the battery, if possible\n" " --battery-status : Show the status of the battery, if possible\n" " --battery-format : Provide the printf format string for battery output (+)\n" "\n" "If an value starts with an ?, it is optional. \"true\" will be used if not set.\n" "An (+) at the end indicates that more help can be printed with --help