From ab92616da8896ffd3f2530c2fe66bab94fbc0198 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 23 Jan 2016 10:31:24 +1100 Subject: [PATCH] wmctrl is now used by default if found --- README.md | 1 - fetch | 8 +------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index afe65c55..77e8b5fa 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,6 @@ alias fetch2="fetch \ --packages string/cmd Manually set the package count --shell string/cmd Manually set the shell --winman string/cmd Manually set the window manager - --use_wmctrl on/off Use wmctrl for a more accurate reading --cpu string/cmd Manually set the cpu name --memory string/cmd Manually set the memory --speed_type Change the type of cpu speed to get diff --git a/fetch b/fetch index 8a225b78..b648dbba 100755 --- a/fetch +++ b/fetch @@ -81,10 +81,6 @@ printinfo () { # Window Manager -# Use wmctrl for a more accurate -# window manager reading -use_wmctrl="off" - # CPU @@ -523,7 +519,7 @@ getshell () { # Get window manager getwindowmanager () { - if [ "$use_wmctrl" == "on" ]; then + if type -p wmctrl >/dev/null 2>&1; then windowmanager="$(wmctrl -m | head -n1)" windowmanager=${windowmanager/Name: /} @@ -1212,7 +1208,6 @@ usage () { cat << EOF --packages string/cmd Manually set the package count --shell string/cmd Manually set the shell --winman string/cmd Manually set the window manager - --use_wmctrl on/off Use wmctrl for a more accurate reading --cpu string/cmd Manually set the cpu name --memory string/cmd Manually set the memory --speed_type Change the type of cpu speed to get @@ -1301,7 +1296,6 @@ while [ "$1" ]; do --packages) packages="$2" ;; --shell) shell="$2" ;; --winman) windowmanager="$2" ;; - --use_wmctrl) use_wmctrl="$2" ;; --cpu) cpu="$2" ;; --speed_type) speed_type="$2" ;; --memory) memory="$2" ;;