Added checks for wmctrl
This commit is contained in:
parent
c470e7eaa0
commit
5fcd3b82d3
1 changed files with 6 additions and 1 deletions
7
lfetch
7
lfetch
|
@ -16,7 +16,12 @@ ram_total() {
|
|||
|
||||
# Get WM name (Requires wmctrl to be installed!)
|
||||
wm_name() {
|
||||
awk '/Name:/ {print $2}' <(wmctrl -m)
|
||||
if [ -x "$(command -v wmctrl)" ]
|
||||
then
|
||||
awk '/Name:/ {print $2}' <(wmctrl -m)
|
||||
else
|
||||
echo "Unknown (Is wmctrl installed?)"
|
||||
fi
|
||||
}
|
||||
|
||||
# Store OS info (DOES NOT WORK ON ALL SYSTEMS!)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue