]> git.rmz.io Git - dotfiles.git/commitdiff
bin: redirect Steam output to log and rotate it
authorSamir Benmendil <me@rmz.io>
Sat, 8 Aug 2020 12:23:04 +0000 (13:23 +0100)
committerSamir Benmendil <me@rmz.io>
Sat, 8 Aug 2020 12:23:51 +0000 (13:23 +0100)
Steam seems to write to the xinit log, this is just noise in that log.
Let's have a separate log for steam instead.

Steam logs a lot and the log grow quite big and don't need to be kept
around, so rotate them also. Keeping last one.

bin/steam

index 206d8c87e38ed8b7ae81dd631889adf557d11b70..56521bd483090a3e79a543f05bb93755503701b9 100755 (executable)
--- a/bin/steam
+++ b/bin/steam
@@ -8,4 +8,6 @@ export STEAMWM_MANAGE_ERRORS=1
 
 # see https://chakraos.org/wiki/index.php?title=Steam#Missing_Direct_Rendering
 export LD_PRELOAD='/home/ramsi/src/steamwm/steamwm/$LIB/steamwm.so /usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so'
-exec /usr/lib/steam/steam "${@:-"steam://open/games/"}"
+steam_log=$XDG_DATA_HOME/Steam/steam_stdout.txt
+[[ -f "$steam_log" ]] && mv "$steam_log"{,.old}
+exec /usr/lib/steam/steam "${@:-"steam://open/games/"}" &> $steam_log