Add dunst and tmux with theme, re-enable nvim Navigator

This commit is contained in:
Evie Litherland-Smith 2023-04-06 18:11:37 +01:00
parent 0f68cea060
commit b0ae831e51
6 changed files with 85 additions and 0 deletions

View file

@ -0,0 +1,11 @@
return {
"numToStr/Navigator.nvim",
cmd = {
"NavigatorUp",
"NavigatorDown",
"NavigatorLeft",
"NavigatorRight",
"NavigatorPrevious",
},
config = function() require("Navigator").setup() end,
}

View file

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
./dunst.nix
./kitty.nix ./kitty.nix
./messaging.nix ./messaging.nix
./cloud.nix ./cloud.nix

View file

@ -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"
#);
};
}

View file

@ -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

View file

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
./tmux.nix
./neovim.nix ./neovim.nix
./lazygit.nix ./lazygit.nix
]; ];

View file

@ -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"
);
};
}