From 84529916c79b3a6d69c8f7742649a52f428b1ab2 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 9 Nov 2023 16:25:30 -0600 Subject: [PATCH] Back to tmux? --- modules/home-manager/hyprland.nix | 13 ++++++----- modules/home-manager/kitty.nix | 5 ++-- modules/home-manager/sway.nix | 2 ++ modules/home-manager/tmux.nix | 3 +++ modules/home-manager/wezterm.nix | 38 ++++++++++++++++++++++--------- modules/home-manager/zellij.nix | 8 +++++-- modules/nixos/common.nix | 1 + 7 files changed, 48 insertions(+), 22 deletions(-) diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 7b504fc..a8d1872 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -31,7 +31,9 @@ "hyprpaper" "mako" "eww daemon && eww open bar$EWW_BAR_MON" - "firefox & wezterm &" + "firefox" + "kitty --single-instance" + "wezterm" (lib.concatStringsSep " " [ "swayidle -w" "timeout 300 'notify-send \"Idling in 300 seconds\"'" @@ -126,7 +128,9 @@ bind = [ # See https://wiki.hyprland.org/Configuring/Keywords/ for more "$mainMod, return, exec, wezterm" - "$mainMod SHIFT, return, exec, kitty" + "$mainMod SHIFT, return, exec, wezterm" + # "$mainMod, return, exec, kitty --single-instance" + # "$mainMod SHIFT, return, exec, kitty" "$mainMod, U, exec, firefox" "$mainMod, space, exec, wofi --show drun" "$mainMod, C, killactive," @@ -247,11 +251,8 @@ # sensitivity = -0.5 # } - # Example windowrule v1 - # windowrule = float, ^(kitty|firefox)$ - # Example windowrule v2 - windowrulev2 = float,class:^.*(kitty|firefox|org.wezfurlong.wezterm).*$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more + windowrulev2 = float,class:^.*(kitty|firefox|org.wezfurlong.wezterm).*$ ''; }; } diff --git a/modules/home-manager/kitty.nix b/modules/home-manager/kitty.nix index 19e1953..a045936 100644 --- a/modules/home-manager/kitty.nix +++ b/modules/home-manager/kitty.nix @@ -155,9 +155,8 @@ # kill tab "ctrl+alt+shift+q" = "close_tab"; - # use zellij for panes - # "ctrl+shift+j" = "launch --location=hsplit --cwd=current"; - # "ctrl+shift+l" = "launch --location=vsplit --cwd=current"; + "ctrl+shift+j" = "launch --location=hsplit --cwd=current"; + "ctrl+shift+l" = "launch --location=vsplit --cwd=current"; "ctrl+alt+shift+k" = "move_window up"; "ctrl+alt+shift+h" = "move_window left"; diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix index f297503..963e910 100644 --- a/modules/home-manager/sway.nix +++ b/modules/home-manager/sway.nix @@ -157,6 +157,7 @@ } {command = "firefox";} {command = "wezterm";} + # {command = "kitty --single-instance";} ]; modes = { @@ -202,6 +203,7 @@ # bindsym $mod+shift+space exec wofi --show drun "${mod}+control+space" = "exec makoctl dismiss"; "${mod}+shift+space" = "exec makoctl invoke"; + # "${mod}+return" = "exec kitty --single-instance"; "${mod}+return" = "exec wezterm"; "${mod}+shift+return" = "exec floating-term"; "${mod}+shift+alt+return" = "exec kitty"; diff --git a/modules/home-manager/tmux.nix b/modules/home-manager/tmux.nix index 120fac1..adc0190 100644 --- a/modules/home-manager/tmux.nix +++ b/modules/home-manager/tmux.nix @@ -11,6 +11,9 @@ unbind C-b set -g prefix C-s + set -g default-terminal "tmux-256color" + set -g terminal-overrides ",xterm-256color:RGB" + set -g update-environment "WAYLAND_DISPLAY DISPLAY" bind R source-file "$HOME/.tmux.conf" \; display-message "Reloaded $HOME/.tmux.conf" diff --git a/modules/home-manager/wezterm.nix b/modules/home-manager/wezterm.nix index 0fd7d0c..379aab5 100644 --- a/modules/home-manager/wezterm.nix +++ b/modules/home-manager/wezterm.nix @@ -23,6 +23,7 @@ 'Noto Color Emoji', } + config.disable_default_key_bindings = true config.default_cursor_style = 'BlinkingBar' config.font = font @@ -32,6 +33,7 @@ config.use_fancy_tab_bar = false config.tab_bar_at_bottom = false config.window_background_opacity = 1.0 + config.enable_kitty_keyboard = true -- config.window_frame.font = config.font -- config.window_frame.font_size = font_size @@ -165,6 +167,11 @@ mods = 'CTRL|SHIFT', action = wezterm.action.PasteFrom'PrimarySelection' }, + { + key = 't', + mods = 'CTRL|SHIFT', + action = wezterm.action.SpawnTab'CurrentPaneDomain' + }, { key = 'h', mods = 'CTRL', @@ -180,17 +187,26 @@ mods = 'CTRL', action = wezterm.action.ActivatePaneDirection'Up' }, - -- use zellij for panes - -- { - -- key = 'j', - -- mods = 'CTRL|SHIFT', - -- action = wezterm.action.SplitVertical{domain='CurrentPaneDomain'} - -- }, - -- { - -- key = 'l', - -- mods = 'CTRL|SHIFT', - -- action = wezterm.action.SplitHorizontal{domain='CurrentPaneDomain'} - -- }, + { + key = 'j', + mods = 'CTRL', + action = wezterm.action.ActivatePaneDirection'Down' + }, + { + key = 'p', + mods = 'CTRL|SHIFT', + action = wezterm.action.SplitVertical{domain='CurrentPaneDomain'} + }, + { + key = 'j', + mods = 'CTRL|SHIFT', + action = wezterm.action.SplitVertical{domain='CurrentPaneDomain'} + }, + { + key = 'l', + mods = 'CTRL|SHIFT', + action = wezterm.action.SplitHorizontal{domain='CurrentPaneDomain'} + }, { key = 'l', mods = 'CTRL|SHIFT|ALT', diff --git a/modules/home-manager/zellij.nix b/modules/home-manager/zellij.nix index 6a1087a..15af12e 100644 --- a/modules/home-manager/zellij.nix +++ b/modules/home-manager/zellij.nix @@ -3,10 +3,12 @@ lib, ... }: { + # zellij does not support modern terminal keyboard input: + # https://github.com/zellij-org/zellij/issues/735 programs.zellij = { # uses home manager's toKDL generator enable = true; - enableFishIntegration = true; + # enableFishIntegration = true; settings = { pane_frames = false; simplified_ui = true; @@ -27,11 +29,12 @@ }; layer = binds: (listToAttrs (map binder binds)); in { - _props = {clear-defaults = true;}; + # _props = {clear-defaults = true;}; normal = {}; locked = layer [ [["Ctrl g"] {SwitchToMode = "Normal";}] [["Ctrl L"] {NewPane = "Right";}] + [["Ctrl Z"] {NewPane = "Right";}] [["Ctrl J"] {NewPane = "Down";}] [["Ctrl h"] {MoveFocus = "Left";}] [["Ctrl l"] {MoveFocus = "Right";}] @@ -468,6 +471,7 @@ ]; }; + default_layout = "compact"; theme = "match"; themes = { diff --git a/modules/nixos/common.nix b/modules/nixos/common.nix index b36f95b..88bed33 100644 --- a/modules/nixos/common.nix +++ b/modules/nixos/common.nix @@ -39,6 +39,7 @@ eza fd file + fzf gnumake gron hexyl