forked from Shinonome/dots-hyprland
Merge remote-tracking branch 'origin/main' into addon-i18n
This commit is contained in:
@@ -15,8 +15,8 @@ QuickToggleButton {
|
||||
toggleBluetooth.running = true
|
||||
}
|
||||
altAction: () => {
|
||||
Hyprland.dispatch(`exec ${ConfigOptions.apps.bluetooth}`)
|
||||
Hyprland.dispatch("global quickshell:sidebarRightClose")
|
||||
Quickshell.execDetached(["bash", "-c", `${ConfigOptions.apps.bluetooth}`])
|
||||
Hyprland.dispatch("global quickshell:sidebarRightClose")
|
||||
}
|
||||
Process {
|
||||
id: toggleBluetooth
|
||||
|
||||
@@ -7,20 +7,27 @@ import Quickshell.Io
|
||||
import Quickshell.Hyprland
|
||||
|
||||
QuickToggleButton {
|
||||
property bool enabled: false
|
||||
id: root
|
||||
buttonIcon: "gamepad"
|
||||
toggled: enabled
|
||||
toggled: toggled
|
||||
|
||||
onClicked: {
|
||||
enabled = !enabled
|
||||
if (enabled) {
|
||||
// gameModeOn.running = true
|
||||
Hyprland.dispatch(`exec hyprctl --batch "keyword animations:enabled 0; keyword decoration:shadow:enabled 0; keyword decoration:blur:enabled 0; keyword general:gaps_in 0; keyword general:gaps_out 0; keyword general:border_size 1; keyword decoration:rounding 0; keyword general:allow_tearing 1"`)
|
||||
root.toggled = !root.toggled
|
||||
if (root.toggled) {
|
||||
Quickshell.execDetached(["bash", "-c", `hyprctl --batch "keyword animations:enabled 0; keyword decoration:shadow:enabled 0; keyword decoration:blur:enabled 0; keyword general:gaps_in 0; keyword general:gaps_out 0; keyword general:border_size 1; keyword decoration:rounding 0; keyword general:allow_tearing 1"`])
|
||||
} else {
|
||||
Hyprland.dispatch("exec hyprctl reload")
|
||||
Quickshell.execDetached(["hyprctl", "reload"])
|
||||
}
|
||||
}
|
||||
Process {
|
||||
id: fetchActiveState
|
||||
running: true
|
||||
command: ["bash", "-c", `test "$(hyprctl getoption animations:enabled -j | jq ".int")" -ne 0`]
|
||||
onExited: (exitCode, exitStatus) => {
|
||||
console.log("Game mode toggle exited with code:", exitCode, "and status:", exitStatus)
|
||||
root.toggled = exitCode !== 0 // Inverted because enabled = nonzero exit
|
||||
}
|
||||
}
|
||||
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Game mode")
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ QuickToggleButton {
|
||||
toggleNetwork.running = true
|
||||
}
|
||||
altAction: () => {
|
||||
Hyprland.dispatch(`exec ${Network.ethernet ? ConfigOptions.apps.networkEthernet : ConfigOptions.apps.network}`)
|
||||
Quickshell.execDetached(["bash", "-c", `${Network.ethernet ? ConfigOptions.apps.networkEthernet : ConfigOptions.apps.network}`])
|
||||
Hyprland.dispatch("global quickshell:sidebarRightClose")
|
||||
}
|
||||
Process {
|
||||
|
||||
Reference in New Issue
Block a user