mirror of
https://github.com/smg1024/nix-darwin.git
synced 2026-05-22 20:32:59 +09:00
feat: wezterm and starship config
This commit is contained in:
parent
d780bab0b1
commit
b8ce095489
4 changed files with 255 additions and 4 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -5,9 +6,225 @@
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
add_newline = true;
|
||||||
|
continuation_prompt = "[▸▹ ](dimmed white)";
|
||||||
|
|
||||||
|
format = lib.concatStrings [
|
||||||
|
"($nix_shell$container$fill\n)$cmd_duration"
|
||||||
|
"$hostname"
|
||||||
|
"$localip"
|
||||||
|
"$shell"
|
||||||
|
"$env_var"
|
||||||
|
"$jobs"
|
||||||
|
"$sudo"
|
||||||
|
"$username"
|
||||||
|
"$character"
|
||||||
|
];
|
||||||
|
|
||||||
|
right_format = lib.concatStrings [
|
||||||
|
"$directory"
|
||||||
|
"$git_branch"
|
||||||
|
"$git_commit"
|
||||||
|
"$git_state"
|
||||||
|
"$git_status"
|
||||||
|
"$docker_context"
|
||||||
|
"$c"
|
||||||
|
"$cpp"
|
||||||
|
"$deno"
|
||||||
|
"$helm"
|
||||||
|
"$java"
|
||||||
|
"$kotlin"
|
||||||
|
"$gradle"
|
||||||
|
"$lua"
|
||||||
|
"$nodejs"
|
||||||
|
"$python"
|
||||||
|
"$ruby"
|
||||||
|
"$rust"
|
||||||
|
"$terraform"
|
||||||
|
"$conda"
|
||||||
|
"$pixi"
|
||||||
|
];
|
||||||
|
|
||||||
|
fill = {
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
line_break = {
|
||||||
|
disabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
character = {
|
character = {
|
||||||
success_symbol = "[›](bold green)";
|
format = "$symbol ";
|
||||||
error_symbol = "[›](bold red)";
|
success_symbol = "[◎](bold italic bright-yellow)";
|
||||||
|
error_symbol = "[○](italic purple)";
|
||||||
|
vimcmd_symbol = "[■](italic dimmed green)";
|
||||||
|
};
|
||||||
|
|
||||||
|
env_var.VIMSHELL = {
|
||||||
|
format = "[$env_value]($style)";
|
||||||
|
style = "green italic";
|
||||||
|
};
|
||||||
|
|
||||||
|
sudo = {
|
||||||
|
format = "[$symbol]($style)";
|
||||||
|
style = "bold italic bright-purple";
|
||||||
|
symbol = "⋈┈";
|
||||||
|
disabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
username = {
|
||||||
|
style_user = "bright-yellow bold italic";
|
||||||
|
style_root = "purple bold italic";
|
||||||
|
format = "[⭘ $user]($style) ";
|
||||||
|
disabled = false;
|
||||||
|
show_always = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
directory = {
|
||||||
|
home_symbol = "⌂";
|
||||||
|
truncation_length = 2;
|
||||||
|
truncation_symbol = "□ ";
|
||||||
|
read_only = " ◈";
|
||||||
|
use_os_path_sep = true;
|
||||||
|
style = "italic blue";
|
||||||
|
format = "[$path]($style)[$read_only]($read_only_style)";
|
||||||
|
repo_root_style = "bold blue";
|
||||||
|
repo_root_format = "[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) [△](bold bright-blue)";
|
||||||
|
};
|
||||||
|
|
||||||
|
cmd_duration = {
|
||||||
|
format = "[◄ $duration ](italic white)";
|
||||||
|
};
|
||||||
|
|
||||||
|
jobs = {
|
||||||
|
format = "[$symbol$number]($style) ";
|
||||||
|
style = "white";
|
||||||
|
symbol = "[▶](blue italic)";
|
||||||
|
};
|
||||||
|
|
||||||
|
localip = {
|
||||||
|
ssh_only = true;
|
||||||
|
format = " ◯[$localipv4](bold magenta)";
|
||||||
|
disabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
git_branch = {
|
||||||
|
format = " [$branch(:$remote_branch)]($style)";
|
||||||
|
symbol = "[△](bold italic bright-blue)";
|
||||||
|
style = "italic bright-blue";
|
||||||
|
truncation_symbol = "⋯";
|
||||||
|
truncation_length = 11;
|
||||||
|
ignore_branches = [
|
||||||
|
"main"
|
||||||
|
"master"
|
||||||
|
];
|
||||||
|
only_attached = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
git_metrics = {
|
||||||
|
format = "([▴$added]($added_style))([▿$deleted]($deleted_style))";
|
||||||
|
added_style = "italic dimmed green";
|
||||||
|
deleted_style = "italic dimmed red";
|
||||||
|
ignore_submodules = true;
|
||||||
|
disabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
git_status = {
|
||||||
|
style = "bold italic bright-blue";
|
||||||
|
format = "([⎪$ahead_behind$staged$modified$untracked$renamed$deleted$conflicted$stashed⎥]($style))";
|
||||||
|
conflicted = "[◪◦](italic bright-magenta)";
|
||||||
|
ahead = "[▴│[\${count}](bold white)│](italic green)";
|
||||||
|
behind = "[▿│[\${count}](bold white)│](italic red)";
|
||||||
|
diverged = "[◇ ▴┤[\${ahead_count}](regular white)│▿┤[\${behind_count}](regular white)│](italic bright-magenta)";
|
||||||
|
untracked = "[◌◦](italic bright-yellow)";
|
||||||
|
stashed = "[◃◈](italic white)";
|
||||||
|
modified = "[●◦](italic yellow)";
|
||||||
|
staged = "[▪┤[$count](bold white)│](italic bright-cyan)";
|
||||||
|
renamed = "[◎◦](italic bright-blue)";
|
||||||
|
deleted = "[✕](italic red)";
|
||||||
|
};
|
||||||
|
|
||||||
|
deno = {
|
||||||
|
format = " [deno](italic) [∫ $version](green bold)";
|
||||||
|
version_format = "\${raw}";
|
||||||
|
};
|
||||||
|
|
||||||
|
lua = {
|
||||||
|
format = " [lua](italic) [\${symbol}\${version}]($style)";
|
||||||
|
version_format = "\${raw}";
|
||||||
|
symbol = "⨀ ";
|
||||||
|
style = "bold bright-yellow";
|
||||||
|
};
|
||||||
|
|
||||||
|
nodejs = {
|
||||||
|
format = " [node](italic) [◫ ($version)](bold bright-green)";
|
||||||
|
version_format = "\${raw}";
|
||||||
|
detect_files = [
|
||||||
|
"package-lock.json"
|
||||||
|
"yarn.lock"
|
||||||
|
];
|
||||||
|
detect_folders = [ "node_modules" ];
|
||||||
|
detect_extensions = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
python = {
|
||||||
|
format = " [py](italic) [\${symbol}\${version}]($style)";
|
||||||
|
symbol = "[⌉](bold bright-blue)⌊ ";
|
||||||
|
version_format = "\${raw}";
|
||||||
|
style = "bold bright-yellow";
|
||||||
|
};
|
||||||
|
|
||||||
|
ruby = {
|
||||||
|
format = " [rb](italic) [\${symbol}\${version}]($style)";
|
||||||
|
symbol = "◆ ";
|
||||||
|
version_format = "\${raw}";
|
||||||
|
style = "bold red";
|
||||||
|
};
|
||||||
|
|
||||||
|
rust = {
|
||||||
|
format = " [rs](italic) [$symbol$version]($style)";
|
||||||
|
symbol = "⊃ ";
|
||||||
|
version_format = "\${raw}";
|
||||||
|
style = "bold red";
|
||||||
|
};
|
||||||
|
|
||||||
|
c = {
|
||||||
|
symbol = "ℂ ";
|
||||||
|
format = " [$symbol($version(-$name))]($style)";
|
||||||
|
};
|
||||||
|
|
||||||
|
cpp = {
|
||||||
|
symbol = "ℂ ";
|
||||||
|
format = " [$symbol($version(-$name))]($style)";
|
||||||
|
};
|
||||||
|
|
||||||
|
conda = {
|
||||||
|
symbol = "◯ ";
|
||||||
|
format = " conda [$symbol$environment]($style)";
|
||||||
|
};
|
||||||
|
|
||||||
|
pixi = {
|
||||||
|
symbol = "■ ";
|
||||||
|
format = " pixi [$symbol$version ($environment )]($style)";
|
||||||
|
};
|
||||||
|
|
||||||
|
docker_context = {
|
||||||
|
symbol = "◧ ";
|
||||||
|
format = " docker [$symbol$context]($style)";
|
||||||
|
};
|
||||||
|
|
||||||
|
java = {
|
||||||
|
symbol = "∪ ";
|
||||||
|
format = " java [\${symbol}(\${version} )]($style)";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix_shell = {
|
||||||
|
style = "bold italic dimmed blue";
|
||||||
|
symbol = "✶";
|
||||||
|
format = "[$symbol nix⎪$state⎪]($style) [$name](italic dimmed white)";
|
||||||
|
impure_msg = "[⌽](bold dimmed red)";
|
||||||
|
pure_msg = "[⌾](bold dimmed green)";
|
||||||
|
unknown_msg = "[◌](bold dimmed yellow)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,6 @@
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
# TODO wezterm config
|
# TODO wezterm config
|
||||||
|
extraConfig = builtins.readFile ./wezterm.lua;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
33
home/wezterm.lua
Normal file
33
home/wezterm.lua
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
local wezterm = require("wezterm")
|
||||||
|
|
||||||
|
config = wezterm.config_builder()
|
||||||
|
|
||||||
|
config = {
|
||||||
|
-- Windows
|
||||||
|
automatically_reload_config = true,
|
||||||
|
enable_tab_bar = false,
|
||||||
|
window_close_confirmation = "NeverPrompt",
|
||||||
|
window_decorations = "RESIZE", -- disable title bar, enable resize
|
||||||
|
default_cursor_style = "BlinkingBar",
|
||||||
|
|
||||||
|
-- Appearance
|
||||||
|
color_scheme = "Tokyo Night",
|
||||||
|
font = wezterm.font("D2CodingLigature Nerd Font"),
|
||||||
|
font_size = 16,
|
||||||
|
background = {
|
||||||
|
{
|
||||||
|
source = { Color = "#282c35" },
|
||||||
|
width = "100%",
|
||||||
|
height = "100%",
|
||||||
|
opacity = 0.95,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
window_padding = {
|
||||||
|
left = 2,
|
||||||
|
right = 2,
|
||||||
|
top = 0,
|
||||||
|
bottom = 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return config
|
||||||
|
|
@ -19,8 +19,8 @@
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
poby = "echo my name is poby";
|
poby = "echo my name is poby";
|
||||||
drs = "sudo darwin-rebuild switch --flake ~/nix-darwin#$(hostname)"; # TODO change to just script
|
nixconfig = "cd ~/nix-darwin && vim flake.nix";
|
||||||
drt = "sudo darwin-rebuild test --flake ~/nix-darwin#$(hostname)"; # TODO change to just script
|
just-darwin = "cd ~/nix-darwin && just darwin";
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue