This commit is contained in:
Rachel Lambda Samuelsson 2024-08-21 13:39:57 +02:00
parent c9794d60cd
commit 54fa622c0b
5 changed files with 99 additions and 36 deletions

View File

@ -5,7 +5,6 @@
enable = true; enable = true;
vimAlias = true; vimAlias = true;
extraLuaConfig = '' extraLuaConfig = ''
require('tmux').setup({ copy_sync = { redirect_to_clipboard = true } });
require('Comment').setup() require('Comment').setup()
require('nvim-surround').setup() require('nvim-surround').setup()
require('numb').setup() require('numb').setup()
@ -174,7 +173,6 @@
comment-nvim comment-nvim
vimtex vimtex
gruvbox-nvim gruvbox-nvim
tmux-nvim
nvim-lspconfig nvim-lspconfig
idris2-vim idris2-vim
numb-nvim numb-nvim

View File

@ -16,7 +16,7 @@
hotkeys.commands."launch-alacritty" = { hotkeys.commands."launch-alacritty" = {
name = "Launch alacritty"; name = "Launch alacritty";
key = "Meta+Return"; key = "Meta+Return";
command = "alacritty"; command = "wezterm";
}; };
hotkeys.commands."cpypsk" = { hotkeys.commands."cpypsk" = {
@ -49,7 +49,7 @@
config = { config = {
General.launchers = [ General.launchers = [
"applications:thunderbird.desktop" "applications:thunderbird.desktop"
"applications:Alacritty.desktop" "applications:org.wezfurlong.wezterm.desktop"
"applications:firefox.desktop" "applications:firefox.desktop"
"applications:discord.desktop" "applications:discord.desktop"
]; ];
@ -77,10 +77,10 @@
window-rules = [ window-rules = [
{ {
description = "alacritty"; description = "wezterm";
match = { match = {
window-class = { window-class = {
value = "Alacritty"; value = "wezterm";
type = "substring"; type = "substring";
}; };
window-types = [ "normal" ]; window-types = [ "normal" ];

View File

@ -1,28 +1,7 @@
{ extra, ... }: { ... }:
{ {
programs.alacritty = { programs.wezterm = {
enable = true; enable = true;
settings = { extraConfig = builtins.readFile ./wezterm.lua;
window = {
padding.x = 5;
padding.y = 5;
decorations = "None";
dynamic_title = false;
};
mouse.hide_when_typing = true;
scrolling.history = 0;
font = {
normal.family = "SAX2 Nerd Font";
size = 11;
};
colors = {
draw_bold_text_with_bright_colors = false;
primary = {
background = "#1d1f21";
foreground = "#c5c8c6";
};
};
shell.program = extra.shell-menu;
};
}; };
} }

View File

@ -51,12 +51,6 @@
set-window-option -g window-status-separator "-" set-window-option -g window-status-separator "-"
set-window-option -g window-status-current-format " #[fg=#b55690 bold]!![ #{b:pane_current_path}/ ] #{b:window_index} $ #{b:pane_current_command}!! " set-window-option -g window-status-current-format " #[fg=#b55690 bold]!![ #{b:pane_current_path}/ ] #{b:window_index} $ #{b:pane_current_command}!! "
set-window-option -g window-status-format " #{b:window_index} [ #{b:pane_current_path}/ ] #{b:pane_current_command} " set-window-option -g window-status-format " #{b:window_index} [ #{b:pane_current_path}/ ] #{b:pane_current_command} "
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'
''; '';
plugins = with pkgs.tmuxPlugins; [
resurrect
];
}; };
} }

92
home-manager/wezterm.lua Normal file
View File

@ -0,0 +1,92 @@
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
act = wezterm.action
config.color_scheme = 'Gruvbox dark, hard (base16)'
config.use_fancy_tab_bar = false
config.hide_tab_bar_if_only_one_tab = true
config.window_padding = {
left = 4,
right = 4,
top = 4,
bottom = 4,
}
config.inactive_pane_hsb = {
saturation = 0.9,
brightness = 0.8,
}
config.window_background_opacity = 0.95
config.colors = { tab_bar = { background = 'rgba(29, 32, 33, 95%)' } }
font = wezterm.font_with_fallback {
'SAX2 Nerd Font',
'Fira Code',
'Noto Mono',
}
config.font = font
config.font_rules = {
{
italic = true,
font = font,
}
}
config.adjust_window_size_when_changing_font_size = false
config.leader = { key = 'a', mods = 'CTRL', timeout_milliseconds = 700 }
config.keys = {
{
key = 'a',
mods = 'LEADER|CTRL',
action = act.SendKey { key = 'a', mods = 'CTRL' },
},
{
key = 'c',
mods = 'LEADER',
action = act.SpawnTab "CurrentPaneDomain",
},
{
key = 'n',
mods = 'LEADER',
action = act.ActivateTabRelative(1),
},
{
key = 'p',
mods = 'LEADER',
action = act.ActivateTabRelative(-1),
},
}
for i = 1, 8 do
table.insert(config.keys, {
key = tostring(i),
mods = 'ALT',
action = act.ActivateTab(i - 1),
})
end
for key, dir in pairs({ h = 'Left', j = 'Down', k = 'Up', l = 'Right' }) do
table.insert(config.keys, {
key = key,
mods = 'ALT',
action = act.AdjustPaneSize { dir, 1 },
})
table.insert(config.keys, {
key = key,
mods = 'CTRL',
})
table.insert(config.keys, {
key = key,
mods = 'LEADER',
})
end
return config