diff options
| author | Mike Vink <59492084+ivi-vink@users.noreply.github.com> | 2025-01-18 21:55:22 +0100 |
|---|---|---|
| committer | Mike Vink <59492084+ivi-vink@users.noreply.github.com> | 2025-01-19 12:39:25 +0000 |
| commit | 75f4f4542766191f9597d48dfc726bdc269b1a89 (patch) | |
| tree | fe5fbdd8975e23e469482ffb9b2d6748e7342774 | |
| parent | e42279a08a4d7ff340a6acf4881279a7617a3c2d (diff) | |
before patch
| l--------- | mut/lf/icons | 2 | ||||
| -rw-r--r-- | mut/surf/patches/surf-clipboard-20200112-a6a8878.diff | 67 | ||||
| -rw-r--r-- | profiles/core/home.nix | 7 |
3 files changed, 75 insertions, 1 deletions
diff --git a/mut/lf/icons b/mut/lf/icons index 365e5b9..853f171 120000 --- a/mut/lf/icons +++ b/mut/lf/icons @@ -1 +1 @@ -/nix/store/09bwd70szjcy3npqwccddkyhcfrvs8c1-home-manager-files/.config/lf/icons
\ No newline at end of file +/nix/store/jr98r05zwc5v3bfmj1g3zk9842md3x9m-home-manager-files/.config/lf/icons
\ No newline at end of file diff --git a/mut/surf/patches/surf-clipboard-20200112-a6a8878.diff b/mut/surf/patches/surf-clipboard-20200112-a6a8878.diff new file mode 100644 index 0000000..5c43025 --- /dev/null +++ b/mut/surf/patches/surf-clipboard-20200112-a6a8878.diff @@ -0,0 +1,67 @@ +From a6a8878bb6a203b589d559025b94a78214f22878 Mon Sep 17 00:00:00 2001 +From: Olivier Moreau <m242@protonmail.com> +Date: Sun, 12 Jan 2020 11:23:11 +0000 +Subject: [PATCH] Added choice between PRIMARY and CLIPBOARD Gtk selections, as + a config option + +--- + config.def.h | 1 + + surf.c | 11 +++++++++-- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 34265f6..03bbe2b 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -48,6 +48,7 @@ static Parameter defconfig[ParameterLast] = { + [Style] = { { .i = 1 }, }, + [WebGL] = { { .i = 0 }, }, + [ZoomLevel] = { { .f = 1.0 }, }, ++ [ClipboardNotPrimary] = { { .i = 1 }, }, + }; + + static UriParameters uriparams[] = { +diff --git a/surf.c b/surf.c +index 2b54e3c..b8a9b2f 100644 +--- a/surf.c ++++ b/surf.c +@@ -82,6 +82,7 @@ typedef enum { + Style, + WebGL, + ZoomLevel, ++ ClipboardNotPrimary, + ParameterLast + } ParamName; + +@@ -291,6 +292,7 @@ static ParamName loadcommitted[] = { + SpellLanguages, + Style, + ZoomLevel, ++ ClipboardNotPrimary, + ParameterLast + }; + +@@ -1816,13 +1818,18 @@ showcert(Client *c, const Arg *a) + void + clipboard(Client *c, const Arg *a) + { ++ /* User defined choice of selection, see config.h */ ++ GdkAtom selection = GDK_SELECTION_PRIMARY; ++ if (curconfig[ClipboardNotPrimary].val.i > 0) ++ selection = GDK_SELECTION_CLIPBOARD; ++ + if (a->i) { /* load clipboard uri */ + gtk_clipboard_request_text(gtk_clipboard_get( +- GDK_SELECTION_PRIMARY), ++ selection), + pasteuri, c); + } else { /* copy uri */ + gtk_clipboard_set_text(gtk_clipboard_get( +- GDK_SELECTION_PRIMARY), c->targeturi ++ selection), c->targeturi + ? c->targeturi : geturi(c), -1); + } + } +-- +2.24.1 + diff --git a/profiles/core/home.nix b/profiles/core/home.nix index 5fd82f0..01ce9ec 100644 --- a/profiles/core/home.nix +++ b/profiles/core/home.nix @@ -37,10 +37,17 @@ with lib; { "x-scheme-handler/magnet" = ["torrent.desktop"]; "x-scheme-handler/mailto" = ["mail.desktop"]; "x-scheme-handler/msteams" = ["teams.desktop"]; + "x-scheme-handler/http" = ["surf.desktop"]; + "x-scheme-handler/https" = ["surf.desktop"]; }; }; desktopEntries = with pkgs; optionalAttrs (!machine.isDarwin) { + surf = { + type = "Application"; + name = "Browser"; + exec = "${surf}/bin/surf %u"; + }; text = { type = "Application"; name = "Text editor"; |
