diff --git a/config/nvim/lua/plugins/navigator.lua b/config/nvim/lua/plugins/navigator.lua new file mode 100644 index 00000000..3dc499f5 --- /dev/null +++ b/config/nvim/lua/plugins/navigator.lua @@ -0,0 +1,11 @@ +return { + "numToStr/Navigator.nvim", + cmd = { + "NavigatorUp", + "NavigatorDown", + "NavigatorLeft", + "NavigatorRight", + "NavigatorPrevious", + }, + config = function() require("Navigator").setup() end, +} diff --git a/nixos/home-manager/packages/gui/default.nix b/nixos/home-manager/packages/gui/default.nix index 6970cb1f..13bd2fc1 100644 --- a/nixos/home-manager/packages/gui/default.nix +++ b/nixos/home-manager/packages/gui/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./dunst.nix ./kitty.nix ./messaging.nix ./cloud.nix diff --git a/nixos/home-manager/packages/gui/dunst.nix b/nixos/home-manager/packages/gui/dunst.nix new file mode 100644 index 00000000..a12b4f81 --- /dev/null +++ b/nixos/home-manager/packages/gui/dunst.nix @@ -0,0 +1,36 @@ +{ ... }: +{ + services.dunst = { + enable = true; + settings = { + global = { + frame_color = "#8AADF4"; + separator_color = "frame"; + }; + + urgency_low = { + background = "#24273A"; + foreground = "#CAD3F5"; + }; + + urgency_normal = { + background = "#24273A"; + foreground = "#CAD3F5"; + }; + + urgency_critical = { + background = "#24273A"; + foreground = "#CAD3F5"; + frame_color = "#F5A97F"; + }; + }; + #settings = builtins.readFile( + # pkgs.fetchFromGitHub { + # owner = "catppuccin"; + # repo = "dunst"; + # rev = "b0b838d38f134136322ad3df2b6dc57c4ca118cf"; + # sha256 = "ruFcHh1dkd4Zy9qNlAA8qAksTzNjXPd2hSSmhdGgflU="; + # } + "/src/macchiato.conf" + #); + }; +} diff --git a/nixos/home-manager/packages/tui/config/tmux.conf b/nixos/home-manager/packages/tui/config/tmux.conf new file mode 100644 index 00000000..caf59140 --- /dev/null +++ b/nixos/home-manager/packages/tui/config/tmux.conf @@ -0,0 +1,21 @@ +version_pat='s/^tmux[^0-9]*([.0-9]+).*/\1/p' + +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" +tmux bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" +tmux bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" +tmux bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" +tmux bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" +tmux_version="$(tmux -V | sed -En "$version_pat")" +tmux setenv -g tmux_version "$tmux_version" + +tmux if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" +tmux if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" + +tmux bind-key -T copy-mode-vi C-h select-pane -L +tmux bind-key -T copy-mode-vi C-j select-pane -D +tmux bind-key -T copy-mode-vi C-k select-pane -U +tmux bind-key -T copy-mode-vi C-l select-pane -R +tmux bind-key -T copy-mode-vi C-\\ select-pane -l diff --git a/nixos/home-manager/packages/tui/default.nix b/nixos/home-manager/packages/tui/default.nix index 77da15a6..eb0f9b1f 100644 --- a/nixos/home-manager/packages/tui/default.nix +++ b/nixos/home-manager/packages/tui/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./tmux.nix ./neovim.nix ./lazygit.nix ]; diff --git a/nixos/home-manager/packages/tui/tmux.nix b/nixos/home-manager/packages/tui/tmux.nix new file mode 100644 index 00000000..d63d63ce --- /dev/null +++ b/nixos/home-manager/packages/tui/tmux.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: +{ + programs.tmux = { + enable = true; + clock24 = true; + extraConfig = builtins.readFile (./config/tmux.conf) + "\n" + builtins.readFile ( + pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "tmux"; + rev = "4e48b09a76829edc7b55fbb15467cf0411f07931"; + sha256 = "bXEsxt4ozl3cAzV3ZyvbPsnmy0RAdpLxHwN82gvjLdU="; + } + "/catppuccin-macchiato.tmuxtheme" + ); + }; +}