diff options
author | Tom Willemse | 2023-04-22 00:32:05 -0700 |
---|---|---|
committer | Tom Willemse | 2023-04-22 00:32:05 -0700 |
commit | 4ce635661de19247f0669d451c292f8c369da2ee (patch) | |
tree | a4d32ba15ee4bd0c91661463b40632f310d038e6 /oni/home/services/stumpwm/config | |
parent | 7c7af83a2750ea29b49a7205014eaadf1e889338 (diff) | |
download | new-dotfiles-4ce635661de19247f0669d451c292f8c369da2ee.tar.gz new-dotfiles-4ce635661de19247f0669d451c292f8c369da2ee.zip |
Show VPN status in mode-line
Diffstat (limited to 'oni/home/services/stumpwm/config')
-rw-r--r-- | oni/home/services/stumpwm/config | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/oni/home/services/stumpwm/config b/oni/home/services/stumpwm/config index 2c0ff58..252a983 100644 --- a/oni/home/services/stumpwm/config +++ b/oni/home/services/stumpwm/config @@ -16,6 +16,9 @@ (when (eq (sb-ext:process-status process) :exited) (run-hook *screen-unlocked-hook*))) +(defun vpn-connected-p () + (probe-file "/sys/class/net/vpn")) + (defcommand lock-screen () () "Lock the screen using i3lock. Run `*screen-locking-hook*' before locking it and run `*screen-unlocked-hook*' @@ -56,7 +59,12 @@ after it has been unlocked." '(:eval (or (ignore-errors (window-title (current-window))) "Unknown")) - "^>%d ")) + "^>" + '(:eval + (if (vpn-connected-p) + "^*5^B[VPN]^b^n " + "")) + "%d ")) (mode-line) (restore-from-file "default") |