dotfiles

configurations and scripts
git clone https://riazj.com/git/dotfiles
Log | Files | Refs | README | LICENSE

commit 40f4c988ae736b35d25649020f22780513ba5ba1
parent b4faa154f1e89b6f47aefbbeb92452589ca2879e
Author: Riaz <riaz@riazj.com>
Date:   Wed,  8 Oct 2025 17:58:09 -0700

Add soap and stagit patches

Diffstat:
A.local/src/patches/soap-config.diff | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.local/src/patches/stagit-remove-favicon.diff | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 119 insertions(+), 0 deletions(-)

diff --git a/.local/src/patches/soap-config.diff b/.local/src/patches/soap-config.diff @@ -0,0 +1,67 @@ +From c762b66ee13eaa6a31608cf69cbabd8679931960 Mon Sep 17 00:00:00 2001 +From: Riaz <riaz@riazj.com> +Date: Sun, 7 Sep 2025 20:20:55 -0700 +Subject: [PATCH] config + +--- + Makefile | 7 ++++--- + config.h | 8 ++++---- + soap.c | 3 +-- + 3 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/Makefile b/Makefile +index 5a6af7f..a757c51 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,4 @@ +-# soap - simple xdg-open replacement with fallback ++# soap - simple xdg-open replacement + + include config.mk + +@@ -30,8 +30,9 @@ clean: + install: all + @test -f /usr/bin/xdg-open_ || (echo backing up to /usr/bin/xdg-open_; mv /usr/bin/xdg-open /usr/bin/xdg-open_) + @echo installing new xdg-open +- @cp -f soap /usr/bin/xdg-open +- @chmod 755 /usr/bin/xdg-open ++ @cp -f soap /usr/bin ++ @chmod 755 /usr/bin/soap ++ @ln -sf /usr/bin/soap /usr/bin/xdg-open + + uninstall: + @echo moving xdg-open_ back into place +diff --git a/config.h b/config.h +index c2e3ee6..92edcc9 100644 +--- a/config.h ++++ b/config.h +@@ -2,8 +2,8 @@ + + static const Pair pairs[] = { + /* regex action */ +- { "\.(jpg|png|tiff)$", "feh %s" }, +- { "\.gif$", "wget -O /tmp/tmp_gifview.gif %s && gifview -a /tmp/tmp_gifview.gif" }, +- { "\.mp3$", "st -e mplayer %s" }, +- { "^(http://|https://)?(www\.)?(youtube.com/watch\?|youtu\.be/)", "youtube-viewer %s" } ++ { "\.(jpg|png|tiff)$", "nsxiv %s" }, ++ { "\.(mp3|mp4|mkv)$", "mpv %s" }, ++ { "\.(htm|html)$", "st w3m %s" }, ++ { "\.pdf$", "zathura %s" } + }; +diff --git a/soap.c b/soap.c +index 3e6ed20..79d893e 100644 +--- a/soap.c ++++ b/soap.c +@@ -49,8 +49,7 @@ main(int argc, char *argv[]){ + regfree(&regex); + } + +- /* alternatively, fall back to xdg-open_ */ +- snprintf(cmd, sizeof cmd, "xdg-open_ %s", sharg); ++ snprintf(cmd, sizeof cmd, "st less %s", sharg); + system(cmd); + return EXIT_SUCCESS; + } +-- +2.51.0 + diff --git a/.local/src/patches/stagit-remove-favicon.diff b/.local/src/patches/stagit-remove-favicon.diff @@ -0,0 +1,52 @@ +From 917d61a0b33b150ef8778cdf872d6dfecbfa3215 Mon Sep 17 00:00:00 2001 +From: Riaz <riaz@riazj.com> +Date: Sun, 7 Sep 2025 20:24:36 -0700 +Subject: [PATCH] Remove favicon and logo + +--- + stagit-index.c | 4 +--- + stagit.c | 4 +--- + 2 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/stagit-index.c b/stagit-index.c +index 6402296..be7d6af 100644 +--- a/stagit-index.c ++++ b/stagit-index.c +@@ -101,11 +101,9 @@ writeheader(FILE *fp) + "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n" + "<title>", fp); + xmlencode(fp, description, strlen(description)); +- fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath); ++ fputs("</title>\n<link rel=\"icon\" href=\"data:,\" />\n", fp); + fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath); + fputs("</head>\n<body>\n", fp); +- fprintf(fp, "<table>\n<tr><td><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></td>\n" +- "<td><span class=\"desc\">", relpath); + xmlencode(fp, description, strlen(description)); + fputs("</span></td></tr><tr><td></td><td>\n" + "</td></tr>\n</table>\n<hr/>\n<div id=\"content\">\n" +diff --git a/stagit.c b/stagit.c +index 03f0c09..dbc622d 100644 +--- a/stagit.c ++++ b/stagit.c +@@ -511,7 +511,7 @@ writeheader(FILE *fp, const char *title) + if (description[0]) + fputs(" - ", fp); + xmlencode(fp, description, strlen(description)); +- fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath); ++ fputs("</title>\n<link rel=\"icon\" href=\"data:,\" />\n", fp); + fputs("<link rel=\"alternate\" type=\"application/atom+xml\" title=\"", fp); + xmlencode(fp, name, strlen(name)); + fprintf(fp, " Atom Feed\" href=\"%satom.xml\" />\n", relpath); +@@ -520,8 +520,6 @@ writeheader(FILE *fp, const char *title) + fprintf(fp, " Atom Feed (tags)\" href=\"%stags.xml\" />\n", relpath); + fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath); + fputs("</head>\n<body>\n<table><tr><td>", fp); +- fprintf(fp, "<a href=\"../%s\"><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>", +- relpath, relpath); + fputs("</td><td><h1>", fp); + xmlencode(fp, strippedname, strlen(strippedname)); + fputs("</h1><span class=\"desc\">", fp); +-- +2.51.0 +