mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
* usr/bin/byobu-status.in:
- restore the ability to toggle date and time on and off from the config interface, as well as hand editing the config file
This commit is contained in:
parent
d30e42e012
commit
4b93622dcc
2 changed files with 40 additions and 0 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -4,6 +4,9 @@ byobu (5.84) unreleased; urgency=medium
|
|||
- make the custom scripts bin dir
|
||||
* usr/lib/byobu/custom:
|
||||
- ensure we clear the cache for custom scripts
|
||||
* usr/bin/byobu-status.in:
|
||||
- restore the ability to toggle date and time on and off from the config
|
||||
interface, as well as hand editing the config file
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Sat, 26 Jul 2014 16:13:23 -0500
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ PKG="byobu"
|
|||
for i in "${BYOBU_PREFIX}/share/$PKG/status/status" "${BYOBU_PREFIX}/share/$PKG/status/statusrc" "$BYOBU_CONFIG_DIR/status" "$BYOBU_CONFIG_DIR/statusrc" "$BYOBU_CONFIG_DIR/color" "$BYOBU_CONFIG_DIR/color.tmux"; do
|
||||
[ -r "$i" ] && . "$i"
|
||||
done
|
||||
[ -r "$BYOBU_CONFIG_DIR/datetime.tmux" ] && . "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
|
||||
case "$BYOBU_BACKEND" in
|
||||
screen)
|
||||
|
@ -110,6 +111,42 @@ case "$1" in
|
|||
*left|*right)
|
||||
eval items="\$$1"
|
||||
for i in $items; do
|
||||
if [ "$BYOBU_BACKEND" = "tmux" ]; then
|
||||
case "$i" in
|
||||
\#date)
|
||||
if [ -n "$BYOBU_DATE" ]; then
|
||||
$BYOBU_SED -i -e "/BYOBU_DATE=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
printf "%s\n" 'BYOBU_DATE=' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
touch "$BYOBU_RUN_DIR/reload-required"
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
\#time)
|
||||
if [ -n "$BYOBU_TIME" ]; then
|
||||
$BYOBU_SED -i -e "/BYOBU_TIME=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
printf "%s\n" 'BYOBU_TIME=' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
touch "$BYOBU_RUN_DIR/reload-required"
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
date)
|
||||
if [ -z "$BYOBU_DATE" ]; then
|
||||
$BYOBU_SED -i -e "/BYOBU_DATE=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
printf "%s\n" 'BYOBU_DATE="%Y-%m-%d "' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
touch "$BYOBU_RUN_DIR/reload-required"
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
time)
|
||||
if [ -z "$BYOBU_TIME" ]; then
|
||||
$BYOBU_SED -i -e "/BYOBU_TIME=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
printf "%s\n" 'BYOBU_TIME="%H:%M:%S"' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
|
||||
touch "$BYOBU_RUN_DIR/reload-required"
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case "$i" in \#*) continue ;; esac
|
||||
get_status "$i"
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue