From c4ced0af309fbf2a27d5006d0b01b52a796f0407 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Wed, 17 Oct 2018 13:18:00 +0300 Subject: [PATCH] Separate config for homeserver with hwtemp backtick. --- screen/backticks/hwtemp-homeserver.sh | 3 +++ screen/homeserver.screenrc | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100755 screen/backticks/hwtemp-homeserver.sh create mode 100644 screen/homeserver.screenrc diff --git a/screen/backticks/hwtemp-homeserver.sh b/screen/backticks/hwtemp-homeserver.sh new file mode 100755 index 0000000..0686773 --- /dev/null +++ b/screen/backticks/hwtemp-homeserver.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +# AMD A10-6800K APU (via motherboard until offset problem in k10temp is fixed) +sensors | fgrep 'CPUTIN:' | awk '{print $2}' | head -n1 diff --git a/screen/homeserver.screenrc b/screen/homeserver.screenrc new file mode 100644 index 0000000..7a961b0 --- /dev/null +++ b/screen/homeserver.screenrc @@ -0,0 +1,18 @@ +# Including common settings +source ~/.dotfiles/screen/common.screenrc + +# Creating default windows +screen -t shell +screen -t root1 sudo -i +screen -t root2 sudo -i + +# Selecting first window +select 0 + +# Backtick commands to output in the hardstatus +backtick 1 10 10 sh -c '~/.dotfiles/screen/backticks/hwtemp-homeserver.sh' +backtick 2 10 10 sh -c '~/.dotfiles/screen/backticks/loadavg.sh' +backtick 3 10 10 sh -c '~/.dotfiles/screen/backticks/memory.sh' + +hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][ %1` ][ %2` ][ %3` ][%{B} %d-%m-%Y %{W}%c %{g}]' +