st-newterm-0.8.2-tabbed.diff - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       st-newterm-0.8.2-tabbed.diff (560B)
       ---
            1 commit 11fc446aef2a9dbb99845e4b0294ef6177dbb3cb
            2 Author: GasparVardanyan <gaspar.vardanyan.mailbox@gmail.com>
            3 Date:   Fri Feb 11 20:15:19 2022 +0400
            4 
            5     modify newterm to work with tabbed
            6 
            7 diff --git a/st.c b/st.c
            8 index f03f5bd..c0a6716 100644
            9 --- a/st.c
           10 +++ b/st.c
           11 @@ -1071,7 +1071,11 @@ newterm(const Arg* a)
           12                  break;
           13          case 0:
           14                  chdir(getcwd_by_pid(pid));
           15 -                execlp("st", "./st", NULL);
           16 +                char * tabbed_win = getenv ("XEMBED");
           17 +                if (tabbed_win)
           18 +                        execlp("st", "./st", "-w", tabbed_win, NULL);
           19 +                else
           20 +                        execlp("st", "./st", NULL);
           21                  break;
           22          }
           23  }