update config

This commit is contained in:
Jonathan Dönszelmann 2024-09-25 14:25:10 +02:00
parent cd4d1d7523
commit 970de4a615
No known key found for this signature in database
6 changed files with 220 additions and 189 deletions

111
flake.lock generated
View file

@ -2,18 +2,17 @@
"nodes": { "nodes": {
"devshell": { "devshell": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1717408969, "lastModified": 1722113426,
"narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "1ebbe68d57457c8cae98145410b164b5477761f4", "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -36,22 +35,6 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@ -60,11 +43,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719877454, "lastModified": 1726153070,
"narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=", "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "4e3583423212f9303aa1a6337f8dffb415920e4f", "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -78,11 +61,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1726560853,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -96,11 +79,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1726560853,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -129,7 +112,10 @@
}, },
"git-hooks": { "git-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": [
"nixvim",
"flake-compat"
],
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
@ -141,11 +127,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719259945, "lastModified": 1726745158,
"narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", "narHash": "sha256-D5AegvGoEjt4rkKedmxlSEmC+nNLMBPWFxvmYnVLhjk=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", "rev": "4e743a6920eab45e8ba0fbe49dc459f1423a4b74",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -183,11 +169,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1720188602, "lastModified": 1727246346,
"narHash": "sha256-lC3byBmhVZFzWl/dCic8+cKUEEAXAswWOYjq4paFmbo=", "narHash": "sha256-TcUaKtya339Asu+g6KTJ8h7KiKcKXKp2V+At+7tksyY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "e3582e5151498bc4d757e8361431ace8529e7bb7", "rev": "1e22ef1518fb175d762006f9cae7f6312b8caedb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -204,11 +190,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719827439, "lastModified": 1726985855,
"narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=", "narHash": "sha256-NJPGK030Y3qETpWBhj9oobDQRbXdXOPxtu+YgGvZ84o=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "59ce796b2563e19821361abbe2067c3bb4143a7d", "rev": "04213d1ce4221f5d9b40bcee30706ce9a91d148d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -241,11 +227,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719845423, "lastModified": 1727003835,
"narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=", "narHash": "sha256-Cfllbt/ADfO8oxbT984MhPHR6FJBaglsr1SxtDGbpec=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "ec12b88104d6c117871fad55e931addac4626756", "rev": "bd7d1e3912d40f799c5c0f7e5820ec950f1e0b3d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -256,11 +242,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1720031269, "lastModified": 1726937504,
"narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", "rev": "9357f4f23713673f310988025d9dc261c20e70c6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -295,14 +281,15 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1720210105, "lastModified": 1727201864,
"narHash": "sha256-AjcTv44xEAOxGqpoMxbfYcUwhCWLHESQIOIMcBFUCKk=", "narHash": "sha256-jhWWJ8LTkyWM7/mUvktwwYiZwhIH70/CsW26U4uAZTg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "367380bd8462419f0199d262b058fadfb43823ff", "rev": "b3a90d737d5e69d784a07f359ea71178b506b8dd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -311,6 +298,28 @@
"type": "github" "type": "github"
} }
}, },
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1726995581,
"narHash": "sha256-lgsE/CTkZk9OIiFGEIrxXZQ7Feiv41dqlN7pEfTdgew=",
"owner": "NuschtOS",
"repo": "search",
"rev": "3b7dd61b365ca45380707453758a45f2e9977be3",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
@ -393,11 +402,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719887753, "lastModified": 1726734507,
"narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=", "narHash": "sha256-VUH5O5AcOSxb0uL/m34dDkxFKP6WLQ6y4I1B4+N3L2w=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c", "rev": "ee41a466c2255a3abe6bc50fc6be927cdee57a9f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -3,7 +3,7 @@ _: {
enable = true; enable = true;
userEmail = "jonathan@donsz.nl"; userEmail = "jonathan@donsz.nl";
userName = "Jonathan Dönszelmann"; userName = "Jonathan Dönszelmann";
signing.key = "~/.ssh/id_ed25519.pub"; signing.key = "/home/jonathan/.ssh/id_ed25519.pub";
signing.signByDefault = true; signing.signByDefault = true;
delta.enable = true; delta.enable = true;

View file

@ -1,42 +1,42 @@
{pkgs, inputs, ...}: { { pkgs, inputs, ... }: {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
font.name = "Jetbrains Mono"; font.name = "Jetbrains Mono";
font.size = 13.0; font.size = 13.0;
font.package = pkgs.jetbrains-mono; font.package = pkgs.jetbrains-mono;
settings = { settings = {
scrollback_lines = 20000; scrollback_lines = 20000;
repaint_delay = 10; repaint_delay = 10;
input_delay = 3; input_delay = 3;
enable_audio_bell = false; enable_audio_bell = false;
update_check_interval = 0; update_check_interval = 0;
initial_window_width = "95c"; initial_window_width = "95c";
initial_window_height = "30c"; initial_window_height = "30c";
remember_window_size = "no"; remember_window_size = "no";
draw_minimal_borders = false; draw_minimal_borders = false;
hide_window_decorations = true; hide_window_decorations = true;
shell = "${pkgs.tmux}/bin/tmux"; shell = "${pkgs.tmux}/bin/tmux";
clipboard_control = "write-clipboard write-primary read-clipboard read-primary"; clipboard_control = "write-clipboard write-primary read-clipboard read-primary";
foreground = "#fcfcfc"; foreground = "#fcfcfc";
background = "#232627"; background = "#232627";
linux_display_server = "auto"; linux_display_server = "auto";
};
keybindings = {
"ctrl+f" = "launch --location=hsplit --allow-remote-control kitty +kitten ${inputs.kitty-search}/search.py @active-kitty-window-id";
"ctrl+alt+r" = "load_config_file";
"ctrl+shift+r" = "no_op";
"ctrl+EQUAL" = "change_font_size all +2.0";
"ctrl+minus" = "change_font_size all -2.0";
"ctrl+0" = "change_font_size all 0";
"ctrl+/" = "send_text all \x1b[47;5u";
};
}; };
keybindings = {
"ctrl+f" = "launch --location=hsplit --allow-remote-control kitty +kitten ${inputs.kitty-search}/search.py @active-kitty-window-id";
"ctrl+alt+r" = "load_config_file";
"ctrl+shift+r" = "no_op";
"ctrl+EQUAL" = "change_font_size all +2.0";
"ctrl+minus" = "change_font_size all -2.0";
"ctrl+0" = "change_font_size all 0";
"ctrl+/" = "send_text all \x1b[47;5u";
};
};
} }

View file

@ -85,11 +85,7 @@ local builtin = require('telescope.builtin')
-- comment -- comment
vim.keymap.set("n", "<leader>c", ":lua require('Comment.api').toggle.linewise.current()<CR> j", { remap = true }) vim.keymap.set("n", "<leader>c", ":lua require('Comment.api').toggle.linewise.current()<CR> j", { remap = true })
vim.keymap.set("v", "<leader>c", ":lua require('Comment.api').toggle.linewise.current()<CR> j", { remap = true }) vim.keymap.set("v", "<leader>c", ":lua require('Comment.api').toggle.blockwise.current()<CR> j", { remap = true })
vim.keymap.set("n", "<C-/>", ":lua require('Comment.api').toggle.linewise.current()<CR> j", { remap = true })
vim.keymap.set("v", "<C-/>", ":lua require('Comment.api').toggle.linewise.current()<CR> j", { remap = true })
-- indent and dedent using tab/shift-ta -- indent and dedent using tab/shift-ta
vim.keymap.set("n", "<tab>", ">>_") vim.keymap.set("n", "<tab>", ">>_")

View file

@ -52,18 +52,21 @@ in
key = "<leader>."; key = "<leader>.";
action = "<cmd>Lspsaga code_action<cr>"; action = "<cmd>Lspsaga code_action<cr>";
} }
]; ];
plugins = { plugins = {
treesitter = { treesitter = {
enable = true; enable = true;
indent = true;
nixGrammars = true; nixGrammars = true;
ensureInstalled = "all"; settings = {
indent.enable = true;
ensure_installed = "all";
};
}; };
rainbow-delimiters.enable = true; rainbow-delimiters.enable = true;
surround.enable = true; vim-surround.enable = true;
cmp-nvim-lsp.enable = true; cmp-nvim-lsp.enable = true;
lsp-format.enable = true; lsp-format.enable = true;
fugitive.enable = true; fugitive.enable = true;
@ -88,10 +91,6 @@ in
settings = { settings = {
sticky = true; sticky = true;
opleader = {
line = "gc";
block = "gb";
};
}; };
}; };
@ -104,8 +103,8 @@ in
mappings = { mappings = {
"<bs>" = "navigate_up"; "<bs>" = "navigate_up";
"." = "set_root"; "." = "set_root";
"f" = "fuzzy_finder"; "/" = "fuzzy_finder";
"/" = "filter_on_submit"; "f" = "filter_on_submit";
"h" = "show_help"; "h" = "show_help";
}; };
}; };
@ -144,7 +143,7 @@ in
text = "💡"; text = "💡";
}; };
status_text = { status_text = {
enabled = true; enabled = false;
text = "💡"; text = "💡";
}; };
}; };
@ -174,14 +173,14 @@ in
enable = true; enable = true;
settings = { settings = {
cmd = "${pkgs.typst}/bin/typst"; cmd = "${pkgs.typst}/bin/typst";
conceal_math = true; conceal_math = 1;
auto_close_toc = true; auto_close_toc = 1;
}; };
}; };
lualine = { lualine = {
enable = true; enable = true;
theme = "onedark"; settings.options.theme = "onedark";
}; };
rustaceanvim = { rustaceanvim = {
@ -193,7 +192,7 @@ in
server = { server = {
standalone = false; standalone = false;
cmd = [ "rustup" "run" "nightly" "rust-analyzer" ]; cmd = [ "rustup" "run" "nightly" "rust-analyzer" ];
settings = { default_settings = {
rust-analyzer = { rust-analyzer = {
inlayHints = { lifetimeElisionHints = { enable = "always"; }; }; inlayHints = { lifetimeElisionHints = { enable = "always"; }; };
check = { command = "clippy"; }; check = { command = "clippy"; };
@ -232,10 +231,11 @@ in
}; };
rustc.source = "discover"; rustc.source = "discover";
};
diagnostics = { options.diagnostics = {
enable = true; enable = true;
styleLints.enable = true; styleLints.enable = true;
};
}; };
}; };
}; };
@ -291,7 +291,7 @@ in
filetypes = [ "sh" "bash" ]; filetypes = [ "sh" "bash" ];
}; };
tsserver = { ts-ls = {
enable = true; enable = true;
filetypes = filetypes =
[ "javascript" "javascriptreact" "typescript" "typescriptreact" ]; [ "javascript" "javascriptreact" "typescript" "typescriptreact" ];
@ -337,7 +337,7 @@ in
}; };
bufferline = { bufferline = {
enable = true; enable = true;
diagnostics = "nvim_lsp"; settings.options.diagnostics = "nvim_lsp";
}; };
@ -353,6 +353,8 @@ in
}; };
}; };
nix.enable = true; nix.enable = true;
web-devicons.enable = true;
}; };
extraPlugins = with pkgs.vimPlugins; [ extraPlugins = with pkgs.vimPlugins; [
onedark-nvim onedark-nvim
@ -369,6 +371,7 @@ in
vim-astro vim-astro
nvim-web-devicons nvim-web-devicons
vim-visual-multi vim-visual-multi
vim-gh-line
]; ];
extraConfigLua = '' extraConfigLua = ''

View file

@ -1,98 +1,121 @@
{ pkgs, ... }: { { pkgs, ... }: {
programs.tmux = { programs.tmux =
enable = true; {
mouse = true; enable = true;
clock24 = true; mouse = true;
clock24 = true;
shortcut = "k"; shortcut = "k";
extraConfig = ''
# unbind every single normal keybinding
unbind-key -a
set -g set-titles on plugins = with pkgs; [
set -s escape-time 0 {
plugin = tmuxPlugins.mkTmuxPlugin {
pluginName = "suspend";
version = "1a2f806";
src = pkgs.fetchFromGitHub {
owner = "MunifTanjim";
repo = "tmux-suspend";
rev = "1a2f806666e0bfed37535372279fa00d27d50d14";
sha256 = "0j7vjrwc7gniwkv1076q3wc8ccwj42zph5wdmsm9ibz6029wlmzv";
};
};
extraConfig = ''
set -g @suspend_key 'F11'
'';
}
{
plugin = tmuxPlugins.mode-indicator;
}
];
set-option -g default-shell /bin/zsh extraConfig = ''
# unbind every single normal keybinding
unbind-key -a
set-window-option -g mode-keys vi set -g set-titles on
set -s escape-time 0
# clipboard stuff set-option -g default-shell /bin/zsh
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
bind v copy-mode
bind p paste-buffer -p
set -s set-clipboard on
# get back normal terminal emulator bindings set-window-option -g mode-keys vi
bind-key -n S-PPage copy-mode -u
bind-key -T copy-mode -n S-NPage send-keys -X page-down
# don't scroll to end when copying with mouse # clipboard stuff
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe bind -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe bind v copy-mode
bind-key -T copy-mode TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe bind p paste-buffer -p
bind-key -T copy-mode-vi DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe set -s set-clipboard on
bind-key -T copy-mode-vi TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe
# window control # get back normal terminal emulator bindings
bind t new-window -c "#{pane_current_path}" bind-key -n S-PPage copy-mode -u
bind-key Tab next-window bind-key -T copy-mode -n S-NPage send-keys -X page-down
bind-key BTab previous-window
set -g automatic-rename-format "#{?#{==:#{pane_current_path},$HOME},~,#{b:pane_current_path}} (#{pane_current_command})"
set -g renumber-windows on
bind-key Q confirm-before -p "kill-window #W? (y/n)" kill-window
bind A last-window
bind-key 1 select-window -t :0 # don't scroll to end when copying with mouse
bind-key 2 select-window -t :1 bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe
bind-key 3 select-window -t :2 bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe
bind-key 4 select-window -t :3 bind-key -T copy-mode DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe
bind-key 5 select-window -t :4 bind-key -T copy-mode TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe
bind-key 6 select-window -t :5 bind-key -T copy-mode-vi DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe
bind-key 7 select-window -t :6 bind-key -T copy-mode-vi TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe
bind-key 8 select-window -t :7
bind-key 9 select-window -t :8
bind-key 0 select-window -t :9
# pane control # window control
bind h select-pane -L bind t new-window -c "#{pane_current_path}"
bind j select-pane -S bind-key Tab next-window
bind k select-pane -U bind-key BTab previous-window
bind l select-pane -R set -g automatic-rename-format "#{?#{==:#{pane_current_path},$HOME},~,#{b:pane_current_path}} (#{pane_current_command})"
bind L split-window -h -c "#{pane_current_path}" set -g renumber-windows on
bind J split-window -v -c "#{pane_current_path}" bind-key Q confirm-before -p "kill-window #W? (y/n)" kill-window
bind H split-window -h -b -c "#{pane_current_path}" bind A last-window
bind K split-window -v -b -c "#{pane_current_path}"
bind x swap-pane -D
bind -r a select-pane -l
bind-key q confirm-before -p "kill-pane #P? (y/n)" kill-pane
bind-key o choose-tree -wZ bind-key 1 select-window -t :0
bind-key O choose-tree -sZ bind-key 2 select-window -t :1
bind-key 3 select-window -t :2
bind-key 4 select-window -t :3
bind-key 5 select-window -t :4
bind-key 6 select-window -t :5
bind-key 7 select-window -t :6
bind-key 8 select-window -t :7
bind-key 9 select-window -t :8
bind-key 0 select-window -t :9
# get back command mode and some other basics... # pane control
bind : command-prompt bind h select-pane -L
bind r source-file ~/.config/tmux/tmux.conf \; display "config reloaded" bind j select-pane -D
bind-key ? list-keys bind k select-pane -U
bind l select-pane -R
bind L split-window -h -c "#{pane_current_path}"
bind J split-window -v -c "#{pane_current_path}"
bind H split-window -h -b -c "#{pane_current_path}"
bind K split-window -v -b -c "#{pane_current_path}"
bind x swap-pane -D
bind -r a select-pane -l
bind-key q confirm-before -p "kill-pane #P? (y/n)" kill-pane
# Scroll oin man etc bind-key o choose-tree -wZ
tmux_commands_with_legacy_scroll="nano less more man git" bind-key O choose-tree -sZ
bind-key -T root WheelUpPane \ # get back command mode and some other basics...
if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \ bind : command-prompt
'send -Mt=' \ bind r source-file ~/.config/tmux/tmux.conf \; display "config reloaded"
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \ bind-key ? list-keys
"send -t= Up" "copy-mode -et="'
bind-key -T root WheelDownPane \ # Scroll oin man etc
if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \ tmux_commands_with_legacy_scroll="nano less more man git"
'send -Mt=' \
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
"send -t= Down" "send -Mt="'
# bind -n DoubleClick1Pane run-shell "${pkgs.xdragon}/bin/dragon -x '#{pane_current_path}/#{mouse_word}'" bind-key -T root WheelUpPane \
''; if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \
}; 'send -Mt=' \
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
"send -t= Up" "copy-mode -et="'
bind-key -T root WheelDownPane \
if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \
'send -Mt=' \
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
"send -t= Down" "send -Mt="'
# bind -n DoubleClick1Pane run-shell "${pkgs.xdragon}/bin/dragon -x '#{pane_current_path}/#{mouse_word}'"
'';
};
} }