-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add wezterm, fish and starship
- Loading branch information
Showing
8 changed files
with
189 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ ... }: { | ||
imports = [ | ||
# ./fish | ||
./fish | ||
./starship | ||
./wezterm | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ lib | ||
, config | ||
, ... | ||
}: | ||
with lib; let | ||
cfg = config.myHome.shell.starship; | ||
in | ||
{ | ||
options.myHome.shell.starship = { enable = mkEnableOption "starship"; }; | ||
|
||
config = mkIf cfg.enable { | ||
programs.starship = { | ||
enable = true; | ||
settings = { | ||
add_newline = false; | ||
command_timeout = 1000; | ||
format = lib.concatStrings [ | ||
"$username" | ||
"$hostname" | ||
"$directory" | ||
"$git_branch" | ||
"$git_status" | ||
"$\{custom.direnv\}" | ||
"$fill" | ||
"$python" | ||
"$status" | ||
"$cmd_duration" | ||
"$line_break" | ||
"$character" | ||
]; | ||
|
||
username = { | ||
style_user = "yellow"; | ||
style_root = "red"; | ||
format = "[$user]($style)"; | ||
show_always = false; | ||
}; | ||
|
||
hostname = { | ||
ssh_only = true; | ||
format = "[@$hostname]($style) in "; | ||
style = "green"; | ||
}; | ||
|
||
directory = { | ||
truncation_length = 3; | ||
format = "[$path]($style)[$read_only]($read_only_style) "; | ||
style = "blue"; | ||
read_only = " "; | ||
truncation_symbol = "../"; | ||
truncate_to_repo = true; | ||
fish_style_pwd_dir_length = 1; | ||
}; | ||
|
||
git_branch = { | ||
format = "on [$symbol$branch]($style) "; | ||
style = "purple"; | ||
symbol = " "; | ||
}; | ||
|
||
git_status = { | ||
format = "([$all_status$ahead_behind]($style) )"; | ||
style = "purple"; | ||
conflicted = " "; | ||
ahead = " "; | ||
behind = " "; | ||
diverged = " "; | ||
up_to_date = " "; | ||
untracked = " "; | ||
stashed = " "; | ||
modified = " "; | ||
staged = " "; | ||
renamed = " "; | ||
deleted = " "; | ||
}; | ||
|
||
fill = { | ||
symbol = " "; | ||
}; | ||
|
||
python = { | ||
format = "[\${symbol}\${pyenv_prefix}(\${version} )(\($virtualenv\) )]($style)"; | ||
symbol = "🐍 "; | ||
}; | ||
|
||
status = { | ||
disabled = false; | ||
format = "[$symbol]($style) "; | ||
symbol = " "; | ||
success_symbol = " "; | ||
style = "red"; | ||
}; | ||
|
||
cmd_duration = { | ||
min_time = 2000; | ||
format = "took [$duration]($style) "; | ||
style = "yellow"; | ||
}; | ||
|
||
character = { | ||
success_symbol = "[](green)"; | ||
error_symbol = "[](green)"; | ||
vicmd_symbol = "[](purple)"; | ||
}; | ||
|
||
custom.direnv = { | ||
format = "[$symbol]($style)"; | ||
symbol = " "; | ||
style = "blue"; | ||
when = "env | grep -E '^DIRENV_FILE='"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ config | ||
, pkgs | ||
, lib | ||
, ... | ||
}: | ||
with lib; let | ||
cfg = config.myHome.shell.wezterm; | ||
in | ||
{ | ||
options.myHome.shell.wezterm = { | ||
enable = mkEnableOption "wezterm"; | ||
configPath = mkOption { | ||
type = types.str; | ||
}; | ||
}; | ||
|
||
# Temporary make .config/wezterm/wezterm.lua link to the local copy | ||
config = mkIf cfg.enable { | ||
# xdg.configFile."wezterm/wezterm.lua".source = config.lib.file.mkOutOfStoreSymlink cfg.configPath; | ||
programs.wezterm = { | ||
enable = true; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ with config; | |
steam | ||
spotify | ||
brightnessctl | ||
prusaslicer | ||
|
||
bat | ||
dbus | ||
|