diff --git a/modules/cli/home.nix b/modules/cli/home.nix index f279c8e..a7aa409 100644 --- a/modules/cli/home.nix +++ b/modules/cli/home.nix @@ -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; diff --git a/modules/gui/ghostty.config b/modules/gui/ghostty.config index 3580450..8e2de04 100644 --- a/modules/gui/ghostty.config +++ b/modules/gui/ghostty.config @@ -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 diff --git a/modules/gui/ghostty.nix b/modules/gui/ghostty.nix index f3d9d76..1eb8719 100644 --- a/modules/gui/ghostty.nix +++ b/modules/gui/ghostty.nix @@ -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 + ]; +} diff --git a/modules/gui/kitty.nix b/modules/gui/kitty.nix index 252e80a..0e61fd4 100644 --- a/modules/gui/kitty.nix +++ b/modules/gui/kitty.nix @@ -15,6 +15,8 @@ tab_bar_edge = "top"; dynamic_background_opacity = true; }; + # Use ghostty one instead + shellIntegration.enableZshIntegration = false; extraConfig = '' clear_all_shortcuts yes