Skip to content

Commit

Permalink
Update betterfetch.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
sctech-tr authored Sep 3, 2024
1 parent 63731cb commit c54eed0
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions betterfetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ if [ "$REMOTE_VERSION" != "$CURRENT_VERSION" ]; then
exit 0
fi



# the meat and potatoes, actual fetch

# only set these if they are not already set by the config file
Expand All @@ -46,7 +44,19 @@ fi
[ -z "$uptime" ] && uptime=$(uptime -p 2>/dev/null | sed "s/up //")
[ -z "$shell" ] && shell=$(printf "$SHELL" | sed "s/\/bin\///" | sed "s/\/usr//")
[ -z "$de" ] && de=$(echo $XDG_CURRENT_DESKTOP)
[ -z "$terminal" ] && terminal=$(readlink "/proc/$(cat /proc/$(echo $$)/stat|cut -d ' ' -f 4)/exe")
if [ -z "$terminal" ]; then
terminals="konsole xterm gnome-terminal xfce4-terminal alacritty st urxvt terminator tilix kitty lxterminal yakuake" # added yakuake
terminal="unknown"
cur=$$
while cur=$(ps -o ppid:1= -p "$cur") && ((cur)); do
comm=$(<"/proc/$cur/comm")
if [[ " $terminals " = *" $comm "* ]]; then
terminal=$comm
break
fi
done
fi


printf "$USER@$host\n"
printf "OS ${nc} $os\n"
Expand Down

0 comments on commit c54eed0

Please sign in to comment.