x11/thinglaunch: Remove expired port

2023-06-10 x11/thinglaunch: Abandonware, please use x11/thingylaunch instead
This commit is contained in:
Rene Ladan 2023-06-10 13:22:04 +02:00
parent 771f26b15e
commit fdeaeafe38
6 changed files with 1 additions and 150 deletions

1
MOVED
View file

@ -7637,3 +7637,4 @@ archivers/libunrar|archivers/libunrar6|2023-06-06|Remove obsoleted port. Use arc
x11/radare-cutter||2023-06-07|Has expired: Cutter for radare has been discontinued as Cutter has moved to use rizin as their backend framework
security/py-sequoia||2023-06-09|Deprecated upstream, broken as based on older dependency
audio/hvl2wav|audio/ocp|2023-06-10|Has expired: Abandoned upstream, use audio/ocp instead
x11/thinglaunch|x11/thingylaunch|2023-06-10|Has expired: Abandonware, please use x11/thingylaunch instead

View file

@ -396,7 +396,6 @@
SUBDIR += terminal.app
SUBDIR += terminator
SUBDIR += terminology
SUBDIR += thinglaunch
SUBDIR += thingylaunch
SUBDIR += tilda
SUBDIR += tilix

View file

@ -1,31 +0,0 @@
PORTNAME= thinglaunch
PORTVERSION= 1.8
PORTREVISION= 3
CATEGORIES= x11
MASTER_SITES= LOCAL/ehaupt
MAINTAINER= ehaupt@FreeBSD.org
COMMENT= Very fast launcher program for X
WWW= http://unix.freecode.com/projects/thinglaunch/
LICENSE= MIT
DEPRECATED= Abandonware, please use x11/thingylaunch instead
EXPIRATION_DATE= 2023-06-10
USES= xorg
USE_XORG= x11 xorgproto
CPPFLAGS+= -I${LOCALBASE}/include -lX11
LDFLAGS+= -L${LOCALBASE}/lib
PLIST_FILES= bin/thinglaunch
do-build:
${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} ${WRKSRC}/${PORTNAME}.c \
-o ${WRKSRC}/${PORTNAME}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>

View file

@ -1,2 +0,0 @@
SHA256 (thinglaunch-1.8.tar.gz) = 675ebfb65aabe5dc620e1594a9f500812d3327e4761e3bd947dc4a474c758fd1
SIZE (thinglaunch-1.8.tar.gz) = 3303

View file

@ -1,111 +0,0 @@
--- thinglaunch.c.orig 2004-09-20 14:27:56 UTC
+++ thinglaunch.c
@@ -19,10 +19,14 @@
*/
#include <X11/Xlib.h>
#include <X11/Xutil.h>
+#include <X11/keysymdef.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef __FreeBSD__
+#include <libgen.h>
+#endif
static void createWindow();
static void setupGC();
@@ -50,10 +54,13 @@ unsigned long black, white;
/* the actual commandline */
char command[MAXCMD+1];
+size_t cursor_pos;
int main(int argc, char ** argv) {
command[0] = 0x0;
+ cursor_pos = 0;
+
createWindow();
setupGC();
@@ -209,15 +216,15 @@ static void redraw() {
int font_height;
int textwidth;
-
+
font_height = font_info->ascent + font_info->descent;
- textwidth = XTextWidth(font_info, command, strlen(command));
+ textwidth = XTextWidth(font_info, command, cursor_pos);
XFillRectangle(display, win, rectgc, 0, 0, WINWIDTH, WINHEIGHT);
XDrawRectangle(display, win, gc, 0, 0, WINWIDTH-1, WINHEIGHT-1);
XDrawString(display, win, gc, 2, font_height+2, command, strlen(command));
- XDrawLine(display, win, gc, 2 + textwidth, font_height + 2,
- 2 + textwidth + 10, font_height+2);
+ XDrawLine(display, win, gc, 2 + textwidth, font_height + 4,
+ 2 + textwidth + 10, font_height+4);
XFlush(display);
@@ -229,22 +236,36 @@ static void keypress(XKeyEvent * keyeven
#define KEYBUFLEN 20
char buffer[KEYBUFLEN+1];
KeySym key_symbol;
- int len;
+ int len, tmp_pos;
len = XLookupString(keyevent, buffer, 1, &key_symbol, NULL);
buffer[len] = 0x0;
+ len = strlen(command);
switch(key_symbol) {
- case 0xff1b: /* this is escape */
+ case XK_Escape:
exit(0);
break;
- case 0xff08: /* backspace */
- len = strlen(command);
- if (len > 0) {
- command[len-1] = 0x0;
- }
+ case XK_BackSpace:
+ if (cursor_pos)
+ for (tmp_pos = --cursor_pos; tmp_pos <= len; tmp_pos++)
+ command[tmp_pos] = command[tmp_pos+1];
break;
- case 0xff0d: /* enter */
+ case XK_Left:
+ if (cursor_pos)
+ cursor_pos--;
+ break;
+ case XK_Right:
+ if (cursor_pos < len)
+ cursor_pos++;
+ break;
+ case XK_Home:
+ cursor_pos = 0;
+ break;
+ case XK_End:
+ cursor_pos = len;
+ break;
+ case XK_Return:
execcmd();
break;
default:
@@ -253,10 +274,11 @@ static void keypress(XKeyEvent * keyeven
/* normal printable chars */
if (key_symbol >= 0x20 && key_symbol <= 0x7e) {
- len = strlen(command);
if (len < MAXCMD) {
- command[len] = buffer[0];
- command[len+1] = 0x0;
+ if (cursor_pos != len)
+ for (tmp_pos = len; tmp_pos > cursor_pos; tmp_pos--)
+ command[tmp_pos] = command[tmp_pos-1];
+ command[cursor_pos++] = buffer[0];
}
}
redraw();

View file

@ -1,5 +0,0 @@
Thinglaunch is a very fast launcher program for X.
You can bind it to a key in your favorite window manager, and when you want to
start a program, just type its name. thinglaunch has a tiny footprint and
depends only on Xlib.