From 944968cf69aa8a93b78d9c278237b6e1ca4b402b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 20 Apr 2018 08:13:01 +1000 Subject: [PATCH] wm: Added WM version. --- config/config.conf | 11 +++++++++++ neofetch | 11 +++++++++++ neofetch.1 | 3 +++ 3 files changed, 25 insertions(+) diff --git a/config/config.conf b/config/config.conf index d754e023..65d01d49 100644 --- a/config/config.conf +++ b/config/config.conf @@ -303,6 +303,17 @@ gtk3="on" public_ip_host="http://ident.me" +# Window Manager + + +# Show Window Manager Version. +# +# Default: 'off' +# Values: 'on', off +# Flag: --wm_version +wm_version="off" + + # Disk diff --git a/neofetch b/neofetch index c54e99d5..dc7a01ad 100755 --- a/neofetch +++ b/neofetch @@ -792,6 +792,15 @@ get_wm() { -e "monsterwm" \ -e "tinywm")" + if [[ "$wm_version" == "on" ]]; then + wmv="$wm $("${wm,,}" --version || "${wm,,}" -v)" + wmv="${wmv/$wm $wm/$wm}" + wmv="${wmv/copyright*}" + wmv="${wmv/version }" + wmv="${wmv/©*}" + wmv="${wmv/(c)*}" + wm="$wmv" + fi else case "$os" in "Mac OS X") @@ -4699,6 +4708,7 @@ INFO: NOTE: This only supports Linux. + --wm_version on/off Show/Hide Window Manager version. --gtk_shorthand on/off Shorten output of gtk theme/icons --gtk2 on/off Enable/Disable gtk2 theme/font/icons output --gtk3 on/off Enable/Disable gtk3 theme/font/icons output @@ -4869,6 +4879,7 @@ get_args() { "--cpu_brand") cpu_brand="$2" ;; "--gpu_brand") gpu_brand="$2" ;; "--gpu_type") gpu_type="$2" ;; + "--wm_version") wm_version="$2" ;; "--refresh_rate") refresh_rate="$2" ;; "--gtk_shorthand") gtk_shorthand="$2" ;; "--gtk2") gtk2="$2" ;; diff --git a/neofetch.1 b/neofetch.1 index d43db1d8..391cb7d6 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -81,6 +81,9 @@ Which GPU to display. (all, dedicated, integrated) .IP NOTE: This only supports Linux. .TP +\fB\-\-wm_version\fR on/off +Show/Hide Window Manager version. +.TP \fB\-\-gtk_shorthand\fR on/off Shorten output of gtk theme/icons .TP