From be77222a9987bda6839a26ae303a2e488db8343f Mon Sep 17 00:00:00 2001
From: Daniel Lundin <dln@arity.se>
Date: Wed, 1 Jan 2025 13:12:48 +0100
Subject: [PATCH 1/4] Ditch tmux for ghostty tabs + a more stateless living

---
 home/common/fish.nix    | 30 +++---------------------
 home/common/ghostty.nix | 51 ++++-------------------------------------
 home/common/tmux.nix    | 20 ++++++++--------
 3 files changed, 16 insertions(+), 85 deletions(-)

diff --git a/home/common/fish.nix b/home/common/fish.nix
index 4452d23..5fd6a55 100644
--- a/home/common/fish.nix
+++ b/home/common/fish.nix
@@ -43,40 +43,17 @@
         body = ''confirm "⚠ Really shutdown $(hostname)?" && command shutdown $argv'';
       };
 
-      tmux-refresh-env = {
-        description = "Refresh environment variables from tmux session";
-        body = ''
-          for var in (tmux show-environment | string match -rv '^-')
-            set -l parts (string split -m 1 '=' $var)
-            if test (count $parts) -eq 2
-              set -Ux $parts[1] $parts[2]
-            end
-          end
-        '';
-      };
-
       kubectl = {
         description = "Wraps kubectl in grc";
         wraps = "kubectl";
         body = "grc.wrap kubectl $argv";
       };
 
-      edit = {
-        description = "Open a file in already running nvim and switch tab";
+      e = {
+        description = "Open a file in already running nvim";
         argumentNames = [ "file" ];
         body = ''
-          set _file (readlink -f "$file")
-          if test -z "$file"
-              set _root (vcs_root)
-              set _file (fd --type f . "$_root" | sed -e "s#^$_root/##" | fzf --no-sort --layout=reverse)
-              set _file "$_root/$_file"
-          end
-          set _nvim_socket "$XDG_RUNTIME_DIR/nvim-persistent.sock"
-          if test -S "$_nvim_socket" && tmux select-window -t nvim 2>/dev/null
-            nvim --server "$_nvim_socket" --remote "$_file"
-            return 0
-          end
-          tmux new-window -S -n nvim nvim --listen "$_nvim_socket" "$_file"
+          nvim --server "$XDG_RUNTIME_DIR/nvim-persistent.sock" --remote (readlink -f "$file")
         '';
       };
 
@@ -156,7 +133,6 @@
     ];
 
     shellAbbrs = {
-      e = "edit";
       l = "bat";
       ls = "eza";
       tree = "eza --tree";
diff --git a/home/common/ghostty.nix b/home/common/ghostty.nix
index 977eedc..7db5cca 100644
--- a/home/common/ghostty.nix
+++ b/home/common/ghostty.nix
@@ -34,8 +34,9 @@
 
         shell-integration = "fish";
 
-        window-decoration = false;
-        gtk-tabs-location = "bottom";
+        window-decoration = true;
+        gtk-single-instance = true;
+        gtk-tabs-location = "hidden";
         gtk-titlebar = false;
         window-padding-x = 12;
         window-padding-y = 0;
@@ -49,16 +50,6 @@
           "alt+shift+v=paste_from_clipboard"
           "ctrl+tab=goto_split:previous"
           "super+enter=toggle_fullscreen"
-          "ctrl+enter=unbind"
-          "alt+one=unbind"
-          "alt+two=unbind"
-          "alt+three=unbind"
-          "alt+four=unbind"
-          "alt+five=unbind"
-          "alt+six=unbind"
-          "alt+seven=unbind"
-          "alt+eight=unbind"
-          "alt+nine=unbind"
         ];
       };
     };
@@ -116,46 +107,12 @@
     '';
 
     xdg.desktopEntries = {
-      ghostty-local = {
-        categories = [
-          "System"
-          "TerminalEmulator"
-        ];
-        exec = ''ghostty --class=com.mitchellh.ghostty-local -e "tmux new-session -A -D -s main -t main"'';
-        genericName = "Ghostty (local)";
-        icon = "com.mitchellh.ghostty";
-        name = "Ghostty (local)";
-        settings = {
-          StartupWMClass = "com.mitchellh.ghostty-local";
-          TryExec = "ghostty";
-        };
-        terminal = false;
-        type = "Application";
-      };
-
-      ghostty-local-secondary = {
-        categories = [
-          "System"
-          "TerminalEmulator"
-        ];
-        exec = ''ghostty --class=com.mitchellh.ghostty-local-secondary -e "tmux new-session -A -D -s secondary -t main"'';
-        genericName = "Ghostty (local) Secondary";
-        icon = "com.mitchellh.ghostty";
-        name = "Ghostty (local) Secondary";
-        settings = {
-          StartupWMClass = "com.mitchellh.ghostty-local-secondary";
-          TryExec = "ghostty";
-        };
-        terminal = false;
-        type = "Application";
-      };
-
       ghostty-nemo = {
         categories = [
           "System"
           "TerminalEmulator"
         ];
-        exec = ''ghostty --class=com.mitchellh.ghostty-nemo -e "ssh -t nemo tmux new-session -A -D -s main -t main"'';
+        exec = ''ghostty --class=com.mitchellh.ghostty-nemo --command="ssh -t nemo"'';
         genericName = "Ghostty (nemo)";
         icon = "com.mitchellh.ghostty";
         name = "Ghostty (nemo)";
diff --git a/home/common/tmux.nix b/home/common/tmux.nix
index d5b0687..a587338 100644
--- a/home/common/tmux.nix
+++ b/home/common/tmux.nix
@@ -25,7 +25,6 @@
       set -g status-right '%F |  %R'
       set -g status off
       set -g update-environment "SSH_AUTH_SOCK"
-      setenv -g "SSH_AUTH_SOCK" "$XDG_RUNTIME_DIR/ssh-agent"
       setw -g alternate-screen on
       setw -g automatic-rename off
       setw -g window-status-format ""
@@ -34,16 +33,15 @@
 
       set -s command-alias[1000] stty='run-shell "tmux send-keys \"stty cols #{pane_width} rows #{pane_height}\" Enter"'
 
-      bind -n M-1 if-shell 'tmux select-window -t nvim' refresh-client 'new-window -S -n nvim nvim --listen $XDG_RUNTIME_DIR/nvim-persistent.sock'
-      bind -n M-2 if-shell 'tmux select-window -t t1' refresh-client 'new-window -S -n t1'
-      bind -n M-3 if-shell 'tmux select-window -t t2' refresh-client 'new-window -S -n t2'
-      bind -n M-4 if-shell 'tmux select-window -t t3' refresh-client 'new-window -S -n t3'
-      bind -n M-5 if-shell 'tmux select-window -t t4' refresh-client 'new-window -S -n t4'
-      bind -n M-6 if-shell 'tmux select-window -t t5' refresh-client 'new-window -S -n t5'
-      bind -n M-7 if-shell 'tmux select-window -t t6' refresh-client 'new-window -S -n t6'
-      bind -n M-8 if-shell 'tmux select-window -t t7' refresh-client 'new-window -S -n t7'
-      bind -n M-9 if-shell 'tmux select-window -t t8' refresh-client 'new-window -S -n t8'
-      bind -n M-0 if-shell 'tmux select-window -t t9' refresh-client 'new-window -S -n t9'
+      bind -n C-2 if-shell 'tmux select-window -t t1' refresh-client 'new-window -S -n t1'
+      bind -n C-3 if-shell 'tmux select-window -t t2' refresh-client 'new-window -S -n t2'
+      bind -n C-4 if-shell 'tmux select-window -t t3' refresh-client 'new-window -S -n t3'
+      bind -n C-5 if-shell 'tmux select-window -t t4' refresh-client 'new-window -S -n t4'
+      bind -n C-6 if-shell 'tmux select-window -t t5' refresh-client 'new-window -S -n t5'
+      bind -n C-7 if-shell 'tmux select-window -t t6' refresh-client 'new-window -S -n t6'
+      bind -n C-8 if-shell 'tmux select-window -t t7' refresh-client 'new-window -S -n t7'
+      bind -n C-9 if-shell 'tmux select-window -t t8' refresh-client 'new-window -S -n t8'
+      bind -n C-0 if-shell 'tmux select-window -t t9' refresh-client 'new-window -S -n t9'
       bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 1 scroll-up
       bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 1 scroll-down
       bind C-s set-option -g status

From 376fb67f48fff74d39b29dbbc9bae64d40e98ba9 Mon Sep 17 00:00:00 2001
From: Daniel Lundin <dln@arity.se>
Date: Wed, 1 Jan 2025 16:55:29 +0100
Subject: [PATCH 2/4] nix update

---
 flake.lock | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/flake.lock b/flake.lock
index 0d72b93..2b181d7 100644
--- a/flake.lock
+++ b/flake.lock
@@ -116,11 +116,11 @@
         "zig": "zig"
       },
       "locked": {
-        "lastModified": 1735589157,
-        "narHash": "sha256-s5fJn9LSwz3cfkKSvicQppCnXVs8F05OH96yaa5K2Dc=",
+        "lastModified": 1735689283,
+        "narHash": "sha256-LOZRScnB8Q9ylmlXnt2j2v4Aj1b5JZTdSeKYaFL1RDw=",
         "owner": "ghostty-org",
         "repo": "ghostty",
-        "rev": "ef542c6e63b40b3541dc5efd625c0b95f750bbc6",
+        "rev": "60611b8a4a1d5b3c1097cce85eb0311de0696cfa",
         "type": "github"
       },
       "original": {
@@ -222,11 +222,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1735381016,
-        "narHash": "sha256-CyCZFhMUkuYbSD6bxB/r43EdmDE7hYeZZPTCv0GudO4=",
+        "lastModified": 1735735907,
+        "narHash": "sha256-/AOGn9qJMjrZQyWYbObHTKmWDUP0q9+0TAXOJnq6ik0=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2",
+        "rev": "59a4c43e9ba6db24698c112720a58a334117de83",
         "type": "github"
       },
       "original": {
@@ -246,11 +246,11 @@
         "treefmt-nix": "treefmt-nix"
       },
       "locked": {
-        "lastModified": 1735517129,
-        "narHash": "sha256-ibHgAkr8OXAP8MRBo4Z7AIaVdOHywGR2J8R50vZCQjI=",
+        "lastModified": 1735693090,
+        "narHash": "sha256-Axke90GBbocA48Lrb7ub/RycvHt1NcujkZW1RMF+Q7Q=",
         "owner": "nix-community",
         "repo": "neovim-nightly-overlay",
-        "rev": "fd381a5a19f553c2466dc437fb94fcf799d77e82",
+        "rev": "47e417b35d1ec8bf79deec3e96c90f1e41a9e1e4",
         "type": "github"
       },
       "original": {
@@ -262,11 +262,11 @@
     "neovim-src": {
       "flake": false,
       "locked": {
-        "lastModified": 1735489459,
-        "narHash": "sha256-PMeWazyxGxpA6UeVrWH/ur8WuqliGxXlRjTTQdMiYVc=",
+        "lastModified": 1735686267,
+        "narHash": "sha256-gLa+1QOW7P5J4cAG34BW68tnf/yOx50rH6iZuSyoX1A=",
         "owner": "neovim",
         "repo": "neovim",
-        "rev": "e4bc8b5967d22840c1e52c97acab0f77107cd48c",
+        "rev": "59cbe640233eeb6ae96231e059449e73e15f9ea5",
         "type": "github"
       },
       "original": {
@@ -277,11 +277,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1735268880,
-        "narHash": "sha256-7QEFnKkzD13SPxs+UFR5bUFN2fRw+GlL0am72ZjNre4=",
+        "lastModified": 1735554305,
+        "narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "7cc0bff31a3a705d3ac4fdceb030a17239412210",
+        "rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd",
         "type": "github"
       },
       "original": {
@@ -341,11 +341,11 @@
     },
     "nixpkgs-unstable_2": {
       "locked": {
-        "lastModified": 1735523292,
-        "narHash": "sha256-opBsbR/nrGxiiF6XzlVluiHYb6yN/hEwv+lBWTy9xoM=",
+        "lastModified": 1735617354,
+        "narHash": "sha256-5zJyv66q68QZJZsXtmjDBazGnF0id593VSy+8eSckoo=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "6d97d419e5a9b36e6293887a89a078cf85f5a61b",
+        "rev": "69b9a8c860bdbb977adfa9c5e817ccb717884182",
         "type": "github"
       },
       "original": {
@@ -405,11 +405,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1735135567,
-        "narHash": "sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q+T0BVeZE=",
+        "lastModified": 1735653038,
+        "narHash": "sha256-Q6xAmciTXDtZfUxf6c15QqtRR8BvX4edYPstF/uoqMk=",
         "owner": "numtide",
         "repo": "treefmt-nix",
-        "rev": "9e09d30a644c57257715902efbb3adc56c79cf28",
+        "rev": "56c0ecd79f7ba01a0ec027da015df751d6ca3ae7",
         "type": "github"
       },
       "original": {

From d06333397ce680163b2cac00a54569c5b67f8870 Mon Sep 17 00:00:00 2001
From: Daniel Lundin <dln@arity.se>
Date: Wed, 1 Jan 2025 13:12:48 +0100
Subject: [PATCH 3/4] Ditch tmux for ghostty tabs + a more stateless living

nix update
---
 flake.lock              | 42 ++++++++++++++++----------------
 home/common/fish.nix    | 30 +++--------------------
 home/common/ghostty.nix | 54 ++++++-----------------------------------
 home/common/tmux.nix    | 20 +++++++--------
 4 files changed, 40 insertions(+), 106 deletions(-)

diff --git a/flake.lock b/flake.lock
index 0d72b93..2b181d7 100644
--- a/flake.lock
+++ b/flake.lock
@@ -116,11 +116,11 @@
         "zig": "zig"
       },
       "locked": {
-        "lastModified": 1735589157,
-        "narHash": "sha256-s5fJn9LSwz3cfkKSvicQppCnXVs8F05OH96yaa5K2Dc=",
+        "lastModified": 1735689283,
+        "narHash": "sha256-LOZRScnB8Q9ylmlXnt2j2v4Aj1b5JZTdSeKYaFL1RDw=",
         "owner": "ghostty-org",
         "repo": "ghostty",
-        "rev": "ef542c6e63b40b3541dc5efd625c0b95f750bbc6",
+        "rev": "60611b8a4a1d5b3c1097cce85eb0311de0696cfa",
         "type": "github"
       },
       "original": {
@@ -222,11 +222,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1735381016,
-        "narHash": "sha256-CyCZFhMUkuYbSD6bxB/r43EdmDE7hYeZZPTCv0GudO4=",
+        "lastModified": 1735735907,
+        "narHash": "sha256-/AOGn9qJMjrZQyWYbObHTKmWDUP0q9+0TAXOJnq6ik0=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2",
+        "rev": "59a4c43e9ba6db24698c112720a58a334117de83",
         "type": "github"
       },
       "original": {
@@ -246,11 +246,11 @@
         "treefmt-nix": "treefmt-nix"
       },
       "locked": {
-        "lastModified": 1735517129,
-        "narHash": "sha256-ibHgAkr8OXAP8MRBo4Z7AIaVdOHywGR2J8R50vZCQjI=",
+        "lastModified": 1735693090,
+        "narHash": "sha256-Axke90GBbocA48Lrb7ub/RycvHt1NcujkZW1RMF+Q7Q=",
         "owner": "nix-community",
         "repo": "neovim-nightly-overlay",
-        "rev": "fd381a5a19f553c2466dc437fb94fcf799d77e82",
+        "rev": "47e417b35d1ec8bf79deec3e96c90f1e41a9e1e4",
         "type": "github"
       },
       "original": {
@@ -262,11 +262,11 @@
     "neovim-src": {
       "flake": false,
       "locked": {
-        "lastModified": 1735489459,
-        "narHash": "sha256-PMeWazyxGxpA6UeVrWH/ur8WuqliGxXlRjTTQdMiYVc=",
+        "lastModified": 1735686267,
+        "narHash": "sha256-gLa+1QOW7P5J4cAG34BW68tnf/yOx50rH6iZuSyoX1A=",
         "owner": "neovim",
         "repo": "neovim",
-        "rev": "e4bc8b5967d22840c1e52c97acab0f77107cd48c",
+        "rev": "59cbe640233eeb6ae96231e059449e73e15f9ea5",
         "type": "github"
       },
       "original": {
@@ -277,11 +277,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1735268880,
-        "narHash": "sha256-7QEFnKkzD13SPxs+UFR5bUFN2fRw+GlL0am72ZjNre4=",
+        "lastModified": 1735554305,
+        "narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "7cc0bff31a3a705d3ac4fdceb030a17239412210",
+        "rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd",
         "type": "github"
       },
       "original": {
@@ -341,11 +341,11 @@
     },
     "nixpkgs-unstable_2": {
       "locked": {
-        "lastModified": 1735523292,
-        "narHash": "sha256-opBsbR/nrGxiiF6XzlVluiHYb6yN/hEwv+lBWTy9xoM=",
+        "lastModified": 1735617354,
+        "narHash": "sha256-5zJyv66q68QZJZsXtmjDBazGnF0id593VSy+8eSckoo=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "6d97d419e5a9b36e6293887a89a078cf85f5a61b",
+        "rev": "69b9a8c860bdbb977adfa9c5e817ccb717884182",
         "type": "github"
       },
       "original": {
@@ -405,11 +405,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1735135567,
-        "narHash": "sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q+T0BVeZE=",
+        "lastModified": 1735653038,
+        "narHash": "sha256-Q6xAmciTXDtZfUxf6c15QqtRR8BvX4edYPstF/uoqMk=",
         "owner": "numtide",
         "repo": "treefmt-nix",
-        "rev": "9e09d30a644c57257715902efbb3adc56c79cf28",
+        "rev": "56c0ecd79f7ba01a0ec027da015df751d6ca3ae7",
         "type": "github"
       },
       "original": {
diff --git a/home/common/fish.nix b/home/common/fish.nix
index 4452d23..7ba4e7b 100644
--- a/home/common/fish.nix
+++ b/home/common/fish.nix
@@ -43,40 +43,17 @@
         body = ''confirm "⚠ Really shutdown $(hostname)?" && command shutdown $argv'';
       };
 
-      tmux-refresh-env = {
-        description = "Refresh environment variables from tmux session";
-        body = ''
-          for var in (tmux show-environment | string match -rv '^-')
-            set -l parts (string split -m 1 '=' $var)
-            if test (count $parts) -eq 2
-              set -Ux $parts[1] $parts[2]
-            end
-          end
-        '';
-      };
-
       kubectl = {
         description = "Wraps kubectl in grc";
         wraps = "kubectl";
         body = "grc.wrap kubectl $argv";
       };
 
-      edit = {
-        description = "Open a file in already running nvim and switch tab";
+      e = {
+        description = "Open a file in already running nvim";
         argumentNames = [ "file" ];
         body = ''
-          set _file (readlink -f "$file")
-          if test -z "$file"
-              set _root (vcs_root)
-              set _file (fd --type f . "$_root" | sed -e "s#^$_root/##" | fzf --no-sort --layout=reverse)
-              set _file "$_root/$_file"
-          end
-          set _nvim_socket "$XDG_RUNTIME_DIR/nvim-persistent.sock"
-          if test -S "$_nvim_socket" && tmux select-window -t nvim 2>/dev/null
-            nvim --server "$_nvim_socket" --remote "$_file"
-            return 0
-          end
-          tmux new-window -S -n nvim nvim --listen "$_nvim_socket" "$_file"
+          nvim --server "$XDG_RUNTIME_DIR/nvim-persistent.sock" --remote (readlink -f "$file") >>/dev/null
         '';
       };
 
@@ -156,7 +133,6 @@
     ];
 
     shellAbbrs = {
-      e = "edit";
       l = "bat";
       ls = "eza";
       tree = "eza --tree";
diff --git a/home/common/ghostty.nix b/home/common/ghostty.nix
index 977eedc..265e7a8 100644
--- a/home/common/ghostty.nix
+++ b/home/common/ghostty.nix
@@ -33,9 +33,11 @@
         unfocused-split-opacity = 1.0;
 
         shell-integration = "fish";
+        initial-command = ''nvim --listen "$XDG_RUNTIME_DIR/nvim-persistent.sock"'';
 
-        window-decoration = false;
-        gtk-tabs-location = "bottom";
+        window-decoration = true;
+        gtk-single-instance = true;
+        gtk-tabs-location = "hidden";
         gtk-titlebar = false;
         window-padding-x = 12;
         window-padding-y = 0;
@@ -49,16 +51,6 @@
           "alt+shift+v=paste_from_clipboard"
           "ctrl+tab=goto_split:previous"
           "super+enter=toggle_fullscreen"
-          "ctrl+enter=unbind"
-          "alt+one=unbind"
-          "alt+two=unbind"
-          "alt+three=unbind"
-          "alt+four=unbind"
-          "alt+five=unbind"
-          "alt+six=unbind"
-          "alt+seven=unbind"
-          "alt+eight=unbind"
-          "alt+nine=unbind"
         ];
       };
     };
@@ -116,46 +108,14 @@
     '';
 
     xdg.desktopEntries = {
-      ghostty-local = {
-        categories = [
-          "System"
-          "TerminalEmulator"
-        ];
-        exec = ''ghostty --class=com.mitchellh.ghostty-local -e "tmux new-session -A -D -s main -t main"'';
-        genericName = "Ghostty (local)";
-        icon = "com.mitchellh.ghostty";
-        name = "Ghostty (local)";
-        settings = {
-          StartupWMClass = "com.mitchellh.ghostty-local";
-          TryExec = "ghostty";
-        };
-        terminal = false;
-        type = "Application";
-      };
-
-      ghostty-local-secondary = {
-        categories = [
-          "System"
-          "TerminalEmulator"
-        ];
-        exec = ''ghostty --class=com.mitchellh.ghostty-local-secondary -e "tmux new-session -A -D -s secondary -t main"'';
-        genericName = "Ghostty (local) Secondary";
-        icon = "com.mitchellh.ghostty";
-        name = "Ghostty (local) Secondary";
-        settings = {
-          StartupWMClass = "com.mitchellh.ghostty-local-secondary";
-          TryExec = "ghostty";
-        };
-        terminal = false;
-        type = "Application";
-      };
-
       ghostty-nemo = {
         categories = [
           "System"
           "TerminalEmulator"
         ];
-        exec = ''ghostty --class=com.mitchellh.ghostty-nemo -e "ssh -t nemo tmux new-session -A -D -s main -t main"'';
+        exec = ''
+        ghostty --class=com.mitchellh.ghostty-nemo --command="ssh -t nemo" --initial-command="ssh -t nemo nvim --listen /run/user/1000/nvim-persistent.sock"
+        '';
         genericName = "Ghostty (nemo)";
         icon = "com.mitchellh.ghostty";
         name = "Ghostty (nemo)";
diff --git a/home/common/tmux.nix b/home/common/tmux.nix
index d5b0687..a587338 100644
--- a/home/common/tmux.nix
+++ b/home/common/tmux.nix
@@ -25,7 +25,6 @@
       set -g status-right '%F |  %R'
       set -g status off
       set -g update-environment "SSH_AUTH_SOCK"
-      setenv -g "SSH_AUTH_SOCK" "$XDG_RUNTIME_DIR/ssh-agent"
       setw -g alternate-screen on
       setw -g automatic-rename off
       setw -g window-status-format ""
@@ -34,16 +33,15 @@
 
       set -s command-alias[1000] stty='run-shell "tmux send-keys \"stty cols #{pane_width} rows #{pane_height}\" Enter"'
 
-      bind -n M-1 if-shell 'tmux select-window -t nvim' refresh-client 'new-window -S -n nvim nvim --listen $XDG_RUNTIME_DIR/nvim-persistent.sock'
-      bind -n M-2 if-shell 'tmux select-window -t t1' refresh-client 'new-window -S -n t1'
-      bind -n M-3 if-shell 'tmux select-window -t t2' refresh-client 'new-window -S -n t2'
-      bind -n M-4 if-shell 'tmux select-window -t t3' refresh-client 'new-window -S -n t3'
-      bind -n M-5 if-shell 'tmux select-window -t t4' refresh-client 'new-window -S -n t4'
-      bind -n M-6 if-shell 'tmux select-window -t t5' refresh-client 'new-window -S -n t5'
-      bind -n M-7 if-shell 'tmux select-window -t t6' refresh-client 'new-window -S -n t6'
-      bind -n M-8 if-shell 'tmux select-window -t t7' refresh-client 'new-window -S -n t7'
-      bind -n M-9 if-shell 'tmux select-window -t t8' refresh-client 'new-window -S -n t8'
-      bind -n M-0 if-shell 'tmux select-window -t t9' refresh-client 'new-window -S -n t9'
+      bind -n C-2 if-shell 'tmux select-window -t t1' refresh-client 'new-window -S -n t1'
+      bind -n C-3 if-shell 'tmux select-window -t t2' refresh-client 'new-window -S -n t2'
+      bind -n C-4 if-shell 'tmux select-window -t t3' refresh-client 'new-window -S -n t3'
+      bind -n C-5 if-shell 'tmux select-window -t t4' refresh-client 'new-window -S -n t4'
+      bind -n C-6 if-shell 'tmux select-window -t t5' refresh-client 'new-window -S -n t5'
+      bind -n C-7 if-shell 'tmux select-window -t t6' refresh-client 'new-window -S -n t6'
+      bind -n C-8 if-shell 'tmux select-window -t t7' refresh-client 'new-window -S -n t7'
+      bind -n C-9 if-shell 'tmux select-window -t t8' refresh-client 'new-window -S -n t8'
+      bind -n C-0 if-shell 'tmux select-window -t t9' refresh-client 'new-window -S -n t9'
       bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 1 scroll-up
       bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 1 scroll-down
       bind C-s set-option -g status

From 9ee84b89e6eaceffcc259e0812fffebc977dae9b Mon Sep 17 00:00:00 2001
From: Daniel Lundin <dln@arity.se>
Date: Thu, 2 Jan 2025 00:30:54 +0100
Subject: [PATCH 4/4] nvim: color scheme tweaks

---
 home/common/nvim/dieter/lua/dieter/init.lua | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/home/common/nvim/dieter/lua/dieter/init.lua b/home/common/nvim/dieter/lua/dieter/init.lua
index e803a36..1a638dd 100644
--- a/home/common/nvim/dieter/lua/dieter/init.lua
+++ b/home/common/nvim/dieter/lua/dieter/init.lua
@@ -52,9 +52,14 @@ local colors = {
     highlight_subtle = hsl(212, 27, 11),
     highlight_intense = hsl(58, 100, 60),
 
-    string = hsl(96, 35, 60),
+    -- string = hsl(96, 35, 60),
+    -- string = hsl(80, 79, 83),
+    string = hsl(90, 45, 70),
     comment = hsl(2, 69, 68),
     comment_error = hsl(2, 85, 50),
+    func = hsl(40, 57, 87),
+    member = hsl(213, 45, 75),
+    punc = hsl(213, 45, 50),
 
     diagnostic_error = hsl(353, 100, 45),
     diagnostic_warning = hsl(30, 100, 50),
@@ -97,13 +102,14 @@ local theme = {
 
   Constant = { link = "NormalNC" },
   Delimiter = { link = "NormalNC" },
+  Function = { fg = c.func },
   Identifier = { link = "NormalNC" },
   Keyword = { fg = c.foreground, bold = true },
   Operator = { link = "NormalNC" },
   Special = { link = "NormalNC" },
   Type = { link = "NormalNC" },
 
-  String = { fg = c.string, italic = true },
+  String = { fg = c.string },
 
   Comment = { fg = c.comment, italic = true, bold = true },
   CommentError = { fg = c.comment_error, italic = true, bold = true },
@@ -123,11 +129,13 @@ local theme = {
   GitSignsDeleteNr = { link = "DiffDelete" },
 
   -- Treesitter
-  ["@function"] = { link = "NormalNC" },
+  -- ["@function"] = { link = "NormalNC" },
+  ["@punctuation.special"] = { fg = c.punc },
   ["@special"] = { link = "NormalNC" },
   ["@variable"] = { link = "NormalNC" },
+  ["@variable.member"] = { fg = c.member },
   ["@variable.parameter"] = { fg = c.accent2 },
-  ["@lsp.type.variable"] = { fg = c.dimmed_subtle, italic = true },
+  -- ["@lsp.type.variable"] = { fg = c.dimmed_subtle, italic = true },
 
   -- UI Elements
   CursorLine = { bg = c.highlight_subtle },