Skip to content

Instantly share code, notes, and snippets.

@aleozlx
Created April 21, 2018 09:28
Show Gist options
  • Select an option

  • Save aleozlx/25e7f46dd1f8499aea2ce57d873875e5 to your computer and use it in GitHub Desktop.

Select an option

Save aleozlx/25e7f46dd1f8499aea2ce57d873875e5 to your computer and use it in GitHub Desktop.
#!/bin/sh
GPU_query="\033[34mGPU\033[0m » $(nvidia-smi --query-gpu=gpu_name,pstate,utilization.gpu,utilization.memory,temperature.gpu --format=csv,noheader|sed 's/,/ |/g') °C"
i3status | while :
do
read line
echo -e "$GPU_query | \033[34mCPU\033[0m » $line" || exit 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment