Skip to content

Instantly share code, notes, and snippets.

@calebccff
Last active January 15, 2024 10:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calebccff/ff10cb96a4e52686f9836e59b7f2e1cb to your computer and use it in GitHub Desktop.
Save calebccff/ff10cb96a4e52686f9836e59b7f2e1cb to your computer and use it in GitHub Desktop.
Make your shell run faster
#!/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