Skip to content

Commit cd2551b

Browse files
committed
create separate patcher for cachyos (fish)
1 parent a3843bf commit cd2551b

File tree

3 files changed

+37
-18
lines changed

3 files changed

+37
-18
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Compatible only with systems running **bash**, **zsh** or **fish** as their defa
99

1010
- Ubuntu (base and official flavours)
1111
- Linux Mint
12-
- CachyOS
12+
- CachyOS (use `patcher-cachy.fish` instead of `patcher.sh`)
1313
- Fedora (official and spins, except atomic)
1414
- openSUSE (Tumbleweed)
1515
- MX Linux (AHS only)
@@ -21,9 +21,15 @@ Compatible only with systems running **bash**, **zsh** or **fish** as their defa
2121

2222
## Usage
2323

24+
### Without terminal
25+
- Download the proper script for your system on [Releases](https://github.com/psygreg/shader-patcherx/releases).
26+
- Right-click the file, go to Properties on the submenu then set it to run as a program.
27+
- Double click it to run.
28+
29+
### On terminal
2430
`git clone https://github.com/psygreg/shader-patcherx.git`\
2531
`cd shader-patcherx`\
26-
`chmod +x patcher.sh`\
27-
`./patcher.sh`
32+
`chmod +x patcher.sh` for most systems; or `chmod +x patcher-cachy.fish` for *CachyOS* \
33+
`./patcher.sh` for most systems; or `./patcher-cachy.fish` for *CachyOS*
2834

29-
You can delete the "shader-patcherx" folder once finished.
35+
**You can delete the "shader-patcherx" folder once finished.**

patcher-cachy.fish

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/fish
2+
# vars
3+
SUCCESS="Success! Reboot to apply."
4+
APPLIED="Patch already present in '$DEST_FILE'. Nothing to do."
5+
6+
# runtime
7+
GPU=$(lspci | grep -i '.* vga .* nvidia .*')
8+
shopt -s nocasematch
9+
if command -v fish &>/dev/null; then
10+
if [[ $GPU == *' nvidia '* ]]; then
11+
set -x --universal __GL_SHADER_DISK_CACHE_SIZE '12000000000'
12+
echo "$SUCCESS"
13+
sleep 5
14+
exit 0
15+
else
16+
set -x --universal AMD_VULKAN_ICD 'RADV'
17+
set -x --universal MESA_SHADER_CACHE_MAX_SIZE '12G'
18+
echo "$SUCCESS"
19+
sleep 5
20+
exit 0
21+
fi
22+
else
23+
echo "If you're not running this on CachyOS, use the standard 'patcher.sh' for bash and zsh."
24+
sleep 5
25+
exit 1
26+
fi

patcher.sh

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,7 @@ patch_mesa () {
3737

3838
GPU=$(lspci | grep -i '.* vga .* nvidia .*')
3939
shopt -s nocasematch
40-
if command -v fish &>/dev/null; then
41-
if [[ $GPU == *' nvidia '* ]]; then
42-
set -x --universal __GL_SHADER_DISK_CACHE_SIZE '12000000000'
43-
echo "$SUCCESS"
44-
sleep 5
45-
exit 0
46-
else
47-
set -x --universal AMD_VULKAN_ICD 'RADV'
48-
set -x --universal MESA_SHADER_CACHE_MAX_SIZE '12G'
49-
echo "$SUCCESS"
50-
sleep 5
51-
exit 0
52-
fi
53-
elif [[ -f "$HOME/.bash_profile" ]]; then
40+
if [[ -f "$HOME/.bash_profile" ]]; then
5441
DEST_FILE="$HOME/.bash_profile"
5542
if [[ $GPU == *' nvidia '* ]]; then
5643
patch_nv

0 commit comments

Comments
 (0)