Merge pull request #499 from dylanaraps/cinnamon_version
DE: Print Cinnamon version, closes #494
This commit is contained in:
commit
c30523dd95
1 changed files with 10 additions and 9 deletions
7
neofetch
7
neofetch
|
@ -552,17 +552,18 @@ get_de() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ -n "$DISPLAY" && -z "$de" ]]; then
|
# Fallback to using xprop.
|
||||||
|
[[ -n "$DISPLAY" && -z "$de" ]] && \
|
||||||
de="$(xprop -root | awk '/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/')"
|
de="$(xprop -root | awk '/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/')"
|
||||||
|
|
||||||
|
# Format strings
|
||||||
case "$de" in
|
case "$de" in
|
||||||
"KDE_SESSION_VERSION"*) de="KDE${de/* = }" ;;
|
"KDE_SESSION_VERSION"*) de="KDE${de/* = }" ;;
|
||||||
*"TDE_FULL_SESSION"*) de="Trinity" ;;
|
*"TDE_FULL_SESSION"*) de="Trinity" ;;
|
||||||
*"MUFFIN"*) de="$(cinnamon --version)"; de="${de:-Cinnamon}" ;;
|
*"MUFFIN"* | "Cinnamon") de="$(cinnamon --version)"; de="${de:-Cinnamon}" ;;
|
||||||
*"xfce4"*) de="XFCE4" ;;
|
*"xfce4"*) de="XFCE4" ;;
|
||||||
*"xfce5"*) de="XFCE5" ;;
|
*"xfce5"*) de="XFCE5" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get_wm() {
|
get_wm() {
|
||||||
|
|
Loading…
Reference in a new issue