[feat] Add wezterm.nix
This commit is contained in:
8
config/nix/fzf.nix
Normal file
8
config/nix/fzf.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.fzf;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
enableShellIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
|
./wezterm.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
@@ -56,77 +57,19 @@
|
|||||||
nushell = {
|
nushell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nushellFull;
|
package = pkgs.nushellFull;
|
||||||
|
shellAliases = {
|
||||||
|
"cd" = "z";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
keychain = {
|
keychain = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
keys = ["id_ed25519" "hetzner_rsa"];
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
enableNushellIntegration = true;
|
enableNushellIntegration = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
wezterm = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = ''
|
|
||||||
local wezterm = require 'wezterm';
|
|
||||||
return {
|
|
||||||
-- -- font = wezterm.font("Hasklug Nerd Font Mono", { weight = "Regular", stretch = "Normal", style = "Normal" }),
|
|
||||||
-- font = wezterm.font_with_fallback({
|
|
||||||
-- "Hasklig",
|
|
||||||
-- "Symbols Nerd Font Mono"
|
|
||||||
-- }),
|
|
||||||
|
|
||||||
font_size = 16,
|
|
||||||
colors = {
|
|
||||||
-- The default text color
|
|
||||||
foreground = "#f8f8f2",
|
|
||||||
-- The default background color
|
|
||||||
-- background = "#282a36",
|
|
||||||
-- Overrides the cell background color when the current cell is occupied by the
|
|
||||||
-- cursor and the cursor style is set to Block
|
|
||||||
cursor_bg = "#f8f8f2",
|
|
||||||
-- Overrides the text color when the current cell is occupied by the cursor
|
|
||||||
cursor_fg = "#000",
|
|
||||||
-- Specifies the border color of the cursor when the cursor style is set to Block,
|
|
||||||
-- or the color of the vertical or horizontal bar when the cursor style is set to
|
|
||||||
-- Bar or Underline.
|
|
||||||
cursor_border = "#52ad70",
|
|
||||||
-- the foreground color of selected text
|
|
||||||
selection_fg = "#ffffff",
|
|
||||||
-- the background color of selected text
|
|
||||||
selection_bg = "#ffffff",
|
|
||||||
-- The color of the scrollbar "thumb"; the portion that represents the current viewport
|
|
||||||
scrollbar_thumb = "#222222",
|
|
||||||
-- The color of the split lines between panes
|
|
||||||
split = "#444444",
|
|
||||||
ansi = { "#21222c", "#ff5555", "#50fa7b", "#f1fa8c", "#bd93f9", "#ff79c6", "#8be9fd", "#f8f8f2" },
|
|
||||||
brights = { "#6272a4", "#ff6e6e", "#69ff94", "#ffffa5", "#d6acff", "#ff92df", "#a4ffff", "#ffffff" },
|
|
||||||
-- Arbitrary colors of the palette in the range from 16 to 255
|
|
||||||
indexed = { [136] = "#af8700" },
|
|
||||||
-- Since: nightly builds only
|
|
||||||
-- When the IME, a dead key or a leader key are being processed and are effectively
|
|
||||||
-- holding input pending the result of input composition, change the cursor
|
|
||||||
-- to this color to give a visual cue about the compose state.
|
|
||||||
compose_cursor = "orange",
|
|
||||||
},
|
|
||||||
initial_cols = 120,
|
|
||||||
hide_tab_bar_if_only_one_tab = true,
|
|
||||||
window_background_opacity = 0.8,
|
|
||||||
cursor_blink_rate = 8,
|
|
||||||
default_cursor_style = "BlinkingBlock",
|
|
||||||
default_prog = { "${pkgs.fish.outPath}/bin/fish", "-l" },
|
|
||||||
window_padding = {
|
|
||||||
left = 2,
|
|
||||||
right = 0,
|
|
||||||
top = 2,
|
|
||||||
bottom = 0,
|
|
||||||
},
|
|
||||||
window_decorations = "RESIZE",
|
|
||||||
use_ime = false,
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
|
|||||||
@@ -3,30 +3,58 @@ let
|
|||||||
tmux-super-fingers = pkgs.tmuxPlugins.mkTmuxPlugin
|
tmux-super-fingers = pkgs.tmuxPlugins.mkTmuxPlugin
|
||||||
{
|
{
|
||||||
pluginName = "tmux-super-fingers";
|
pluginName = "tmux-super-fingers";
|
||||||
version = "unstable-2023-01-06";
|
version = "v1-2024-02-14";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "artemave";
|
owner = "artemave";
|
||||||
repo = "tmux_super_fingers";
|
repo = "tmux_super_fingers";
|
||||||
rev = "2c12044984124e74e21a5a87d00f844083e4bdf7";
|
rev = "518044ef78efa1cf3c64f2e693fef569ae570ddd";
|
||||||
sha256 = "sha256-cPZCV8xk9QpU49/7H8iGhQYK6JwWjviL29eWabuqruc=";
|
sha256 = "sha256-iKfx9Ytk2vSuINvQTB6Kww8Vv7i51cFEnEBHLje+IJw=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shell = "${pkgs.fish}/bin/fish";
|
shell = "${pkgs.nushellFull}/bin/nu";
|
||||||
terminal = "tmux-256color";
|
terminal = "tmux-256color";
|
||||||
|
prefix = "C-q";
|
||||||
historyLimit = 100000;
|
historyLimit = 100000;
|
||||||
plugins = with pkgs;
|
plugins = with pkgs;
|
||||||
[
|
[
|
||||||
|
tmuxPlugins.better-mouse-mode
|
||||||
{
|
{
|
||||||
plugin = tmux-super-fingers;
|
plugin = tmux-super-fingers;
|
||||||
extraConfig = "set -g @super-fingers-key f";
|
extraConfig = "set -g @super-fingers-key o";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = tmuxPlugins.catppuccin;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @catppuccin_flavour 'mocha'
|
||||||
|
set -g @catppuccin_window_tabs_enabled on
|
||||||
|
set -g @catppuccin_status_modules_right ""
|
||||||
|
set -g @catppuccin_status_modules_right "battery application session date_time"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = tmuxPlugins.battery;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @catppuccin_status_modules_right "application session user host date_time"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
tmuxPlugins.better-mouse-mode
|
|
||||||
];
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
set -gw mode-keys vi
|
||||||
|
set -g status-keys vi
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
bind h set status
|
||||||
|
set -g allow-passthrough on
|
||||||
|
set -ga update-environment TERM
|
||||||
|
set -ga update-environment TERM_PROGRAM
|
||||||
|
if-shell 'uname | grep -q "Darwin"' { set -s copy-command "pbcopy" }
|
||||||
|
if-shell 'uname | grep -q "Linux"' { set -s copy-command "wl-copy" }
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
63
config/nix/wezterm.nix
Normal file
63
config/nix/wezterm.nix
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
programs.wezterm = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
local wezterm = require 'wezterm';
|
||||||
|
return {
|
||||||
|
-- -- font = wezterm.font("Hasklug Nerd Font Mono", { weight = "Regular", stretch = "Normal", style = "Normal" }),
|
||||||
|
-- font = wezterm.font_with_fallback({
|
||||||
|
-- "Hasklig",
|
||||||
|
-- "Symbols Nerd Font Mono"
|
||||||
|
-- }),
|
||||||
|
|
||||||
|
font_size = 16,
|
||||||
|
colors = {
|
||||||
|
-- The default text color
|
||||||
|
foreground = "#f8f8f2",
|
||||||
|
-- The default background color
|
||||||
|
-- background = "#282a36",
|
||||||
|
-- Overrides the cell background color when the current cell is occupied by the
|
||||||
|
-- cursor and the cursor style is set to Block
|
||||||
|
cursor_bg = "#f8f8f2",
|
||||||
|
-- Overrides the text color when the current cell is occupied by the cursor
|
||||||
|
cursor_fg = "#000",
|
||||||
|
-- Specifies the border color of the cursor when the cursor style is set to Block,
|
||||||
|
-- or the color of the vertical or horizontal bar when the cursor style is set to
|
||||||
|
-- Bar or Underline.
|
||||||
|
cursor_border = "#52ad70",
|
||||||
|
-- the foreground color of selected text
|
||||||
|
selection_fg = "#ffffff",
|
||||||
|
-- the background color of selected text
|
||||||
|
selection_bg = "#ffffff",
|
||||||
|
-- The color of the scrollbar "thumb"; the portion that represents the current viewport
|
||||||
|
scrollbar_thumb = "#222222",
|
||||||
|
-- The color of the split lines between panes
|
||||||
|
split = "#444444",
|
||||||
|
ansi = { "#21222c", "#ff5555", "#50fa7b", "#f1fa8c", "#bd93f9", "#ff79c6", "#8be9fd", "#f8f8f2" },
|
||||||
|
brights = { "#6272a4", "#ff6e6e", "#69ff94", "#ffffa5", "#d6acff", "#ff92df", "#a4ffff", "#ffffff" },
|
||||||
|
-- Arbitrary colors of the palette in the range from 16 to 255
|
||||||
|
indexed = { [136] = "#af8700" },
|
||||||
|
-- Since: nightly builds only
|
||||||
|
-- When the IME, a dead key or a leader key are being processed and are effectively
|
||||||
|
-- holding input pending the result of input composition, change the cursor
|
||||||
|
-- to this color to give a visual cue about the compose state.
|
||||||
|
compose_cursor = "orange",
|
||||||
|
},
|
||||||
|
initial_cols = 120,
|
||||||
|
hide_tab_bar_if_only_one_tab = true,
|
||||||
|
window_background_opacity = 0.8,
|
||||||
|
cursor_blink_rate = 8,
|
||||||
|
default_cursor_style = "BlinkingBlock",
|
||||||
|
default_prog = { "${pkgs.fish.outPath}/bin/fish", "-l" },
|
||||||
|
window_padding = {
|
||||||
|
left = 2,
|
||||||
|
right = 0,
|
||||||
|
top = 2,
|
||||||
|
bottom = 0,
|
||||||
|
},
|
||||||
|
window_decorations = "RESIZE",
|
||||||
|
use_ime = false,
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user