8d7 < #include /* puts, printf */ 31,44d29 < int origx=50; < int origy=50; < time_t gtime_ptr; < tm* gtm_local; < int kk=1; < < bool doesFileExist(const std::string& name) { // thanks to https://stackoverflow.com/questions/46292764/check-for-file-existence-in-c-without-creating-file < if (FILE *file = fopen(name.c_str(), "r")) { < fclose(file); < return true; < } else { < return false; < } < } 71c56 < origx, origy, // origin --- > 50, 50, // origin 78c63 < origx, origy, // origin --- > 50, 50, // origin 90,92c75 < if (kk > 1) { < memcpy((buff + strlen(buff)), (-3 + strstr(ctime(&time_ptr), ":")), 21); //, (1 + strlen(suffix))); < } else if (jk < strlen(" ... Click to refresh\0")){ --- > if (jk < strlen(" ... Click to refresh\0")){ 198c181 < XResizeWindow(dsp, win, 220 + (i % 11), 220 + (i % 11)); --- > XResizeWindow(dsp, win, 200 + (i % 11), 200 + (i % 11)); 207c190 < catch (int ez) { if (1 == 2) { printf("%i\n", ez); } } --- > catch (int ez) { printf("%i\n", ez); } 213,215c196 < int main(int argc, char* argv[]) { < int status=0; < int ostatus=256; --- > int main() { 217,222d197 < char datehuh[80]="TZ= date\0"; < char gbuff[81]="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; < kk=argc; < gtime_ptr = time(NULL); < gtm_local = localtime(>ime_ptr); < strftime(gbuff,80,"%Z",gtm_local); 225,226c200 < if (kk <= 1) { if (doesFileExist("get_tz.php")) { status=std::system("php -f get_tz.php"); ostatus=status; } } else { if (strstr(argv[1], "/")) { usleep(1100); if (doesFileExist("stop_x1.x1")) { remove("stop_x1.x1"); } usleep(1100); memcpy((datehuh + 3), argv[1], strlen(argv[1])); } else { kk=1; } } < while (!doesFileExist("stop_x1.x1")) { --- > while(1) { 233d206 < if (kk <= 1) { std::system("date"); } else { gtime_ptr = time(NULL); printf("%s%s\n", ctime(>ime_ptr), gbuff); } 235,238d207 < } < if (doesFileExist("stop_x1.x1")) { < remove("stop_x1.x1"); < exit(EXIT_FAILURE);