Bump sunshine to stable & include res script from lyzardbyte docs

This commit is contained in:
tem
2024-02-22 08:09:27 +03:00
committed by Josh Sunnex
parent c3941d1f0b
commit 63cfefa1fc
2 changed files with 36 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
#!/bin/bash
###
# File: set-custom-res.sh
# Project: bin
# Author: LyzardByte Community Docs
###
# Get params and set any defaults
width=${1:-1920}
height=${2:-1080}
refresh_rate=${3:-60}
# You may need to adjust the scaling differently so the UI/Text isn't too small / big
scale=${4:-1}
# Get the name of the active display
display_output=$(xrandr | grep " connected" | awk '{print $1 }')
# Get the modeline info from the 2nd row in the cvt output
modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2')
xrandr_mode_str=${modeline//Modeline \"*\" /}
mode_alias="${width}x${height}"
echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}"
xrandr --newmode ${mode_alias} ${xrandr_mode_str}
xrandr --addmode ${display_output} ${mode_alias}
# Reset Scaling
xrandr --output ${display_output} --scale ${scale}
# Apply new xrandr mode
xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
# Optionally reset your wallpaper
# xwallpaper --zoom /path/to/wallpaper.png