forked from Shinonome/dots-hyprland
game mode toggle: run hyprctl directly instead of relying on ags
moar consistency
This commit is contained in:
@@ -210,7 +210,7 @@ export const ModuleGameMode = async (props = {}) => {
|
|||||||
className: 'txt-small sidebar-iconbutton',
|
className: 'txt-small sidebar-iconbutton',
|
||||||
tooltipText: getString('Hyprland Game Mode'),
|
tooltipText: getString('Hyprland Game Mode'),
|
||||||
onClicked: (button) => {
|
onClicked: (button) => {
|
||||||
Hyprland.messageAsync('j/getoption animations:enabled')
|
Utils.execAsync(`hyprctl -j getoption animations:enabled`)
|
||||||
.then((output) => {
|
.then((output) => {
|
||||||
const enabled = JSON.parse(output)["int"] === 1;
|
const enabled = JSON.parse(output)["int"] === 1;
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
|
|||||||
Reference in New Issue
Block a user