Last active
January 15, 2024 10:28
-
-
Save calebccff/ff10cb96a4e52686f9836e59b7f2e1cb to your computer and use it in GitHub Desktop.
Make your shell run faster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PROC="gnome-shell" | |
CLAMP=900 | |
PID=$(pidof "$PROC") | |
function enable() { | |
echo "Setting uclamp min to 800 (max: 1024)" | |
uclampset --pid "$PID" -m "$CLAMP" | |
echo | |
echo "Done, Everything should be fast now" | |
} | |
function disable() { | |
echo "Setting uclamp min to 0" | |
uclampset --pid "$PID" -m 0 | |
echo | |
echo "Done, all slow again" | |
} | |
if [ "$1" = "-d" ]; then | |
disable | |
else | |
enable | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment