Re: [dev] sbm dmenu bookmarker

2023-08-01 Thread Spenser Truex
Thanks for your feedbacks, however, the script bm is the
simplification/attempted improvement of of bmks which I got from some
unknown source (apologies if you are the uncredited author).
-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] sbm dmenu bookmarker

2023-07-31 Thread Spenser Truex
On 23/07/31 08:15AM, Randy Palamar wrote:
> Hi,
>
> I think this script is way too complicated for what it does. I
> do the following:
>
> `grep -v -e '#' -e '^$' $BOOKMARKS | dmenu -i -l 20 | cut -f 1 -d ' '`
>
> Then I pipe it to the clipboard or a plumber script depending
> on what I want to do with it (bound to a keybind in dwm).
>
> To add bookmarks I either use a text editor or just echo:
>
> `echo "https://nsa.gov file sharing, hosting provider" >> $BOOKMARKS`

How do you avoid duplicates and edit existing booksmarks?

Admittedly my script doesn't do these things at the moment.

-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] sbm dmenu bookmarker

2023-07-31 Thread Spenser Truex
> You should really get rid of the useless use of cats (it's common enough
> mistake that it even has an abbreviation - UUOC [0]).

Oh crap, coming right up.

-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


[dev] sbm dmenu bookmarker

2023-07-30 Thread Spenser Truex
A friend of mine was impressed with how quickly I was spamming the most
based and redpilled links from this script and wanted me to publish it.

screenhots etc.
https://equwal.com/posts/sbm
the "code"
https://github.com/equwal/sbm

It's still rough around the edges, I'd like to be able to have some
input validation (no duplicate links) and plumbing options (browse
where? copy to what?).

As it stands, it just copies to clipboard which is probably good enough.
-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] [quark] a monty-pythonesque journey with SYSTEMd

2023-05-29 Thread Spenser Truex
On 23/05/30 07:12AM, Marcel Plch wrote:

> Offtopic:
> equwal.com seems not to support https properly. My browser screams the
> following:
>
> Secure Connection Failed
>
> An error occurred during a connection to equwal.com.
> PR_CONNECT_RESET_ERROR
>
> Error code: PR_CONNECT_RESET_ERROR

Indeed, there's nothing there at the moment to respond on HTTP or HTTPS.

-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com (soon)



[dev] [quark] a monty-pythonesque journey with SYSTEMd

2023-05-29 Thread Spenser Truex
My $10/yr VPS host Racknerd ungraciously requires that I'd make a support
ticket in order to get a custom ISO for my VPS. I think I'd rather
suffer and die. Fun awaits? Maybe I can collect a pile of .service files
for some suckless programs?

Quark has a slightly complex set of behaviours that make systemd not boot
it. I think systemd sockets and systemd chroot shenanegains are involved
here. It "starts" but causes systemd to hang on the systemctl start quark
command. The socket doesn't open -- quark seems to be blocked in some way.

Unbound has a similar issue, and it too has a chroot startup which is
explicitly defined in their systemD service file on debian, but the
unbound official recommendation is to use whatever magic code the program
can run to install itself. And they recommend deleting the socket-related
bits in the systemd service files directory. Despite this, I tried just
copying the unbound config but wasn't able to get it to work. SystemD
doesn't tell you why it doesn't work (please pay redhat instead for
help installing programs on your VPS!).

I hope to succeed on my quest for the Holy Grail in this desolate land.
-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] running a shortlink provider

2023-05-26 Thread Spenser Truex
On 23/05/26 07:52PM, syg wrote:
> Hi,
>
> Just my two cents, but why not just store the link destination, even
> better, the HTML with the correct re-direction, in a file named
> according to the hash. You can then just serve it as-is. No lock
> problem. No database required. O(1) complexity.
>
> Of course this is only valid for a personal, non-public use since that
> strongly limits the number of links you can have.

If you edit your HTTP server instead you can send 300 requests and avoid
having a lot of unnecessary bandwidth usage.

>
> Also, this is trivially extensible to a pastebin.
>
> - syg
>

-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] [dwm] swallow without patching dwm -- or losing focus

2023-05-26 Thread Spenser Truex
On 23/05/26 11:07AM, v4hn wrote:
> On Fri, May 26, 2023 at 02:50:20AM -0300, Spenser Truex wrote:
> > I just want my windows to open where I opened
> > them. There is no kitchen sink included.
>
> I would like that too, but the linked project doesn't do it.
> It doesn't even work when ran through `dmenu`, but instead hides/unhides
> whatever window you focused before you opened dmenu. :)

That's true, sorry I was unclear. That's what I'm trying to do with it.
I think it can be done with a POSIX queue.
>
>
> v4hn
>
> --
> Michael 'v4hn' Görner, M.Sc. Cognitive Science, Research Associate
> Universität Hamburg
> Faculty of Mathematics, Informatics and Natural Sciences
> Department of Informatics
> Group Technical Aspects of Multimodal Systems
>
> Vogt-Kölln-Straße 30
> D-22527 Hamburg
>
> Room: F-315
> Phone: +49 40 42883-2432
> Website: https://tams.informatik.uni-hamburg.de/people/goerner/



-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] [dwm] swallow without patching dwm -- or losing focus

2023-05-25 Thread Spenser Truex
On 23/05/26 07:24AM, Sagar Acharya wrote:
> Beautiful code. As a rookie user, how will this code be used? Can this be a 
> complete Xenocara/Xorg alternative?
> Thanking you

A very humourous response. I just want my windows to open where I opened
them. There is no kitchen sink included.

It is used like this

./swallow mpv

cheers

> Sagar Acharya
> http://humaaraartha.in <https://humaaraartha.in>
>
>
>
> 26 May 2023, 05:45 by tr...@equwal.com:
>
> > Greetings,
> >
> > I converted this swallow program to C, not that it makes any difference
> > at this code size. It's just a couple of malloc'd strings.
> >
> > https://github.com/equwal/swallow-c--
> >
> > I'd like to make it actually transfer the terminal's focus rather than
> > async open and hide itself. That way you get the program you opened in the
> > tag you opened it in, which is something I've been trying to do for a
> > long time in multiple window managers.
> >
> > The author pointed out that "startup hooks" can do this in some window
> > managers, but I like the idea of not even having that be part of the WM
> > itself.
> >
> >
> > --
> > CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
> > Spenser Truexhttps://equwal.com
> >
>

-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


[dev] [dwm] swallow without patching dwm -- or losing focus

2023-05-25 Thread Spenser Truex
Greetings,

I converted this swallow program to C, not that it makes any difference
at this code size. It's just a couple of malloc'd strings.

https://github.com/equwal/swallow-c--

I'd like to make it actually transfer the terminal's focus rather than
async open and hide itself. That way you get the program you opened in the
tag you opened it in, which is something I've been trying to do for a
long time in multiple window managers.

The author pointed out that "startup hooks" can do this in some window
managers, but I like the idea of not even having that be part of the WM
itself.


-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] running a shortlink provider

2023-05-25 Thread Spenser Truex
On 23/05/25 10:29AM, Anthony wrote:
> On 5/25/23 07:29, Страхиња Радић wrote:
> > Perhaps the most minimal solution for keeping data would be TSV files, but 
> > they
> > are not suitable for storing data entered from the web because of 
> > concurrency,
> > so a "real" database would be needed.
> >
> What do you mean by, "because of concurrency"?

Performance:

A hash table would be O(1) because you lookup the hash and get it. For a
text file you could only hope for O(log n) with bisecting.

Locks:
No need to lock a hashtable. Needed very much to lock a file though.

I don't support this database heavy database stuff. A key-value pair
dataset would be enough. It's basically a perl one-liner. If you have a
markup language for your database it's bloat.

>
> I know it is insecure, but I would store everything in a txt file where each
> line is a link.

Why is that insecure?

>
> Then you can reach your link with http://myperfectsite.org/

Neat.

>
> If you don't want your id to be consecutive, a tsv file would do the trick
> with a hash then the link.

BINGO

>
> Is there a problem with this approach ?
>

Why use a hammer when you can beat the nail with your hand?

-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] running a shortlink provider

2023-05-25 Thread Spenser Truex
Highlight:

Link shorteners always go down due to non-funding and bloatware
backends. Let's have a suckless one that is cheap to run!

On 23/05/25 07:02AM, Marcel Plch wrote:
> On Thu, May 25, 2023 at 12:47:20AM -0300, Spenser Truex wrote:
> > Hello,
> >
> > My internet friends and I have been wanting a shortlinks provider. How
> > can I do this in a suckless way? I'd like to be able to host the
> > shortlinks provider and easily let my friends point their own domains at
> > my VPS.
> >
> > I used to just upload a HTML file with a redirect to the desired
> > location in my webserver root. This doesn't work for a shared service
> > though.
> >
> > There are a lot of bloated projects that I've found. Any suggestions?
> >
> >
> > --
> > CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
> > Spenser Truexhttps://equwal.com
>
> 1) VPS
> 2) Pick favorite Web stack
> 3) Make a website that takes the specified URL, stores the URL and its
>hash as a key-value pair (possibly in a database if that's suckless
>enough for you, directory+file structure is probably okay as well.)
> 4) Store the hash value in base64
>
>
> I personally would go for Python/Django, I'm not sure how suckless that's
> considered (probably not at all) but I found Django to be about the
> least bloated fully functional web framework. Web is in a sad state so
> I'm sure Unix gods are gonna reward you even if you write a minimalistic
> web in Django.
>
> Django also uses sqlite by default as a database backend, so it's not even
> a glass cannon. It knows that unless you bother to set something up, you
> probably don't need something special.
>
>
> I'm sure this suggestion is going to be either extremely helpful or
> upsetting. Let me know what you picked. ^_^

If we are going with "write your own backend" I'll do it in Common Lisp
since I like it. It's even more lindy than C. I guess the suckless lisp
is LISP 1.5. I suppose C could make a decent backend too, although I'm
not really up to the task of doing it with C. That being said, it's a
lot of work for something that has been redone a million times already.

I did some more research and found hda.me's codebase. It uses nginx and
postgresql. I'm not sure I want to use all that, but if I could make a
backend that is compatible for the F-Droid app then that would be neat.
The feature of either making 3-character tiny links that disappear, or
longer links that last a long time is very smart.

I found a bloatware that lets you just choose whatever link you want,
but I don't think I'd want to let anyone use my domain to make vanity
links like mydomain.com/mydomains-owner-is-a-cunt

The hda.me owner said he stopped funding it because he needed multiple
VPSes and cloudflare service to avoid getting his data-holding VPS shut
down for malicious use of the link shortener. This is avoidable by just
using a decent VPS provider and doing routine full disk backups just
in case. My intended use case is for each person to use their own domain
to make their own links, not really as a public link shortener.
-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


[dev] running a shortlink provider

2023-05-24 Thread Spenser Truex
Hello,

My internet friends and I have been wanting a shortlinks provider. How
can I do this in a suckless way? I'd like to be able to host the
shortlinks provider and easily let my friends point their own domains at
my VPS.

I used to just upload a HTML file with a redirect to the desired
location in my webserver root. This doesn't work for a shared service
though.

There are a lot of bloated projects that I've found. Any suggestions?


-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] Simpler WiFi alternatives

2023-05-23 Thread Spenser Truex
Greetings fossy and friends,

Please consider reading the ancient RFC1855 on Netiquitte and saving it
to your bookmarks. Many great ideas that should be obvious have been
forgotten thanks to the profit-driven anti-privacy Zeitgeist.

https://datatracker.ietf.org/doc/html/rfc1855.html

Also, ESR's How To Ask Questions The Smart Way

https://www.catb.org/esr/faqs/smart-questions.html

I also suggest How To Become A Hacker:

http://www.catb.org/~esr/faqs/hacker-howto.html

I remain Your Most Humble and Obedient Servant,
--
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


[dev] [sacc][PATCH] Add comment about pkg-config

2022-08-19 Thread Spenser Truex
---
 config.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/config.mk b/config.mk
index 223207e..6232f46 100644
--- a/config.mk
+++ b/config.mk
@@ -13,6 +13,8 @@ DEFVERSION = "1.06"
 # txt (textual)
 #UI=txt
 # ti (screen-oriented)
+# You can use pkg-config --libs curses or --libs ncurses to to find these if
+# your system has it installed.
 UI=ti
 LIBS=-lcurses

@@ -27,7 +29,7 @@ IOCFLAGS = -DUSE_TLS
 # OS compilation flags are used to expose the system interfaces
 # Linux, OpenBSD
 OSCFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_GNU_SOURCE
-OSLDFLAGS =
+OSLDFLAGS =
 # NetBSD, using default pkgsrc path
 #OSCFLAGS = -I/usr/pkg/include
 #OSLDFLAGS = -L/usr/pkg/lib -R/usr/pkg/lib
--
2.35.1



[dev] Re: [sacc][PATCH] Infer the (n)curses(w) library to use and -l

2022-08-17 Thread Spenser Truex
On 22/08/16 10:04AM, Quentin Rameau wrote:
> Hi Spenser,
>
> > Useful since curses cocks up any portability here. We prioritise the
> > user's entries in CURSESLIB where possible, and use LIBS when pkg-config
> > cannot be used.
>
> Indeed, dealing with *ncurses* is a mess.
> Ideally, we would only link against terminfo,
> because that's what sacc needs, not curses,
> but sadly this is implemented in most system
> through ncurses.
>
> > An opinioned change (maybe the user should just figure this stuff out
> > himself or curses should be fixed).
>
> As a result, there is no good simple way to deal with that,
> and I prefer letting the user dealing with their system,
> because they should know better
> (with the potential help of documentation)
> how it is setup.

The goal of this patch is to just "be helpful" rather than silently not
building with some opaque messages about ld.

> Regarding the patch itself, besides the actual target idea,
> I prefer to keep the Makefile POSIX-compatible
> and you're introducing GNU make style operators.

POSIX make doesn't appear to have $(shell) which is the main thing used
here. Instead the commands could be run inside a recipe somehow.

(posix make documentation): https://pubs.opengroup.org/onlinepubs/9699919799/

> I'm not motivated to change the way we link against terminfo,
> at least not that way,
> but maybe we could introduce a comment there
> explaining that ncurses is a mess, but that already sounds like
> something most people would already know???

For a comment, mentioning pkg-config --libs would be sufficient.

> In any case, thanks for your patch Spenser,
> and I hope you'll still find sacc useful,
>
> cheers!
>
> P.S.: sacc isn't really a suckless.org project, although I suppose
> people will not mind too much having it discussed there.


I'm satisfied with adding a comment as a solution and will submit a
patch. Then I will remember what to do the next time I compile sacc in
a couple of years.

--
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


[dev] [PATCH] (better) Infer the (n)curses(w) library to use and -l

2022-08-16 Thread Spenser Truex
Useful since curses cocks up any portability here
Better than my last patch (replace, not sequential)

---
 Makefile  | 9 +
 config.mk | 4 +++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 4c00649..85bdf0d 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,15 @@ GETVER = $$(git rev-parse --is-inside-work-tree >/dev/null 
2>&1 \
&& git describe --tags \
|| echo $(DEFVERSION))

+ifeq ("$(shell basename $(shell command -v pkg-config))","pkg-config")
+pkgconfig = $(and $(findstring 0,$(and $(shell pkg-config --libs 
$(i)),$(.SHELLSTATUS))),$(i))
+var := i
+list := curses cursesw ncurses ncursesw
+CURSESLIB = $(foreach $(var), $(list), $(pkgconfig))
+LIBS := $(shell pkg-config --libs $(CURSESLIB))
+endif
+
+
 all: $(BIN)

 config.h:
diff --git a/config.mk b/config.mk
index 223207e..0778f71 100644
--- a/config.mk
+++ b/config.mk
@@ -14,6 +14,8 @@ DEFVERSION = "1.06"
 #UI=txt
 # ti (screen-oriented)
 UI=ti
+# LIBS ignored if it can be inferred from CURSESLIB
+CURSESLIB = curses
 LIBS=-lcurses

 # IO type
@@ -27,7 +29,7 @@ IOCFLAGS = -DUSE_TLS
 # OS compilation flags are used to expose the system interfaces
 # Linux, OpenBSD
 OSCFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_GNU_SOURCE
-OSLDFLAGS =
+OSLDFLAGS =
 # NetBSD, using default pkgsrc path
 #OSCFLAGS = -I/usr/pkg/include
 #OSLDFLAGS = -L/usr/pkg/lib -R/usr/pkg/lib
--
2.35.1


signature.asc
Description: PGP signature


[dev] [sacc][PATCH] Infer the (n)curses(w) library to use and -l

2022-08-16 Thread Spenser Truex
Useful since curses cocks up any portability here. We prioritise the
user's entries in CURSESLIB where possible, and use LIBS when pkg-config
cannot be used.

An opinioned change (maybe the user should just figure this stuff out
himself or curses should be fixed).

---
 Makefile  | 31 +++
 config.mk |  4 +++-
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 4c00649..5cf1e3a 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,37 @@ GETVER = $$(git rev-parse --is-inside-work-tree >/dev/null 
2>&1 \
&& git describe --tags \
|| echo $(DEFVERSION))

+NEWCURSES = "$(shell pkg-config --libs curses)"
+ifeq ($(.SHELLSTATUS),0)
+   CURSESLIB = $(NEWCURSES)
+endif
+
+NEWCURSES = "$(shell pkg-config --libs cursesw)"
+ifeq ($(.SHELLSTATUS),0)
+   CURSESLIB = $(NEWCURSES)
+endif
+
+NEWCURSES = "$(shell pkg-config --libs ncurses)"
+ifeq ($(.SHELLSTATUS),0)
+   CURSESLIB = $(NEWCURSES)
+endif
+
+NEWCURSES = "$(shell pkg-config --libs ncursesw)"
+ifeq ($(.SHELLSTATUS),0)
+   CURSESLIB = $(NEWCURSES)
+endif
+
+NEWCURSES = "$(shell pkg-config --libs $(CURSESLIB))"
+ifeq ($(.SHELLSTATUS),0)
+   CURSESLIB = $(NEWCURSES)
+endif
+
+ifeq ("$(shell basename $(shell command -v pkg-config))", "pkg-config")
+LIBS := $(shell pkg-config --libs $(CURSESLIB))
+endif
+
+
+
 all: $(BIN)

 config.h:
diff --git a/config.mk b/config.mk
index 223207e..0778f71 100644
--- a/config.mk
+++ b/config.mk
@@ -14,6 +14,8 @@ DEFVERSION = "1.06"
 #UI=txt
 # ti (screen-oriented)
 UI=ti
+# LIBS ignored if it can be inferred from CURSESLIB
+CURSESLIB = curses
 LIBS=-lcurses

 # IO type
@@ -27,7 +29,7 @@ IOCFLAGS = -DUSE_TLS
 # OS compilation flags are used to expose the system interfaces
 # Linux, OpenBSD
 OSCFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_GNU_SOURCE
-OSLDFLAGS =
+OSLDFLAGS =
 # NetBSD, using default pkgsrc path
 #OSCFLAGS = -I/usr/pkg/include
 #OSLDFLAGS = -L/usr/pkg/lib -R/usr/pkg/lib
--
2.35.1


binhaTMW8ear9.bin
Description: PGP Key 0xC5CED0031AA8E281


signature.asc
Description: PGP signature


[dev] [slstatus][PATCH] Add 'Not charging' status support

2022-08-09 Thread Spenser Truex
Exists on my thinkpad T500. Seems to be both a synonym for "full". Tested
on the T500.
---
 components/battery.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/components/battery.c b/components/battery.c
index f2b0f14..a36132d 100644
--- a/components/battery.c
+++ b/components/battery.c
@@ -53,6 +53,7 @@
{ "Charging","+" },
{ "Discharging", "-" },
{ "Full","o" },
+   { "Not charging", "o" },
};
size_t i;
char path[PATH_MAX], state[12];
@@ -61,7 +62,7 @@
  "/sys/class/power_supply/%s/status", bat) < 0) {
return NULL;
}
-   if (pscanf(path, "%12s", state) != 1) {
+   if (pscanf(path, "%12[a-zA-Z ]", state) != 1) {
return NULL;
}
 
@@ -84,7 +85,7 @@
  "/sys/class/power_supply/%s/status", bat) < 0) {
return NULL;
}
-   if (pscanf(path, "%12s", state) != 1) {
+   if (pscanf(path, "%12[a-zA-Z ]", state) != 1) {
return NULL;
}
 
-- 
2.35.1


-- 
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


[dev] [scroll][PATCH] Fix typo: "the fist place"

2021-01-27 Thread Spenser Truex
Where is the fist place? I can only imagine...
---
 README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README b/README
index 8180db8..a1837c2 100644
--- a/README
+++ b/README
@@ -10,7 +10,7 @@ The initial version of this program is from Roberto E. Vargas 
Caballero:
 What is the state of scroll?

 The project is faced with some hard facts, that our original plan is not doable
-as we thought in the fist place:
+as we thought in the first place:

  1. [crtl]+[e] is used in emacs mode (default) on the shell to jump to the end
 of the line.  But, its also used so signal a scroll down mouse event from
--
2.30.0


--
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Neatvi Re: [dev] Programs that rock

2021-01-25 Thread Spenser Truex
On 21/01/24 04:10PM, Kyryl Melekhin wrote:
> Mart Zirnask  wrote:
>
> [...] So try the stock version, see what features are missing for
> your needs, then try mine, do a diff and patch if I have the features
> you may need, and have your own custom fork. Keep in mind though that
> I made my neatvi a general purpose editor that I use for everything now,
> I comletely got rid of VIM from my system,

>which is considered harmful.

You are taking cat-v's list way too seriously here I think.

> So ideally my wish is to make people do the same. Many people use dwm and
> st and it grew to have many good patches and infinite user control. So
> why can't we have the same good things for a text editor? I tried all
> text editors listed on the rocks page and all of them were not suitable
> for hacking in some way, just like how easy it is to hack on st or dwm
> for example. But neatvi came in as a saving hero.

github.com/kyx0r/neatvi

Wow, that is a lot of edits.

One of the things that makes suckless programs so useful for obscures
uses is that there is a barebones skeleton and a bunch of patches to
choose from. I myself use some guy's fork of st, but my own patches for
dwm, ii, and other programs.

It would be good to see your changes split into these groups:
- Sent upstream to ali (stuff everyone needs)

Pick one (or both):
- Made into individual patches in the Suckless way (stuff that may suit one's 
taste)
- Your public fork (a bunch of patches appplied like you have, but not
  peculiarities to you). If you do this, I probably would't use your fork still,
  but someone else might.
- Your private fork (stuff that only you need) (no need to publish this)

Then I would perhaps consider using your code, however I happen to see
fit, for this program. This is my personal opinion, I hope you find it useful.

From your README:
> Q: Why not distribute as patches, like on suckless.org?
> A:  It's hard to maintain, say this repo have 35 patches, so it will
> be 35+ diffs. And each time something will mess up because one file change
> will require to change every patch offset, etc.

I disagree that it is hard to maintain. What I do is:
- Make a clean fork at the patch's commit
  git checkout  && git branch commit1
- Apply the possibly outdated patch
- Merge
- Fix conflicts

This works fine, you can do 35 patches if you want this way, it would
take around an hour to get a custom fork. It is easier to add code than
remove code.

> Regards,
I remain Your Most Humble and Obedient Servant,
--
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


[dev] [quark] Shouldn't it redirect site.com/ to /index.html?

2021-01-22 Thread Spenser Truex
If you navigate to my site:
http://equwal.com
It doesn't redirct to index.html, since I don't have a program
performing redirects on there like varnishd.

Previously I was using varnishd in front of quark to do this, and I had
this stuff doing it:

Shouldn't quark support this out of the box? I'm on the latest git
version of quark.
--
CAEE B377 FC82 BAF9 102C  D22F C5CE D003 1AA8 E281
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


[dev] [dwm][bug] Programs teleport tag on startup

2021-01-16 Thread Spenser Truex
To me this seems like undesirable behaviour, since after opening a
program one has to wait for it to load before switching the current tag.

Reproduction:
Run a program (eg. firefox) in tag 1
Switch tag view before it loads to tag 2
It gets labeled in tag 2, not tag 1.

Expect: use tag 1, not 2.

I can't imagine any way that this is desirable. I will try to patch a
fix later, seems like low hanging fruit.
--
7E7B 2078 A241 3205 F469  3B21 0AD4 8D58 F9FB DDC6
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


Re: [dev] [ii] SASL over TOR question

2021-01-15 Thread Spenser Truex
On 21/01/15 11:44AM, Jan Klemkow wrote:
> On Fri, Jan 15, 2021 at 01:42:43AM -0800, Spenser Truex wrote:
> > Has anyone a working setup for ii->sasl->tor?
>
> I use ii with ucspi-patch[1] and ucspi-tools[2] to connect to IRC
> servers via Tor and with SSL for certificate-user-authentication.
>
> [1]: https://tools.suckless.org/ii/patches/ucspi/
> [2]: https://github.com/younix/ucspi/
>
> -Jan
>

Thanks Jan, I will be using this patch on my client.

This seems like a much simpler arrangement than ii -> cyrus-sasl Unix
socket -> socat to local port -> stunnel -> torsocks. Seems pretty absurd to
be running this many complex servers on my machine just so I can connect
my IRC client, though it would be fine when using ii as a bouncer.

Further was I confused, not understanding that SASL is not a part of
SSL, but a separate thing.

Thanks.
--
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature


[dev] [ii] SASL over TOR question

2021-01-15 Thread Spenser Truex
Greetings,

For SASL PLAIN enabled servers (eg. hackint.org) I haven't been able to
get stunnel to route via my TOR.

Here is the /etc/stunnel/stunnel.conf section:
[hackint]
accept = 6695
client = yes
connect = 9050
;This is a SASL PLAIN URI
protocolHost = 
dtlbunzs5b7s5sl775quwezleyeplxzicdoh3cnhm7feolxmkfd42nqd.onion:6667
cert = /home/jose/dat/certs/equwal-irc/equwal-stunnel.pem

ii ... -p 6695

Of course plaintext works fine with
torify ii ...

To connect to the TOR freenode uri[1] one needs SASL EXTERNAL. I think
this requires a patch to ii to get it working, though I haven't tried
yet.

Has anyone a working setup for ii->sasl->tor?

[1] https://freenode.net/kb/answer/chat#accessing-freenode-via-tor

--
Spenser Truexhttps://equwal.com


signature.asc
Description: PGP signature