Merge lp:~jefferyto/byobu/misc-updates into lp:byobu

Proposed by Jeffery To
Status: Needs review
Proposed branch: lp:~jefferyto/byobu/misc-updates
Merge into: lp:byobu
Diff against target: 1406 lines (+467/-282)
29 files modified
debian/changelog (+96/-0)
usr/bin/byobu-ctrl-a.in (+149/-76)
usr/bin/byobu-export.in (+1/-1)
usr/bin/byobu-janitor.in (+13/-7)
usr/bin/byobu-launch.in (+1/-1)
usr/bin/byobu-select-profile.in (+102/-75)
usr/bin/byobu-status-detail.in (+1/-1)
usr/bin/byobu-status.in (+6/-7)
usr/bin/byobu.in (+14/-20)
usr/lib/byobu/battery (+1/-1)
usr/lib/byobu/disk_io (+1/-1)
usr/lib/byobu/hostname (+1/-1)
usr/lib/byobu/include/common (+7/-3)
usr/lib/byobu/include/constants (+6/-10)
usr/lib/byobu/include/dirs.in (+23/-14)
usr/lib/byobu/include/shutil (+4/-4)
usr/lib/byobu/ip_address (+2/-2)
usr/lib/byobu/memory (+1/-1)
usr/lib/byobu/release (+2/-2)
usr/lib/byobu/updates_available (+14/-14)
usr/lib/byobu/users (+10/-2)
usr/lib/byobu/whoami (+3/-3)
usr/lib/byobu/wifi_quality (+4/-4)
usr/share/byobu/keybindings/f-keys.screen (+1/-1)
usr/share/byobu/keybindings/f-keys.tmux (+1/-1)
usr/share/byobu/profiles/Makefile.am (+1/-1)
usr/share/byobu/profiles/byoburc (+0/-27)
usr/share/byobu/profiles/screenrc (+1/-1)
usr/share/byobu/profiles/tmuxrc (+1/-1)
To merge this branch: bzr merge lp:~jefferyto/byobu/misc-updates
Reviewer Review Type Date Requested Status
Dustin Kirkland  Pending
Review via email: mp+368934@code.launchpad.net

Description of the change

There isn't a major theme to these changes, just things I noticed while working on porting byobu to OpenWrt (but aren't critical enough that I needed to patch right away).

There is one fix (trailing "#" sign for usr/lib/byobu/users). Originally it was working for screen but broken for tmux, then I fixed tmux but (unwittingly) broke screen. Now it should work for both.

I imagine the "create new config dir in ~/.config" change may be somewhat controversial. I think at this point most users will have a ~/.config directory and keeping $HOME clean(er) is a good thing.

To post a comment you must log in.
Revision history for this message
Jeffery To (jefferyto) wrote :

Should I separate these changes into separate branches/merge requests?

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hi Jeffrey,

Yeah, these are a lot of changes. I'm struggling to review all of them, as a monolith.

Revision history for this message
Jeffery To (jefferyto) wrote :

> Hi Jeffrey,
>
> Yeah, these are a lot of changes. I'm struggling to review all of them, as a
> monolith.

I can submit them one at a time (the first one is at https://code.launchpad.net/~jefferyto/byobu/fix-trailing-hash/+merge/379412) but I would prefer not to wait 6 months for a review.

Revision history for this message
Jeffery To (jefferyto) wrote :

I can submit all of the changes in separate merge requests all at once, but since they all include an update to debian/changelog, they will all conflict with each other.

Do you want me to submit all of the changes all at once and you will resolve the conflicts, or do you want me to submit them one at a time?

Unmerged revisions

2640. By Jeffery To

* usr/bin/byobu-status-detail.in,
  usr/bin/byobu-status.in:
  - Remove unnecessary backticks; the command returns no output, only
    the exit value is tested

2639. By Jeffery To

* usr/bin/byobu-ctrl-a.in,
  usr/bin/byobu-janitor.in,
  usr/share/byobu/keybindings/f-keys.screen,
  usr/share/byobu/keybindings/f-keys.tmux:
  - Fix ^A unbinding: ^A is bound in f-keys.screen / f-keys.tmux to
    autorun byobu-ctrl-a, but if the user selected a different key in
    byobu-config, it would unbind the custom key instead of ^A
  - Use functions to help make the logic easier to understand
  - Add "custom" and "manual" modes, that only unbind ^A ("emacs" mode
    would also set prefix to F12 for tmux, possibly overriding the
    user's custom prefix); "custom" when it is detected that the user
    has customized their prefix before byobu-ctrl-a was run for the
    first time, "manual" when the user just wants to disable the
    autorun
  - Add an "autorun" command line option, used when byobu-ctrl-a is
    triggered by the user pressing ^A; in this case, byobu-ctrl-a will
    wait for the user to press enter/return before exiting, so that
    the user can read the text output before the window auto-closes
  - Add a quit option, so that the user can exit byobu-ctrl-a without
    making any changes

2638. By Jeffery To

* usr/bin/byobu-status.in:
  - Include $BYOBU_CONFIG_DIR/datetime.tmux in the sourcing for loop

2637. By Jeffery To

* usr/bin/byobu-select-profile.in:
  - Update help message
  - Remove $BYOBU_CONFIG_DIR/profile test, it is not used directly in
    the script
  - Restore list colors functionality
  - Use local variables in functions
  - Simplify color calculation
  - Exit when --list / --help / invalid options are specified, before
    making changes
  - Removed -- option, command utilities that have a -- option expect
    data to come after the --

2636. By Jeffery To

* usr/bin/byobu-janitor.in:
  - Remove unused variables

2635. By Jeffery To

* usr/bin/byobu-export.in,
  usr/bin/byobu-janitor.in,
  usr/bin/byobu-launch.in,
  usr/bin/byobu-select-profile.in,
  usr/bin/byobu-status-detail.in,
  usr/bin/byobu-status.in,
  usr/bin/byobu.in,
  usr/lib/byobu/battery,
  usr/lib/byobu/disk_io,
  usr/lib/byobu/hostname,
  usr/lib/byobu/include/common,
  usr/lib/byobu/include/constants,
  usr/lib/byobu/include/shutil,
  usr/lib/byobu/ip_address,
  usr/lib/byobu/memory,
  usr/lib/byobu/release,
  usr/lib/byobu/updates_available,
  usr/lib/byobu/whoami,
  usr/lib/byobu/wifi_quality:
  - Add (and use) a byobu_test function to wrap $BYOBU_TEST

2634. By Jeffery To

* usr/bin/byobu.in:
  - Remove exporting of $BYOBU_BACKEND, this is already done in
    usr/lib/byobu/include/constants

2633. By Jeffery To

* usr/lib/byobu/include/constants:
  - Remove sourcing of files looking for $BYOBU_BACKEND, this is
    already done in usr/lib/byobu/include/common

2632. By Jeffery To

* usr/bin/byobu-status-detail.in:
  - Use $BYOBU_TEST

2631. By Jeffery To

* usr/bin/byobu.in:
  - Replace $HOME/.$PKG with $BYOBU_CONFIG_DIR

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2019-06-12 23:41:10 +0000
3+++ debian/changelog 2019-06-17 20:09:21 +0000
4@@ -2,6 +2,102 @@
5
6 * UNRELEASED
7
8+ [ Jeffery To ]
9+ * usr/bin/byobu-ctrl-a.in,
10+ usr/bin/byobu-janitor.in,
11+ usr/share/byobu/keybindings/f-keys.screen,
12+ usr/share/byobu/keybindings/f-keys.tmux:
13+ - Fix ^A unbinding: ^A is bound in f-keys.screen / f-keys.tmux to
14+ autorun byobu-ctrl-a, but if the user selected a different key in
15+ byobu-config, it would unbind the custom key instead of ^A
16+ - Use functions to help make the logic easier to understand
17+ - Add "custom" and "manual" modes, that only unbind ^A ("emacs" mode
18+ would also set prefix to F12 for tmux, possibly overriding the
19+ user's custom prefix); "custom" when it is detected that the user
20+ has customized their prefix before byobu-ctrl-a was run for the
21+ first time, "manual" when the user just wants to disable the
22+ autorun
23+ - Add an "autorun" command line option, used when byobu-ctrl-a is
24+ triggered by the user pressing ^A; in this case, byobu-ctrl-a will
25+ wait for the user to press enter/return before exiting, so that
26+ the user can read the text output before the window auto-closes
27+ - Add a quit option, so that the user can exit byobu-ctrl-a without
28+ making any changes
29+ * usr/bin/byobu-export.in,
30+ usr/bin/byobu-janitor.in,
31+ usr/bin/byobu-launch.in,
32+ usr/bin/byobu-select-profile.in,
33+ usr/bin/byobu-status-detail.in,
34+ usr/bin/byobu-status.in,
35+ usr/bin/byobu.in,
36+ usr/lib/byobu/battery,
37+ usr/lib/byobu/disk_io,
38+ usr/lib/byobu/hostname,
39+ usr/lib/byobu/include/common,
40+ usr/lib/byobu/include/constants,
41+ usr/lib/byobu/include/shutil,
42+ usr/lib/byobu/ip_address,
43+ usr/lib/byobu/memory,
44+ usr/lib/byobu/release,
45+ usr/lib/byobu/updates_available,
46+ usr/lib/byobu/whoami,
47+ usr/lib/byobu/wifi_quality:
48+ - Add (and use) a byobu_test function to wrap $BYOBU_TEST
49+ * usr/bin/byobu.in:
50+ - Use "sh -n" to check $HOME/.byoburc, to avoid sourcing a
51+ partially valid file
52+ - Remove redundant sourcing of $HOME/.byoburc
53+ - Set BYOBU_BACKEND before sourcing usr/lib/byobu/include/common, so
54+ the latter doesn't need to look for a backend
55+ - Remove sourcing of $BYOBU_CONFIG_DIR/backend, it is already
56+ sourced by usr/lib/byobu/include/common
57+ - Remove exporting of $BYOBU_BACKEND, this is already done in
58+ usr/lib/byobu/include/constants
59+ - Replace $HOME/.$PKG with $BYOBU_CONFIG_DIR
60+ * usr/bin/byobu.in,
61+ usr/share/byobu/profiles/byoburc,
62+ usr/share/byobu/profiles/Makefile.am:
63+ - Remove usr/share/byobu/profile/byoburc, since there are no longer
64+ separate ".screenrc" and ".byoburc" configurations and it is
65+ exactly the same as usr/share/byobu/profile/screenrc
66+ * usr/bin/byobu-janitor.in:
67+ - Remove unused variables
68+ * usr/bin/byobu-status-detail.in:
69+ - Use $BYOBU_TEST
70+ * usr/bin/byobu-status-detail.in,
71+ usr/bin/byobu-status.in:
72+ - Remove unnecessary backticks; the command returns no output, only
73+ the exit value is tested
74+ * usr/bin/byobu-status.in:
75+ - Include $BYOBU_CONFIG_DIR/datetime.tmux in the sourcing for loop
76+ * usr/bin/byobu-status.in,
77+ usr/lib/byobu/include/common,
78+ usr/lib/byobu/include/dirs.in:
79+ - Remove unnecessary directory existence test before "mkdir -p"
80+ * usr/bin/byobu-select-profile.in:
81+ - Update help message
82+ - Remove $BYOBU_CONFIG_DIR/profile test, it is not used directly in
83+ the script
84+ - Restore list colors functionality
85+ - Use local variables in functions
86+ - Simplify color calculation
87+ - Exit when --list / --help / invalid options are specified, before
88+ making changes
89+ - Removed -- option, command utilities that have a -- option expect
90+ data to come after the --
91+ * usr/lib/byobu/include/constants:
92+ - Remove sourcing of files looking for $BYOBU_BACKEND, this is
93+ already done in usr/lib/byobu/include/common
94+ * usr/lib/byobu/include/dirs.in:
95+ - Use BYOBU_CONFIG_DIR or XDG_CONFIG_HOME even if they do not exist
96+ - Create new config dir in ~/.config, if it exists
97+ - Use XDG_CACHE_HOME even if it does not exist
98+ * usr/lib/byobu/users:
99+ - Fix trailing '#' sign for screen
100+ * usr/share/byobu/profiles/screenrc,
101+ usr/share/byobu/profiles/tmuxrc:
102+ - Fix header comment
103+
104 -- Dustin Kirkland <kirkland@ubuntu.com> Wed, 12 Jun 2019 18:41:09 -0500
105
106 byobu (5.129-0ubuntu1) eoan; urgency=medium
107
108=== modified file 'usr/bin/byobu-ctrl-a.in'
109--- usr/bin/byobu-ctrl-a.in 2017-08-15 06:51:04 +0000
110+++ usr/bin/byobu-ctrl-a.in 2019-06-17 20:09:21 +0000
111@@ -17,11 +17,11 @@
112 # You should have received a copy of the GNU General Public License
113 # along with this program. If not, see <http://www.gnu.org/licenses/>.
114
115-Usage() {
116+usage() {
117 cat <<EOF
118 Usage: ${0##*/} [mode]
119- mode is one of 'screen' or 'emacs'
120- if not specified, prompt the user
121+ mode is one of 'screen' or 'emacs'
122+ if not specified, prompt the user
123 EOF
124 }
125
126@@ -30,47 +30,119 @@
127 [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="@prefix@" || export BYOBU_PREFIX
128 . "${BYOBU_PREFIX}/lib/${PKG}/include/common"
129
130-bind_to=""
131+bind_to=
132+is_autorun=
133+is_autorun_disabled=
134 keybindings="$BYOBU_CONFIG_DIR/keybindings"
135 [ "$BYOBU_BACKEND" = "tmux" ] && keybindings="$keybindings.tmux"
136 touch "$keybindings"
137
138+# may not work if a custom key was selected before (with ^${KEY} unbound)
139+case $BYOBU_BACKEND in
140+ screen) s='^bindkey "\^A"' ;;
141+ tmux) s="^unbind-key -n C-a" ;;
142+esac
143+if grep -qs "$s" "$keybindings"; then
144+ is_autorun_disabled=1
145+fi
146+
147+# unbind ^A and not ^${KEY} because it is ^A in f-keys.screen / f-keys.tmux
148+disable_autorun() {
149+ local binding
150+ case $BYOBU_BACKEND in
151+ screen) binding='bindkey "^A"' ;;
152+ tmux) binding="unbind-key -n C-a" ;;
153+ esac
154+ echo "$binding" >> "$keybindings"
155+}
156+
157+clear_mode_bindings() {
158+ case $BYOBU_BACKEND in
159+ screen)
160+ $BYOBU_SED_INLINE -e "/^register x /d" -e "/^escape /d" "$keybindings"
161+ ;;
162+ tmux)
163+ $BYOBU_SED_INLINE -e "/^set -g prefix/d" -e "/ send-prefix/d" "$keybindings"
164+ ;;
165+ esac
166+}
167+
168+set_emacs_mode_bindings() {
169+ case $BYOBU_BACKEND in
170+ screen)
171+ :
172+ ;;
173+ tmux)
174+ echo "set -g prefix F12" >> "$keybindings"
175+ ;;
176+ esac
177+}
178+
179+set_screen_mode_bindings() {
180+ case $BYOBU_BACKEND in
181+ screen)
182+ echo "escape \"^$KEY$key\"" >> "$keybindings"
183+ echo "register x \"^$KEY\"" >> "$keybindings"
184+ ;;
185+ tmux)
186+ if $BYOBU_BACKEND -V | grep " 1.5"; then
187+ # tmux 1.5 supports a list of prefixes
188+ echo "set -g prefix ^$KEY,F12" >> "$keybindings"
189+ else
190+ # tmux 1.6 and above supports prefix and prefix2
191+ echo "set -g prefix ^$KEY" >> "$keybindings"
192+ echo "set -g prefix2 F12" >> "$keybindings"
193+ fi
194+ echo "bind $key send-prefix" >> "$keybindings"
195+ ;;
196+ esac
197+}
198+
199+reload_profile() {
200+ case $BYOBU_BACKEND in
201+ screen)
202+ $BYOBU_BACKEND -X at 0 source "$BYOBU_CONFIG_DIR/profile"
203+ ;;
204+ tmux)
205+ $BYOBU_BACKEND source "$BYOBU_PREFIX/share/byobu/profiles/tmuxrc" 2>/dev/null
206+ ;;
207+ esac
208+}
209+
210 # If the user has already chosen an escape sequence, then
211-# presumably they want ctrl-a to operate in emacs mode
212-case "$BYOBU_BACKEND" in
213- "screen")
214- if grep -qs "^escape" "$keybindings"; then
215- # Check for escape definition in local keybindings config
216- bind_to="emacs"
217- fi
218- ;;
219- "tmux")
220- if grep -qs "^set -g prefix" "$keybindings"e; then
221- # Check for escape definition in local keybindings config
222- bind_to="emacs"
223- fi
224- # Check for some other escape sequence in tmux keys
225- if $BYOBU_BACKEND list-keys 2>/dev/null | grep -qs "^bind-key\s\+[^a]\s\+send-prefix"; then
226- bind_to="emacs"
227- fi
228- ;;
229-esac
230+# presumably they just want to disable autorun
231+if [ -z "$is_autorun_disabled" ]; then
232+ case $BYOBU_BACKEND in
233+ screen)
234+ if grep -qs "^escape" "$keybindings"; then
235+ # Check for escape definition in local keybindings config
236+ bind_to=custom
237+ fi
238+ ;;
239+ tmux)
240+ if grep -qs "^set -g prefix" "$keybindings"; then
241+ # Check for escape definition in local keybindings config
242+ bind_to=custom
243+ fi
244+ # Check for some other escape sequence in tmux keys
245+ if $BYOBU_BACKEND list-keys 2>/dev/null | grep "\ssend-prefix$" | grep -vqs "\sa\s\+send-prefix$"; then
246+ bind_to=custom
247+ fi
248+ ;;
249+ esac
250+fi
251
252-case "${1}" in
253- -h|--help) Usage; exit 0;;
254- screen) bind_to="screen";;
255- emacs) bind_to="emacs";;
256+case $1 in
257+ -h|--help) usage; exit 0 ;;
258+ screen) bind_to=screen ;;
259+ emacs) bind_to=emacs ;;
260+ autorun) is_autorun=1 ;;
261 "") :;;
262- *) { Usage printf "%s\n" "Bad argument $1"; } 1>&2; exit 1;;
263+ *) { usage; printf "%s\n" "Bad argument: $1"; } 1>&2; exit 1;;
264 esac
265
266-if [ "${2}" ]; then
267- KEY=$(printf "$2" | $BYOBU_SED 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/')
268- key=$(printf "$2" | $BYOBU_SED 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')
269-else
270- KEY="A"
271- key="a"
272-fi
273+KEY=$(printf "${2:-A}" | $BYOBU_SED 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/')
274+key=$(printf "$KEY" | $BYOBU_SED 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')
275
276 while [ -z "$bind_to" ]; do
277 echo
278@@ -79,72 +151,73 @@
279 echo "When you press ctrl-a in Byobu, do you want it to operate in:"
280 echo " (1) Screen mode (GNU Screen's default escape sequence)"
281 echo " (2) Emacs mode (go to beginning of line)"
282+ if [ -z "$is_autorun_disabled" ]; then
283+ echo " (M) Manual (I will configure this manually, don't ask me anymore)"
284+ echo " (Q) Quit (ask me again later)"
285+ else
286+ echo " (Q) Quit (no change)"
287+ fi
288 echo
289 echo "Note that:"
290 echo " - F12 also operates as an escape in Byobu"
291 echo " - You can press F9 and choose your escape character"
292 echo " - You can run 'byobu-ctrl-a' at any time to change your selection"
293 echo
294- printf "Select [1 or 2]: "
295+ if [ -z "$is_autorun_disabled" ]; then
296+ printf "Select [1 / 2 / M / Q]: "
297+ else
298+ printf "Select [1 / 2 / Q]: "
299+ fi
300 s=$(head -n1)
301 echo
302 case "$s" in
303 1) bind_to="screen"; break;;
304 2) bind_to="emacs"; break;;
305+ q|Q) break;;
306+ m|M)
307+ if [ -z "$is_autorun_disabled" ]; then
308+ bind_to="manual"
309+ break
310+ fi
311+ ;;
312 esac
313 done
314
315 case "$bind_to" in
316+ custom)
317+ disable_autorun
318+ reload_profile
319+ echo "INFO: custom settings were found, no change to ctrl-a was made"
320+ ;;
321+ manual)
322+ disable_autorun
323+ reload_profile
324+ echo "INFO: ctrl-a will no longer cause this prompt to appear"
325+ ;;
326 emacs)
327- case "$BYOBU_BACKEND" in
328- screen)
329- $BYOBU_SED_INLINE -e "/^register x /d" -e "/^bindkey /d" -e "/^escape /d" "$keybindings"
330- echo "bindkey \"^${KEY}\"" >> "$keybindings"
331- $BYOBU_BACKEND -X at 0 source "$BYOBU_CONFIG_DIR/profile"
332- ;;
333- tmux)
334- $BYOBU_SED_INLINE -e "/^set -g prefix/d" -e "/ send-prefix/d" -e "/^unbind-key -n C-${key}/d" "$keybindings"
335- echo "set -g prefix F12" >> "$keybindings"
336- echo "unbind-key -n C-${key}" >> "$keybindings"
337- $BYOBU_BACKEND source "$BYOBU_PREFIX/share/byobu/profiles/tmuxrc" 2>/dev/null
338- ;;
339- esac
340+ [ -n "$is_autorun_disabled" ] || disable_autorun
341+ clear_mode_bindings
342+ set_emacs_mode_bindings
343+ reload_profile
344 echo "INFO: ctrl-a will now operate in emacs mode"
345 ;;
346 screen)
347- case "$BYOBU_BACKEND" in
348- screen)
349- $BYOBU_SED_INLINE -e "/^register x /d" -e "/^bindkey \"^\"/d" -e "/^escape /d" "$keybindings"
350- echo "bindkey \"^${KEY}\"" >> "$keybindings"
351- echo "escape \"^${KEY}${key}\"" >> "$keybindings"
352- echo "register x \"^${KEY}\"" >> "$keybindings"
353- $BYOBU_BACKEND -X at 0 source "$BYOBU_CONFIG_DIR/profile"
354- ;;
355- tmux)
356- $BYOBU_SED_INLINE -e "/^set -g prefix/d" -e "/ send-prefix/d" -e "/^unbind-key -n C-${key}/d" "$keybindings"
357- echo "unbind-key -n C-${key}" >> "$keybindings"
358- if $BYOBU_BACKEND -V | grep " 1.5"; then
359- # tmux 1.5 supports a list of prefixes
360- echo "set -g prefix ^${KEY},F12" >> "$keybindings"
361- else
362- # tmux 1.6 and above supports prefix and prefix2
363- echo "set -g prefix ^${KEY}" >> "$keybindings"
364- echo "set -g prefix2 F12" >> "$keybindings"
365- fi
366- echo "bind ${key} send-prefix" >> "$keybindings"
367- $BYOBU_BACKEND source "$BYOBU_PREFIX/share/byobu/profiles/tmuxrc" 2>/dev/null
368- ;;
369- esac
370+ [ -n "$is_autorun_disabled" ] || disable_autorun
371+ clear_mode_bindings
372+ set_screen_mode_bindings
373+ reload_profile
374 echo "INFO: ctrl-a will now operate in GNU Screen mode"
375 ;;
376- *)
377- echo "Error: bad value for binding: $bind_to"
378- ;;
379 esac
380
381-if [ -z "${2}" ]; then
382+if [ "$bind_to" != manual ]; then
383 echo "To modify this behavior again later, run 'byobu-ctrl-a'"
384 echo
385 fi
386
387+if [ -n "$is_autorun" ]; then
388+ echo "Press enter/return to close this window..."
389+ s=$(head -n1)
390+fi
391+
392 # vi: syntax=sh ts=4 noexpandtab
393
394=== modified file 'usr/bin/byobu-export.in'
395--- usr/bin/byobu-export.in 2019-05-26 19:18:53 +0000
396+++ usr/bin/byobu-export.in 2019-06-17 20:09:21 +0000
397@@ -22,7 +22,7 @@
398 [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="@prefix@" || export BYOBU_PREFIX
399 . "${BYOBU_PREFIX}/lib/${PKG}/include/common"
400
401-if eval $BYOBU_TEST gettext >/dev/null 2>&1; then
402+if byobu_test gettext; then
403 command=gettext
404 else
405 command=echo
406
407=== modified file 'usr/bin/byobu-janitor.in'
408--- usr/bin/byobu-janitor.in 2019-05-26 19:18:06 +0000
409+++ usr/bin/byobu-janitor.in 2019-06-17 20:09:21 +0000
410@@ -36,13 +36,9 @@
411 exit 0
412 fi
413
414-# Set the rest of the variables
415-DEFAULT_PROFILE="light"
416-PROFILE="$BYOBU_CONFIG_DIR/profile"
417-
418 # Create byobu-exchange buffer file, with secure permissions, if it doesn't exist
419 if ! [ -e "$BYOBU_RUN_DIR/printscreen" ]; then
420- if eval $BYOBU_TEST install >/dev/null 2>&1; then
421+ if byobu_test install; then
422 install -m 600 /dev/null "$BYOBU_RUN_DIR/printscreen"
423 else
424 cp /dev/null "$BYOBU_RUN_DIR/printscreen"
425@@ -121,11 +117,11 @@
426 # Affects: Upgrades from <= byobu 5.50, install byobu prompt if using stock bashrc
427 if [ -r /etc/skel/.bashrc ] && [ -r "$HOME/.bashrc" ] && [ -w "$HOME/.bashrc" ] && \
428 ! (grep -qs "#byobu-prompt#$" "$HOME/.bashrc") && ! [ -e "$BYOBU_CONFIG_DIR/prompt" ]; then
429- if eval $BYOBU_TEST diff >/dev/null 2>&1; then
430+ if byobu_test diff; then
431 if diff /etc/skel/.bashrc "$HOME/.bashrc" >/dev/null 2>&1; then
432 printf "[ -r $BYOBU_CONFIG_DIR/prompt ] && . $BYOBU_CONFIG_DIR/prompt #byobu-prompt#\n" >> "$HOME/.bashrc"
433 fi
434- elif eval $BYOBU_TEST md5sum >/dev/null 2>&1; then
435+ elif byobu_test md5sum; then
436 if [ "$(cat /etc/skel/.bashrc | md5sum)" = "$(cat $HOME/.bashrc | md5sum)" ]; then
437 printf "[ -r $BYOBU_CONFIG_DIR/prompt ] && . $BYOBU_CONFIG_DIR/prompt #byobu-prompt#\n" >> "$HOME/.bashrc"
438 fi
439@@ -136,4 +132,14 @@
440 # Affects: Upgrades from <= byobu 5.126, clear out ec2/rcs cost statuses
441 rm -f "$BYOBU_RUN_DIR"/cache.tmux/ec2_cost* "$BYOBU_RUN_DIR"/cache.tmux/rcs_cost* "$BYOBU_RUN_DIR"/status.tmux/ec2_cost* "$BYOBU_RUN_DIR"/status.tmux/rcs_cost*
442
443+# Affects: Upgrades from <= byobu 5.129, fix unbinding of ctrl-a binding (autorun byobu-ctrl-a)
444+if grep '^bindkey "\^."$' "$BYOBU_CONFIG_DIR/keybindings" | grep -vqs '^bindkey "\^A"$'; then
445+ $BYOBU_SED_INLINE -e '/^bindkey "\^."$/d' "$BYOBU_CONFIG_DIR/keybindings"
446+ echo 'bindkey "^A"' >> "$BYOBU_CONFIG_DIR/keybindings"
447+fi
448+if grep "^unbind-key -n C-.$" "$BYOBU_CONFIG_DIR/keybindings.tmux" | grep -vqs "^unbind-key -n C-a$"; then
449+ $BYOBU_SED_INLINE -e "/^unbind-key -n C-.$/d" "$BYOBU_CONFIG_DIR/keybindings.tmux"
450+ echo "unbind-key -n C-a" >> "$BYOBU_CONFIG_DIR/keybindings.tmux"
451+fi
452+
453 # vi: syntax=sh ts=4 noexpandtab
454
455=== modified file 'usr/bin/byobu-launch.in'
456--- usr/bin/byobu-launch.in 2019-05-26 19:17:42 +0000
457+++ usr/bin/byobu-launch.in 2019-06-17 20:09:21 +0000
458@@ -51,7 +51,7 @@
459 *i*)
460 # Attempt to merge shell history across sessions/windows (works with some exceptions)
461 for i in shopt setopt; do
462- if eval $BYOBU_TEST $i >/dev/null; then
463+ if byobu_test $i; then
464 case $i in
465 shopt) $i -s histappend || true ;;
466 setopt) $i appendhistory || true ;;
467
468=== modified file 'usr/bin/byobu-select-profile.in'
469--- usr/bin/byobu-select-profile.in 2018-08-12 14:43:52 +0000
470+++ usr/bin/byobu-select-profile.in 2019-06-17 20:09:21 +0000
471@@ -51,47 +51,51 @@
472
473 # Find a hash utility
474 for i in md5sum md5 sha512sum sha256sum sha1sum shasum shasum5.12 shasum5.10; do
475- if eval $BYOBU_TEST $i >/dev/null 2>&1; then
476+ if byobu_test $i; then
477 HASH="$i"
478 break
479 fi
480 done
481
482 usage () {
483- cat <<EOT
484-Usage: $0 [OPTION]
485- -l,--list list available profiles
486+ cat <<EOF
487+Usage: ${0##*/} [OPTION]
488+ screen options:
489+ -l,--list list available colors
490 -b,--background COLOR set the background color
491 -f,--foreground COLOR set the foreground color
492- -h,--hostnmae set the colors based on a hash of the hostname
493+
494+ tmux options:
495+ -h,--hostname set the colors based on a hash of the hostname
496 -i,--ip set the colors based on a hash of the ip
497 -r,--random set the colors randomly
498+
499+ Other options:
500 --help this help
501-EOT
502+
503+ If multiple tmux options are specified, only the first one will
504+ take effect.
505+EOF
506 }
507
508 # Initialize variables
509 FILE="$BYOBU_CONFIG_DIR/color"
510-PROFILE="$BYOBU_CONFIG_DIR/profile"
511-[ -r "$PROFILE" ] || ln -sf $BYOBU_PREFIX/share/$PKG/profiles/common "$PROFILE"
512-selected=-1
513-color=
514
515-listprofiles() {
516- # Display list of profiles, one per line
517+listcolors() {
518+ local x
519+ # Display list of colors, one per line
520 for x in $COLORS; do
521 echo "$x"
522 done
523 }
524
525 getletter() {
526- count=$(echo "$1" | wc -c)
527- if [ "$count" = "2" ]; then
528+ local letter
529+ if [ "${#1}" -eq 1 ]; then
530 echo "$1"
531 return
532 fi
533- color="$1"
534- case $color in
535+ case $1 in
536 default_light) letter="d";;
537 default_dark) letter="D";;
538 black) letter="k";;
539@@ -117,8 +121,9 @@
540 }
541
542 setcolor_screen() {
543- which="$1"
544- color="$2"
545+ local which="$1"
546+ local color="$2"
547+ local FOREGROUND BACKGROUND MONOCHROME
548 [ -r $FILE ] && . $FILE
549 if [ "$which" = "foreground" ]; then
550 FOREGROUND=$(getletter "$color")
551@@ -126,20 +131,20 @@
552 BACKGROUND=$(getletter "$color")
553 fi
554 [ "$MONOCHROME" = "1" ] || MONOCHROME=0
555- printf "FOREGROUND=$FOREGROUND\nBACKGROUND=$BACKGROUND\nMONOCHROME=$MONOCHROME" > $FILE
556+ printf "FOREGROUND=$FOREGROUND\nBACKGROUND=$BACKGROUND\nMONOCHROME=$MONOCHROME\n" > $FILE
557 touch "$BYOBU_RUN_DIR/reload-required"
558- $BYOBU_BACKEND -X at 0 source "$BYOBU_CONFIG_DIR/profile"
559+ screen -X at 0 source "$BYOBU_CONFIG_DIR/profile"
560 }
561
562 get_contrast() {
563 # See section 2.2: http://www.w3.org/TR/AERT#color-contrast
564- local awk="awk"
565- if eval $BYOBU_TEST gawk >/dev/null 2>&1; then
566- awk="gawk"
567- fi
568 local hex="$(echo "$1" | sed -e "s/\(..\)\(..\)\(..\)/\1 \2 \3/")"
569- local bright=$(echo $hex | $awk --non-decimal-data '{printf "%0.0f",(("0x"$1)*299+("0x"$2)*587+("0x"$3)*114)/1000}')
570- if [ $bright -ge 130 ]; then
571+ local dec h
572+ for h in $hex; do
573+ dec="$dec $((0x$h))"
574+ done
575+ local bright=$(echo $dec | awk '{printf "%0.0f",(($1*299)+($2*587)+($3*114))/1000}')
576+ if [ "$bright" -ge 130 ]; then
577 _RET="black"
578 else
579 _RET="white"
580@@ -150,61 +155,83 @@
581 if [ "$BYOBU_BACKEND" != "tmux" ]; then
582 echo "WARNING: This functionality is only supported in Byobu with the tmux backend" 1>&2
583 fi
584- dark="$1"
585+ local dark="$1"
586 get_contrast "$dark"
587- light="$_RET"
588- accent="magenta"
589- highlight="red"
590- monochrome="0"
591- printf "BYOBU_DARK=\"$dark\"\nBYOBU_LIGHT=$light\nBYOBU_ACCENT=$accent\nBYOBU_HIGHLIGHT=$highlight\nMONOCHROME=$MONOCHROME" > "$FILE".tmux
592+ local light="$_RET"
593+ local accent="magenta"
594+ local highlight="red"
595+ local monochrome="0"
596+ printf "BYOBU_DARK=\"#$dark\"\nBYOBU_LIGHT=$light\nBYOBU_ACCENT=$accent\nBYOBU_HIGHLIGHT=$highlight\nMONOCHROME=$monochrome\n" > "$FILE".tmux
597 tmux source "$BYOBU_PREFIX/share/byobu/profiles/tmuxrc"
598 }
599
600 if [ $# -eq 0 ]; then
601 usage
602-else
603- while true; do
604- case "$1" in
605- -b|--background)
606- setcolor_screen "background" "$2"
607- shift 2
608- ;;
609- -f|--foreground)
610- setcolor_screen "foreground" "$2"
611- shift 2
612- ;;
613- -h|--hostname)
614- color=$(hostname | $HASH | head -c 6)
615- setcolor_tmux "$color"
616- shift
617- break
618- ;;
619- -i|--ip)
620- [ -r "$BYOBU_CONFIG_DIR/statusrc" ] && . "$BYOBU_CONFIG_DIR/statusrc"
621- . $BYOBU_PREFIX/lib/$PKG/ip_address
622- color=$(__ip_address t| $HASH | head -c 6)
623- setcolor_tmux "$color"
624- shift
625- break
626- ;;
627- -r|--random)
628- color=$(head -c 10 /dev/urandom | $HASH | head -c 6)
629- setcolor_tmux "\#$color"
630- shift
631- break
632- ;;
633- *)
634- usage
635- exit 1
636- ;;
637- --)
638- shift
639- break
640- ;;
641- esac
642- [ $# -eq 0 ] && break
643- done
644-fi
645+ exit 0
646+fi
647+
648+# Check options first, exit early if necessary
649+for opt in "$@"; do
650+ if [ -n "$ignore_next" ]; then
651+ ignore_next=
652+ continue
653+ fi
654+ case $opt in
655+ -l|--list) listcolors; exit 0 ;;
656+ -b|--background) ignore_next=1 ;;
657+ -f|--foreground) ignore_next=1 ;;
658+ -h|--hostname) : ;;
659+ -i|--ip) : ;;
660+ -r|--random) : ;;
661+ --help) usage; exit 0 ;;
662+ *) usage; exit 1 ;;
663+ esac
664+done
665+
666+# Was expecting an argument but it wasn't specified
667+if [ -n "$ignore_next" ]; then
668+ usage
669+ exit 1
670+fi
671+
672+while [ "$#" -gt 0 ]; do
673+ case $1 in
674+ -b|--background)
675+ setcolor_screen "background" "$2"
676+ shift 2
677+ ;;
678+ -f|--foreground)
679+ setcolor_screen "foreground" "$2"
680+ shift 2
681+ ;;
682+ -h|--hostname)
683+ if byobu_test hostname; then
684+ h=$(hostname)
685+ elif [ -r /proc/sys/kernel/hostname ]; then
686+ read h < /proc/sys/kernel/hostname
687+ fi
688+ color=$(echo "$h" | $HASH | head -c 6)
689+ setcolor_tmux "$color"
690+ break
691+ ;;
692+ -i|--ip)
693+ [ -r "$BYOBU_CONFIG_DIR/statusrc" ] && . "$BYOBU_CONFIG_DIR/statusrc"
694+ . $BYOBU_PREFIX/lib/$PKG/ip_address
695+ color=$(__ip_address t| $HASH | head -c 6)
696+ setcolor_tmux "$color"
697+ break
698+ ;;
699+ -r|--random)
700+ color=$(head -c 10 /dev/urandom | $HASH | head -c 6)
701+ setcolor_tmux "$color"
702+ break
703+ ;;
704+ *)
705+ usage
706+ exit 1
707+ ;;
708+ esac
709+done
710
711 exit 0
712
713
714=== modified file 'usr/bin/byobu-status-detail.in'
715--- usr/bin/byobu-status-detail.in 2016-04-07 22:07:52 +0000
716+++ usr/bin/byobu-status-detail.in 2019-06-17 20:09:21 +0000
717@@ -22,7 +22,7 @@
718 [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="@prefix@" || export BYOBU_PREFIX
719 . "${BYOBU_PREFIX}/lib/${PKG}/include/common"
720
721-if which vim >/dev/null && `vim --version | grep -q +folding`; then
722+if byobu_test vim && vim --version | grep -q +folding; then
723 byobu-status --detail | vim -c "set foldmethod=indent" -c "set foldminlines=0" -c "set foldnestmax=1" -c "set foldcolumn=2" -R -
724 else
725 byobu-status --detail | $BYOBU_PAGER
726
727=== modified file 'usr/bin/byobu-status.in'
728--- usr/bin/byobu-status.in 2016-09-15 19:25:51 +0000
729+++ usr/bin/byobu-status.in 2019-06-17 20:09:21 +0000
730@@ -26,16 +26,15 @@
731 # Make sure status is not disabled
732 [ -f "$BYOBU_CONFIG_DIR/status.disable" ] && exit 0
733
734-# Clean and create cache directories
735-[ -d "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND" ] || mkdir -p "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND"
736-[ -d "$BYOBU_RUN_DIR/.last.$BYOBU_BACKEND" ] || mkdir -p "$BYOBU_RUN_DIR/.last.$BYOBU_BACKEND"
737+# Create cache directories
738+mkdir -p "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND"
739+mkdir -p "$BYOBU_RUN_DIR/.last.$BYOBU_BACKEND"
740
741 # Source configurations
742 . "${BYOBU_PREFIX}/lib/${PKG}/include/icons"
743-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
744+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" "$BYOBU_CONFIG_DIR/datetime.tmux"; do
745 [ -r "$i" ] && . "$i"
746 done
747-[ -r "$BYOBU_CONFIG_DIR/datetime.tmux" ] && . "$BYOBU_CONFIG_DIR/datetime.tmux"
748
749 case "$BYOBU_BACKEND" in
750 screen)
751@@ -153,11 +152,11 @@
752 ;;
753 --detail)
754 VER=
755- if eval $BYOBU_TEST dpkg-query >/dev/null; then
756+ if byobu_test dpkg-query; then
757 VER=$(set -- $(dpkg-query --show $PKG); printf "%s\n" "$2")
758 fi
759 printf "$PKG-$VER Detailed Status Navigation\n"
760- if eval $BYOBU_TEST vim >/dev/null && `vim --version | grep -q +folding`; then
761+ if byobu_test vim && vim --version | grep -q +folding; then
762 printf " Expand all - zr\t\tCollapse all - zm\n Expand one - zo\t\tCollapse one - zc\n\n"
763 fi
764 for i in "$BYOBU_PREFIX/lib/$PKG"/*; do
765
766=== modified file 'usr/bin/byobu.in'
767--- usr/bin/byobu.in 2019-06-12 23:41:10 +0000
768+++ usr/bin/byobu.in 2019-06-17 20:09:21 +0000
769@@ -35,7 +35,11 @@
770 # Source local byobu config
771 if [ -r "$HOME/.byoburc" ]; then
772 # Ensure that this configuration is usable
773- . "$HOME/.byoburc" || mv -f "$HOME/.byoburc" "$HOME/.byoburc".orig
774+ if sh -n "$HOME/.byoburc" >/dev/null 2>&1; then
775+ . "$HOME/.byoburc"
776+ else
777+ mv -f "$HOME/.byoburc" "$HOME/.byoburc".orig
778+ fi
779 fi
780 if [ -z "${BYOBU_PREFIX}" ]; then
781 # Find and export the installation location prefix
782@@ -43,26 +47,22 @@
783 prefix="$(dirname $(dirname $($BYOBU_READLINK -f $0)))"
784 if [ "$prefix" != "@prefix@" ]; then
785 echo "export BYOBU_PREFIX='$prefix'" >> "$HOME/.byoburc"
786- . "$HOME/.byoburc"
787+ BYOBU_PREFIX="$prefix"
788 fi
789 fi
790 export BYOBU_CHARMAP=$(locale charmap)
791-[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
792-[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="@prefix@" || export BYOBU_PREFIX
793-. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
794
795 # Override backend if we can determine intentions from argv[0]
796-[ -r "$HOME/.$PKG/backend" ] && . "$HOME/.$PKG/backend"
797 case "$0" in
798 *byobu-screen) BYOBU_BACKEND="screen" ;;
799 *byobu-tmux) BYOBU_BACKEND="tmux" ;;
800 esac
801
802-# At this point, we're sure BYOBU_BACKEND is properly defined
803-export BYOBU_BACKEND
804+[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="@prefix@" || export BYOBU_PREFIX
805+. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
806
807 # Store the parent tty
808-if eval $BYOBU_TEST tty >/dev/null 2>&1; then
809+if byobu_test tty; then
810 export BYOBU_TTY=$(tty)
811 else
812 export BYOBU_TTY=$(readlink /proc/$$/fd/0)
813@@ -76,7 +76,7 @@
814 case "$1" in
815 -v|--version)
816 echo "$PKG version $VERSION"
817- if eval $BYOBU_TEST bash >/dev/null 2>&1; then
818+ if byobu_test bash; then
819 # Check ulimits
820 u=$(bash -c "ulimit -n")
821 [ "$u" = "unlimited" ] || [ $u -ge 15 ] || echo "WARNING: ulimit -n is too low" 1>&2
822@@ -122,7 +122,7 @@
823
824 # Check if our terminfo supports 256 colors
825 CAN_SHOW_COLORS=
826-if eval $BYOBU_TEST tput >/dev/null 2>&1; then
827+if byobu_test tput; then
828 if [ "$(tput colors 2>/dev/null || echo 0)" = "256" ]; then
829 CAN_SHOW_COLORS=1
830 fi
831@@ -130,7 +130,7 @@
832
833 # Check if the color terminfo is available
834 HAS_COLOR_TERM=
835-if eval $BYOBU_TEST infocmp >/dev/null 2>&1; then
836+if byobu_test infocmp; then
837 if infocmp "$BYOBU_COLOR_TERM" >/dev/null 2>&1; then
838 HAS_COLOR_TERM=1
839 fi
840@@ -151,7 +151,7 @@
841 fi
842 BYOBU_PROFILE="-f $BYOBU_PREFIX/share/$PKG/profiles/tmuxrc"
843 # Set default window, unless user has overriden
844- if egrep -qs "default-command|default-shell" $HOME/.$PKG/.tmux.conf >/dev/null 2>&1; then
845+ if egrep -qs "default-command|default-shell" "$BYOBU_CONFIG_DIR/.tmux.conf" >/dev/null 2>&1; then
846 DEFAULT_WINDOW=
847 else
848 DEFAULT_WINDOW="new-session -n $BYOBU_WINDOW_NAME ${BYOBU_PREFIX}/bin/byobu-shell"
849@@ -191,13 +191,7 @@
850 fi
851 fi
852 SCREEN_TERM="-T $BYOBU_TERM"
853- # Some users want to maintain separate configurations
854- # if they use both GNU Screen and byobu on the same system
855- if [ -r "$BYOBU_CONFIG_DIR/.screenrc" ]; then
856- BYOBU_PROFILE="-c $BYOBU_PREFIX/share/$PKG/profiles/byoburc"
857- else
858- BYOBU_PROFILE="-c $BYOBU_PREFIX/share/$PKG/profiles/screenrc"
859- fi
860+ BYOBU_PROFILE="-c $BYOBU_PREFIX/share/$PKG/profiles/screenrc"
861 BYOBU_SESSION_NAME="-S $PKG"
862 # Zero out $BYOBU_SESSION_NAME if user has specified a session name
863 for i in "$@"; do
864
865=== modified file 'usr/lib/byobu/battery'
866--- usr/lib/byobu/battery 2016-09-15 19:25:51 +0000
867+++ usr/lib/byobu/battery 2019-06-17 20:09:21 +0000
868@@ -77,7 +77,7 @@
869 esac
870 done
871 # Mac OS X support
872- if eval $BYOBU_TEST /usr/sbin/ioreg >/dev/null 2>&1; then
873+ if byobu_test /usr/sbin/ioreg; then
874 # MacOS support
875 local key
876 for key in CurrentCapacity MaxCapacity ExternalChargeCapable FullyCharged; do
877
878=== modified file 'usr/lib/byobu/disk_io'
879--- usr/lib/byobu/disk_io 2019-06-12 00:01:41 +0000
880+++ usr/lib/byobu/disk_io 2019-06-17 20:09:21 +0000
881@@ -20,7 +20,7 @@
882 # along with this program. If not, see <http://www.gnu.org/licenses/>.
883
884 __disk_io_detail() {
885- if eval $BYOBU_TEST iostat >/dev/null; then
886+ if byobu_test iostat; then
887 iostat -d -m -h
888 else
889 printf "%s\n" "Please install iostat if you want detailed information on your disk throughput"
890
891=== modified file 'usr/lib/byobu/hostname'
892--- usr/lib/byobu/hostname 2019-05-26 19:12:44 +0000
893+++ usr/lib/byobu/hostname 2019-06-17 20:09:21 +0000
894@@ -25,7 +25,7 @@
895
896 __hostname() {
897 local h=
898- if eval $BYOBU_TEST hostname >/dev/null 2>&1; then
899+ if byobu_test hostname; then
900 h=$(hostname -s 2>/dev/null || hostname)
901 elif [ -r /proc/sys/kernel/hostname ]; then
902 read h < /proc/sys/kernel/hostname
903
904=== modified file 'usr/lib/byobu/include/common'
905--- usr/lib/byobu/include/common 2016-09-15 19:25:51 +0000
906+++ usr/lib/byobu/include/common 2019-06-17 20:09:21 +0000
907@@ -27,6 +27,10 @@
908 eval $BYOBU_TEST ls >/dev/null 2>&1 && break || true
909 done
910
911+ byobu_test() {
912+ eval $BYOBU_TEST "$1" >/dev/null 2>&1
913+ }
914+
915 # If the backend is already set (eg. running `byobu-tmux`), do nothing.
916 if [ -z "${BYOBU_BACKEND}" ]; then
917 [ -r "/etc/$PKG/backend" ] && . "/etc/$PKG/backend"
918@@ -34,9 +38,9 @@
919 # Just in case there's no config file at all
920 if [ -z "${BYOBU_BACKEND}" ]; then
921 # New byobu configuration, default to tmux
922- if eval $BYOBU_TEST tmux >/dev/null; then
923+ if byobu_test tmux; then
924 BYOBU_BACKEND="tmux"
925- elif eval $BYOBU_TEST screen >/dev/null; then
926+ elif byobu_test screen; then
927 BYOBU_BACKEND="screen"
928 else
929 printf "%s\n" "ERROR: $PKG won't work without tmux or screen installed" 1>&2
930@@ -45,7 +49,7 @@
931 fi
932
933 # Creating backend cache
934- [ -d "$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND" ] || mkdir -p "$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND"
935+ mkdir -p "$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND"
936
937 . "${BYOBU_PREFIX}/lib/${PKG}/include/shutil"
938 . "${BYOBU_PREFIX}/lib/${PKG}/include/constants"
939
940=== modified file 'usr/lib/byobu/include/constants'
941--- usr/lib/byobu/include/constants 2018-04-11 15:16:45 +0000
942+++ usr/lib/byobu/include/constants 2019-06-17 20:09:21 +0000
943@@ -26,10 +26,6 @@
944 PCT="%"
945
946 # Support two different backends (screen/tmux)
947-if [ -z "$BYOBU_BACKEND" ]; then
948- [ -r "/etc/byobu/backend" ] && . "/etc/byobu/backend"
949- [ -r "$BYOBU_CONFIG_DIR/backend" ] && . "$BYOBU_CONFIG_DIR/backend"
950-fi
951 case "$BYOBU_BACKEND" in
952 tmux)
953 export BYOBU_BACKEND
954@@ -44,18 +40,18 @@
955 esac
956
957 # MacOS Support
958-eval $BYOBU_TEST gsed >/dev/null 2>&1 && export BYOBU_SED="gsed" || export BYOBU_SED="sed"
959-eval $BYOBU_TEST greadlink >/dev/null 2>&1 && export BYOBU_READLINK="greadlink" || export BYOBU_READLINK="readlink"
960-eval $BYOBU_TEST sensible-pager >/dev/null 2>&1 && export BYOBU_PAGER="sensible-pager" || export BYOBU_PAGER="less"
961-eval $BYOBU_TEST sensible-editor >/dev/null 2>&1 && export BYOBU_EDITOR="sensible-editor" || export BYOBU_EDITOR="$EDITOR"
962-eval $BYOBU_TEST "$BYOBU_EDITOR" >/dev/null 2>&1 || export BYOBU_EDITOR="vim"
963+byobu_test gsed && export BYOBU_SED="gsed" || export BYOBU_SED="sed"
964+byobu_test greadlink && export BYOBU_READLINK="greadlink" || export BYOBU_READLINK="readlink"
965+byobu_test sensible-pager && export BYOBU_PAGER="sensible-pager" || export BYOBU_PAGER="less"
966+byobu_test sensible-editor && export BYOBU_EDITOR="sensible-editor" || export BYOBU_EDITOR="$EDITOR"
967+byobu_test "$BYOBU_EDITOR" || export BYOBU_EDITOR="vim"
968
969
970 # Check sed's follow-symlinks feature
971 $BYOBU_SED --follow-symlinks "s///" /dev/null 2>/dev/null && BYOBU_SED_INLINE="$BYOBU_SED -i --follow-symlinks" || BYOBU_SED_INLINE="$BYOBU_SED -i"
972
973 # Determine if we have ulimit support
974-eval $BYOBU_TEST ulimit >/dev/null 2>&1 && export BYOBU_ULIMIT="ulimit" || export BYOBU_ULIMIT="false"
975+byobu_test ulimit && export BYOBU_ULIMIT="ulimit" || export BYOBU_ULIMIT="false"
976
977 # Find a suitable python interpreter, if undefined
978 if [ -z "$BYOBU_PYTHON" ]; then
979
980=== modified file 'usr/lib/byobu/include/dirs.in'
981--- usr/lib/byobu/include/dirs.in 2016-04-07 22:07:52 +0000
982+++ usr/lib/byobu/include/dirs.in 2019-06-17 20:09:21 +0000
983@@ -25,22 +25,29 @@
984 [ -n "$BYOBU_PREFIX" ] || BYOBU_PREFIX="@prefix@"
985
986 # Create and export the user configuration directory
987-if [ -d "$BYOBU_CONFIG_DIR" ]; then
988- export BYOBU_CONFIG_DIR="$BYOBU_CONFIG_DIR"
989-elif [ -d "$XDG_CONFIG_HOME" ]; then
990- # Use XDG, as some users insist on such nonsense :-)
991- export BYOBU_CONFIG_DIR="$XDG_CONFIG_HOME/$PKG"
992+if [ -n "$BYOBU_CONFIG_DIR" ]; then
993+ # Explicitly told to use this location, even if it does not exist yet
994+ :
995+elif [ -n "$XDG_CONFIG_HOME" ]; then
996+ # Presumably set explicitly, use even if it doesn't exist yet
997+ BYOBU_CONFIG_DIR="$XDG_CONFIG_HOME/$PKG"
998 elif [ -d "$HOME/.config/$PKG" ]; then
999 # Use XDG config directory, if it exists
1000- export BYOBU_CONFIG_DIR="$HOME/.config/$PKG"
1001+ BYOBU_CONFIG_DIR="$HOME/.config/$PKG"
1002 elif [ -d "$HOME/.local/share/$PKG" ]; then
1003 # Use XDG local directory, if it exists
1004- export BYOBU_CONFIG_DIR="$HOME/.local/share/$PKG"
1005+ BYOBU_CONFIG_DIR="$HOME/.local/share/$PKG"
1006+elif [ -d "$HOME/.$PKG" ]; then
1007+ # Use classic config dir location, if it exists
1008+ BYOBU_CONFIG_DIR="$HOME/.$PKG"
1009+elif [ -d "$HOME/.config" ]; then
1010+ # Create new config in XDG config directory
1011+ BYOBU_CONFIG_DIR="$HOME/.config/$PKG"
1012 else
1013 # And to default to good old classic config dir location!
1014- export BYOBU_CONFIG_DIR="$HOME/.$PKG"
1015+ BYOBU_CONFIG_DIR="$HOME/.$PKG"
1016 fi
1017-[ -d "$BYOBU_CONFIG_DIR" ] || mkdir -p "$BYOBU_CONFIG_DIR/bin"
1018+mkdir -p "$BYOBU_CONFIG_DIR/bin"
1019
1020 # Grab the global, then local socket directory
1021 [ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir"
1022@@ -51,22 +58,24 @@
1023 # Use shm for performance, if possible
1024 for i in /dev/shm/$PKG-$USER-*; do
1025 if [ -d "$i" ] && [ -O "$i" ]; then
1026- export BYOBU_RUN_DIR="$i"
1027+ BYOBU_RUN_DIR="$i"
1028 break
1029 fi
1030 done
1031 # Still empty, make a new one
1032 if [ ! -d "$BYOBU_RUN_DIR" ] || [ ! -O "$BYOBU_RUN_DIR" ]; then
1033- export BYOBU_RUN_DIR=$(mktemp -d /dev/shm/$PKG-$USER-XXXXXXXX)
1034+ BYOBU_RUN_DIR=$(mktemp -d /dev/shm/$PKG-$USER-XXXXXXXX)
1035 fi
1036 fi
1037 if [ ! -d "$BYOBU_RUN_DIR" ] || [ ! -O "$BYOBU_RUN_DIR" ] || [ ! -w "$BYOBU_RUN_DIR" ]; then
1038 # For distros that don't have a /dev/shm, use local disk
1039- if [ -d "$XDG_CACHE_HOME" ]; then
1040+ if [ -n "$XDG_CACHE_HOME" ]; then
1041 # Use XDG, as some users insist on such nonsense :-)
1042- export BYOBU_RUN_DIR="$XDG_CACHE_HOME/$PKG"
1043+ BYOBU_RUN_DIR="$XDG_CACHE_HOME/$PKG"
1044 else
1045 # But if not, we'll use a cache directory
1046- export BYOBU_RUN_DIR="$HOME/.cache/$PKG"
1047+ BYOBU_RUN_DIR="$HOME/.cache/$PKG"
1048 fi
1049 fi
1050+
1051+export BYOBU_CONFIG_DIR BYOBU_RUN_DIR
1052
1053=== modified file 'usr/lib/byobu/include/shutil'
1054--- usr/lib/byobu/include/shutil 2018-08-12 16:28:39 +0000
1055+++ usr/lib/byobu/include/shutil 2019-06-17 20:09:21 +0000
1056@@ -300,7 +300,7 @@
1057 [ "$Mask" = "00000000" ] && break
1058 done < /proc/net/route
1059 _RET="$Iface"
1060- elif eval $BYOBU_TEST route >/dev/null 2>&1; then
1061+ elif byobu_test route; then
1062 # Route command on path
1063 _RET=$(route get default|grep interface:|awk '{print $2}')
1064 elif [ -x "/sbin/route" ]; then
1065@@ -340,7 +340,7 @@
1066 distro="${issue%% *}";
1067 ;;
1068 esac
1069- elif eval $BYOBU_TEST lsb_release >/dev/null 2>&1; then
1070+ elif byobu_test lsb_release; then
1071 # If lsb_release is available, use it
1072 local r=$(lsb_release -s -d)
1073 case "$r" in
1074@@ -354,9 +354,9 @@
1075 distro=$(lsb_release -s -i)
1076 ;;
1077 esac
1078- elif eval $BYOBU_TEST sw_vers >/dev/null 2>&1; then
1079+ elif byobu_test sw_vers; then
1080 distro="$(sw_vers -productName)"
1081- elif eval $BYOBU_TEST uname >/dev/null 2>&1; then
1082+ elif byobu_test uname; then
1083 distro="$(uname -s)"
1084 else
1085 distro="Byobu"
1086
1087=== modified file 'usr/lib/byobu/ip_address'
1088--- usr/lib/byobu/ip_address 2018-08-12 14:07:40 +0000
1089+++ usr/lib/byobu/ip_address 2019-06-17 20:09:21 +0000
1090@@ -47,7 +47,7 @@
1091 # Background an update
1092 if [ -x /sbin/ip ]; then
1093 LC_ALL=C /sbin/ip -6 addr list dev "$interface" scope global </dev/null >"$cache" 2>/dev/null &
1094- elif eval $BYOBU_TEST ifconfig >/dev/null 2>&1; then
1095+ elif byobu_test ifconfig; then
1096 LC_ALL=c ifconfig "$interface" | grep "inet6 " | awk '{print $2}' | sed -e "s/%.*//" >"$cache" 2>/dev/null &
1097
1098 fi
1099@@ -73,7 +73,7 @@
1100 ipaddr=$(LC_ALL=C /sbin/ip -4 addr list dev "$interface" scope global 2>/dev/null)
1101 ipaddr=${ipaddr#* inet }
1102 ipaddr=${ipaddr%%/*}
1103- elif eval $BYOBU_TEST ifconfig >/dev/null 2>&1; then
1104+ elif byobu_test ifconfig; then
1105 ipaddr=$(ifconfig "$interface" | grep "inet " | awk '{print $2}')
1106 fi
1107 fi
1108
1109=== modified file 'usr/lib/byobu/memory'
1110--- usr/lib/byobu/memory 2016-09-15 19:25:51 +0000
1111+++ usr/lib/byobu/memory 2019-06-17 20:09:21 +0000
1112@@ -36,7 +36,7 @@
1113 esac
1114 [ -n "${free}" -a -n "${total}" -a -n "${buffers}" -a -n "${cached}" ] && break;
1115 done < /proc/meminfo
1116- elif eval $BYOBU_TEST vm_stat >/dev/null 2>&1; then
1117+ elif byobu_test vm_stat; then
1118 # MacOS support
1119 # calculation borrowed from http://apple.stackexchange.com/a/48195/18857
1120 free_blocks=$(vm_stat | grep free | awk '{ print $3 }' | sed -e 's/\.//')
1121
1122=== modified file 'usr/lib/byobu/release'
1123--- usr/lib/byobu/release 2019-05-26 19:14:28 +0000
1124+++ usr/lib/byobu/release 2019-06-17 20:09:21 +0000
1125@@ -46,10 +46,10 @@
1126 RELEASE="$ver"
1127 ;;
1128 esac
1129- elif eval $BYOBU_TEST sw_vers >/dev/null 2>&1; then
1130+ elif byobu_test sw_vers; then
1131 RELEASE="$(sw_vers -productVersion)"
1132 fi
1133- if [ -z "$RELEASE" ] && eval $BYOBU_TEST lsb_release >/dev/null 2>&1; then
1134+ if [ -z "$RELEASE" ] && byobu_test lsb_release; then
1135 # If lsb_release is available, use it
1136 RELEASE=$(lsb_release -s -r)
1137 fi
1138
1139=== modified file 'usr/lib/byobu/updates_available'
1140--- usr/lib/byobu/updates_available 2019-05-26 19:15:34 +0000
1141+++ usr/lib/byobu/updates_available 2019-06-17 20:09:21 +0000
1142@@ -51,32 +51,32 @@
1143 if [ -x /usr/lib/update-notifier/apt-check ]; then
1144 # If apt-check binary exists, use it
1145 flock -xn "$flock" sh -c "(/usr/lib/update-notifier/apt-check 2>&1 | awk '-F;' 'END { print \$1, \$2 }' >\"${mycache}-x\" 2>/dev/null ; mv \"${mycache}-x\" \"$mycache\")" &
1146- elif eval $BYOBU_TEST apt-get >/dev/null; then
1147+ elif byobu_test apt-get; then
1148 # If apt-get exists, use it
1149 flock -xn "$flock" apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst >$mycache 2>/dev/null &
1150- elif eval $BYOBU_TEST pkcon >/dev/null; then
1151+ elif byobu_test pkcon; then
1152 # use packagekit to show list of packages
1153 LC_ALL=C flock -xn "$flock" pkcon get-updates -p | awk '/^Results:$/ { start=NR }; /^Security/ { security++ }; END { if (!/There are no updates available at this time./) { print NR-start, security }}' > "$mycache" 2>/dev/null &
1154- elif eval $BYOBU_TEST zypper >/dev/null; then
1155+ elif byobu_test zypper; then
1156 # If zypper exists, use it
1157 flock -xn "$flock" zypper --no-refresh lu --best-effort | grep -c 'v |' >$mycache 2>/dev/null &
1158- elif eval $BYOBU_TEST yum >/dev/null; then
1159+ elif byobu_test yum; then
1160 # If yum exists, use it
1161 # TODO: We need a better way of counting updates available from a RH expert
1162 flock -xn "$flock" yum list updates -q | grep -vc "Updated Packages" >$mycache 2>/dev/null &
1163- elif eval $BYOBU_TEST pacman >/dev/null; then
1164+ elif byobu_test pacman; then
1165 # If pacman (Archlinux) exists, use it
1166 LC_ALL=C flock -xn "$flock" pacman -Sup | grep -vc "^\(::\| \)" >$mycache 2>/dev/null &
1167- elif eval $BYOBU_TEST opkg >/dev/null; then
1168+ elif byobu_test opkg; then
1169 # If opkg (OpenWrt) exists, use it, also background if flock exists
1170- if eval $BYOBU_TEST flock >/dev/null; then
1171+ if byobu_test flock; then
1172 flock -xn "$flock" opkg list-upgradable | wc -l >$mycache 2>/dev/null &
1173 else
1174 opkg list-upgradable | wc -l >$mycache &
1175 fi
1176- elif eval $BYOBU_TEST brew >/dev/null; then
1177+ elif byobu_test brew; then
1178 # If homebrew (Mac OSX) exists, use it, also background if flock exists
1179- if eval $BYOBU_TEST flock >/dev/null; then
1180+ if byobu_test flock; then
1181 flock -xn "$flock" brew outdated | wc -l >$mycache 2>/dev/null &
1182 else
1183 brew outdated | wc -l >$mycache &
1184@@ -90,7 +90,7 @@
1185 local mycache=$1
1186 # The cache doesn't exist: create it
1187 [ ! -e "$mycache" ] && return 0
1188- if eval $BYOBU_TEST apt-get >/dev/null; then
1189+ if byobu_test apt-get; then
1190 # Debian/ubuntu
1191 d0=$(($(stat -c %Y $mycache 2>/dev/null)-5))
1192 d1=$(stat -c %Y /var/lib/apt)
1193@@ -106,14 +106,14 @@
1194 elif [ -e "/var/lib/PackageKit/transactions.db" ]; then
1195 [ "/var/lib/PackageKit/transactions.db" -nt "$mycache" ]
1196 return $?
1197- elif eval $BYOBU_TEST pacman >/dev/null; then
1198+ elif byobu_test pacman; then
1199 # Archlinux
1200 local db
1201 for db in /var/lib/pacman/sync/*.db; do
1202 [ "$db" -nt "$mycache" ] && return 0
1203 done
1204 return 1
1205- elif eval $BYOBU_TEST opkg >/dev/null; then
1206+ elif byobu_test opkg; then
1207 # OpenWrt
1208 [ ! -e /var/lock/opkg.lock ] || return 1
1209 if [ -d /var/opkg-lists ]; then
1210@@ -125,7 +125,7 @@
1211 [ "$u" -gt 0 ]
1212 return $?
1213 fi
1214- elif eval $BYOBU_TEST brew >/dev/null; then
1215+ elif byobu_test brew; then
1216 # Mac OSX
1217 # check if any new versions have been installed since
1218 # we last cached. this may not recognize formulae
1219@@ -142,7 +142,7 @@
1220 }
1221
1222 __updates_available_detail() {
1223- if eval $BYOBU_TEST apt-get >/dev/null; then
1224+ if byobu_test apt-get; then
1225 local detail=`apt-get -s -o Debug::NoLocking=true upgrade`
1226 if [ "$1" = "--detail" ]; then
1227 printf "$detail"
1228
1229=== modified file 'usr/lib/byobu/users'
1230--- usr/lib/byobu/users 2019-05-26 19:18:32 +0000
1231+++ usr/lib/byobu/users 2019-06-17 20:09:21 +0000
1232@@ -26,7 +26,7 @@
1233 }
1234
1235 __users() {
1236- local count=0
1237+ local count=0 sign
1238 if [ "$USERS_DISTINCT" = "1" ]; then
1239 count=$(pgrep -fl 'sshd:.*@' | cut -f3 -d\ | cut -f1 -d@ | sort -u | wc -l)
1240 else
1241@@ -35,7 +35,15 @@
1242 count=$(pgrep -f "^sshd:.*@|^/usr/sbin/sshd -i" | wc -l) || return
1243 fi
1244 if [ $count -gt 0 ]; then
1245- color b w r; printf "%d" "$count"; color -; color w r; printf "##"; color --
1246+ case "$BYOBU_BACKEND" in
1247+ tmux)
1248+ sign="##"
1249+ ;;
1250+ screen)
1251+ sign="#"
1252+ ;;
1253+ esac
1254+ color b w r; printf "%d" "$count"; color -; color w r; printf "$sign"; color --
1255 else
1256 rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/users"*
1257 fi
1258
1259=== modified file 'usr/lib/byobu/whoami'
1260--- usr/lib/byobu/whoami 2019-05-26 19:15:56 +0000
1261+++ usr/lib/byobu/whoami 2019-06-17 20:09:21 +0000
1262@@ -20,9 +20,9 @@
1263 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1264
1265 ___get_user() {
1266- if eval $BYOBU_TEST whoami >/dev/null 2>&1; then
1267+ if byobu_test whoami; then
1268 whoami
1269- elif eval $BYOBU_TEST id >/dev/null 2>&1; then
1270+ elif byobu_test id; then
1271 id -un
1272 fi
1273 }
1274@@ -30,7 +30,7 @@
1275 __whoami_detail() {
1276 local user=$(___get_user)
1277 [ -n "$user" ] || return
1278- if eval $BYOBU_TEST getent >/dev/null 2>&1; then
1279+ if byobu_test getent; then
1280 getent -- passwd "$user"
1281 else
1282 grep "^$user:" /etc/passwd
1283
1284=== modified file 'usr/lib/byobu/wifi_quality'
1285--- usr/lib/byobu/wifi_quality 2019-06-01 21:12:18 +0000
1286+++ usr/lib/byobu/wifi_quality 2019-06-17 20:09:21 +0000
1287@@ -28,21 +28,21 @@
1288 }
1289
1290 __wifi_quality_detail() {
1291- if eval $BYOBU_TEST iw >/dev/null 2>&1; then
1292+ if byobu_test iw; then
1293 local dev
1294 for dev in $(___get_dev_list); do
1295 iw dev "$dev" info
1296 iw dev "$dev" link
1297 echo
1298 done
1299- elif eval $BYOBU_TEST iwconfig >/dev/null 2>&1; then
1300+ elif byobu_test iwconfig; then
1301 iwconfig 2>/dev/null
1302 fi
1303 }
1304
1305 __wifi_quality() {
1306 local out bitrate quality
1307- if eval $BYOBU_TEST iwconfig >/dev/null 2>&1; then
1308+ if byobu_test iwconfig; then
1309 # iwconfig is expected to output lines like:
1310 # Bit Rate=54 Mb/s Tx-Power=15 dBm
1311 # Link Quality=60/70 Signal level=-50 dBm
1312@@ -54,7 +54,7 @@
1313 $0 ~ /[ ]*Bit Rate/ { sub(/.*[:=]/,"",$2); printf("bitrate=%s\n", $2); }
1314 '`
1315 eval "$out"
1316- elif eval $BYOBU_TEST iw >/dev/null 2>&1; then
1317+ elif byobu_test iw; then
1318 local dev
1319 for dev in $(___get_dev_list); do
1320 # iw is expected to output lines like:
1321
1322=== modified file 'usr/share/byobu/keybindings/f-keys.screen'
1323--- usr/share/byobu/keybindings/f-keys.screen 2018-04-11 15:16:45 +0000
1324+++ usr/share/byobu/keybindings/f-keys.screen 2019-06-17 20:09:21 +0000
1325@@ -89,4 +89,4 @@
1326 register d ":source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.screen.disable^M"
1327 bind ! eval 'process x' 'process d' 'backtick 111 9999999 9999999 byobu-status menu --disable-f-keys' # F12 ! | toggle on/off f-keys
1328
1329-bindkey "^A" $BYOBU_BACKEND -t ctrl-a byobu-ctrl-a
1330+bindkey "^A" $BYOBU_BACKEND -t ctrl-a byobu-ctrl-a autorun
1331
1332=== modified file 'usr/share/byobu/keybindings/f-keys.tmux'
1333--- usr/share/byobu/keybindings/f-keys.tmux 2019-05-26 19:10:55 +0000
1334+++ usr/share/byobu/keybindings/f-keys.tmux 2019-06-17 20:09:21 +0000
1335@@ -82,4 +82,4 @@
1336 bind-key -n M-F12 source $BYOBU_PREFIX/share/byobu/keybindings/mouse.tmux.enable
1337 bind-key -n M-IC paste-buffer
1338
1339-bind-key -n C-a new-window -n "ctrl-a" "byobu-ctrl-a"
1340+bind-key -n C-a new-window -n "ctrl-a" "byobu-ctrl-a autorun"
1341
1342=== modified file 'usr/share/byobu/profiles/Makefile.am'
1343--- usr/share/byobu/profiles/Makefile.am 2015-11-14 22:57:11 +0000
1344+++ usr/share/byobu/profiles/Makefile.am 2019-06-17 20:09:21 +0000
1345@@ -1,2 +1,2 @@
1346 profilesdir = $(datadir)/@PACKAGE@/profiles
1347-profiles_DATA = bashrc byoburc dircolors screenrc common tmux tmuxrc NONE
1348+profiles_DATA = bashrc dircolors screenrc common tmux tmuxrc NONE
1349
1350=== removed file 'usr/share/byobu/profiles/byoburc'
1351--- usr/share/byobu/profiles/byoburc 2016-04-07 22:07:52 +0000
1352+++ usr/share/byobu/profiles/byoburc 1970-01-01 00:00:00 +0000
1353@@ -1,27 +0,0 @@
1354-###############################################################################
1355-# Load:
1356-# * the stock byobu profile
1357-# * any windows
1358-# * and the local byoburc (instead of .screenrc)
1359-# Used at startup but not profile refresh
1360-#
1361-# Copyright (C) 2009-2011 Canonical Ltd.
1362-#
1363-# Authors: Dustin Kirkland <kirkland@byobu.org>
1364-#
1365-# This program is free software: you can redistribute it and/or modify
1366-# it under the terms of the GNU General Public License as published by
1367-# the Free Software Foundation, version 3 of the License.
1368-#
1369-# This program is distributed in the hope that it will be useful,
1370-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1371-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1372-# GNU General Public License for more details.
1373-#
1374-# You should have received a copy of the GNU General Public License
1375-# along with this program. If not, see <http://www.gnu.org/licenses/>.
1376-###############################################################################
1377-
1378-source $BYOBU_CONFIG_DIR/profile
1379-source $BYOBU_WINDOWS
1380-source $BYOBU_CONFIG_DIR/.screenrc
1381
1382=== modified file 'usr/share/byobu/profiles/screenrc'
1383--- usr/share/byobu/profiles/screenrc 2016-04-07 22:07:52 +0000
1384+++ usr/share/byobu/profiles/screenrc 2019-06-17 20:09:21 +0000
1385@@ -2,7 +2,7 @@
1386 # Load:
1387 # * the stock byobu profile
1388 # * any windows
1389-# * and the local .screenrc (instead of .byoburc)
1390+# * and the local .screenrc
1391 # Used at startup but not profile refresh
1392 #
1393 # Copyright (C) 2009-2011 Canonical Ltd.
1394
1395=== modified file 'usr/share/byobu/profiles/tmuxrc'
1396--- usr/share/byobu/profiles/tmuxrc 2016-04-07 22:07:52 +0000
1397+++ usr/share/byobu/profiles/tmuxrc 2019-06-17 20:09:21 +0000
1398@@ -2,7 +2,7 @@
1399 # Load:
1400 # * the stock byobu profile
1401 # * any windows
1402-# * and the local byoburc (instead of .screenrc)
1403+# * and the local .tmux.conf
1404 # Used at startup but not profile refresh
1405 #
1406 # Copyright (C) 2009-2011 Canonical Ltd.

Subscribers

People subscribed via source and target branches