<commit_before>#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

int
main(int argc, char **argv)
{
   int i, perm = 0;
   
   if (!getenv("TERMINOLOGY")) return 0;
   if (argc <= 1)
     {
        printf("Usage: %s [-p] FILE1 [FILE2 ...]\n"
               "  Change the terminal background to the given file/uri\n"
               "  -p  Make change permanent (stored in config)\n"
               "\n",
               argv[0]);
        return 0;
     }
   for (i = 1; i < argc; i++)
     {
        char *path, buf[PATH_MAX * 2], tbuf[PATH_MAX * 3];

        if (!strcmp(argv[i], "-p"))
          {
             perm = 1;
             i++;
             if (i >= argc) break;
          }
        path = argv[i];
        if (realpath(path, buf)) path = buf;<commit_msg>tybg: make tybg without argument display the default wallpaper<commit_after>#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

int
main(int argc, char **argv)
{
   int i, perm = 0;
   
   if (!getenv("TERMINOLOGY")) return 0;
   if (argc > 1 &&
       (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")))
     {
        printf("Usage: %s [-p] [FILE1 FILE2 ...]\n"
               "  Change the terminal background to the given file/uri\n"
               "  -p  Make change permanent (stored in config)\n"
               "\n",
               argv[0]);
        return 0;
     }
   if (argc <= 1)
     {
        char tbuf[32];
          snprintf(tbuf, sizeof(tbuf), "%c}bt", 0x1b);
        if (write(0, tbuf, strlen(tbuf) + 1) != (signed)(strlen(tbuf) + 1)) perror("write");
        return 0;
     }
   for (i = 1; i < argc; i++)
     {
        char *path, buf[PATH_MAX * 2], tbuf[PATH_MAX * 3];

        if (!strcmp(argv[i], "-p"))
          {
             perm = 1;
             i++;
             if (i >= argc) break;
          }
        path = argv[i];
        if (realpath(path, buf)) path = buf;
{'fraction_non_alphanumeric': 0.17006109979633402, 'fraction_numerical': 0.01680244399185336, 'mean_word_length': 1.6954732510288066, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6090469', 'n_tokens_mistral': 707, 'n_tokens_neox': 683, 'n_words': 190}