better versions

This commit is contained in:
Tahinli 2022-12-08 00:11:45 +03:00
parent 9637a1990d
commit a493a2e631
2 changed files with 32 additions and 8 deletions

26
configFixer.sh Normal file → Executable file
View file

@ -1,12 +1,30 @@
echo -e ' --->Tahinli Linux Easy Config Fixer<---\n'
echo -e '1) Nvidia Primary Fix\n2) Alsa Headset Detection Fix\n'
function restartSelection
{
echo -e ' |#|Do You Want to Restart System\n0) Restart\n1) Do not Restart\n'
read restartCheck
case $restartCheck in
0)
echo -e '\n |»|Restarting\n'
reboot
;;
1)
echo -e '\n |»|Do not Restart Selected\n'
;;
esac
}
echo -e '1) Discrete Nvidia GPU as a Primary\n2) Integrated GPU as a Primary\n3) Alsa Headset Detection Fix\n'
read selection
case $selection in
1)
echo -e ' #Nvidia Primary Fix Selected\n'
echo -e ' #Discrete Nvidia GPU as a Primary Selected\n'
echo -e '#This file is provided by xorg-x11-drv-nvidia\n#Edited by Tahinli\n\nSection "OutputClass"\n\tIdentifier "nvidia"\n\tMatchDriver "nvidia-drm"\n\tDriver "nvidia"\n\tOption "AllowEmptyInitialConfiguration"\n\tOption "SLI" "Auto"\n\tOption "BaseMosaic" "on"\n\tOption "PrimaryGPU" "yes"\nEndSection\n\nSection "ServerLayout"\n\tIdentifier "layout"\n\tOption "AllowNVIDIAGPUScreens"\n\tOption "PrimaryGPU" "yes"\nEndSection\n' | sudo tee /etc/X11/xorg.conf.d/nvidia.conf
;;
2)
echo -e ' #Integrated GPU as a Primary Selected\n'
echo -e '#This file is provided by xorg-x11-drv-nvidia\n#Edited by Tahinli\n\nSection "OutputClass"\n\tIdentifier "nvidia"\n\tMatchDriver "nvidia-drm"\n\tDriver "nvidia"\n\tOption "AllowEmptyInitialConfiguration"\n\tOption "SLI" "Auto"\n\tOption "BaseMosaic" "on"\n\tOption "PrimaryGPU" "no"\nEndSection\n\nSection "ServerLayout"\n\tIdentifier "layout"\n\tOption "AllowNVIDIAGPUScreens"\n\tOption "PrimaryGPU" "no"\nEndSection\n' | sudo tee /etc/X11/xorg.conf.d/nvidia.conf
;;
3)
echo -e ' #Alsa Headset Detectetion Fix Selected\n'
echo 'options snd-hda-intel index=0 model=dell-headset-multi' | sudo tee /etc/modprobe.d/alsa-base.conf
;;
@ -14,3 +32,7 @@ case $selection in
echo -e ' ---Invalid Selection\n Quiting'
;;
esac
if [[ $selection > 0 ]] && [[ $selection < 3 ]];
then
restartSelection
fi

View file

@ -4,8 +4,9 @@ echo " 2- Join- Linear_Extended"
echo " 3- Mirror"
echo " 4- First Monitor Only"
echo " 5- Second Monitor Only"
echo -e " 6- Second Monitor Only-Vertical\n"
read selection
if [[ $selection > 0 ]] && [[ $selection < 6 ]];
if [[ $selection > 0 ]] && [[ $selection < 7 ]];
then
echo " --->Request's Accepted-|"
xrandr --output HDMI-0 --off
@ -20,6 +21,7 @@ case $selection in
xrandr --output HDMI-0 --mode 1920x1080 -r 75 --rotate normal;;
4)xrandr --output eDP-1-1 --mode 1920x1080 -r 144 --rotate normal;;
5)xrandr --output HDMI-0 --mode 1920x1080 -r 75 --rotate normal;;
6)xrandr --output HDMI-0 --mode 1920x1080 -r 75 --rotate right;;
*)echo "------Invalid Selection";;
esac
echo -e "\n # DONE #"