mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* select-screen-profile: align profile options properly, LP: #335943;
order profile options better, LP: #335944; match "F5" text to that in screen-profiles
This commit is contained in:
parent
63a65dce92
commit
73d0b42c92
1 changed files with 13 additions and 5 deletions
|
@ -56,7 +56,14 @@ assert_symlink "$HOME/.screen-profiles/profile"
|
||||||
|
|
||||||
listprofiles() {
|
listprofiles() {
|
||||||
# Display list of profiles, one per line
|
# Display list of profiles, one per line
|
||||||
for x in $(ls $PROFILE_DIR); do
|
# Start with basic profiles
|
||||||
|
basename $(ls $PROFILE_DIR/plain 2>/dev/null) 2>/dev/null
|
||||||
|
basename $(ls $PROFILE_DIR/*-light 2>/dev/null) 2>/dev/null
|
||||||
|
basename $(ls $PROFILE_DIR/*-dark 2>/dev/null) 2>/dev/null
|
||||||
|
basename $(ls $PROFILE_DIR/*-black 2>/dev/null) 2>/dev/null
|
||||||
|
# Now, list advanced profiles
|
||||||
|
for x in $(ls $PROFILE_DIR/*-*_*); do
|
||||||
|
x=$(basename "$x")
|
||||||
if [ $x = "common" -o $x = "misc" ]; then
|
if [ $x = "common" -o $x = "misc" ]; then
|
||||||
# Skip the common profile, no value there
|
# Skip the common profile, no value there
|
||||||
continue
|
continue
|
||||||
|
@ -82,6 +89,7 @@ prompt() {
|
||||||
elif [ "$x" = "plain" ]; then
|
elif [ "$x" = "plain" ]; then
|
||||||
simple=$i
|
simple=$i
|
||||||
fi
|
fi
|
||||||
|
[ $i -lt 10 ] && i=" $i"
|
||||||
echo " $i. $x$desc"
|
echo " $i. $x$desc"
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
|
@ -89,15 +97,16 @@ prompt() {
|
||||||
count=1
|
count=1
|
||||||
while /bin/true; do
|
while /bin/true; do
|
||||||
if [ $count -gt 5 ]; then
|
if [ $count -gt 5 ]; then
|
||||||
|
echo `gettext "ERROR: Invalid selection"`
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
count=`expr $count + 1`
|
count=`expr $count + 1`
|
||||||
if [ -z "$selected" -a ! -z "$simple" ]; then
|
if [ -z "$selected" -a ! -z "$simple" ]; then
|
||||||
selected="$simple"
|
selected="$simple"
|
||||||
elif ! test $selected -gt 0 2>/dev/null; then
|
elif ! test $selected -gt 0 2>/dev/null; then
|
||||||
read -p "`gettext 'Choose: '` 1-$i [$simple]: " -r selected
|
read -p "`gettext 'Choose'` 1-$i [$simple]: " -r selected
|
||||||
elif ! test $selected -le $i 2>/dev/null; then
|
elif ! test $selected -le $i 2>/dev/null; then
|
||||||
read -p "`gettext 'Choose: '` 1-$i [$simple]: " -r selected
|
read -p "`gettext 'Choose'` 1-$i [$simple]: " -r selected
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
@ -123,8 +132,7 @@ setprofile() {
|
||||||
found=1
|
found=1
|
||||||
echo
|
echo
|
||||||
if [ "$TERM" = "screen" ]; then
|
if [ "$TERM" = "screen" ]; then
|
||||||
echo `gettext 'Hit <F5><enter> to reload the current profile, or...'`
|
echo `gettext 'If you are using the default set of keybindings, press\n<F5><enter> to activate these changes.\n\nOtherwise, exit this screen session and start a new one.'`
|
||||||
echo `gettext 'Close the current screen by typing "exit", and restart "screen" to activate.'`
|
|
||||||
else
|
else
|
||||||
echo `gettext 'Run "screen" to activate'`
|
echo `gettext 'Run "screen" to activate'`
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue