forked from Shinonome/dots-hyprland
use hyprland global keybind dispatch for window toggling
This commit is contained in:
@@ -5,6 +5,7 @@ import "root:/modules/common/widgets"
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Hyprland
|
||||
|
||||
QuickToggleButton {
|
||||
toggled: Bluetooth.bluetoothEnabled
|
||||
@@ -17,17 +18,15 @@ QuickToggleButton {
|
||||
toggleBluetooth.running = true
|
||||
}
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
configureBluetooth.running = true
|
||||
Hyprland.dispatch(`exec ${ConfigOptions.apps.bluetooth}`)
|
||||
Hyprland.dispatch("global quickshell:sidebarRightClose")
|
||||
|
||||
}
|
||||
}
|
||||
hoverEnabled: false
|
||||
propagateComposedEvents: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
Process {
|
||||
id: configureBluetooth
|
||||
command: ["bash", "-c", `${ConfigOptions.apps.bluetooth} & qs ipc call sidebarRight close`]
|
||||
}
|
||||
Process {
|
||||
id: toggleBluetooth
|
||||
command: ["bash", "-c", `bluetoothctl power ${Bluetooth.bluetoothEnabled ? "off" : "on"}`]
|
||||
|
||||
@@ -2,9 +2,10 @@ import "root:/modules/common"
|
||||
import "root:/modules/common/widgets"
|
||||
import "root:/services"
|
||||
import "../"
|
||||
import Quickshell.Io
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Hyprland
|
||||
|
||||
QuickToggleButton {
|
||||
toggled: Network.networkName.length > 0 && Network.networkName != "lo"
|
||||
@@ -23,17 +24,14 @@ QuickToggleButton {
|
||||
toggleNetwork.running = true
|
||||
}
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
configureNetwork.running = true
|
||||
Hyprland.dispatch(`exec ${ConfigOptions.apps.network}`)
|
||||
Hyprland.dispatch("global quickshell:sidebarRightClose")
|
||||
}
|
||||
}
|
||||
hoverEnabled: false
|
||||
propagateComposedEvents: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
Process {
|
||||
id: configureNetwork
|
||||
command: ["bash", "-c", `${ConfigOptions.apps.network} & qs ipc call sidebarRight close`]
|
||||
}
|
||||
Process {
|
||||
id: toggleNetwork
|
||||
command: ["bash", "-c", "nmcli radio wifi | grep -q enabled && nmcli radio wifi off || nmcli radio wifi on"]
|
||||
|
||||
Reference in New Issue
Block a user