You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
321 B
Bash
15 lines
321 B
Bash
2 years ago
|
#!/usr/bin/env bash
|
||
|
# checks for agent status and echos to status bar
|
||
|
|
||
2 years ago
|
if [ -S ~/.ssh/ssh_auth_sock ] ; then
|
||
2 years ago
|
# agent active
|
||
|
clr='#[fg=color34]' # green
|
||
|
symb=$(echo -e '\uf00c')
|
||
|
else
|
||
|
# agent not active
|
||
|
clr='#[fg=color1]' # red
|
||
|
symb=$(echo -e '\uf00d')
|
||
|
fi
|
||
|
|
||
|
printf 'Agent %s%s #[default]' $clr $symb
|