X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=blobdiff_plain;f=setup.sh;h=197263de0aca28cd92d749de5adb1d6599c19afc;hp=3edf5f4d15ad26460b95ee590224932238ad75bd;hb=ba1e10becaa8755981364ea61deee6cf48c38fb9;hpb=489ef4f059c7315dccca529e279fb15205636e47 diff --git a/setup.sh b/setup.sh index 3edf5f4..197263d 100755 --- a/setup.sh +++ b/setup.sh @@ -195,6 +195,14 @@ for x in /sys/class/power_supply/BAT*; do done apply_optional_replacement screenrc \ battery BATTERY "$battery" +# Display current temperature. Necessary lines are marked as "(TEMPERATURE)". +# Also used for Tmux. +temperature=/sys/devices/platform/coretemp.0 +if ! test -d "$temperature"; then + temperature= +fi +apply_optional_replacement screenrc \ + temperature TEMPERATURE "$temperature" if installed tmux; then @@ -202,6 +210,8 @@ if installed tmux; then apply_optional_replacement tmux.conf \ battery BATTERY "$battery" + apply_optional_replacement tmux.conf \ + temperature TEMPERATURE "$temperature" # Old Tmux versions can't handle that. generate tmux.conf '' ./bin/remove-continuation.pl