zerodya / hyprfreeze Goto Github PK
View Code? Open in Web Editor NEWUtility to suspend a game process (and other programs) in Hyprland and Sway
License: GNU General Public License v3.0
Utility to suspend a game process (and other programs) in Hyprland and Sway
License: GNU General Public License v3.0
I have encountered an issue when using this script with Minecraft... when using this script to pause a running Minecraft client, any other audio being played (I use Pipewire) is muted (the clip/video/program continues running). This seems to be one-way; audio in MC does not shut down when I pause the other app.
This issue happens when pausing a game while the mouse cursor is inside the game window. It's like the mouse cursor gets paused too, and is stuck in that state (Proton games run in XWayland), so it stops working in other XWayland windows too.
This issue is apparently only present when running the script via a keybind.
For some reason running the same script in a terminal (by manually assigning the game process to the PID variable) works as intended and mouse input works correctly in other Xorg/XWayland windows.
Script I ran in terminal which works as intended:
PID=26043 #Manually assign pid of a game
PIDS=$(pstree $PID -npl | grep -oP '(?<=\()[0-9]+(?=\))')
kill -STOP $PIDS
Pausing a game running in gamescope also works as intended.
On further analysis it looks like this issue only happens when pausing a game while the mouse cursor is inside the game window.
If I add a sleep timer like this
if [[ "$(ps -o state= $PID)" == S ]]; then
sleep 3 #timer
kill -STOP $PIDS
exit 0
fi
run the script from keybind, and quickly move the mouse cursor out of the game window, the game gets paused after 3 seconds and the mouse works correctly in other XWayland windows.
Not sure how to proceed right now as this should be fixed in a way that still allows pausing the game instantaneously.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.