feat(polybar): ssh and keepassxc

This commit is contained in:
Flinner Yuu 2022-04-17 05:28:14 +03:00
parent e8469a7625
commit 577fe721b3
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
2 changed files with 29 additions and 1 deletions

View File

@ -145,7 +145,7 @@ font-1 = "waffle:size=10;3"
#modules-right = color-switch sep network sep keyboard battery volume backlight sep sysmenu try
modules-left = launcher sep workspaces sep memory_bar cpu_bar sep temperature sep title
modules-center = date sep mu4e_edu mu4e
modules-center = date sep mu4e_edu mu4e ssh keepassxc
modules-right = color-switch sep network sep keyboard sep volume brightness sep filesystem_bar sep battery sep sysmenu tray
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View File

@ -44,6 +44,34 @@ label-padding = 1
format-prefix =
format-prefix-foreground = ${color.blue}
[module/ssh]
type = custom/script
exec = (ssh-add -l > /dev/null && ssh-add -l | wc -l) || echo 0
interval = 5
format = <label>
label-padding = 1
format-prefix =
format-prefix-foreground = ${color.green}
# this checks if keepassxc is open, by using secret-tool
# secret-tool store --label='is_keepassxc_open' check status
# and type anything in the password prompt.
# See: https://github.com/keepassxreboot/keepassxc/discussions/7906
[module/keepassxc]
type = custom/script
exec = secret-tool lookup check status &> /dev/null && echo " "
interval = 5
format = <label>
label-padding = 1
format-prefix = ""
format-prefix-foreground = ${color.green}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/updates]