feat(wezterm): use nix to clone plugins

This commit is contained in:
winston 2023-11-08 11:54:01 +01:00
parent 06c22928a8
commit 4fa23f5a32
Signed by: winston
GPG key ID: 3786770EDBC2B481
4 changed files with 30 additions and 14 deletions

View file

@ -1,15 +1,31 @@
{ {
config, config,
flakePath, flakePath,
pkgs,
... ...
}: { }: let
mkSymlink = path: config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/wezterm/${path}";
in {
programs.wezterm.enable = true; programs.wezterm.enable = true;
# disable the default config created by Home-Manager
xdg.configFile."wezterm/wezterm.lua".enable = false; xdg.configFile = {
# and use my own config instead "wezterm/wezterm.lua".source = mkSymlink "wezterm.lua";
xdg.configFile."wezterm" = { "wezterm/config" = {
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/wezterm"; source = mkSymlink "config";
recursive = true; recursive = true;
};
"wezterm/bar".source = pkgs.fetchFromGitHub {
owner = "nekowinston";
repo = "wezterm-bar";
sha256 = "sha256-3acxqJ9HMA5hASWq/sVL9QQjfEw5Xrh2fT9nFuGjzHM=";
rev = "e96b81460b3ad11a7461934dcb7889ce5079f97f";
};
"wezterm/catppuccin".source = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "wezterm";
sha256 = "sha256-McSWoZaJeK+oqdK/0vjiRxZGuLBpEB10Zg4+7p5dIGY=";
rev = "b1a81bae74d66eaae16457f2d8f151b5bd4fe5da";
};
}; };
programs.zsh.initExtra = '' programs.zsh.initExtra = ''

View file

@ -1,11 +1,12 @@
local wezterm = require("wezterm") local wezterm = require("wezterm")
local c = wezterm.config_builder() local c = wezterm.config_builder()
require("keys").apply(c) require("config.keys").apply(c)
c.font = wezterm.font_with_fallback({ c.font = wezterm.font_with_fallback({
"Cascadia Code", "Cascadia Code",
"Symbols Nerd Font", "Symbols Nerd Font",
}) })
c.front_end = "WebGpu"
c.font_size = 13 c.font_size = 13
c.harfbuzz_features = { "calt=1", "ss01=1" } c.harfbuzz_features = { "calt=1", "ss01=1" }
c.command_palette_font_size = c.font_size * 1.1 c.command_palette_font_size = c.font_size * 1.1
@ -13,6 +14,7 @@ c.window_frame = {
font = wezterm.font("IBM Plex Sans"), font = wezterm.font("IBM Plex Sans"),
font_size = c.font_size, font_size = c.font_size,
} }
c.window_decorations = "RESIZE" c.window_decorations = "RESIZE"
c.window_padding = { left = 0, right = 0, top = 20, bottom = 0 } c.window_padding = { left = 0, right = 0, top = 20, bottom = 0 }
c.adjust_window_size_when_changing_font_size = false c.adjust_window_size_when_changing_font_size = false
@ -20,11 +22,9 @@ c.audible_bell = "Disabled"
c.default_cursor_style = "BlinkingBar" c.default_cursor_style = "BlinkingBar"
c.inactive_pane_hsb = { brightness = 0.90 } c.inactive_pane_hsb = { brightness = 0.90 }
wezterm.plugin require("bar.plugin").apply_to_config(c)
.require("https://github.com/catppuccin/wezterm") require("catppuccin.plugin").apply_to_config(c, {
.apply_to_config(c, { sync = true }) sync = true,
wezterm.plugin })
.require("https://github.com/nekowinston/wezterm-bar")
.apply_to_config(c)
return c return c