X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=f1f7bc11e5bc15eb84cd52364d78a2daefa7845f;hb=d5275012b45149a2a6e94679609aacca478221ad;hp=ae93ade5e83c56f24af82e6e7fa771b22e8bd16a;hpb=149c0d3aedffe69b625ef95868daae200941d5f5;p=st.git diff --git a/st.c b/st.c index ae93ade..f1f7bc1 100644 --- a/st.c +++ b/st.c @@ -28,13 +28,11 @@ #include #include -char *argv0; - #define Glyph Glyph_ #define Font Font_ -#include "win.h" #include "st.h" +#include "win.h" #if defined(__linux) #include @@ -60,7 +58,7 @@ char *argv0; #define ISDELIM(u) (utf8strchr(worddelimiters, u) != NULL) /* constants */ -#define ISO14755CMD "dmenu -w %lu -p codepoint: > 4); if (c == -1) @@ -699,7 +701,6 @@ execsh(void) setenv("SHELL", sh, 1); setenv("HOME", pw->pw_dir, 1); setenv("TERM", termname, 1); - xsetenv(); signal(SIGCHLD, SIG_DFL); signal(SIGHUP, SIG_DFL); @@ -1986,14 +1987,11 @@ tprinter(char *s, size_t len) void iso14755(const Arg *arg) { - unsigned long id = xwinid(); - char cmd[sizeof(ISO14755CMD) + NUMMAXLEN(id)]; FILE *p; char *us, *e, codepoint[9], uc[UTF_SIZ]; unsigned long utf32; - snprintf(cmd, sizeof(cmd), ISO14755CMD, id); - if (!(p = popen(cmd, "r"))) + if (!(p = popen(ISO14755CMD, "r"))) return; us = fgets(codepoint, sizeof(codepoint), p); @@ -2572,37 +2570,6 @@ tresize(int col, int row) term.c = c; } -void -zoom(const Arg *arg) -{ - Arg larg; - - larg.f = usedfontsize + arg->f; - zoomabs(&larg); -} - -void -zoomabs(const Arg *arg) -{ - xunloadfonts(); - xloadfonts(usedfont, arg->f); - cresize(0, 0); - ttyresize(); - redraw(); - xhints(); -} - -void -zoomreset(const Arg *arg) -{ - Arg larg; - - if (defaultfontsize > 0) { - larg.f = defaultfontsize; - zoomabs(&larg); - } -} - void resettitle(void) { @@ -2684,16 +2651,3 @@ cresize(int width, int height) tresize(col, row); xresize(col, row); } - -void -usage(void) -{ - die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]" - " [-n name] [-o file]\n" - " [-T title] [-t title] [-w windowid]" - " [[-e] command [args ...]]\n" - " %s [-aiv] [-c class] [-f font] [-g geometry]" - " [-n name] [-o file]\n" - " [-T title] [-t title] [-w windowid] -l line" - " [stty_args ...]\n", argv0, argv0); -}