A simple extension for gnome-shell that let easily set a threshold to limit battery charge level. This extension uses "pkexec" since sudo permissions are needed to change the threshold level. Tested on Fedora Silverblue 35,36,37 and 38 (gnome-shell 3.41, 3.42, 3.43, 3,44) on an Asus Vivobook. Github page: https://github.com/francku/gnome-shell-extension-battery-threshold
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.