eww: dashboard(fake) & spotify player
This commit is contained in:
28
eww/Main/scripts/details
Executable file
28
eww/Main/scripts/details
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $1 == "--image" ]]; then
|
||||
FILE=$HOME/.face
|
||||
if [[ -f "$FILE" ]]; then
|
||||
echo "../../.face"
|
||||
else
|
||||
echo "Main/images/profile.png"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user