From e3a86f9f7a335e417d038a7ec183c8cd2fd95a19 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Tue, 23 Nov 2021 01:06:56 +0100 Subject: [PATCH] [scripts] feat : fetch infos more robust on wm --- .local/bin/fetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/fetch b/.local/bin/fetch index d45ccc5..254c08b 100755 --- a/.local/bin/fetch +++ b/.local/bin/fetch @@ -18,8 +18,8 @@ os='Arch Linux' kernel="$(uname -sr)" uptime="$(uptime -p | sed 's/up //')" packages="$(pacman -Q | wc -l)" -shell="$(basename "$SHELL")" -wm="$(tail -n 1 "$XDG_CONFIG_HOME/X11/xinitrc" | cut -d ' ' -f 2)" +shell="$($SHELL --version | sed -e 's/(.*)//')" +wm="$(tail -n 1 "$XDG_CONFIG_HOME/X11/xinitrc" | rev | cut -d ' ' -f 1 | rev)" # parse the '/proc/meminfo' file splitting on ':' and 'k'. # the format of the file is 'key: 000kB' and an additional