mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
usr/bin/byobu-janitor
This commit is contained in:
parent
48f3615ba8
commit
308c9aa650
2 changed files with 32 additions and 25 deletions
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -12,6 +12,7 @@ byobu (2.81) unreleased; urgency=low
|
|||
- usr/bin/byobu-launcher
|
||||
- usr/bin/byobu
|
||||
- usr/bin/byobu-export
|
||||
- usr/bin/byobu-janitor
|
||||
|
||||
* usr/bin/byobu-config, usr/share/doc/byobu/help.txt: improve help
|
||||
text, per feedback from Turnkey Linux users
|
||||
|
|
|
@ -58,32 +58,38 @@ fi
|
|||
[ -r "$PROFILE" ] || ln -sf /usr/share/$PKG/profiles/common "$PROFILE"
|
||||
|
||||
# Affects: Symlinks pointing to color profiles
|
||||
if [ -h "$PROFILE" ] && \
|
||||
stat "$PROFILE" | grep -qs "File:.*->.*/usr/share/byobu/profiles/" && \
|
||||
! stat "$PROFILE" | grep -qs "File:.*->.*/usr/share/byobu/profiles/common" ; then
|
||||
# Set default colors
|
||||
BG=W
|
||||
FG=k
|
||||
color=$(ls -l "$PROFILE" | sed "s/^.*\///")
|
||||
case $color in
|
||||
black|dark) BG=k; FG=W;;
|
||||
dark_blue) BG=b; FG=W;;
|
||||
dark_cyan) BG=c; FG=W;;
|
||||
dark_green) BG=g; FG=W;;
|
||||
dark_purple) BG=m; FG=W;;
|
||||
dark_red) BG=r; FG=W;;
|
||||
dark_yellow) BG=y; FG=W;;
|
||||
light) BG=W; FG=k;;
|
||||
light_blue) BG=B; FG=k;;
|
||||
light_cyan) BG=C; FG=k;;
|
||||
light_green) BG=G; FG=k;;
|
||||
light_purple) BG=M; FG=k;;
|
||||
light_red) BG=R; FG=k;;
|
||||
light_yellow) BG=Y; FG=k;;
|
||||
*) BG=W; FG=k;;
|
||||
if [ -h "$PROFILE" ]; then
|
||||
case "$(stat $PROFILE)" in
|
||||
*File:*-\>*/usr/share/byobu/profiles/common)
|
||||
# All good, nothing to do
|
||||
true
|
||||
;;
|
||||
*File:*-\>*/usr/share/byobu/profiles/*)
|
||||
# Set default colors
|
||||
BG=W
|
||||
FG=k
|
||||
color=$(ls -l "$PROFILE" | sed "s/^.*\///")
|
||||
case $color in
|
||||
black|dark) BG=k; FG=W;;
|
||||
dark_blue) BG=b; FG=W;;
|
||||
dark_cyan) BG=c; FG=W;;
|
||||
dark_green) BG=g; FG=W;;
|
||||
dark_purple) BG=m; FG=W;;
|
||||
dark_red) BG=r; FG=W;;
|
||||
dark_yellow) BG=y; FG=W;;
|
||||
light) BG=W; FG=k;;
|
||||
light_blue) BG=B; FG=k;;
|
||||
light_cyan) BG=C; FG=k;;
|
||||
light_green) BG=G; FG=k;;
|
||||
light_purple) BG=M; FG=k;;
|
||||
light_red) BG=R; FG=k;;
|
||||
light_yellow) BG=Y; FG=k;;
|
||||
*) BG=W; FG=k;;
|
||||
esac
|
||||
rm -f "$PROFILE" 2>/dev/null
|
||||
byobu-select-profile -b $BG -f $FG >/dev/null 2>&1
|
||||
;;
|
||||
esac
|
||||
rm -f "$PROFILE" 2>/dev/null
|
||||
byobu-select-profile -b $BG -f $FG >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
[ -s "$HOME/.$PKG/keybindings" ] || echo "source /usr/share/$PKG/keybindings/common" > "$HOME/.$PKG/keybindings"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue