#!/usr/bin/bash

if [[ $1 == "--name" ]]; then
	fullname=$(getent passwd "$(whoami)" | cut -d ':' -f 5 | cut -d ',' -f 1 | tr -d "\n")
	if [ -z "$fullname" ]; then
		echo "$(whoami)@$(hostnamectl | awk 'FNR==1 {print $3}')"
	else
		echo "$fullname"
	fi
fi

if [[ $1 == "--kernel" ]]; then
	echo "$(uname -r)"
fi

if [[ $1 == "--os" ]]; then
	echo "$(cat /etc/os-release | awk 'NR==1' | awk -F '"' '{print $2}')"
fi

if [[ $1 == "--pkgs" ]]; then
	echo "$(yay -Q | wc -l)"
fi

if [[ $1 == "--wm" ]]; then
	echo "$XDG_CURRENT_DESKTOP"
fi