diff options
-rw-r--r-- | config.h | 1 | ||||
-rwxr-xr-x | st.c | 10 |
2 files changed, 6 insertions, 5 deletions
@@ -1,4 +1,3 @@ | |||
1 | #define SHELL "/bin/bash" | ||
2 | #define TAB 8 | 1 | #define TAB 8 |
3 | 2 | ||
4 | #define FONT "6x13" | 3 | #define FONT "6x13" |
@@ -208,9 +208,12 @@ die(const char *errstr, ...) { | |||
208 | 208 | ||
209 | void | 209 | void |
210 | execsh(void) { | 210 | execsh(void) { |
211 | char *args[3] = {SHELL, "-i", NULL}; | 211 | char *shell = getenv("SHELL"); |
212 | if(!shell) | ||
213 | shell = "/bin/sh"; | ||
214 | char *args[3] = {shell, "-i", NULL}; | ||
212 | putenv("TERM=" TNAME); | 215 | putenv("TERM=" TNAME); |
213 | execvp(SHELL, args); | 216 | execvp(shell, args); |
214 | } | 217 | } |
215 | 218 | ||
216 | void | 219 | void |
@@ -844,7 +847,6 @@ tputtab(void) { | |||
844 | 847 | ||
845 | void | 848 | void |
846 | tputc(char c) { | 849 | tputc(char c) { |
847 | /* dump(c); */ | ||
848 | if(term.esc & ESC_START) { | 850 | if(term.esc & ESC_START) { |
849 | if(term.esc & ESC_CSI) { | 851 | if(term.esc & ESC_CSI) { |
850 | escseq.buf[escseq.len++] = c; | 852 | escseq.buf[escseq.len++] = c; |
@@ -1277,7 +1279,7 @@ run(void) { | |||
1277 | } | 1279 | } |
1278 | if(FD_ISSET(cmdfd, &rfd)) { | 1280 | if(FD_ISSET(cmdfd, &rfd)) { |
1279 | ttyread(); | 1281 | ttyread(); |
1280 | draw(SCREEN_UPDATE); | 1282 | draw(SCREEN_UPDATE); |
1281 | } | 1283 | } |
1282 | while(XPending(xw.dis)) { | 1284 | while(XPending(xw.dis)) { |
1283 | XNextEvent(xw.dis, &ev); | 1285 | XNextEvent(xw.dis, &ev); |