Skip to content

Commit

Permalink
chore(fish): remove greeting message
Browse files Browse the repository at this point in the history
  • Loading branch information
tetzng committed Dec 9, 2023
1 parent 63c32c5 commit 414dbcd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .config/fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ end

set -gx GPG_TTY (tty)

# remove greeting message
set -U fish_greeting

source $HOME/.config/fish/secrets.fish

if test -d /opt/homebrew
Expand Down
22 changes: 11 additions & 11 deletions .config/fish/functions/fish_greeting.fish
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
function fish_greeting -d "Display system information as a greeting"
set_color $fish_color_autosuggestion

set -l system_info (system_profiler SPSoftwareDataType | string collect)
set -l sys_version (echo "$system_info" | rg "System Version: (.+)" -r '$1' | string trim)
set -l kernel_version (echo "$system_info" | rg "Kernel Version: (.+)" -r '$1' | string trim)
set -l time_since_boot (echo "$system_info" | rg "Time since boot: (.+)" -r '$1' | string trim)

echo "You're running $sys_version with $kernel_version,"
echo "and your system has been up for $time_since_boot."
end
# function fish_greeting -d "Display system information as a greeting"
# set_color $fish_color_autosuggestion
#
# set -l system_info (system_profiler SPSoftwareDataType | string collect)
# set -l sys_version (echo "$system_info" | rg "System Version: (.+)" -r '$1' | string trim)
# set -l kernel_version (echo "$system_info" | rg "Kernel Version: (.+)" -r '$1' | string trim)
# set -l time_since_boot (echo "$system_info" | rg "Time since boot: (.+)" -r '$1' | string trim)
#
# echo "You're running $sys_version with $kernel_version,"
# echo "and your system has been up for $time_since_boot."
# end

0 comments on commit 414dbcd

Please sign in to comment.