Closed nxtcoder36 closed 2 weeks ago
This pull request implements a Wireguard status indicator in the workspace environment. It modifies the .zshrc file to display an "offline" status in the right prompt when the Wireguard connection is not active, and updates the start.sh script to initialize and run a background process for checking the online status.
sequenceDiagram
participant StartScript as start.sh
participant CheckOnline as .check-online
participant BackgroundProcess as Background Process
StartScript->>CheckOnline: Copy .check-online to home directory
StartScript->>BackgroundProcess: Run .check-online in background
BackgroundProcess-->>StartScript: Check online status
Note right of BackgroundProcess: Updates /tmp/kl/online.status
classDiagram
class Zshrc {
+update_rprompt()
+TRAPALRM()
+precmd()
+add-zsh-hook precmd update_rprompt
+TMOUT = 1
}
Zshrc : update_rprompt() -- updates the right prompt based on online status
Zshrc : TRAPALRM() -- triggers update_rprompt
Zshrc : precmd() -- checks hash and updates prompt symbol
Zshrc : TMOUT -- sets timeout for prompt update
Change | Details | Files |
---|---|---|
Implement Wireguard status indicator in zsh prompt |
|
klbox-docker/.zshrc |
Initialize and run online status check in workspace startup |
|
klbox-docker/start.sh |
Remove unnecessary shebang and empty line from .zshrc |
|
klbox-docker/.zshrc |
Summary by Sourcery
Enhance the Zsh configuration to dynamically update the right prompt based on online status and modify the start script to include a new online check script.
Enhancements: