mirror of
https://github.com/neoromantique/dotfiles.git
synced 2026-03-13 21:53:20 +03:00
update
This commit is contained in:
@@ -37,11 +37,11 @@
|
||||
|
||||
# Device-specific configuration
|
||||
{{- if eq $deviceProfile "desktop" }}
|
||||
primaryMonitor = "DP-1"
|
||||
secondaryMonitor = "DP-2"
|
||||
primaryResolution = "2560x1440@165"
|
||||
secondaryResolution = "2560x1440@60"
|
||||
hasMultipleMonitors = true
|
||||
primaryMonitor = "DP-2"
|
||||
secondaryMonitor = ""
|
||||
primaryResolution = "2560x1440@144"
|
||||
secondaryResolution = ""
|
||||
hasMultipleMonitors = false
|
||||
hasTouchpad = false
|
||||
hasBattery = false
|
||||
idleTimeout = 300
|
||||
|
||||
@@ -127,6 +127,7 @@ def build_menu():
|
||||
lines.append(" ● Exit Node Active - Disconnect")
|
||||
for node in get_ts_exit_nodes():
|
||||
lines.append(f" ○ {node['hostname']} ({node['country']}/{node['city']})")
|
||||
lines.append(" ⊘ Tailscale Down")
|
||||
else:
|
||||
lines.append(" ○ Start Tailscale")
|
||||
|
||||
@@ -205,6 +206,11 @@ def handle_selection(selection):
|
||||
notify("Tailscale started")
|
||||
return
|
||||
|
||||
if clean == "Tailscale Down":
|
||||
run(["tailscale", "down"])
|
||||
notify("Tailscale stopped")
|
||||
return
|
||||
|
||||
for node in ts_exit_nodes:
|
||||
if node["hostname"] in clean or node["short"] in clean:
|
||||
disconnect_all_wg()
|
||||
|
||||
@@ -43,7 +43,7 @@ get_status() {
|
||||
fi
|
||||
|
||||
# Check Tailscale
|
||||
if command -v tailscale &>/dev/null; then
|
||||
if command -v tailscale &>/dev/null && tailscale status &>/dev/null; then
|
||||
ts_json=$(tailscale status --json 2>/dev/null)
|
||||
if [[ -n "$ts_json" ]]; then
|
||||
ts_state=$(echo "$ts_json" | jq -r '.BackendState // empty')
|
||||
|
||||
Reference in New Issue
Block a user