commit d21aba6577be01dd56432a5a7c79ab2acc133aaf parent c72e35e10aa806f25824cc106521f1d99fbbcd96 Author: Mahdi Mirzade <[email protected]> Date: Sat, 6 Aug 2022 00:41:47 +0430 Cleanup suckless projects, remove freebsd specific ports Diffstat:
39 files changed, 49 insertions(+), 54 deletions(-)
diff --git a/.local/src/dmenu/dmenu b/.local/src/dmenu/dmenu Binary files differ. diff --git a/.local/src/dmenu/dmenu.o b/.local/src/dmenu/dmenu.o Binary files differ. diff --git a/.local/src/dmenu/drw.o b/.local/src/dmenu/drw.o Binary files differ. diff --git a/.local/src/dmenu/stest b/.local/src/dmenu/stest Binary files differ. diff --git a/.local/src/dmenu/stest.o b/.local/src/dmenu/stest.o Binary files differ. diff --git a/.local/src/dmenu/util.o b/.local/src/dmenu/util.o Binary files differ. diff --git a/.local/src/dwm/config.mk b/.local/src/dwm/config.mk @@ -7,10 +7,10 @@ VERSION = 6.3 PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man -X11INC = /usr/local/include -X11LIB = /usr/local/lib +X11INC = /usr/X11R6/include +X11LIB = /usr/X11R6/lib -BDINC = /usr/local/include/fribidi +BDINC = /usr/include/fribidi # Xinerama, comment if you don't want it XINERAMALIBS = -lXinerama @@ -18,7 +18,7 @@ XINERAMAFLAGS = -DXINERAMA # freetype FREETYPELIBS = -lfontconfig -lXft -FREETYPEINC = /usr/local/include/freetype2 +FREETYPEINC = /usr/include/freetype2 # OpenBSD (uncomment) #FREETYPEINC = ${X11INC}/freetype2 diff --git a/.local/src/dwm/drw.o b/.local/src/dwm/drw.o Binary files differ. diff --git a/.local/src/dwm/dwm b/.local/src/dwm/dwm Binary files differ. diff --git a/.local/src/dwm/dwm.c b/.local/src/dwm/dwm.c @@ -2342,9 +2342,7 @@ spawn(const Arg *arg) close(ConnectionNumber(dpy)); setsid(); execvp(((char **)arg->v)[0], (char **)arg->v); - fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[0]); - perror(" failed"); - exit(EXIT_SUCCESS); + die("dwm: execvp '%s' failed:", ((char **)arg->v)[0]); } } @@ -2517,6 +2515,7 @@ unmanage(Client *c, int destroyed) wc.border_width = c->oldbw; XGrabServer(dpy); /* avoid race conditions */ XSetErrorHandler(xerrordummy); + XSelectInput(dpy, c->win, NoEventMask); XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */ XUngrabButton(dpy, AnyButton, AnyModifier, c->win); setclientstate(c, WithdrawnState); @@ -3235,7 +3234,8 @@ main(int argc, char *argv[]) #endif /* __OpenBSD__ */ scan(); run(); - if(restartsig) execvp(argv[0], argv); + if(restartsig) + execvp(argv[0], argv); cleanup(); XCloseDisplay(dpy); return EXIT_SUCCESS; diff --git a/.local/src/dwm/dwm.o b/.local/src/dwm/dwm.o Binary files differ. diff --git a/.local/src/dwm/util.o b/.local/src/dwm/util.o Binary files differ. diff --git a/.local/src/merbe/Makefile b/.local/src/merbe/Makefile @@ -1,11 +1,13 @@ X11INC=/usr/X11R6/include X11LIB=/usr/X11R6/lib +FT2INC=/usr/include/freetype2 # FreeBSD (uncomment) -X11INC=/usr/local/include -X11LIB=/usr/local/lib +#X11INC=/usr/local/include +#X11LIB=/usr/local/lib +#FT2INC=/usr/local/include/freetype2 -CFLAGS = -Wall -Wextra -pedantic -I${X11INC} -L${X11LIB} -lX11 -lXft -I${X11INC}/freetype2 -pthread +CFLAGS = -Wall -Wextra -pedantic -I${FT2INC} -I${X11INC} -L${X11LIB} -lX11 -lXft -I${X11INC}/freetype2 -pthread PREFIX ?= /usr/local CC ?= cc diff --git a/.local/src/merbe/merbe b/.local/src/merbe/merbe Binary files differ. diff --git a/.local/src/slock/config.mk b/.local/src/slock/config.mk @@ -7,8 +7,8 @@ VERSION = 1.4 PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man -X11INC = /usr/local/include/xorg -X11LIB = /usr/local/lib +X11INC = /usr/X11R6/include +X11LIB = /usr/X11R6/lib # Xinerama XINERAMALIBS = -lXinerama @@ -16,11 +16,11 @@ XINERAMAFLAGS = -DXINERAMA # freetype FREETYPELIBS = -lXft -FREETYPEINC = /usr/local/include/freetype2 +FREETYPEINC = /usr/include/freetype2 # includes and libs -INCS = -I. -I/usr/local/include -I/usr/local/include/pixman-1 -I${X11INC} -I${FREETYPEINC} -LIBS = -L/usr/local/lib -lc -lcrypt -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXext -lXrandr -lImlib2 +INCS = -I. -I/usr/include -I/usr/include/pixman-1 -I${X11INC} -I${FREETYPEINC} +LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXext -lXrandr -lImlib2 # flags CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE ${XINERAMAFLAGS} diff --git a/.local/src/slock/explicit_bzero.o b/.local/src/slock/explicit_bzero.o Binary files differ. diff --git a/.local/src/slock/slock b/.local/src/slock/slock Binary files differ. diff --git a/.local/src/slock/slock.o b/.local/src/slock/slock.o Binary files differ. diff --git a/.local/src/st/st b/.local/src/st/st Binary files differ. diff --git a/.local/src/st/st.o b/.local/src/st/st.o Binary files differ. diff --git a/.local/src/st/x.o b/.local/src/st/x.o Binary files differ. diff --git a/.local/src/surf/config.h b/.local/src/surf/config.h @@ -1,6 +1,6 @@ /* modifier 0 means no modifier */ -//#define HOMEPAGE "https://yandex.com/" -#define DOWNLOADS "~/Downloads" +//#define HOMEPAGE "https://mahdi.pw" +#define DOWNLOADS "~/dls" #define HS_FILE "~/.config/surf/history" #define BM_FILE "~/.config/surf/bookmarks" @@ -15,7 +15,7 @@ static char *cookiefile = "~/.config/surf/cookies.txt"; static char *bookmarkfile = BM_FILE; static char *historyfile = HS_FILE; -static char *searchengine = "https://yandex.com/search/?text="; +static char *searchengine = "https://wiby.me/?q="; static SearchEngine searchengines[] = { { "wt", "https://www.wiktionary.org/search-redirect.php?family=wiktionary&search=%s" }, @@ -95,27 +95,28 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | /* SETPROP(readprop, setprop, prompt)*/ #define SETPROP(r, s, p) { \ - .v = (const char *[]){ "/bin/sh", "-c", \ - "WIDTH=\"$(xwininfo -id $1 | awk '/Width/{print int($2/5/3)}')\"; " \ - "HIST=\"$(tail -n 5000 " HS_FILE " 2>/dev/null | awk -F'|' '!a[$2]++' | sort -r)\"; " \ - "if [ \"${WIDTH}\" -lt 30 ]; then " \ - " HIST_TABLE=\"$(printf '%s\n' \"${HIST}\" | awk -F'|' '{print NR\"|\"$3}')\";" \ - "elif [ \"${WIDTH}\" -lt 50 ]; then" \ - " HIST_TABLE=\"$(printf '%s\n' \"${HIST}\" | awk -F'|' '{if(length($2) > '\"$WIDTH\"'){print NR\"|\"substr($2,0,'\"$WIDTH\"')\"...|\"$3}else{print NR\"|\"$2\"|\"$3}}')\"; " \ - "else HIST_TABLE=\"$(printf '%s\n' \"${HIST}\" | awk -F'|' '{if(length($2) > '\"$WIDTH\"'){print NR\"|\"$1\"|\"substr($2,0,'\"$WIDTH\"')\"...|\"$3}else{print NR\"|\"$1\"|\"$2\"|\"$3}}')\"; fi; " \ - "BOOK_MARKS=\"$(cat " BM_FILE " 2>/dev/null)\"; " \ - "prop=\"$(printf '%b' \"$(xprop -id $1 "r" " \ - "| sed -e 's/^"r"(UTF8_STRING) = \"\\(.*\\)\"/\\1/' " \ - " -e 's/\\\\\\(.\\)/\\1/g' "\ - " && [ \""p"\" != \""PROMPT_FIND"\" ]" \ - " && printf '%s\n' \"${BOOK_MARKS}\" " \ - " && printf '%s\n' \"${HIST_TABLE}\" | column -t -s '|')\" " \ - "| dmenu -i -b -l 20 -p '"p"' -w $1 | awk '{if(length($3)!=0){print $1}else{print $0}}')\"; " \ - "[ \"$prop\" ] || exit; " \ - "[ \"$(echo \"$prop\" | grep -Eo '^\-?[0-9]+$')\" -gt 0 ] && prop=\"$(printf '%s\n' \"${HIST}\" | sed \"${prop}q;d\" | awk -F'|' '{print $2}')\"; " \ - "if [ \""p"\" != \""PROMPT_NEW"\" ]; then xprop -id $1 -f "s" 8u -set "s" \"$prop\"; else surf-open \"$prop\"; fi", \ - "surf-setprop", winid, NULL \ - } \ + .v = (const char *[]){ "/bin/sh", "-c", \ + "WIDTH=$(xwininfo -id $1 | awk '/Width/{print int($2/20)}'); " \ + "HIST=$(tail -n 5000 " HS_FILE " 2>/dev/null | awk -F'|' '!a[$2]++' | sort -r); " \ + "if [ ${WIDTH} -lt 30 ]; then " \ + " HIST_TABLE=$(printf '%s\n' \"${HIST}\" | awk -F'|' '{print NR\"|\"$3}');" \ + "elif [ ${WIDTH} -lt 50 ]; then" \ + " HIST_TABLE=$(printf '%s\n' \"${HIST}\" | awk -F'|' '{if(length($2) > '\"$WIDTH\"'){print NR\"|\"substr($2,0,'\"$WIDTH\"')\"...|\"$3}else{print NR\"|\"$2\"|\"$3}}'); " \ + "else HIST_TABLE=$(printf '%s\n' \"${HIST}\" | awk -F'|' '{if(length($2) > '\"$WIDTH\"'){print NR\"|\"$1\"|\"substr($2,0,'\"$WIDTH\"')\"...|\"$3}else{print NR\"|\"$1\"|\"$2\"|\"$3}}'); fi; " \ + "BOOKMARKS=$(cat " BM_FILE " 2>/dev/null); " \ + "HISTORIES=$(printf '%s\n' \"${HIST_TABLE}\" | column -t -s '|'); " \ + "[ \"$HIST\" ] || HISTORIES=''; " \ + "prop=$(printf '%b' \"$(xprop -id $1 "r" " \ + "| sed -e 's/^"r"(UTF8_STRING) = \"\\(.*\\)\"/\\1/' " \ + " -e 's/\\\\\\(.\\)/\\1/g' "\ + " && [ \""p"\" != \""PROMPT_FIND"\" ]" \ + " && printf '%s\n' \"${BOOKMARKS:----Bookmarks go here---}\" \"${HISTORIES:----History records go here---}\")\" " \ + "| dmenu -i -b -l 20 -p '"p"' -w $1 | awk '{if(length($3)!=0){print $1}else{print $0}}'); " \ + "[ \"$prop\" ] || exit; " \ + "[ \"$(echo \"$prop\" | grep -Eo '^\-?[0-9]+$')\" -gt 0 ] && prop=\"$(printf '%s\n' \"${HIST}\" | sed \"${prop}q;d\" | awk -F'|' '{print $2}')\"; " \ + "if [ \""p"\" != \""PROMPT_NEW"\" ]; then xprop -id $1 -f "s" 8u -set "s" \"$prop\"; else surf-open \"$prop\"; fi", \ + "surf-setprop", winid, NULL \ + } \ } /* DOWNLOAD(URI, referer) */ diff --git a/.local/src/surf/config.mk b/.local/src/surf/config.mk @@ -18,7 +18,7 @@ WEBEXTINC = `pkg-config --cflags webkit2gtk-4.0 webkit2gtk-web-extension-4.0 gio WEBEXTLIBS = `pkg-config --libs webkit2gtk-4.0 webkit2gtk-web-extension-4.0 gio-2.0` # includes and libs -INCS = $(X11INC) $(GTKINC) +INCS = $(X11INC) $(GTKINC) -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include LIBS = $(X11LIB) $(GTKLIB) -lgthread-2.0 # flags diff --git a/.local/src/surf/surf b/.local/src/surf/surf Binary files differ. diff --git a/.local/src/surf/surf.o b/.local/src/surf/surf.o Binary files differ. diff --git a/.local/src/surf/webext-surf.o b/.local/src/surf/webext-surf.o Binary files differ. diff --git a/.local/src/surf/webext-surf.so b/.local/src/surf/webext-surf.so Binary files differ. diff --git a/.local/src/tabbed/config.mk b/.local/src/tabbed/config.mk @@ -7,18 +7,18 @@ VERSION = 0.6 PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man -X11INC = /usr/local/include -X11LIB = /usr/local/lib +X11INC = /usr/X11R6/include +X11LIB = /usr/X11R6/lib # freetype FREETYPELIBS = -lfontconfig -lXft -FREETYPEINC = /usr/local/include/freetype2 +FREETYPEINC = /usr/include/freetype2 # OpenBSD (uncomment) #FREETYPEINC = ${X11INC}/freetype2 # includes and libs -INCS = -I. -I/usr/local/include -I$(X11INC) -I${FREETYPEINC} -LIBS = -L/usr/local/lib -lc -L${X11LIB} -lX11 ${FREETYPELIBS} +INCS = -I. -I/usr/include -I$(X11INC) -I${FREETYPEINC} +LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${FREETYPELIBS} # flags CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE diff --git a/.local/src/tabbed/tabbed b/.local/src/tabbed/tabbed Binary files differ. diff --git a/.local/src/tabbed/tabbed.o b/.local/src/tabbed/tabbed.o Binary files differ. diff --git a/.local/src/tabbed/xembed b/.local/src/tabbed/xembed Binary files differ. diff --git a/.local/src/tabbed/xembed.o b/.local/src/tabbed/xembed.o Binary files differ. diff --git a/freebsd/doas.conf b/freebsd/doas.conf @@ -1,2 +0,0 @@ -permit nopass keepenv :wheel -#permit keepenv :wheel diff --git a/freebsd/src/dmenu b/freebsd/src/dmenu @@ -1 +0,0 @@ -Subproject commit c61036548411483a6284f095a028930f76bbd834 diff --git a/freebsd/src/dwm b/freebsd/src/dwm @@ -1 +0,0 @@ -Subproject commit a2f05d7af4cb17f58d1e3b6b0c8980d410752b9d diff --git a/freebsd/src/slock b/freebsd/src/slock @@ -1 +0,0 @@ -Subproject commit 072324b905878281552e0b5fb34f60f8dfe5c2bd diff --git a/freebsd/src/st b/freebsd/src/st @@ -1 +0,0 @@ -Subproject commit 4687ea1b0505dacb908060b42d901e8b7bd05fb4 diff --git a/freebsd/src/surf b/freebsd/src/surf @@ -1 +0,0 @@ -Subproject commit 107fe086707b94e94990f2b83d83d13c47c3e32c diff --git a/freebsd/src/tabbed b/freebsd/src/tabbed @@ -1 +0,0 @@ -Subproject commit 1fea079791467a8168303a99f247ea0f8cbaf972