#include "fastfetch.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:WMTheme: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 (one per line). \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" //Things only needed by fastfetch typedef struct FFdata { FFvaluestore valuestore; FFstrbuf structure; FFstrbuf logoName; bool multithreading; } 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" " --print-default-structure: prints the default stucture and exits\n" " --print-available-modules: prints a list of available modules and exits\n" "\n" "General options:\n" " --structure : sets the structure of the fetch. Must be a colon seperated list of keys. Use --print-available-modules to show the default\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" " --spacing : 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" " --print-remaining-logo : print the remaining logo, if it is higher than the number of lines shown\n" " --multithreading : use multiple threads to calculate values\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" "Format options: Provide the format string for custom output (+)\n" " --os-format \n" " --host-format \n" " --kernel-format \n" " --uptime-format \n" " --packages-format \n" " --shell-format \n" " --resolution-format \n" " --de-format \n" " --wm-format \n" " --wm-theme-format \n" " --theme-format \n" " --icons-format \n" " --font-format \n" " --terminal-format \n" " --terminal-font-format \n" " --cpu-format \n" " --gpu-format \n" " --memory-format \n" " --disk-format \n" " --battery-format \n" " --locale-format \n" "\n" "Key options: Provide a custom key for an output\n" " --os-key \n" " --host-key \n" " --kernel-key \n" " --uptime-key \n" " --packages-key \n" " --shell-key \n" " --resolution-key \n" " --de-key \n" " --wm-key \n" " --wm-theme-key \n" " --theme-key \n" " --icons-key \n" " --font-key \n" " --terminal-key \n" " --terminal-font-key \n" " --cpu-key \n" " --gpu-key : takes the gpu index as format argument\n" " --memory-key \n" " --disk-key : takes the mount path as format argument\n" " --battery-key : takes the battery index as format argument\n" " --locale-key \n" "\n" "Library optins: Set the path of a library to load\n" " --lib-PCI \n" " --lib-X11 \n" " --lib-Xrandr \n" " --lib-DConf \n" "\n" "Module specific options:\n" " --disk-folders : A colon seperated list of folder paths for the disk output. Default is \"/:/home\"\n" "\n" "Parsing is not case sensetive. E.g. \"--lib-PCI\" is equal to \"--Lib-Pci\"\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