Adding open selected text patch

This commit is contained in:
Bakkeby 2025-02-20 22:36:51 +01:00
parent 08b53c4960
commit 978e25f23b
7 changed files with 34 additions and 1 deletions

13
patch/openselectedtext.c Normal file
View file

@ -0,0 +1,13 @@
void
selopen(const Arg *dummy)
{
pid_t chpid;
if ((chpid = fork()) == 0) {
if (fork() == 0)
execlp("xdg-open", "xdg-open", getsel(), NULL);
exit(1);
}
if (chpid > 0)
waitpid(chpid, NULL, 0);
}