Skip to content

Commit

Permalink
feat(ujust): add post-gamescope-logs ujust (#1533)
Browse files Browse the repository at this point in the history
Co-authored-by: Aarron Lee <[email protected]>
  • Loading branch information
aarron-lee and aarron-lee authored Aug 22, 2024
1 parent dc6d4dc commit 0bba7d3
Showing 1 changed file with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,55 @@ bazzite-cli:
benchmark:
echo 'Running a 1 minute benchmark ...'
cd /tmp && stress-ng --matrix 0 -t 1m --times

post-gamescope-logs:
#!/usr/bin/bash
OUTPUT_FILE="/tmp/gathered_info.txt"

# Clear the output file or create it if it doesn't exist
> "$OUTPUT_FILE"

# Gather information from various sources
{
echo "GPU info"
lshw -C display

# Add a blank line for readability
echo

filepaths=(
"/sys/devices/virtual/dmi/id/bios_date"
"/sys/devices/virtual/dmi/id/board_name"
"/sys/devices/virtual/dmi/id/board_vendor"
"/sys/devices/virtual/dmi/id/product_name"
"$HOME/.gamescope-cmd.log"
"$HOME/.gamescope-stdout.log"
)

# Iterate over each file path in the array
for filepath in "${filepaths[@]}"; do
# Print the file path
echo "File: $filepath"

# Check if the file exists before trying to read it
if [[ -f "$filepath" ]]; then
# Print the file content
cat "$filepath"
else
echo "File not found: $filepath"
fi

# Add a blank line for readability
echo
done

echo "----- Contents of $HOME/.config/environment.d/ -----"
mkdir -p $HOME/.config/environment.d
cat "$HOME/.config/environment.d/"* 2>/dev/null || echo "No files found in $HOME/.config/environment.d/"

} >> "$OUTPUT_FILE"

fpaste $OUTPUT_FILE

# cleanup output file
rm -rf $OUTPUT_FILE

0 comments on commit 0bba7d3

Please sign in to comment.