gamemoded will now load and merge settings from the following locations - arrays will merge and single settings will overwrite.
1. /usr/share/gamemode/
2. /etc/
3. $XDG_CONFIG_HOME or $HOME/.config/
4. $PWD
This allows the client to query the daemon about the status of gamemode.
Returns the following:
0 if gamemode is inactive
1 if gamemode is active
2 if gamemode is active and this client is registered
-1 if the query failed
Passing -s to gamemoded will simply query and print the current status.
Allows for more comprehensive testing when using 'gamemoded -r' as well as more reactionary program behaviour
A much requested feature, this allows for providing custom scripts in the config file. An example in the man page is below and would trigger both a system notification, and allow control over a background crypto mining script automatically in gamemode.
[custom]
; Custom scripts (executed using the shell) when gamemode starts and ends
start=notify-send "GameMode started"
/home/me/bin/stop_ethmining.sh
end=notify-send "GameMode ended"
/home/me/bin/start_ethmining.sh
Scripts are run with system() and do not have any special privilages, as with the rest of the daemon, custom scripts that require root will need their own permissions set up externally.
This commit also renames two defines as they needed to be moved to the public interface.
as it's already required by meson.
Also use the default unit file path (/usr/lib/systemd/user/) for
packaged versions. /etc/systemd/user is intended for manually installed
services.
arch-meson is just a Meson wrapper with correct arch packaging prefixes set.
* Install off the 1.0 tag not master
* Generally remove some headers to clean up the view on GitHub
* Link to contributors page as we now have more than 2
Updating the README.md to bring it ready for wider release:
* Removed some points that were more implementation details
* Added Contributions section
* Simplified the usage section
* Expanded initial explanation
* Fixed steam launch command to allow the overlay to still work
Others:
* Mark as 1.0
* Update the license file for 2018
Checks for a gamemode.ini in /usr/share/gamemode/ (or in the cwd for debugging)
Currently allows for blacklisting and whitelisting clients based on rudimentary needle-haystack executable name checks
See the example/gamemode.ini file for expected syntax
Using the BSD licensed inih library (with additional meson.build file)
This ensures we use the architecture independent path in the environment
variable, allowing multiarch + multilib system paths to be respected.
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This is a slightly modified version of Ikey's format for usysconf found here: https://github.com/solus-project/usysconf/blob/master/.clang-format
Modifications are to change to tab indentation, and tab/indent widths of 4
You'll never please everyone, but I find tabs for indentation is the most pragmatic approach to keeping most people happy about indent length arguments.
This is a small daemon/libary to enable games to request a
performance "game mode" from the system.
Currently only implemented to upgrade the CPU governor and
automatically downgrade it once done.
A game only needs to load libgamemodeauto to activate the request.
Which means an LD_PRELOAD can be applied to any game to activate
the mode as needed.
However gamemode_client.h can be used to manually activate/deactivate
the mode as needed, and also perform error checking.
The libs are miminal loaders to call into an installed libgamemode
which, if the daemon is installed and running, will send through
the equivelant game mode request, and magic will happen.
See the README.md for more details.
Currently licensed under the BSD 3 clause license.