~ubuntu-branches/ubuntu/vivid/byobu/vivid-proposed

« back to all changes in this revision

Viewing changes to usr/bin/byobu-status.in

  • Committer: Package Import Robot
  • Author(s): Dustin Kirkland
  • Date: 2014-07-26 16:13:23 UTC
  • mfrom: (1.1.229)
  • Revision ID: package-import@ubuntu.com-20140726161323-exfqdd23zou532me
Tags: 5.84-0ubuntu1
* usr/lib/byobu/include/dirs.in:
  - 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

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
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
36
36
        [ -r "$i" ] && . "$i"
37
37
done
 
38
[ -r "$BYOBU_CONFIG_DIR/datetime.tmux" ] && . "$BYOBU_CONFIG_DIR/datetime.tmux"
38
39
 
39
40
case "$BYOBU_BACKEND" in
40
41
        screen)
110
111
        *left|*right)
111
112
                eval items="\$$1"
112
113
                for i in $items; do
 
114
                        if [ "$BYOBU_BACKEND" = "tmux" ]; then
 
115
                                case "$i" in
 
116
                                        \#date)
 
117
                                                if [ -n "$BYOBU_DATE" ]; then
 
118
                                                        $BYOBU_SED -i -e "/BYOBU_DATE=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
 
119
                                                        printf "%s\n" 'BYOBU_DATE=' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
 
120
                                                        touch "$BYOBU_RUN_DIR/reload-required"
 
121
                                                        continue
 
122
                                                fi
 
123
                                        ;;
 
124
                                        \#time)
 
125
                                                if [ -n "$BYOBU_TIME" ]; then
 
126
                                                        $BYOBU_SED -i -e "/BYOBU_TIME=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
 
127
                                                        printf "%s\n" 'BYOBU_TIME=' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
 
128
                                                        touch "$BYOBU_RUN_DIR/reload-required"
 
129
                                                        continue
 
130
                                                fi
 
131
                                        ;;
 
132
                                        date)
 
133
                                                if [ -z "$BYOBU_DATE" ]; then
 
134
                                                        $BYOBU_SED -i -e "/BYOBU_DATE=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
 
135
                                                        printf "%s\n" 'BYOBU_DATE="%Y-%m-%d "' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
 
136
                                                        touch "$BYOBU_RUN_DIR/reload-required"
 
137
                                                        continue
 
138
                                                fi
 
139
                                        ;;
 
140
                                        time)
 
141
                                                if [ -z "$BYOBU_TIME" ]; then
 
142
                                                        $BYOBU_SED -i -e "/BYOBU_TIME=/d" "$BYOBU_CONFIG_DIR/datetime.tmux"
 
143
                                                        printf "%s\n" 'BYOBU_TIME="%H:%M:%S"' >> "$BYOBU_CONFIG_DIR/datetime.tmux"
 
144
                                                        touch "$BYOBU_RUN_DIR/reload-required"
 
145
                                                        continue
 
146
                                                fi
 
147
                                        ;;
 
148
                                esac
 
149
                        fi
113
150
                        case "$i" in \#*) continue ;; esac
114
151
                        get_status "$i"
115
152
                done