Update stuff

This commit is contained in:
2025-11-18 11:54:26 +01:00
parent 78542a3c83
commit 4dfec90cbc
4 changed files with 100 additions and 85 deletions

72
flake.lock generated
View File

@@ -24,11 +24,11 @@
]
},
"locked": {
"lastModified": 1762040540,
"narHash": "sha256-z5PlZ47j50VNF3R+IMS9LmzI5fYRGY/Z5O5tol1c9I4=",
"lastModified": 1762980239,
"narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "0010412d62a25d959151790968765a70c436598b",
"rev": "52a2caecc898d0b46b2b905f058ccc5081f842da",
"type": "github"
},
"original": {
@@ -44,11 +44,11 @@
]
},
"locked": {
"lastModified": 1762266885,
"narHash": "sha256-THnfl16UGSjMXdDQZwIuFuDJj+tYjUHAl9w/DNpkuAw=",
"lastModified": 1763416652,
"narHash": "sha256-8EBEEvtzQ11LCxpQHMNEBQAGtQiCu/pqP9zSovDSbNM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c39c07bf31dc080851377c04352fa06f197f0c1c",
"rev": "ea164b7c9ccdc2321379c2ff78fd4317b4c41312",
"type": "github"
},
"original": {
@@ -81,11 +81,11 @@
]
},
"locked": {
"lastModified": 1762214689,
"narHash": "sha256-rRIECim04sRqCeBCvuARPLyDezGa7CU4XKAkCx4mmqA=",
"lastModified": 1763424377,
"narHash": "sha256-le7Pl92+UgbftZNQH8+nJnERVGTrfKMuQgaJIc4VsB0=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "928ecc3c71ef85227c25cf0ff3bfba1efd9b1930",
"rev": "f15729dbae4e51ffa77b62abdd59d555d73b6cfb",
"type": "github"
},
"original": {
@@ -97,11 +97,11 @@
"neovim-src": {
"flake": false,
"locked": {
"lastModified": 1762151025,
"narHash": "sha256-5XdkjVsB8LbqTUMmOmK3YscnCVm7yHenKoaKrgFESac=",
"lastModified": 1763404442,
"narHash": "sha256-2mWXjP4vKxUsfF/UNkfO587fbl7iyXv/ARf6fFv6Gik=",
"owner": "neovim",
"repo": "neovim",
"rev": "b80d390765b0c987f86ecd257fa8c38cc1225797",
"rev": "c4ac36bfd9bc9826dde01839d10d0e65a7b3c9e2",
"type": "github"
},
"original": {
@@ -117,11 +117,11 @@
]
},
"locked": {
"lastModified": 1762186368,
"narHash": "sha256-dzLBZKccS0jMefj+WAYwsk7gKDluqavC7I4KfFwVh8k=",
"lastModified": 1763136804,
"narHash": "sha256-6p2ljK42s0S8zS0UU59EsEqupz0GVCaBYRylpUadeBM=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "69921864a70b58787abf5ba189095566c3f0ffd3",
"rev": "973db96394513fd90270ea5a1211a82a4a0ba47f",
"type": "github"
},
"original": {
@@ -137,11 +137,11 @@
]
},
"locked": {
"lastModified": 1762055842,
"narHash": "sha256-Pu1v3mlFhRzZiSxVHb2/i/f5yeYyRNqr0RvEUJ4UgHo=",
"lastModified": 1763265660,
"narHash": "sha256-Ad9Rd3ZAidrH01xP73S3CjPiyXo7ywZs3uCESjPwUdc=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "359ff6333a7b0b60819d4c20ed05a3a1f726771f",
"rev": "469ef53571ea80890c9497952787920c79c1ee6e",
"type": "github"
},
"original": {
@@ -155,11 +155,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1761791238,
"narHash": "sha256-KAfIkokYx86S62nfIxzPvCtSrNJIIqWNeBCbtLLb/LM=",
"lastModified": 1763322257,
"narHash": "sha256-eiKNbZXvkB2p/YhM5ltK1CO1znm5Nn2aHLW3Awcqq9g=",
"owner": "nix-community",
"repo": "nixos-avf",
"rev": "9142152e9fd1a18e003605465bc5cd060261edc8",
"rev": "3fae0a3692b993bc0c40c61138a76fc1455d0b6e",
"type": "github"
},
"original": {
@@ -170,11 +170,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1762267440,
"narHash": "sha256-WHjEJ80oYbWyNu0dxysBs5oMlBc5w7YYzL1/UPj4iGo=",
"lastModified": 1762847253,
"narHash": "sha256-BWWnUUT01lPwCWUvS0p6Px5UOBFeXJ8jR+ZdLX8IbrU=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "2e85ae1b7030df39269d29118b1f74944d0c8f15",
"rev": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9",
"type": "github"
},
"original": {
@@ -192,11 +192,11 @@
]
},
"locked": {
"lastModified": 1762251193,
"narHash": "sha256-CmSddz8e2kM+ITbYutluhKZyXXwI9Sg2lf7XXSvc8oY=",
"lastModified": 1763385941,
"narHash": "sha256-99CBNgyMvg3Zu/hxqixtShevrF4Kfr/qjtizQ6oseVI=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "e001844d4553aef268f97b32d3a825b6370eed91",
"rev": "cc6483354b236c2fc95cc1d4ba1f0f40b7345e69",
"type": "github"
},
"original": {
@@ -223,11 +223,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1762111121,
"narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=",
"lastModified": 1763283776,
"narHash": "sha256-Y7TDFPK4GlqrKrivOcsHG8xSGqQx3A6c+i7novT85Uk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4",
"rev": "50a96edd8d0db6cc8db57dab6bb6d6ee1f3dc49a",
"type": "github"
},
"original": {
@@ -254,11 +254,11 @@
"tmux": {
"flake": false,
"locked": {
"lastModified": 1762171266,
"narHash": "sha256-Ze/CXFGvf3H25gCqlPsVCm+0WNwj1A9qqNSwzICFewQ=",
"lastModified": 1763114468,
"narHash": "sha256-xL9lGjc/yN2F4faz2WW1QPoW63xXUA35T8AFczbBSWs=",
"owner": "tmux",
"repo": "tmux",
"rev": "815f7ecffbf5e7f6daecb3ce6e550bdb32b0d887",
"rev": "f372112a8df8c4fa0de6f202ea4f707e312dcc97",
"type": "github"
},
"original": {
@@ -274,11 +274,11 @@
]
},
"locked": {
"lastModified": 1761883599,
"narHash": "sha256-ntnfAAqSuXI/+uqXAWUjbY5arB7sRK9cpgFbHbCZgK8=",
"lastModified": 1763352549,
"narHash": "sha256-hzLnXm0v1snDENpF3KvUQBO8XOAh45qg+y4D46K3rz8=",
"owner": "youwen5",
"repo": "zen-browser-flake",
"rev": "5355c0dc6857a2aa34b126fb4a93a454ed702f52",
"rev": "5d002fcacbc5423090f2bba19818adda471fe0c8",
"type": "github"
},
"original": {

View File

@@ -20,7 +20,7 @@ in {
home.packages = with pkgs;
[
firefox
zen-browser.packages.${pkgs.system}.default
zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default
vesktop
freecad
kicad

View File

@@ -18,8 +18,9 @@ return {
sql = { "pg_format" },
cs = { "csharpier" },
nix = { "alejandra" },
["*"] = { "injected" },
["_"] = { "injected", lsp_format = "last" },
-- ["*"] = { "injected" },
-- ["_"] = { "injected", lsp_format = "last" },
["_"] = { lsp_format = "last" },
},
formatters = {
csharpier = function()

View File

@@ -1,9 +1,9 @@
# source: https://github.com/tmux/tmux/issues/4275
diff --git a/input.c b/input.c
index 8113f2b3..0571ad0d 100644
index 3a61ec26..58a1b091 100644
--- a/input.c
+++ b/input.c
@@ -3056,18 +3056,41 @@ input_osc_133(struct input_ctx *ictx, const char *p)
@@ -3069,18 +3069,41 @@ input_osc_133(struct input_ctx *ictx, const char *p)
}
}
@@ -48,7 +48,7 @@ index 8113f2b3..0571ad0d 100644
const char* allow = "cpqs01234567";
char flags[sizeof "cpqs01234567"] = "";
u_int i, j = 0;
@@ -3092,12 +3115,7 @@ input_osc_52(struct input_ctx *ictx, const char *p)
@@ -3105,12 +3128,7 @@ input_osc_52(struct input_ctx *ictx, const char *p)
log_debug("%s: %.*s %s", __func__, (int)(end - p - 1), p, flags);
if (strcmp(end, "?") == 0) {
@@ -62,7 +62,7 @@ index 8113f2b3..0571ad0d 100644
return;
}
@@ -3156,6 +3174,7 @@ input_osc_104(struct input_ctx *ictx, const char *p)
@@ -3169,6 +3187,7 @@ input_osc_104(struct input_ctx *ictx, const char *p)
free(copy);
}
@@ -70,32 +70,31 @@ index 8113f2b3..0571ad0d 100644
void
input_reply_clipboard(struct bufferevent *bev, const char *buf, size_t len,
const char *end)
@@ -3273,27 +3292,69 @@ input_add_request(struct input_ctx *ictx, enum input_request_type type, int idx)
@@ -3305,6 +3324,9 @@ input_add_request(struct input_ctx *ictx, enum input_request_type type, int idx)
xsnprintf(s, sizeof s, "\033]4;%d;?\033\\", idx);
tty_puts(&c->tty, s);
break;
+ case INPUT_REQUEST_CLIPBOARD:
+ tty_putcode_ss(&c->tty, TTYC_MS, "", "?");
+ break;
case INPUT_REQUEST_QUEUE:
break;
}
@@ -3312,6 +3334,39 @@ input_add_request(struct input_ctx *ictx, enum input_request_type type, int idx)
return (0);
}
+/* Handle a palette reply. */
+static int
+static void
+input_request_palette_reply(struct input_request *ir, void *data)
+{
+ struct input_request_palette_data *pd = data;
+
+ if (pd->idx != ir->idx)
+ return (-1);
+ input_osc_colour_reply(ir->ictx, 4, pd->idx, pd->c);
+ return (0);
+ input_osc_colour_reply(ir->ictx, 0, 4, pd->idx, pd->c, ir->end);
+}
+
+/* Handle a clipboard reply. */
+static int
+static void
+input_request_clipboard_reply(struct input_request *ir, void *data)
+{
+ struct input_ctx *ictx = ir->ictx;
@@ -105,7 +104,7 @@ index 8113f2b3..0571ad0d 100644
+
+ state = options_get_number(global_options, "get-clipboard");
+ if (state == 0 || state == 1)
+ return (-1);
+ return;
+ if (state == 3) {
+ copy = xmalloc(cd->len);
+ memcpy(copy, cd->buf, cd->len);
@@ -116,33 +115,46 @@ index 8113f2b3..0571ad0d 100644
+ input_reply_clipboard(ictx->event, cd->buf, cd->len, "\007");
+ else
+ input_reply_clipboard(ictx->event, cd->buf, cd->len, "\033\\");
+ return (0);
+}
+
/* Handle a reply to a request. */
void
input_request_reply(struct client *c, enum input_request_type type, void *data)
{
struct input_request_list *irl = &c->input_requests[type];
struct input_request *ir, *ir1;
- struct input_request_palette_data *pd = data;
@@ -3321,11 +3376,18 @@ input_request_reply(struct client *c, enum input_request_type type, void *data)
int complete = 0;
TAILQ_FOREACH_SAFE(ir, &irl->requests, centry, ir1) {
log_debug("%s: req %p: client %s, pane %%%u, type %d",
__func__, ir, c->name, ir->ictx->wp->id, ir->type);
switch (type) {
case INPUT_REQUEST_PALETTE:
- if (pd->idx != ir->idx)
+ if (input_request_palette_reply(ir, data) != 0)
+ continue;
TAILQ_FOREACH_SAFE(ir, &c->input_requests, centry, ir1) {
- if (ir->type == type && pd->idx == ir->idx) {
+ if (ir->type != type) {
+ input_free_request(ir);
+ continue;
+ }
+ if (type == INPUT_REQUEST_PALETTE && pd->idx == ir->idx) {
+ found = ir;
+ break;
+ case INPUT_REQUEST_CLIPBOARD:
+ if (input_request_clipboard_reply(ir, data) != 0)
continue;
- input_osc_colour_reply(ir->ictx, 4, pd->idx, pd->c);
+ }
+ if (type == INPUT_REQUEST_CLIPBOARD) {
found = ir;
break;
}
TAILQ_REMOVE(&ir->ictx->requests[type], ir, entry);
- input_free_request(ir);
}
if (found == NULL)
return;
@@ -3335,8 +3397,11 @@ input_request_reply(struct client *c, enum input_request_type type, void *data)
break;
if (ir->type == INPUT_REQUEST_QUEUE)
input_send_reply(ir->ictx, ir->data);
- else if (ir == found && ir->type == INPUT_REQUEST_PALETTE) {
- input_osc_colour_reply(ir->ictx, 0, 4, pd->idx, pd->c, ir->end);
+ else if (ir == found) {
+ if (ir->type == INPUT_REQUEST_PALETTE)
+ input_request_palette_reply(ir, data);
+ else if (ir->type == INPUT_REQUEST_CLIPBOARD)
+ input_request_clipboard_reply(ir, data);
complete = 1;
}
input_free_request(ir);
diff --git a/options-table.c b/options-table.c
index 6946a085..b3ba39cd 100644
--- a/options-table.c
@@ -177,10 +189,10 @@ index 6946a085..b3ba39cd 100644
.type = OPTIONS_TABLE_STRING,
.scope = OPTIONS_TABLE_SERVER,
diff --git a/tmux.1 b/tmux.1
index b13b514a..98528217 100644
index a25da1fb..2ae1b724 100644
--- a/tmux.1
+++ b/tmux.1
@@ -4236,6 +4236,32 @@ passed through to applications running in
@@ -4241,6 +4241,32 @@ passed through to applications running in
.Nm .
Attached clients should be detached and attached again after changing this
option.
@@ -214,28 +226,30 @@ index b13b514a..98528217 100644
If not empty, a file to which
.Nm
diff --git a/tmux.h b/tmux.h
index 7be23085..dd279fa3 100644
index c3959d2a..3dece217 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1127,9 +1127,16 @@ struct window_mode_entry {
@@ -1129,6 +1129,7 @@ struct window_mode_entry {
/* Type of request to client. */
enum input_request_type {
- INPUT_REQUEST_PALETTE
+ INPUT_REQUEST_PALETTE,
+ INPUT_REQUEST_CLIPBOARD
+};
+#define INPUT_REQUEST_TYPES (2)
+
INPUT_REQUEST_PALETTE,
+ INPUT_REQUEST_CLIPBOARD,
INPUT_REQUEST_QUEUE
};
@@ -1138,6 +1139,12 @@ struct input_request_palette_data {
int c;
};
+/* Clipboard request reply data. */
+struct input_request_clipboard_data {
+ char *buf;
+ size_t len;
};
-#define INPUT_REQUEST_TYPES (1)
+};
+
/* Request sent to client on behalf of pane. */
TAILQ_HEAD(input_requests, input_request);
/* Palette request reply data. */
struct input_request_palette_data {
diff --git a/tty-keys.c b/tty-keys.c
index 77254591..7acee80f 100644
--- a/tty-keys.c