Skip to content

Commit

Permalink
Update Initialize.sh
Browse files Browse the repository at this point in the history
Update prime-run, delete " and %U, etc in Exec in .desktop.
  • Loading branch information
张天怿 authored and 张天怿 committed Aug 15, 2020
1 parent 6a51c96 commit 3335e5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ echo '#!/bin/sh
file=$1
if [ "${file##*.}"x = "desktop"x ]
then
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia $(cat $file | grep "Exec=" | sed "s/^Exec=https://" | head -n 1)
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia $(cat $file | grep "Exec=" | sed "s/^Exec=https://" | sed 's/%.//' | sed 's/^"//g' | sed 's/" *$//g' | head -n 1)
else
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia $file
fi' | sudo tee /usr/bin/prime-run.bak > /dev/null
Expand Down

0 comments on commit 3335e5a

Please sign in to comment.