Question of implementation details #280
-
I'm implementing Windows support for fastfetch, and encountered a few questions
uint32_t ffdsParseRefreshRate(int32_t refreshRate)
{
if(refreshRate <= 0)
return 0;
int remainder = refreshRate % 5;
if(remainder >= 3)
refreshRate += (5 - remainder);
else
refreshRate -= remainder;
//All other typicall refresh rates are dividable by 5
if(refreshRate == 145)
refreshRate = 144;
return (uint32_t) refreshRate;
}
typedef struct FFTerminalShellResult
{
FFstrbuf shellProcessName;
FFstrbuf shellExe;
const char* shellExeName; //pointer to a char in shellExe
FFstrbuf shellVersion;
FFstrbuf terminalProcessName;
FFstrbuf terminalExe;
const char* terminalExeName; //pointer to a char in terminalExe
FFstrbuf userShellExe;
const char* userShellExeName; //pointer to a char in userShellExe
FFstrbuf userShellVersion;
} FFTerminalShellResult; I found that we use |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I am back from vacation, so i can finally work on fastfetch again:
Resolution detection on linux often returns values like
Groups:
Entries:
On linux process names are truncated after 16 characters, so printing the exe name is often the better option. For example |
Beta Was this translation helpful? Give feedback.
-
Encountered a case with With I think What do you think about this? @LinusDierheimer |
Beta Was this translation helpful? Give feedback.
I am back from vacation, so i can finally work on fastfetch again:
Resolution detection on linux often returns values like
59.7264876728
herz, so this function rounds to the nearest multiple of 5, because that is what the user expects to see.Groups:
shell*
: bash, zsh, etc currently in useterminal*
: konsole, gnome-terminal, etc currently in useuserShell*
: Default shell of the user, usually set in/etc/passwd
Entries:
*ProcessName
: current process name, can be changed by the process, so it has its own field*…