mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-24 02:02:19 +00:00
Compare commits
No commits in common. "9442614acdbb3131069c244c15927ed5241007fa" and "7611b35d7f36ffca04a17043f8bb2cde3fc6caaf" have entirely different histories.
9442614acd
...
7611b35d7f
2 changed files with 23 additions and 56 deletions
30
flake.lock
30
flake.lock
|
@ -9,11 +9,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "pkgs/firefox-addons",
|
"dir": "pkgs/firefox-addons",
|
||||||
"lastModified": 1719584439,
|
"lastModified": 1718867615,
|
||||||
"narHash": "sha256-GFc6v+Xcf4cflul5K08inTCVWNnDPdvAwiyVqRpdqh8=",
|
"narHash": "sha256-ijBhGG+9MfxqIk0hWk4CGTNvk9PcTFJZfZCHoBI9ecI=",
|
||||||
"owner": "rycee",
|
"owner": "rycee",
|
||||||
"repo": "nur-expressions",
|
"repo": "nur-expressions",
|
||||||
"rev": "8b3184e20f30a14cc966d11a1409f0143cf4e9f3",
|
"rev": "3ce9dae224e8750e0d05b7dd3101fea61004e475",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -40,11 +40,11 @@
|
||||||
},
|
},
|
||||||
"hardware": {
|
"hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719552654,
|
"lastModified": 1718894893,
|
||||||
"narHash": "sha256-PX3msbC5KdwCDnucGtir3qzlzv+1fuiU4tk17nljFIE=",
|
"narHash": "sha256-hxQBUtDbFOCCW1CsFZTS9Q5Ov1ZKdJgbBZHSez1M6iA=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "3980e7816c99d9e4da7a7b762e5b294055b73b2f",
|
"rev": "083823b7904e43a4fc1c7229781417e875359a42",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -60,11 +60,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719584202,
|
"lastModified": 1718788307,
|
||||||
"narHash": "sha256-lL0j2vltAX4L5z6APsQVCpNrfzI15P0O/tZ5PMgUCXE=",
|
"narHash": "sha256-SqiOz0sljM0GjyQEVinPXQxaGcbOXw5OgpCWGPgh/vo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "f50e2779edbc905ab131ce7ce36b14a09ab44f3c",
|
"rev": "d7830d05421d0ced83a0f007900898bdcaf2a2ca",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -75,11 +75,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719254875,
|
"lastModified": 1718714799,
|
||||||
"narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=",
|
"narHash": "sha256-FUZpz9rg3gL8NVPKbqU8ei1VkPLsTIfAJ2fdAf5qjak=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60",
|
"rev": "c00d587b1a1afbf200b1d8f0b0e4ba9deb1c7f0e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -91,11 +91,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719234068,
|
"lastModified": 1718811006,
|
||||||
"narHash": "sha256-1AjSIedDC/aERt24KsCUftLpVppW61S7awfjGe7bMio=",
|
"narHash": "sha256-0Y8IrGhRmBmT7HHXlxxepg2t8j1X90++qRN3lukGaIk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "90bd1b26e23760742fdcb6152369919098f05417",
|
"rev": "03d771e513ce90147b65fe922d87d3a0356fc125",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -36,6 +36,13 @@
|
||||||
set -q fish_color_status
|
set -q fish_color_status
|
||||||
or set -g fish_color_status red
|
or set -g fish_color_status red
|
||||||
|
|
||||||
|
# Detect if we're in a nix-shell
|
||||||
|
set -l nix_shell_info (
|
||||||
|
if test -n "$IN_NIX_SHELL"
|
||||||
|
echo -n "[nix-shell] "
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
# Color the prompt differently when we're root
|
# Color the prompt differently when we're root
|
||||||
set -l color_cwd $fish_color_cwd
|
set -l color_cwd $fish_color_cwd
|
||||||
set -l suffix '>'
|
set -l suffix '>'
|
||||||
|
@ -58,47 +65,7 @@
|
||||||
set -l statusb_color (set_color $bold_flag $fish_color_status)
|
set -l statusb_color (set_color $bold_flag $fish_color_status)
|
||||||
set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus)
|
set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus)
|
||||||
|
|
||||||
echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal " "$nix_shell_info $prompt_status $suffix " "
|
echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$nix_shell_info $prompt_status $suffix " "
|
||||||
'';
|
|
||||||
fish_right_prompt = ''
|
|
||||||
set -l normal (set_color normal)
|
|
||||||
# vcs
|
|
||||||
set -g __fish_git_prompt_showdirtystate 1
|
|
||||||
set -g __fish_git_prompt_showuntrackedfiles 1
|
|
||||||
set -g __fish_git_prompt_showstashstate 1
|
|
||||||
set -g __fish_git_prompt_showupstream informative
|
|
||||||
set -g __fish_git_prompt_showcolorhints 1
|
|
||||||
set -g __fish_git_prompt_use_informative_chars 1
|
|
||||||
string match -qi "*.utf-8" -- $LANG $LC_CTYPE $LC_ALL
|
|
||||||
and set -g __fish_git_prompt_char_dirtystate \U1F4a9
|
|
||||||
set -g __fish_git_prompt_char_untrackedfiles "?"
|
|
||||||
set -l vcs (fish_vcs_prompt '(%s)' 2>/dev/null)
|
|
||||||
|
|
||||||
# timestamp
|
|
||||||
set -l d (set_color brgrey)(date "+%R")$normal
|
|
||||||
|
|
||||||
# execution duration
|
|
||||||
set -l duration "$cmd_duration$CMD_DURATION"
|
|
||||||
if test $duration -gt 100
|
|
||||||
set duration (math $duration / 1000)s
|
|
||||||
else
|
|
||||||
set duration
|
|
||||||
end
|
|
||||||
|
|
||||||
# virtual env
|
|
||||||
set -q VIRTUAL_ENV_DISABLE_PROMPT
|
|
||||||
or set -g VIRTUAL_ENV_DISABLE_PROMPT true
|
|
||||||
set -q VIRTUAL_ENV
|
|
||||||
and set -l venv (string replace -r '.*/' "" -- "$VIRTUAL_ENV")
|
|
||||||
|
|
||||||
# nix-shell
|
|
||||||
set -l nix (
|
|
||||||
if test -n "$IN_NIX_SHELL"
|
|
||||||
echo -n "[nix]"
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
string join " " -- $duration $venv $nix $vcs $d
|
|
||||||
'';
|
'';
|
||||||
get-local-ip = "ip addr show $(ip route | grep default | awk '{print $5}') | grep 'inet ' | awk '{print $2}' | cut -d/ -f1";
|
get-local-ip = "ip addr show $(ip route | grep default | awk '{print $5}') | grep 'inet ' | awk '{print $2}' | cut -d/ -f1";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue