From 89774b869922456caf638034a58e9b3d9856cf35 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 30 Aug 2023 22:19:43 -0500 Subject: [PATCH] Past main fish shell home manager hurdle --- common/bin/dotfiles-setup | 2 - common/fish/config.fish | 84 +++++++++++++++++++++++++- common/fish/old-config.fish | 83 -------------------------- os/linux/nix/daniel.nix | 98 +++++++++++++++++++++++++++++++ os/linux/nix/machines/thinker.nix | 1 - 5 files changed, 181 insertions(+), 87 deletions(-) mode change 120000 => 100755 common/fish/config.fish delete mode 100755 common/fish/old-config.fish diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index 550223e..5accd42 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -40,8 +40,6 @@ test -d ~/.tmux/pluginx/tpm || \ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm l common/zellij $c/zellij l common/tmux/conf $h/.tmux.conf -l common/fish $c/fish -l common/broot $c/broot l common/bat $c/bat l common/bash/rc $h/.bashrc l common/wezterm $c/wezterm diff --git a/common/fish/config.fish b/common/fish/config.fish deleted file mode 120000 index 24eead0..0000000 --- a/common/fish/config.fish +++ /dev/null @@ -1 +0,0 @@ -/nix/store/ahxpk1vl2rwy1qqpnwkakyv0gjf49iad-home-manager-files/.config/fish/config.fish \ No newline at end of file diff --git a/common/fish/config.fish b/common/fish/config.fish new file mode 100755 index 0000000..2f5fb60 --- /dev/null +++ b/common/fish/config.fish @@ -0,0 +1,83 @@ +source (dirname (status --current-filename))/paths.fish + +for s in $ENV_PATH/*/config.d.fish + source $s (dirname $s) +end + +for f in vars colors functions + source $FISH_PATH/$f.fish +end + +if has_command rtx + rtx activate fish | source +else if has_command brew && test -f (brew --prefix asdf)/libexec/asdf.fish + set --universal --export ASDF_DIR (brew --prefix asdf) + source (brew --prefix asdf)/libexec/asdf.fish +else if test -f $HOME/.asdf/asdf.fish + source $HOME/.asdf/asdf.fish +else if test -f /opt/asdf-vm/asdf.fish + source /opt/asdf-vm/asdf.fish +end + +if test -f $HOME/.nix-profile/etc/profile.d/nix.fish + . $HOME/.nix-profile/etc/profile.d/nix.fish +end + +if test -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh + # for determinate systems install + set nix_profiles /nix/var/nix/profiles/default $HOME/.nix-profile + set --export --universal NIX_PROFILES "$nix_profiles" + + if set -q NIX_SSL_CERT_FILE + : + else if test -e /etc/ssl/certs/ca-certificates.crt + set --export --universal NIX_SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt + else + for p in (string split $NIX_PROFILES) + test -e $p/etc/ssl/certs/ca-bundle.crt && \ + set --export --universal NIX_SSL_CERT_FILE $p/etc/ssl/certs/ca-bundle.crt + end + end + + set --prepend --export --global fish_user_paths $HOME/.nix-profile/bin /nix/var/nix/profiles/default/bin +end + +if has_command direnv + direnv hook fish | source +end + +# everything after this is ONLY relevant to interactive shells +status --is-interactive || exit + +if has_command nnn + source $DOTFILES_PATH/common/nnn/config.fish +end + +for f in prompt key-bindings + source $FISH_PATH/$f.fish +end + +if test -f /usr/share/password-store/extensions/otp.bash + source $FISH_PATH/pass-otp-completions.fish +end + +if set -q KITTY_INSTALLATION_DIR + set --global KITTY_SHELL_INTEGRATION enabled + source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish" + set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d" +end + +test $PWD = $HOME && begin + cd $NICE_HOME || cd +end + +# If we're running the shell interactively from inside Kitty, assume that we will be using Kitty's multiplexing features +# Otherwise, assume we're in a context that is not capable of "native" multiplexing features and run everything inside Zellij +if not set --query ZELLIJ && set --query FISH_START_ZELLIJ + # simulate auto attach + zellij attach -c + # simulate auto kill + kill $fish_pid +else if not set --query TMUX && set --query FISH_START_TMUX + tmux att -t default || tmux new -s default +end \ No newline at end of file diff --git a/common/fish/old-config.fish b/common/fish/old-config.fish deleted file mode 100755 index 2f5fb60..0000000 --- a/common/fish/old-config.fish +++ /dev/null @@ -1,83 +0,0 @@ -source (dirname (status --current-filename))/paths.fish - -for s in $ENV_PATH/*/config.d.fish - source $s (dirname $s) -end - -for f in vars colors functions - source $FISH_PATH/$f.fish -end - -if has_command rtx - rtx activate fish | source -else if has_command brew && test -f (brew --prefix asdf)/libexec/asdf.fish - set --universal --export ASDF_DIR (brew --prefix asdf) - source (brew --prefix asdf)/libexec/asdf.fish -else if test -f $HOME/.asdf/asdf.fish - source $HOME/.asdf/asdf.fish -else if test -f /opt/asdf-vm/asdf.fish - source /opt/asdf-vm/asdf.fish -end - -if test -f $HOME/.nix-profile/etc/profile.d/nix.fish - . $HOME/.nix-profile/etc/profile.d/nix.fish -end - -if test -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh - # for determinate systems install - set nix_profiles /nix/var/nix/profiles/default $HOME/.nix-profile - set --export --universal NIX_PROFILES "$nix_profiles" - - if set -q NIX_SSL_CERT_FILE - : - else if test -e /etc/ssl/certs/ca-certificates.crt - set --export --universal NIX_SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt - else - for p in (string split $NIX_PROFILES) - test -e $p/etc/ssl/certs/ca-bundle.crt && \ - set --export --universal NIX_SSL_CERT_FILE $p/etc/ssl/certs/ca-bundle.crt - end - end - - set --prepend --export --global fish_user_paths $HOME/.nix-profile/bin /nix/var/nix/profiles/default/bin -end - -if has_command direnv - direnv hook fish | source -end - -# everything after this is ONLY relevant to interactive shells -status --is-interactive || exit - -if has_command nnn - source $DOTFILES_PATH/common/nnn/config.fish -end - -for f in prompt key-bindings - source $FISH_PATH/$f.fish -end - -if test -f /usr/share/password-store/extensions/otp.bash - source $FISH_PATH/pass-otp-completions.fish -end - -if set -q KITTY_INSTALLATION_DIR - set --global KITTY_SHELL_INTEGRATION enabled - source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish" - set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d" -end - -test $PWD = $HOME && begin - cd $NICE_HOME || cd -end - -# If we're running the shell interactively from inside Kitty, assume that we will be using Kitty's multiplexing features -# Otherwise, assume we're in a context that is not capable of "native" multiplexing features and run everything inside Zellij -if not set --query ZELLIJ && set --query FISH_START_ZELLIJ - # simulate auto attach - zellij attach -c - # simulate auto kill - kill $fish_pid -else if not set --query TMUX && set --query FISH_START_TMUX - tmux att -t default || tmux new -s default -end \ No newline at end of file diff --git a/os/linux/nix/daniel.nix b/os/linux/nix/daniel.nix index b20fe68..564a5cf 100644 --- a/os/linux/nix/daniel.nix +++ b/os/linux/nix/daniel.nix @@ -17,6 +17,104 @@ programs.broot = { enable = true; enableFishIntegration = true; + settings = { + modal = true; + skin = { + input = "rgb(205, 214, 244) none"; + selected_line = "none rgb(88, 91, 112)"; + default = "rgb(205, 214, 244) none"; + tree = "rgb(108, 112, 134) none"; + parent = "rgb(116, 199, 236) none"; + file = "none none"; + + perm__ = "rgb(186, 194, 222) none"; + perm_r = "rgb(250, 179, 135) none"; + perm_w = "rgb(235, 160, 172) none"; + perm_x = "rgb(166, 227, 161) none"; + owner = "rgb(148, 226, 213) none"; + group = "rgb(137, 220, 235) none"; + + dates = "rgb(186, 194, 222) none"; + + directory = "rgb(180, 190, 254) none Bold"; + exe = "rgb(166, 227, 161) none"; + link = "rgb(249, 226, 175) none"; + pruning = "rgb(166, 173, 200) none Italic"; + + preview_title = "rgb(205, 214, 244) rgb(24, 24, 37)"; + preview = "rgb(205, 214, 244) rgb(24, 24, 37)"; + preview_line_number = "rgb(108, 112, 134) none"; + + char_match = "rgb(249, 226, 175) rgb(69, 71, 90) Bold Italic"; + content_match = "rgb(249, 226, 175) rgb(69, 71, 90) Bold Italic"; + preview_match = "rgb(249, 226, 175) rgb(69, 71, 90) Bold Italic"; + + count = "rgb(249, 226, 175) none"; + sparse = "rgb(243, 139, 168) none"; + content_extract = "rgb(243, 139, 168) none Italic"; + + git_branch = "rgb(250, 179, 135) none"; + git_insertions = "rgb(250, 179, 135) none"; + git_deletions = "rgb(250, 179, 135) none"; + git_status_current = "rgb(250, 179, 135) none"; + git_status_modified = "rgb(250, 179, 135) none"; + git_status_new = "rgb(250, 179, 135) none Bold"; + git_status_ignored = "rgb(250, 179, 135) none"; + git_status_conflicted = "rgb(250, 179, 135) none"; + git_status_other = "rgb(250, 179, 135) none"; + staging_area_title = "rgb(250, 179, 135) none"; + + flag_label = "rgb(243, 139, 168) none"; + flag_value = "rgb(243, 139, 168) none Bold"; + + status_normal = "none rgb(24, 24, 37)"; + status_italic = "rgb(243, 139, 168) rgb(24, 24, 37) Italic"; + status_bold = "rgb(235, 160, 172) rgb(24, 24, 37) Bold"; + status_ellipsis = "rgb(235, 160, 172) rgb(24, 24, 37) Bold"; + status_error = "rgb(205, 214, 244) rgb(243, 139, 168)"; + status_job = "rgb(235, 160, 172) rgb(40, 38, 37)"; + status_code = "rgb(235, 160, 172) rgb(24, 24, 37) Italic"; + mode_command_mark = "rgb(235, 160, 172) rgb(24, 24, 37) Bold"; + + help_paragraph = "rgb(205, 214, 244) none"; + help_headers = "rgb(243, 139, 168) none Bold"; + help_bold = "rgb(250, 179, 135) none Bold"; + help_italic = "rgb(249, 226, 175) none Italic"; + help_code = "rgb(166, 227, 161) rgb(49, 50, 68)"; + help_table_border = "rgb(108, 112, 134) none"; + + hex_null = "rgb(205, 214, 244) none"; + hex_ascii_graphic = "rgb(250, 179, 135) none"; + hex_ascii_whitespace = "rgb(166, 227, 161) none"; + hex_ascii_other = "rgb(148, 226, 213) none"; + hex_non_ascii = "rgb(243, 139, 168) none"; + + file_error = "rgb(251, 73, 52) none"; + + purpose_normal = "none none"; + purpose_italic = "rgb(177, 98, 134) none Italic"; + purpose_bold = "rgb(177, 98, 134) none Bold"; + purpose_ellipsis = "none none"; + + scrollbar_track = "rgb(49, 50, 68) none"; + scrollbar_thumb = "rgb(88, 91, 112) none"; + + good_to_bad_0 = "rgb(166, 227, 161) none"; + good_to_bad_1 = "rgb(148, 226, 213) none"; + good_to_bad_2 = "rgb(137, 220, 235) none"; + good_to_bad_3 = "rgb(116, 199, 236) none"; + good_to_bad_4 = "rgb(137, 180, 250) none"; + good_to_bad_5 = "rgb(180, 190, 254) none"; + good_to_bad_6 = "rgb(203, 166, 247) none"; + good_to_bad_7 = "rgb(250, 179, 135) none"; + good_to_bad_8 = "rgb(235, 160, 172) none"; + good_to_bad_9 = "rgb(243, 139, 168) none"; + }; + + verbs = [ + { invocation = "edit"; shortcut = "e"; execution = "$EDITOR +{line} {file}"; } + ]; + }; }; programs.home-manager.enable = true; diff --git a/os/linux/nix/machines/thinker.nix b/os/linux/nix/machines/thinker.nix index 8192359..60aef01 100644 --- a/os/linux/nix/machines/thinker.nix +++ b/os/linux/nix/machines/thinker.nix @@ -165,7 +165,6 @@ in bind bottom brightnessctl - broot clang curl delta