forked from Shinonome/dots-hyprland
sidebar: warp: no weird connection loop
This commit is contained in:
@@ -16,8 +16,7 @@ QuickToggleButton {
|
|||||||
source: 'cloudflare-dns-symbolic'
|
source: 'cloudflare-dns-symbolic'
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: 12
|
height: 16
|
||||||
height: 12
|
|
||||||
colorize: true
|
colorize: true
|
||||||
color: root.toggled ? Appearance.m3colors.m3onPrimary : Appearance.colors.colOnLayer1
|
color: root.toggled ? Appearance.m3colors.m3onPrimary : Appearance.colors.colOnLayer1
|
||||||
|
|
||||||
@@ -40,11 +39,8 @@ QuickToggleButton {
|
|||||||
id: connectProc
|
id: connectProc
|
||||||
command: ["warp-cli", "connect"]
|
command: ["warp-cli", "connect"]
|
||||||
onExited: (exitCode, exitStatus) => {
|
onExited: (exitCode, exitStatus) => {
|
||||||
console.log("Warp connection exited with code and status:", exitCode, exitStatus)
|
if (exitCode !== 0) {
|
||||||
if (exitCode === 0) {
|
Quickshell.execDetached(["notify-send", "Cloudflare WARP", "Connection failed. Please inspect manually with the <tt>warp-cli</tt> command", "-a", "Shell"])
|
||||||
connectProc.running = true
|
|
||||||
} else {
|
|
||||||
console.error("Warp connection failed, please check your connection or try again later.")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,7 +53,7 @@ QuickToggleButton {
|
|||||||
if (exitCode === 0) {
|
if (exitCode === 0) {
|
||||||
connectProc.running = true
|
connectProc.running = true
|
||||||
} else {
|
} else {
|
||||||
Quickshell.execDetached(["notify-send", "Cloudflare Warp", "Registration failed. Please inspect manually with the <tt>warp-cli</tt> command", "-a", "Shell"])
|
Quickshell.execDetached(["notify-send", "Cloudflare WARP", "Registration failed. Please inspect manually with the <tt>warp-cli</tt> command", "-a", "Shell"])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user