Use ghostty shell integration & bind tmux keys for next/prev prompts

This commit is contained in:
2024-11-22 18:20:38 +01:00
parent c6dd4702e1
commit f7b454646b
4 changed files with 36 additions and 18 deletions
+14 -10
View File
@@ -64,17 +64,22 @@
set -g set-clipboard on
set-window-option -g mode-keys vi
bind v copy-mode
bind -T copy-mode-vi i send -X cancel
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi V send -X select-line
bind -T copy-mode-vi y send -X copy-selection -x
bind-key v copy-mode
bind-key -T copy-mode-vi i send -X cancel
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi V send -X select-line
bind-key -T copy-mode-vi y send -X copy-selection -x
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection -x
bind-key -r f run-shell "tmux neww tmux-sessionizer"
bind-key -r C-h run-shell "tmux-sessionizer ~/projects/kyoo"
bind-key -r C-s run-shell "tmux-sessionizer ~/projects/flake"
bind-key -r C-n run-shell "tmux-sessionizer ~/projects/blog"
bind-key [ copy-mode \; send-keys -X previous-prompt
bind-key ] copy-mode \; send-keys -X next-prompt
bind-key -T copy-mode-vi [ send-keys -X previous-prompt
bind-key -T copy-mode-vi ] send-keys -X next-prompt
bind-key f run-shell "tmux neww tmux-sessionizer"
bind-key C-h run-shell "tmux-sessionizer ~/projects/kyoo"
bind-key C-s run-shell "tmux-sessionizer ~/projects/flake"
bind-key C-n run-shell "tmux-sessionizer ~/projects/blog"
run-shell ${pkgs.tmuxPlugins.sensible.rtp}
run-shell ${pkgs.tmuxPlugins.fzf-tmux-url.rtp}
@@ -83,7 +88,6 @@
set -gu default-command
set -g default-shell "$SHELL"
'';
# terminal = "\$TERM";
xdg.configFile."nixpkgs/config.nix".text = '' {
allowUnfree = true;
+4 -6
View File
@@ -10,8 +10,6 @@ keybind = clear
keybind = ctrl+shift+c=copy_to_clipboard
keybind = ctrl+shift+v=paste_from_clipboard
keybind = alt+r=reload_config
keybind = ctrl+plus=increase_font_size:1
keybind = ctrl+equal=increase_font_size:1
keybind = ctrl+minus=decrease_font_size:1
@@ -21,9 +19,6 @@ keybind = ctrl+backspace=reset_font_size
keybind = ctrl+shift+comma=reload_config
keybind = ctrl+shift+i=inspector:toggle
keybind = alt+o=jump_to_prompt:1
keybind = alt+i=jump_to_prompt:-1
window-padding-x = 0
window-padding-y = 0
window-padding-balance = true
@@ -41,6 +36,9 @@ resize-overlay = never
auto-update = off
shell-integration-features = true
# we manually configure it
shell-integration = none
# disabling cursor because it sets it to blink and i hate that
shell-integration-features = no-cursor,sudo,title
# vim: ft=conf
+16 -2
View File
@@ -1,4 +1,18 @@
{
{inputs, ...}: let
pkg = inputs.ghostty.packages.x86_64-linux.default;
in {
xdg.configFile."ghostty/config".source = ./ghostty.config;
}
programs.zsh.initExtra = ''
# load ghostty integration (responsible for OSC 133 aka sementic prompts)
if [[ $TERM != "dumb" ]]; then
autoload -Uz -- ${pkg}/share/ghostty/shell-integration/zsh/ghostty-integration
ghostty-integration
unfunction ghostty-integration
fi
'';
home.packages = [
pkg
];
}
+2
View File
@@ -15,6 +15,8 @@
tab_bar_edge = "top";
dynamic_background_opacity = true;
};
# Use ghostty one instead
shellIntegration.enableZshIntegration = false;
extraConfig = ''
clear_all_shortcuts yes