Compare commits
5
Commits
58ec82092c
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86bac5930e | ||
|
|
c10382bd7f | ||
|
|
6234cf3435 | ||
|
|
8f6e02f096 | ||
|
|
38f9220937 |
No files matched your search
@@ -340,6 +340,15 @@ window-rule {
|
|||||||
clip-to-geometry true
|
clip-to-geometry true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Work around WezTerm's initial configure bug
|
||||||
|
// by setting an empty default-column-width.
|
||||||
|
window-rule {
|
||||||
|
// This regular expression is intentionally made as specific as possible,
|
||||||
|
// since this is the default config, and we want no false positives.
|
||||||
|
// You can get away with just app-id="wezterm" if you want.
|
||||||
|
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||||
|
default-column-width {}
|
||||||
|
}
|
||||||
|
|
||||||
// Open the Firefox picture-in-picture player as floating by default.
|
// Open the Firefox picture-in-picture player as floating by default.
|
||||||
window-rule {
|
window-rule {
|
||||||
@@ -398,7 +407,7 @@ binds {
|
|||||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||||
|
|
||||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||||
Mod+T hotkey-overlay-title="Open a Terminal: wezterm" { spawn "wezterm"; }
|
Mod+T hotkey-overlay-title="Open a Terminal: kitty" { spawn "kitty"; }
|
||||||
Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
|
Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
|
||||||
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
||||||
Super+Alt+Ctrl+L hotkey-overlay-title="Lock N turn off screen" { spawn "lockNTurnOffScreen"; }
|
Super+Alt+Ctrl+L hotkey-overlay-title="Lock N turn off screen" { spawn "lockNTurnOffScreen"; }
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
filter = "classic"; # Options: classic, octagon, pro, machine
|
filter = "classic"; # Options: classic, octagon, pro, machine
|
||||||
transparent_background = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#colorschemes.nightfox = {
|
#colorschemes.nightfox = {
|
||||||
@@ -33,13 +32,8 @@
|
|||||||
relativenumber = true;
|
relativenumber = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
autoGroups = {
|
|
||||||
WezTermUserVar = {
|
|
||||||
clear = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
autoCmd = [
|
|
||||||
# --- Sets tab spacing for file types ---
|
# --- Sets tab spacing for file types ---
|
||||||
|
autoCmd = [
|
||||||
{
|
{
|
||||||
event = [ "FileType" ];
|
event = [ "FileType" ];
|
||||||
pattern = [ "html" "css" "javascript" "typescript" "nix" "lua" ];
|
pattern = [ "html" "css" "javascript" "typescript" "nix" "lua" ];
|
||||||
@@ -54,33 +48,28 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
event = [ "UIEnter" "VimResume" ];
|
event = [ "FileType" ];
|
||||||
group = "WezTermUserVar";
|
pattern = [ "cpp" "c" ];
|
||||||
callback = {
|
callback = {
|
||||||
__raw = ''
|
__raw = ''
|
||||||
function()
|
function()
|
||||||
local b64 = vim.base64.encode('true')
|
vim.opt_local.expandtab = false
|
||||||
local seq = string.format('\x1b]1337;SetUserVar=%s=%s\x07', 'IS_NVIM', b64)
|
vim.opt_local.shiftwidth = 4
|
||||||
if vim.env.TMUX then
|
vim.opt_local.tabstop = 4
|
||||||
seq = string.format('\x1bPtmux;\x1b%s\x1b\\', seq)
|
|
||||||
end
|
|
||||||
pcall(vim.fn.chansend, vim.v.stderr, seq)
|
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
event = [ "VimLeavePre" "VimSuspend" ];
|
event = [ "FileType" ];
|
||||||
group = "WezTermUserVar";
|
pattern = [ "rust" ];
|
||||||
callback = {
|
callback = {
|
||||||
__raw = ''
|
__raw = ''
|
||||||
function()
|
function()
|
||||||
local b64 = vim.base64.encode('false')
|
vim.opt_local.expandtab = true
|
||||||
local seq = string.format('\x1b]1337;SetUserVar=%s=%s\x07', 'IS_NVIM', b64)
|
vim.opt_local.shiftwidth = 4
|
||||||
if vim.env.TMUX then
|
vim.opt_local.softtabstop = 4
|
||||||
seq = string.format('\x1bPtmux;\x1b%s\x1b\\', seq)
|
vim.opt_local.tabstop = 4
|
||||||
end
|
|
||||||
pcall(vim.fn.chansend, vim.v.stderr, seq)
|
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,9 +7,6 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
|
||||||
./wezterm/wezterm.nix
|
|
||||||
];
|
|
||||||
home.packages = (
|
home.packages = (
|
||||||
(with pkgs; [
|
(with pkgs; [
|
||||||
# --- Core Wayland plumbing (Stable 26.05) ---
|
# --- Core Wayland plumbing (Stable 26.05) ---
|
||||||
@@ -53,6 +50,15 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
"font_size" = 15;
|
||||||
|
"background_opacity" = 0.6;
|
||||||
|
"background_blur" = 1;
|
||||||
|
"include" = "colors.conf";
|
||||||
|
};
|
||||||
|
};
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,67 +0,0 @@
|
|||||||
local wezterm = require 'wezterm'
|
|
||||||
local config = wezterm.config_builder()
|
|
||||||
|
|
||||||
-- Launch fish directly instead of your system login shell
|
|
||||||
config.default_prog = { 'fish', '-l' }
|
|
||||||
|
|
||||||
-- Appearance & Tab Bar
|
|
||||||
config.window_background_opacity = 0.60
|
|
||||||
config.wayland_window_background_blur = true
|
|
||||||
config.hide_tab_bar_if_only_one_tab = true
|
|
||||||
|
|
||||||
config.window_padding = {
|
|
||||||
left = 0,
|
|
||||||
right = 0,
|
|
||||||
top = 0,
|
|
||||||
bottom = 0,
|
|
||||||
}
|
|
||||||
|
|
||||||
config.font_size = 14.0
|
|
||||||
config.colors = {
|
|
||||||
foreground = '#dddddd',
|
|
||||||
}
|
|
||||||
|
|
||||||
local bg_image_path = wezterm.config_dir .. '/texture.png'
|
|
||||||
|
|
||||||
local function sync_nvim_appearance(window, pane)
|
|
||||||
if not pane then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local user_vars = pane:get_user_vars()
|
|
||||||
local is_nvim = user_vars.IS_NVIM == 'true'
|
|
||||||
local overrides = window:get_config_overrides() or {}
|
|
||||||
|
|
||||||
-- Avoid redundant config reloads if state hasn't changed
|
|
||||||
local currently_active = overrides.window_background_image ~= nil
|
|
||||||
if is_nvim == currently_active then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if is_nvim then
|
|
||||||
overrides.colors = {
|
|
||||||
foreground = '#ffffff',
|
|
||||||
}
|
|
||||||
overrides.window_background_opacity = 1.0
|
|
||||||
overrides.window_background_image = bg_image_path
|
|
||||||
else
|
|
||||||
overrides.colors = nil
|
|
||||||
overrides.window_background_opacity = nil
|
|
||||||
overrides.window_background_image = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
window:set_config_overrides(overrides)
|
|
||||||
end
|
|
||||||
|
|
||||||
wezterm.on('user-var-changed', function(window, pane, name, _value)
|
|
||||||
if name == 'IS_NVIM' then
|
|
||||||
sync_nvim_appearance(window, pane)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Also sync when switching tabs or closing panes
|
|
||||||
wezterm.on('update-status', function(window, pane)
|
|
||||||
sync_nvim_appearance(window, pane)
|
|
||||||
end)
|
|
||||||
|
|
||||||
return config
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:{
|
|
||||||
xdg.configFile."wezterm/wezterm.lua".source = ./wezterm.lua;
|
|
||||||
programs.wezterm = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.unstablePkgs.wezterm;
|
|
||||||
};
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
lua
|
|
||||||
];
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user