Compare commits
No commits in common. "d8a2687701fb6e140c07f99871a27eec9c316195" and "5a42e615989da2a0f54a2958ce0b996a3820a50c" have entirely different histories.
d8a2687701
...
5a42e61598
8 changed files with 202 additions and 155 deletions
|
@ -83,8 +83,6 @@
|
||||||
extraPackages = [
|
extraPackages = [
|
||||||
deprekages.xontrib-whole-word-jumping
|
deprekages.xontrib-whole-word-jumping
|
||||||
deprekages.xontrib-term-integrations
|
deprekages.xontrib-term-integrations
|
||||||
deprekages.xontrib-prompt-bar
|
|
||||||
deprekages.xontrib-termcolors
|
|
||||||
deprekages.xontrib-sh
|
deprekages.xontrib-sh
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -121,7 +121,6 @@ with pkgs;
|
||||||
deprekages.vja
|
deprekages.vja
|
||||||
wget
|
wget
|
||||||
wireshark-cli
|
wireshark-cli
|
||||||
zellij
|
|
||||||
zstd
|
zstd
|
||||||
zip
|
zip
|
||||||
|
|
||||||
|
|
|
@ -120,16 +120,12 @@ flake-utils.lib.eachDefaultSystem (
|
||||||
# xonsh and xontribs
|
# xonsh and xontribs
|
||||||
xontrib-whole-word-jumping = callPackage ./xontrib-whole-word-jumping.nix {};
|
xontrib-whole-word-jumping = callPackage ./xontrib-whole-word-jumping.nix {};
|
||||||
xontrib-term-integrations = callPackage ./xontrib-term-integrations.nix {};
|
xontrib-term-integrations = callPackage ./xontrib-term-integrations.nix {};
|
||||||
xontrib-prompt-bar = callPackage ./xontrib-prompt-bar.nix {};
|
|
||||||
xontrib-termcolors = callPackage ./xontrib-termcolors.nix {};
|
|
||||||
xontrib-sh = callPackage ./xontrib-sh.nix {};
|
xontrib-sh = callPackage ./xontrib-sh.nix {};
|
||||||
|
|
||||||
xonsh-with-xontribs = pkgs.xonsh.override {
|
xonsh-with-xontribs = pkgs.xonsh.override {
|
||||||
extraPackages = pythonPackages: [
|
extraPackages = pythonPackages: [
|
||||||
xontrib-whole-word-jumping
|
xontrib-whole-word-jumping
|
||||||
xontrib-term-integrations
|
xontrib-term-integrations
|
||||||
xontrib-prompt-bar
|
|
||||||
xontrib-termcolors
|
|
||||||
xontrib-sh
|
xontrib-sh
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
callPackage,
|
|
||||||
fetchPypi,
|
|
||||||
python3Packages,
|
|
||||||
xonsh
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
|
|
||||||
# Create a version of xonsh as a python package,
|
|
||||||
# matching the version installed on the syste,
|
|
||||||
xonsh-python = callPackage ./xonsh-python-package.nix { inherit xonsh; };
|
|
||||||
|
|
||||||
in python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "xontrib_prompt_bar";
|
|
||||||
version = "0.5.8";
|
|
||||||
format = "pyproject";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
hash = "sha256-955TqiUm+s/0S2TkaSgyUDe3I5596/A2mHb+SpG0VeA=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = with python3Packages; [
|
|
||||||
setuptools
|
|
||||||
wheel
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = with python3Packages; [
|
|
||||||
xonsh-python
|
|
||||||
pdm-pep517
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
callPackage,
|
|
||||||
fetchPypi,
|
|
||||||
python3Packages,
|
|
||||||
xonsh
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
|
|
||||||
# Create a version of xonsh as a python package,
|
|
||||||
# matching the version installed on the syste,
|
|
||||||
xonsh-python = callPackage ./xonsh-python-package.nix { inherit xonsh; };
|
|
||||||
|
|
||||||
in python3Packages.buildPythonPackage rec {
|
|
||||||
pname = "xontrib-termcolors";
|
|
||||||
version = "0.2.0";
|
|
||||||
format = "pyproject";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
hash = "sha256-ZaVurvHbHFr0fvIc/MeBVqiYFtcbXcRl41GzgI26cIw=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = with python3Packages; [
|
|
||||||
setuptools
|
|
||||||
wheel
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = with python3Packages; [
|
|
||||||
xonsh-python
|
|
||||||
pdm-pep517
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -9,108 +9,228 @@ local hostname = wezterm.hostname()
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
-- Set up our font.
|
-- Set up our font.
|
||||||
font = wezterm.font_with_fallback({
|
font = wezterm.font_with_fallback({
|
||||||
"MonoLisa",
|
"MonoLisa",
|
||||||
"Codicons",
|
"Codicons",
|
||||||
}),
|
}),
|
||||||
font_size = 14,
|
font_size = 14,
|
||||||
|
|
||||||
-- Color scheme stuff.
|
-- Color scheme stuff.
|
||||||
color_scheme = "Solarized Dark - Patched",
|
color_scheme = "Solarized Dark - Patched",
|
||||||
|
|
||||||
-- Generel config.
|
-- Generel config.
|
||||||
term = "wezterm",
|
term = "wezterm",
|
||||||
|
|
||||||
-- Get rid of the annoying update popups we can't do anything about.
|
-- Get rid of the annoying update popups we can't do anything about.
|
||||||
check_for_updates = false,
|
check_for_updates = false,
|
||||||
|
|
||||||
-- Automatically reload our config on changes.
|
-- Automatically reload our config on changes.
|
||||||
automatically_reload_config = true,
|
automatically_reload_config = true,
|
||||||
|
|
||||||
-- Improve tab viewing by disabling native wonk,
|
-- Improve tab viewing by disabling native wonk,
|
||||||
-- and make it behave more like Tmux.
|
-- and make it behave more like Tmux.
|
||||||
hide_tab_bar_if_only_one_tab = true,
|
use_fancy_tab_bar = false,
|
||||||
use_fancy_tab_bar = false,
|
tab_bar_at_bottom = true,
|
||||||
tab_bar_at_bottom = true,
|
tab_max_width = 32,
|
||||||
tab_max_width = 32,
|
|
||||||
|
|
||||||
-- Disable window styling, where possible.
|
-- Disable window styling, where possible.
|
||||||
window_decorations = "NONE",
|
window_decorations = "NONE",
|
||||||
|
|
||||||
-- Use WebGpu, when we can.
|
-- Use WebGpu, when we can.
|
||||||
front_end = "WebGpu",
|
front_end = "WebGpu",
|
||||||
|
|
||||||
-- Tab bar styling.
|
-- Tab bar styling.
|
||||||
colors = {
|
colors = {
|
||||||
tab_bar = {
|
tab_bar = {
|
||||||
background = "#002b36",
|
background = "#002b36",
|
||||||
active_tab = {
|
active_tab = {
|
||||||
bg_color = "#073642",
|
bg_color = "#073642",
|
||||||
fg_color = "#268bd2",
|
fg_color = "#268bd2",
|
||||||
intensity = "Bold",
|
intensity = "Bold",
|
||||||
},
|
},
|
||||||
inactive_tab = {
|
inactive_tab = {
|
||||||
bg_color = "#002b36",
|
bg_color = "#002b36",
|
||||||
fg_color = "#586e75",
|
fg_color = "#586e75",
|
||||||
},
|
},
|
||||||
new_tab = {
|
new_tab = {
|
||||||
bg_color = "#002b36",
|
bg_color = "#002b36",
|
||||||
fg_color = "#586e75",
|
fg_color = "#586e75",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Set up multiplexing.
|
-- Set up multiplexing.
|
||||||
unix_domains = { { name = "unix" } },
|
unix_domains = { { name = "unix" } },
|
||||||
ssh_domains = {
|
ssh_domains = {
|
||||||
{
|
{
|
||||||
name = "trailblazer",
|
name = "trailblazer",
|
||||||
remote_address = "trailblazer",
|
remote_address = "trailblazer",
|
||||||
remote_wezterm_path = "/run/current-system/sw/bin/wezterm",
|
remote_wezterm_path = "/run/current-system/sw/bin/wezterm",
|
||||||
},
|
},
|
||||||
{ name = "valere", remote_address = "valere", remote_wezterm_path = "/run/current-system/sw/bin/wezterm" },
|
{ name = "valere", remote_address = "valere", remote_wezterm_path = "/run/current-system/sw/bin/wezterm" },
|
||||||
{ name = "hinata", remote_address = "hinata", remote_wezterm_path = "/run/current-system/sw/bin/wezterm" },
|
{ name = "hinata", remote_address = "hinata", remote_wezterm_path = "/run/current-system/sw/bin/wezterm" },
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Key bindings.
|
-- Key bindings.
|
||||||
keys = {
|
leader = { key = "`" },
|
||||||
|
keys = {
|
||||||
|
|
||||||
-- Generic customization.
|
-- Tmux keybindings: tabs and splits.
|
||||||
{ key = "l", mods = "SHIFT|CTRL", action = "ShowDebugOverlay" },
|
{
|
||||||
{ key = "Enter", mods = "ALT", action = "DisableDefaultAssignment" },
|
key = "c",
|
||||||
{ key = "Enter", mods = "SUPER", action = "ToggleFullScreen" },
|
mods = "LEADER",
|
||||||
},
|
action = act.SpawnTab("CurrentPaneDomain"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "RightArrow",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivatePaneDirection("Right"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "UpArrow",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivatePaneDirection("Up"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "DownArrow",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivatePaneDirection("Down"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = ";",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivatePaneDirection("Next"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "v",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.SplitVertical({ domain = "CurrentPaneDomain" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "h",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "5",
|
||||||
|
mods = "LEADER|SHIFT",
|
||||||
|
action = act.SplitVertical({ domain = "CurrentPaneDomain" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "'",
|
||||||
|
mods = "LEADER|SHIFT",
|
||||||
|
action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "1",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivateTab(0),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "2",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivateTab(1),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "3",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivateTab(2),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "4",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivateTab(3),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "5",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivateTab(4),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "6",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivateTab(5),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "7",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivateTab(6),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "8",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivateTab(7),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "9",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivateTab(8),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "0",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.ActivateTab(10),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "x",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.CloseCurrentPane({ confirm = true }),
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Tmux keybindings: misc.
|
||||||
|
{
|
||||||
|
key = "`",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.SendKey({ key = "`" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "d",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.DetachDomain("CurrentPaneDomain"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key = "z",
|
||||||
|
mods = "LEADER",
|
||||||
|
action = act.TogglePaneZoomState,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Generic customization.
|
||||||
|
{ key = "l", mods = "SHIFT|CTRL", action = "ShowDebugOverlay" },
|
||||||
|
{ key = "Enter", mods = "ALT", action = "DisableDefaultAssignment" },
|
||||||
|
{ key = "Enter", mods = "SUPER", action = "ToggleFullScreen" },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Font Size Tweaks
|
-- Font Size Tweaks
|
||||||
--
|
--
|
||||||
font_overrides = {
|
font_overrides = {
|
||||||
miko = 10,
|
miko = 10,
|
||||||
hinata = 16,
|
hinata = 16,
|
||||||
valere = 12,
|
valere = 12,
|
||||||
utol = 13,
|
utol = 13,
|
||||||
trailblazer = 11,
|
trailblazer = 11,
|
||||||
kanbaru = 12,
|
kanbaru = 12,
|
||||||
aigis = 12,
|
aigis = 12;
|
||||||
komashi = 12,
|
komashi = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
if font_overrides[hostname] ~= nil then
|
if font_overrides[hostname] ~= nil then
|
||||||
config.font_size = font_overrides[hostname]
|
config.font_size = font_overrides[hostname]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Increase tab bar spacing.
|
-- Increase tab bar spacing.
|
||||||
--
|
--
|
||||||
wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width)
|
wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width)
|
||||||
-- Truncate our title so we have room for a padding space at the end.
|
-- Truncate our title so we have room for a padding space at the end.
|
||||||
local title = wezterm.truncate_right(tab.active_pane.title, max_width - 6)
|
local title = wezterm.truncate_right(tab.active_pane.title, max_width - 6)
|
||||||
local number = tostring((tab.tab_index + 1) % 10)
|
local number = tostring((tab.tab_index + 1) % 10)
|
||||||
|
|
||||||
-- Generate the tab format.
|
-- Generate the tab format.
|
||||||
return " " .. number .. ": " .. title .. " "
|
return " " .. number .. ": " .. title .. " "
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Windows support.
|
-- Windows support.
|
||||||
|
|
12
xonsh/rc.xsh
12
xonsh/rc.xsh
|
@ -25,6 +25,8 @@ warnings.warn = warn
|
||||||
# Xonsh configuration
|
# Xonsh configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Load our Xonsh extensions.
|
||||||
|
xontrib load whole_word_jumping coreutils term_integration sh
|
||||||
|
|
||||||
# Squish down long CWD paths,
|
# Squish down long CWD paths,
|
||||||
$DYNAMIC_CWD_WIDTH="30%"
|
$DYNAMIC_CWD_WIDTH="30%"
|
||||||
|
@ -56,8 +58,8 @@ def try_source(filename):
|
||||||
|
|
||||||
if path.exists(full_file):
|
if path.exists(full_file):
|
||||||
if XONSHRC_VERBOSE:
|
if XONSHRC_VERBOSE:
|
||||||
print(f"Sourcing {full_file}!")
|
print(f"Sourcing {full_file}!")
|
||||||
aliases.source_alias([full_file])
|
aliases.source_alias([full_file])
|
||||||
elif XONSHRC_VERBOSE:
|
elif XONSHRC_VERBOSE:
|
||||||
print(f"Not sourcing {full_file}!")
|
print(f"Not sourcing {full_file}!")
|
||||||
|
|
||||||
|
@ -77,6 +79,7 @@ PATH_ADDS = []
|
||||||
#
|
#
|
||||||
# Per-platform and per-machine environment.
|
# Per-platform and per-machine environment.
|
||||||
#
|
#
|
||||||
|
|
||||||
try_source(socket.gethostname().split('.')[0])
|
try_source(socket.gethostname().split('.')[0])
|
||||||
try_source(sys.platform)
|
try_source(sys.platform)
|
||||||
|
|
||||||
|
@ -126,8 +129,3 @@ except Exception as e:
|
||||||
|
|
||||||
if XONSHRC_VERBOSE:
|
if XONSHRC_VERBOSE:
|
||||||
print("Final color scheme: " + $XONSH_COLOR_STYLE)
|
print("Final color scheme: " + $XONSH_COLOR_STYLE)
|
||||||
|
|
||||||
# Prompt config.
|
|
||||||
|
|
||||||
# Load our Xonsh extensions.
|
|
||||||
xontrib load whole_word_jumping coreutils sh term_integration prompt_bar
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
xontrib-whole-word-jumping
|
xontrib-whole-word-jumping
|
||||||
xontrib-sh
|
xontrib-bashisms
|
||||||
xontrib-term-integrations
|
xontrib-term-integrations
|
||||||
xontrib-prompt-bar
|
xontrib-abbrevs
|
||||||
|
|
Loading…
Add table
Reference in a new issue