From 34fe183aa3a1d2830dfe3140e5279de2aff364c0 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Mon, 5 Feb 2024 17:50:45 +0100 Subject: [PATCH] do not use sysctl -q as Nix may deploy of a version of sysctl that doesn't support this option, fixes #716 --- .tmux.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 7818061..c07e25a 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -707,7 +707,7 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration' # _uptime() { # case "$_uname_s" in # *Darwin*|*FreeBSD*) -# boot=$(sysctl -q -n kern.boottime | awk -F'[ ,:]+' '{ print $4 }') +# boot=$(sysctl -n kern.boottime 2>/dev/null | awk -F'[ ,:]+' '{ print $4 }') # now=$(date +%s) # ;; # *Linux*|*CYGWIN*|*MSYS*|*MINGW*) @@ -741,13 +741,13 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration' # _loadavg() { # case "$_uname_s" in # *Darwin*|*FreeBSD*) -# tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f2)" +# tmux set -g @loadavg "$(sysctl -n vm.loadavg 2>/dev/null | cut -d' ' -f2)" # ;; # *Linux*|*CYGWIN*) # tmux set -g @loadavg "$(cut -d' ' -f1 < /proc/loadavg)" # ;; # *OpenBSD*) -# tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f1)" +# tmux set -g @loadavg "$(sysctl -n vm.loadavg 2>/dev/null | cut -d' ' -f1)" # ;; # esac # }