mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
ensure that the status file exists
Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
64c4258553
commit
233dab6eb7
4 changed files with 8 additions and 4 deletions
|
@ -24,7 +24,8 @@ if [ "$1" = "--detail" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. "$HOME/.$PKG/status" 2>/dev/null || true
|
. "/etc/$PKG/statusrc"
|
||||||
|
. "$HOME/.$PKG/status"
|
||||||
[ "$whoami" = "1" ] && at="@"
|
[ "$whoami" = "1" ] && at="@"
|
||||||
|
|
||||||
printf "\005{+b }%s%s\005{-}" "$at" $(hostname -s 2>/dev/null || hostname)
|
printf "\005{+b }%s%s\005{-}" "$at" $(hostname -s 2>/dev/null || hostname)
|
||||||
|
|
|
@ -24,7 +24,8 @@ if [ "$1" = "--detail" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. "$HOME/.$PKG/status" 2>/dev/null || true
|
. "/etc/$PKG/statusrc"
|
||||||
|
. "$HOME/.$PKG/status"
|
||||||
[ "$hostname" = "1" ] && space=" "
|
[ "$hostname" = "1" ] && space=" "
|
||||||
[ "$whoami" = "1" ] && space=" "
|
[ "$whoami" = "1" ] && space=" "
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,8 @@ if [ "$1" = "--detail" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. "$HOME/.$PKG/status" 2>/dev/null || true
|
. "/etc/$PKG/statusrc"
|
||||||
|
. "$HOME/.$PKG/status"
|
||||||
[ "$mem_used" = "1" ] && comma="," || whitespace=" "
|
[ "$mem_used" = "1" ] && comma="," || whitespace=" "
|
||||||
|
|
||||||
mem=`free | grep -m 1 "^Mem:" | awk '{print $2}'`
|
mem=`free | grep -m 1 "^Mem:" | awk '{print $2}'`
|
||||||
|
|
3
byobu
3
byobu
|
@ -86,7 +86,8 @@ fi
|
||||||
[ -s "$HOME/.$PKG/keybindings" ] || echo "source /usr/share/$PKG/keybindings/common" > "$HOME/.$PKG/keybindings"
|
[ -s "$HOME/.$PKG/keybindings" ] || echo "source /usr/share/$PKG/keybindings/common" > "$HOME/.$PKG/keybindings"
|
||||||
sed -i "s/$OLDPKG/$PKG/g" "$HOME/.$PKG/keybindings"
|
sed -i "s/$OLDPKG/$PKG/g" "$HOME/.$PKG/keybindings"
|
||||||
|
|
||||||
# Ensure that their default windows are seeded
|
# Ensure that the user's configuration is seeded
|
||||||
|
[ -r "$HOME/.$PKG/status" ] || touch "$HOME/.$PKG/status"
|
||||||
[ -r "$HOME/.$PKG/windows" ] || touch "$HOME/.$PKG/windows"
|
[ -r "$HOME/.$PKG/windows" ] || touch "$HOME/.$PKG/windows"
|
||||||
if grep -qs "^[^#]" "$HOME/.$PKG/windows"; then
|
if grep -qs "^[^#]" "$HOME/.$PKG/windows"; then
|
||||||
# User has some default windows, so don't launch motd+shell
|
# User has some default windows, so don't launch motd+shell
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue