firefox -> chromium and initial bspwm config (thanks fbt)
This commit is contained in:
parent
fcd1e75e6d
commit
eaff767e63
12 changed files with 444 additions and 1 deletions
53
bspwm/panel/panel_status
Executable file
53
bspwm/panel/panel_status
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source "$HOME/.config/bspwm/common"
|
||||
|
||||
status::date() {
|
||||
while true; do
|
||||
printf 'date::%%{T2}%s%%{T}\n' "$(date '+%a %d %H:%M')"
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
status::updates() {
|
||||
declare pkgs
|
||||
|
||||
while true; do
|
||||
pkgs=( $(pacman -Qqu) )
|
||||
pkgs_n=${#pkgs[@]}
|
||||
|
||||
if (( pkgs_n )); then
|
||||
printf 'updates::[ Updates: %s ]\n' "${#pkgs[@]}"
|
||||
else
|
||||
printf 'updates::[ No updates ]\n'
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
kill $(jobs -p)
|
||||
}
|
||||
|
||||
rexec() {
|
||||
kill $(jobs -p)
|
||||
exec "$0"
|
||||
}
|
||||
|
||||
main() {
|
||||
declare msg date
|
||||
|
||||
trap cleanup EXIT TERM INT
|
||||
trap rexec HUP
|
||||
|
||||
modules=( date )
|
||||
|
||||
for i in "${modules[@]}"; do
|
||||
"status::${i}" > "$panel_fifo" &
|
||||
done
|
||||
|
||||
wait
|
||||
}
|
||||
|
||||
main
|
Loading…
Add table
Add a link
Reference in a new issue