byobu 5.2
このコミットが含まれているのは:
コミット
a0074a8e50
|
@ -0,0 +1,65 @@
|
||||||
|
# 5.2
|
||||||
|
* 今度から、テクニカル諏訪子ちゃんは更新します。
|
||||||
|
* メモリ、ディスク、CPU温度、及びCPUプロセスがLinux、OpenBSD、及びFreeBSDに対応する様にしました。
|
||||||
|
* 「.byobu」→「.config/byobu」、「.byoburc」→「.config/byoburc」
|
||||||
|
|
||||||
|
# 5.133
|
||||||
|
* fix FTBFS on README
|
||||||
|
|
||||||
|
# 5.132
|
||||||
|
* pep8 binary is gone from Debian, disable for now
|
||||||
|
|
||||||
|
# 5.131
|
||||||
|
* build-depend on python3-pep8, rather than pep8 transitional package
|
||||||
|
* change disk status to white on darker magenta/purple, helps with readability on some terminals
|
||||||
|
* commit edeae41 fixed the excessive creation of sessions by not creating different sessions. This commit adjust the behavior in a way that having .reuse-sessions enabled tmux will properly attach and remove sessions when dettaching and will also kill the last session available
|
||||||
|
* When more than two sessions exist, tmux asks which session to use
|
||||||
|
* Update usage of tmux swap-window so that focus stays with the original window.
|
||||||
|
|
||||||
|
# 5.130
|
||||||
|
* add Raspbian colors / logo
|
||||||
|
* Force UTF-8 when attaching in `select-session.py`
|
||||||
|
* ignore new pep8 rules around hard tabs and whitespaces, related to bug 1843729
|
||||||
|
* Flatten these files into a single README.md
|
||||||
|
* Minor updates in the process
|
||||||
|
|
||||||
|
# 5.129
|
||||||
|
* recommend less package, for BYOBU_PAGER
|
||||||
|
|
||||||
|
# 5.128
|
||||||
|
* Quotes are needed around "$@" to keep parameters from splitting on spaces.
|
||||||
|
* "SuSE" name is an outdated version of it. Use the modern one: SUSE
|
||||||
|
* use env python3 for portability to other Linux and Mac systems (hopefully that's still okay for Debian / Ubuntu?
|
||||||
|
* https://github.com/dustinkirkland/byobu/pull/30
|
||||||
|
* prefer iwconfig over iw for now, iw is not working for me
|
||||||
|
* flatten some of our color configuration to match the new tmux format
|
||||||
|
* ensure some values are set to zero, if unreadable
|
||||||
|
* fixes a bug where disk_io causes the rest of the status line to fail
|
||||||
|
* fix bug creating a mess of sessions, where cycling through a bunch of copies of the same session
|
||||||
|
* On tmux version 1.9 all the styles *-bg/fg/attr were deprecated and replaced with *-style bg=/ fg=/ attribute In the upcoming version 2.9, this commands are gone and will break byobu style. this fix that issue and mantain compatibility with upcoming tmux versions.
|
||||||
|
* Do not include the user's .screenrc in the apport generated crash report
|
||||||
|
* Test if $HOME/.bashrc exists before modifying it (and potentially creating it)
|
||||||
|
* Use echo if the gettext command is not available
|
||||||
|
* Use readlink if the tty command is not available
|
||||||
|
* Add fallback if the install command is not available
|
||||||
|
* Don't autolaunch for ARM serial consoles
|
||||||
|
* Ensure the detected mount point device exists
|
||||||
|
* Read from /proc/sys/kernel/hostname if the hostname command is not available
|
||||||
|
* Add logo for OpenWrt
|
||||||
|
* Handle stderr for ps, e.g. unsupported options
|
||||||
|
* Remove unnecessary awk call; wc -l only outputs one value
|
||||||
|
* Ensure /proc/mdstat is readable
|
||||||
|
* Fix typo
|
||||||
|
* Fix reading services from $BYOBU_CONFIG_DIR/statusrc
|
||||||
|
* Fix screen session regex
|
||||||
|
* Add support for opkg (OpenWrt)
|
||||||
|
* Handle stderr for ps, e.g. unsupported options
|
||||||
|
* Fix trailing '#' sign
|
||||||
|
* Use id if the whoami command is not available
|
||||||
|
* Read from /etc/passwd if the getent command is not available
|
||||||
|
* Add support for iw (preferred over iwconfig)
|
||||||
|
* Make logic more similar to other status notifications
|
||||||
|
* Remove -k for new-window. In older versions of tmux, -k without -t <target-window> had no effect. In tmux 2.8, -k without -t will not trigger a new window; the given command is executed in the current window instead.
|
||||||
|
* Rename the new window created after adding a new session
|
||||||
|
|
||||||
|
もっと: [https://launchpad.net/byobu/+download](https://launchpad.net/byobu/+download)
|
|
@ -1 +1,4 @@
|
||||||
元のbyobuはDebian向けらしい、だからArtix、CRUX、OpenBSD、及びFreeBSDでもうまく機能している間で変更した
|
元のbyobuはDebian向けらしい、だからArtix、CRUX、OpenBSD、及びFreeBSDでもうまく機能している間で変更した。
|
||||||
|
|
||||||
|
更新:\
|
||||||
|
元のbyobuの開発者は辞めたらしいから、バージョン5.2からあたしが開発者だわ〜
|
||||||
|
|
12
bin/byobu
12
bin/byobu
|
@ -18,7 +18,7 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
VERSION=5.133
|
VERSION=5.2
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
|
|
||||||
# All sorts of things go wrong if you don't own your $HOME dir.
|
# All sorts of things go wrong if you don't own your $HOME dir.
|
||||||
|
@ -33,21 +33,21 @@ if [ ! -O "$HOME" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Source local byobu config
|
# Source local byobu config
|
||||||
if [ -r "$HOME/.byoburc" ]; then
|
if [ -r "$HOME/.config/byoburc" ]; then
|
||||||
# Ensure that this configuration is usable
|
# Ensure that this configuration is usable
|
||||||
. "$HOME/.byoburc" || mv -f "$HOME/.byoburc" "$HOME/.byoburc".orig
|
. "$HOME/.config/byoburc" || mv -f "$HOME/.config/byoburc" "$HOME/.config/byoburc".orig
|
||||||
fi
|
fi
|
||||||
if [ -z "${BYOBU_PREFIX}" ]; then
|
if [ -z "${BYOBU_PREFIX}" ]; then
|
||||||
# Find and export the installation location prefix
|
# Find and export the installation location prefix
|
||||||
greadlink -f . >/dev/null 2>&1 && export BYOBU_READLINK="greadlink" || export BYOBU_READLINK="readlink"
|
greadlink -f . >/dev/null 2>&1 && export BYOBU_READLINK="greadlink" || export BYOBU_READLINK="readlink"
|
||||||
prefix="$(dirname $(dirname $($BYOBU_READLINK -f $0)))"
|
prefix="$(dirname $(dirname $($BYOBU_READLINK -f $0)))"
|
||||||
if [ "$prefix" != "/usr" ]; then
|
if [ "$prefix" != "/usr" ]; then
|
||||||
echo "export BYOBU_PREFIX='$prefix'" >> "$HOME/.byoburc"
|
echo "export BYOBU_PREFIX='$prefix'" >> "$HOME/.config/byoburc"
|
||||||
. "$HOME/.byoburc"
|
. "$HOME/.config/byoburc"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
export BYOBU_CHARMAP=$(locale charmap)
|
export BYOBU_CHARMAP=$(locale charmap)
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
[ "$SHELL" = "/bin/bash" ] || exit 1
|
[ "$SHELL" = "/bin/bash" ] || exit 1
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ The byobu-export utility is now deprecated.
|
||||||
To install byobu on a system for which byobu is not packaged, or
|
To install byobu on a system for which byobu is not packaged, or
|
||||||
where you are not the root user, simply:
|
where you are not the root user, simply:
|
||||||
* Download the latest release (>= 3.0) from:
|
* Download the latest release (>= 3.0) from:
|
||||||
https://launchpad.net/byobu/+download
|
https://gitler.moe/suwako/byobu
|
||||||
* And follow the instructions in the README
|
* And follow the instructions in the README
|
||||||
|
|
||||||
"
|
"
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ elif [ "$BYOBU_SOURCED_PROFILE" != "1" ] && [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_
|
||||||
unset _tty
|
unset _tty
|
||||||
BYOBU_SOURCED_PROFILE=1
|
BYOBU_SOURCED_PROFILE=1
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
# Ensure that autolaunch is not explicitly disabled
|
# Ensure that autolaunch is not explicitly disabled
|
||||||
|
|
|
@ -21,7 +21,7 @@ PKG="byobu"
|
||||||
# Bad things happen if you run byobu, but you don't own your $HOME
|
# Bad things happen if you run byobu, but you don't own your $HOME
|
||||||
# ie, rather than "sudo byobu", you must run "sudo -H byobu"
|
# ie, rather than "sudo byobu", you must run "sudo -H byobu"
|
||||||
if [ -O "$HOME" ]; then
|
if [ -O "$HOME" ]; then
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
if [ -e "$BYOBU_CONFIG_DIR/disable-autolaunch" ]; then
|
if [ -e "$BYOBU_CONFIG_DIR/disable-autolaunch" ]; then
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
# ./debian/rules get-po
|
# ./debian/rules get-po
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
# command-line option.
|
# command-line option.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
|
||||||
|
|
|
@ -1,92 +1,132 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
#
|
||||||
|
# battery: print the state of the battery
|
||||||
|
#
|
||||||
|
# Copyright (C) 2009 Raphaël Pinson.
|
||||||
|
# Copyright (C) 2011-2014 Dustin Kirkland
|
||||||
|
#
|
||||||
|
# Authors: Raphaël Pinson <raphink@ubuntu.com>
|
||||||
|
# Dustin Kirkland <kirkland@byobu.org>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, version 3 of the License.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
__battery_detail() {
|
__battery_detail() {
|
||||||
local bat
|
local bat
|
||||||
for bat in /proc/acpi/battery/*; do
|
for bat in /proc/acpi/battery/*; do
|
||||||
cat "$bat/info"
|
cat "$bat/info"
|
||||||
cat "$bat/state"
|
cat "$bat/state"
|
||||||
done
|
done
|
||||||
|
# FIXME: do the same thing with the /sys interface
|
||||||
}
|
}
|
||||||
|
|
||||||
__battery() {
|
__battery() {
|
||||||
local bat line present sign state percent full rem color bcolor
|
local bat line present sign state percent full rem color bcolor
|
||||||
|
# Linux support
|
||||||
present=""; full="0"; rem="0"; state=""
|
present=""; full="0"; rem="0"; state=""
|
||||||
case "$(uname)" in
|
for bat in $BATTERY /sys/class/power_supply/* /proc/acpi/battery/*; do
|
||||||
OpenBSD)
|
case "$bat" in
|
||||||
percent=$(apm -l)
|
/sys/*)
|
||||||
case $(apm -a) in
|
if [ -r "$bat/uevent" ]; then
|
||||||
0) state="discharging";;
|
. "$bat/uevent"
|
||||||
1) state="charging";;
|
case "$POWER_SUPPLY_NAME" in AC|ac|Ac|aC) continue ;; esac
|
||||||
2) state="on-line";;
|
present="$POWER_SUPPLY_PRESENT"
|
||||||
esac
|
# Some use "CHARGE", others use "ENERGY", still others "CAPACITY"
|
||||||
;;
|
[ -n "$POWER_SUPPLY_CHARGE_FULL" ] && full=$((POWER_SUPPLY_CHARGE_FULL+full))
|
||||||
Linux)
|
[ -n "$POWER_SUPPLY_ENERGY_FULL" ] && full=$((POWER_SUPPLY_ENERGY_FULL+full))
|
||||||
for bat in $BATTERY /sys/class/power_supply/* /proc/acpi/battery/*; do
|
[ -n "$POWER_SUPPLY_CHARGE_NOW" ] && rem=$((POWER_SUPPLY_CHARGE_NOW+rem))
|
||||||
case "$bat" in
|
[ -n "$POWER_SUPPLY_ENERGY_NOW" ] && rem=$((POWER_SUPPLY_ENERGY_NOW+rem))
|
||||||
/sys/*)
|
if [ -n "$POWER_SUPPLY_CAPACITY" ] && [ ! -n "$POWER_SUPPLY_ENERGY_NOW" ] && [ ! -n "$POWER_SUPPLY_CHARGE_NOW" ]; then
|
||||||
if [ -r "$bat/uevent" ]; then
|
rem="$POWER_SUPPLY_CAPACITY" && full="100"
|
||||||
. "$bat/uevent"
|
fi
|
||||||
case "$POWER_SUPPLY_NAME" in AC|ac|Ac|aC) continue ;; esac
|
[ "$POWER_SUPPLY_STATUS" != "Unknown" ] && state="$POWER_SUPPLY_STATUS"
|
||||||
present="$POWER_SUPPLY_PRESENT"
|
fi
|
||||||
[ -n "$POWER_SUPPLY_CHARGE_FULL" ] && full=$((POWER_SUPPLY_CHARGE_FULL+full))
|
;;
|
||||||
[ -n "$POWER_SUPPLY_ENERGY_FULL" ] && full=$((POWER_SUPPLY_ENERGY_FULL+full))
|
/proc/*)
|
||||||
[ -n "$POWER_SUPPLY_CHARGE_NOW" ] && rem=$((POWER_SUPPLY_CHARGE_NOW+rem))
|
[ -f "$bat/info" ] || continue
|
||||||
[ -n "$POWER_SUPPLY_ENERGY_NOW" ] && rem=$((POWER_SUPPLY_ENERGY_NOW+rem))
|
while read line; do
|
||||||
if [ -n "$POWER_SUPPLY_CAPACITY" ] && [ ! -n "$POWER_SUPPLY_ENERGY_NOW" ] && [ ! -n "$POWER_SUPPLY_CHARGE_NOW" ]; then
|
set -- ${line}
|
||||||
rem="$POWER_SUPPLY_CAPACITY" && full="100"
|
case "$line" in
|
||||||
fi
|
present:*)
|
||||||
[ "$POWER_SUPPLY_STATUS" != "Unknown" ] && state="$POWER_SUPPLY_STATUS"
|
# make sure that this battery is present
|
||||||
fi
|
[ "$2" = "no" ] && continue 2
|
||||||
;;
|
present="$2";;
|
||||||
/proc/*)
|
last\ full\ capacity:*) full="$4";;
|
||||||
[ -f "$bat/info" ] || continue
|
esac
|
||||||
while read line; do
|
[ -n "$present" -a -n "$full" ] && break
|
||||||
set -- ${line}
|
done < "${bat}/info"
|
||||||
case "$line" in
|
while read line; do
|
||||||
present:*)
|
set -- ${line}
|
||||||
[ "$2" = "no" ] && continue 2
|
case "$line" in
|
||||||
present="$2";;
|
remaining\ capacity:*) rem="$3";;
|
||||||
last\ full\ capacity:*) full="$4";;
|
charging\ state:*) state="$3";;
|
||||||
esac
|
esac
|
||||||
[ -n "$present" -a -n "$full" ] && break
|
[ -n "$rem" -a -n "$state" ] && break
|
||||||
done < "${bat}/info"
|
done < "$bat/state"
|
||||||
while read line; do
|
[ -n "$full" ] && [ -n "$rem" ] && [ -n "$state" ] && break
|
||||||
set -- ${line}
|
;;
|
||||||
case "$line" in
|
esac
|
||||||
remaining\ capacity:*) rem="$3";;
|
done
|
||||||
charging\ state:*) state="$3";;
|
# Mac OS X support
|
||||||
esac
|
if eval $BYOBU_TEST /usr/sbin/ioreg >/dev/null 2>&1; then
|
||||||
[ -n "$rem" -a -n "$state" ] && break
|
# MacOS support
|
||||||
done < "$bat/state"
|
local key
|
||||||
[ -n "$full" ] && [ -n "$rem" ] && [ -n "$state" ] && break
|
for key in CurrentCapacity MaxCapacity ExternalChargeCapable FullyCharged; do
|
||||||
;;
|
line=$(/usr/sbin/ioreg -n AppleSmartBattery -w0 | grep $key | sed -e 's/|//g' | awk '{ print $3 }')
|
||||||
esac
|
case "$key" in
|
||||||
done
|
CurrentCapacity) rem="$line";;
|
||||||
esac
|
MaxCapacity) full="$line";;
|
||||||
|
ExternalChargeCapable)
|
||||||
if [ $percent -ge 0 ]; then
|
if [ "${line}" = "Yes" ]; then
|
||||||
if [ "$percent" -lt 33 ]; then
|
state="charging"
|
||||||
color="R w"
|
elif [ "${line}" = "No" ]; then
|
||||||
bcolor="b R w"
|
state="discharging"
|
||||||
elif [ "$percent" -lt 67 ]; then
|
fi
|
||||||
color="Y k"
|
;;
|
||||||
bcolor="b Y k"
|
FullyCharged)
|
||||||
else
|
if [ "${line}" = "Yes" ]; then
|
||||||
color="G k"
|
state="charged"
|
||||||
bcolor="b G k"
|
fi
|
||||||
fi
|
;;
|
||||||
percent="${percent}${PCT}"
|
esac
|
||||||
state=$(printf "%s" "$state" | $BYOBU_SED 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')
|
done
|
||||||
case $state in
|
fi
|
||||||
charging) sign="+" ;;
|
if [ $rem -ge 0 ] && [ $full -gt 0 ]; then
|
||||||
discharging) sign="-" ;;
|
percent=$(((100*$rem)/$full))
|
||||||
on-line) sign="=" ;;
|
if [ "$percent" -lt 33 ]; then
|
||||||
*) sign="$state" ;;
|
color="R w"
|
||||||
esac
|
bcolor="b R w"
|
||||||
if [ -z "$percent" ]; then
|
elif [ "$percent" -lt 67 ]; then
|
||||||
rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/battery"*
|
color="Y k"
|
||||||
return
|
bcolor="b Y k"
|
||||||
fi
|
else
|
||||||
color $bcolor; printf "%s" "$percent"; color -; color $color; printf "%s" "$sign"; color --
|
color="G k"
|
||||||
|
bcolor="b G k"
|
||||||
|
fi
|
||||||
|
percent="${percent}${PCT}"
|
||||||
|
# Convert state to lower case
|
||||||
|
state=$(printf "%s" "$state" | $BYOBU_SED 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')
|
||||||
|
case $state in
|
||||||
|
charging) sign="+" ;;
|
||||||
|
discharging) sign="-" ;;
|
||||||
|
charged|unknown|full) sign="=" ;;
|
||||||
|
*) sign="$state" ;;
|
||||||
|
esac
|
||||||
|
if [ -z "$percent" ]; then
|
||||||
|
rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/battery"*
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
color $bcolor; printf "%s" "$percent"; color -; color $color; printf "%s" "$sign"; color --
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vi: syntax=sh ts=4 noexpandtab
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#!/bin/sh -e
|
|
||||||
__cpu_freq_detail() {
|
__cpu_freq_detail() {
|
||||||
cat /proc/cpuinfo
|
cat /proc/cpuinfo
|
||||||
}
|
}
|
||||||
|
@ -45,6 +44,7 @@ __cpu_freq() {
|
||||||
unit="MHz"
|
unit="MHz"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$freq" ] || return
|
[ -n "$freq" ] || return
|
||||||
color c W; printf "%s" "${cores}x"; color b c W; printf "%s" "$freq"; color -; color c W; printf "%s" "$unit"; color --
|
color c W; printf "%s" "${cores}x"; color b c W; printf "%s" "$freq"; color -; color c W; printf "%s" "$unit"; color --
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,54 +1,53 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
#
|
|
||||||
# cpu_temp: cpu temperature
|
|
||||||
#
|
|
||||||
# Copyright (C) 2008 Canonical Ltd.
|
|
||||||
# Copyright (C) 2011-2014 Dustin Kirkland
|
|
||||||
#
|
|
||||||
# Authors: Dustin Kirkland <kirkland@byobu.org>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, version 3 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
__cpu_temp_detail() {
|
__cpu_temp_detail() {
|
||||||
local i
|
case "$(uname)" in
|
||||||
for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /proc/acpi/ibm/thermal /proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
|
"OpenBSD")
|
||||||
[ -r "$i" ] || continue
|
sysctl hw.sensors | grep -E 'hw.sensors.*temp'
|
||||||
printf "%s\n" "$i:"
|
;;
|
||||||
cat "$i"/*
|
"FreeBSD")
|
||||||
done
|
sysctl dev.cpu | grep -E 'dev.cpu.*temperature'
|
||||||
|
;;
|
||||||
|
"Linux")
|
||||||
|
local i
|
||||||
|
for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /proc/acpi/ibm/thermal /proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
|
||||||
|
[ -r "$i" ] || continue
|
||||||
|
printf "%s\n" "$i:"
|
||||||
|
cat "$i"/*
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
__cpu_temp() {
|
__cpu_temp() {
|
||||||
local i t unit
|
local i t unit
|
||||||
for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /proc/acpi/ibm/thermal /proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
|
case "$(uname)" in
|
||||||
case "$i" in
|
"OpenBSD")
|
||||||
*temp*_input|*thermal_zone*/temp)
|
t=$(sysctl hw.sensors | grep -E 'hw.sensors.*temp' | awk '{ print $1 }' | head -1 | sed 's/^.*=//' | sed 's/\..*$//')
|
||||||
[ -s "$i" ] && read t < "$i" && t=$(($t/1000))
|
color b k Y; printf "%s" "$t"; color --
|
||||||
;;
|
;;
|
||||||
*)
|
"FreeBSD")
|
||||||
[ -s "$i" ] && t=$($BYOBU_SED -e "s/^[^0-9]\+//" -e "s/\s.*$//" "$i")
|
t=$(sysctl dev.cpu | grep -E 'dev.cpu.*temperature' | awk '{ print $2 }' | head -1 | sed 's/\..*$/C/')
|
||||||
;;
|
color b k Y; printf "%s" "$t"; color --
|
||||||
esac
|
;;
|
||||||
if [ -n "$t" ] && [ "$t" -gt 0 ]; then
|
"Linux")
|
||||||
unit="$ICON_C"
|
for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /proc/acpi/ibm/thermal /proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
|
||||||
if [ "$TEMP" = "F" ]; then
|
case "$i" in
|
||||||
t=$(($t*9/5 + 32))
|
*temp*_input|*thermal_zone*/temp)
|
||||||
unit="$ICON_F"
|
[ -s "$i" ] && read t < "$i" && t=$(($t/1000))
|
||||||
fi
|
;;
|
||||||
color b k Y; printf "%s" "$t"; color -; color k Y; printf "%s" "$unit"; color --
|
*)
|
||||||
break
|
[ -s "$i" ] && t=$($BYOBU_SED -e "s/^[^0-9]\+//" -e "s/\s.*$//" "$i")
|
||||||
fi
|
;;
|
||||||
done
|
esac
|
||||||
|
|
||||||
|
if [ -n "$t" ] && [ "$t" -gt 0 ]; then
|
||||||
|
color b k Y; printf "%sC" "$t"; color --
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# vi: syntax=sh ts=4 noexpandtab
|
# vi: syntax=sh ts=4 noexpandtab
|
||||||
|
|
|
@ -1,40 +1,23 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
__disk_detail() {
|
__disk_detail() {
|
||||||
df -h -P
|
if [ $(uname) = "FreeBSD" ]; then
|
||||||
|
df -h
|
||||||
|
else
|
||||||
|
df -h -P
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
__disk() {
|
__disk() {
|
||||||
local out="" MP="" size="" free="" unit=""
|
local use="" total=""
|
||||||
[ -z "$MONITORED_DISK" ] && MP="/" || MP="$MONITORED_DISK"
|
if [ $(uname) = "FreeBSD" ]; then
|
||||||
case $MP in
|
use=$(zpool list | tail -1 | awk '{ print $3 }')
|
||||||
/dev/*) MP=$(awk '$1 == m { print $2; exit(0); }' "m=$MP" /proc/mounts);;
|
total=$(zpool list | tail -1 | awk '{ print $2 }')
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$(uname)" = "FreeBSD" ]; then
|
|
||||||
out=$(df -h | grep "${MP}$" | awk '{ printf("%s %s", $4, $2); }')
|
|
||||||
else
|
else
|
||||||
out=$({ df -h -P "$MP" 2>/dev/null || df -h "$MP"; } | awk 'END { printf("%s %s", $3, $2); }')
|
use=$(df -h "/" | tail -1 | awk '{ print $3 }')
|
||||||
|
total=$(df -h "/" | tail -1 | awk '{ print $2 }')
|
||||||
fi
|
fi
|
||||||
|
color b m W; printf "%s/" "$use"; color -; color b m W; printf "%s" "$total"; color -;
|
||||||
set -- ${out}
|
|
||||||
free=${1}; size=${2};
|
|
||||||
free_unit=${free#${free%?}}
|
|
||||||
free=${free%?};
|
|
||||||
unit=${size#${size%?}}
|
|
||||||
size=${size%?};
|
|
||||||
case "$unit" in
|
|
||||||
k*|K*) unit="$ICON_KB" ;;
|
|
||||||
m*|M*) unit="$ICON_MB" ;;
|
|
||||||
g*|G*) unit="$ICON_GB" ;;
|
|
||||||
t*|T*) unit="$ICON_TB" ;;
|
|
||||||
esac
|
|
||||||
case "$free_unit" in
|
|
||||||
k*|K*) free_unit="$ICON_KB" ;;
|
|
||||||
m*|M*) free_unit="$ICON_MB" ;;
|
|
||||||
g*|G*) free_unit="$ICON_GB" ;;
|
|
||||||
t*|T*) free_unit="$ICON_TB" ;;
|
|
||||||
esac
|
|
||||||
[ -n "$size" ] || return
|
|
||||||
color b m W; printf "%s%s/%s%s" "$free" "$free_unit" "$size" "$unit"; color --;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vi: syntax=sh ts=4 noexpandtab
|
||||||
|
|
|
@ -49,7 +49,7 @@ except Exception:
|
||||||
PKG = "byobu"
|
PKG = "byobu"
|
||||||
HOME = os.getenv("HOME")
|
HOME = os.getenv("HOME")
|
||||||
USER = os.getenv("USER")
|
USER = os.getenv("USER")
|
||||||
BYOBU_CONFIG_DIR = os.getenv("BYOBU_CONFIG_DIR", HOME + "/.byobu")
|
BYOBU_CONFIG_DIR = os.getenv("BYOBU_CONFIG_DIR", HOME + "/.config/byobu")
|
||||||
BYOBU_RUN_DIR = os.getenv("BYOBU_RUN_DIR", HOME + "/.cache/byobu")
|
BYOBU_RUN_DIR = os.getenv("BYOBU_RUN_DIR", HOME + "/.cache/byobu")
|
||||||
BYOBU_BACKEND = os.getenv("BYOBU_BACKEND", "tmux")
|
BYOBU_BACKEND = os.getenv("BYOBU_BACKEND", "tmux")
|
||||||
BYOBU_SOCKETDIR = os.getenv("SOCKETDIR", "/var/run/screen")
|
BYOBU_SOCKETDIR = os.getenv("SOCKETDIR", "/var/run/screen")
|
||||||
|
|
|
@ -21,25 +21,11 @@
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
|
|
||||||
# Some users build and install byobu themselves, rather than from a distro
|
# Some users build and install byobu themselves, rather than from a distro
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -n "$BYOBU_PREFIX" ] || BYOBU_PREFIX="/usr"
|
[ -n "$BYOBU_PREFIX" ] || BYOBU_PREFIX="/usr"
|
||||||
|
|
||||||
# Create and export the user configuration directory
|
# Create and export the user configuration directory
|
||||||
if [ -d "$BYOBU_CONFIG_DIR" ]; then
|
export BYOBU_CONFIG_DIR="$HOME/.config/$PKG"
|
||||||
export BYOBU_CONFIG_DIR="$BYOBU_CONFIG_DIR"
|
|
||||||
elif [ -d "$XDG_CONFIG_HOME" ]; then
|
|
||||||
# Use XDG, as some users insist on such nonsense :-)
|
|
||||||
export BYOBU_CONFIG_DIR="$XDG_CONFIG_HOME/$PKG"
|
|
||||||
elif [ -d "$HOME/.config/$PKG" ]; then
|
|
||||||
# Use XDG config directory, if it exists
|
|
||||||
export BYOBU_CONFIG_DIR="$HOME/.config/$PKG"
|
|
||||||
elif [ -d "$HOME/.local/share/$PKG" ]; then
|
|
||||||
# Use XDG local directory, if it exists
|
|
||||||
export BYOBU_CONFIG_DIR="$HOME/.local/share/$PKG"
|
|
||||||
else
|
|
||||||
# And to default to good old classic config dir location!
|
|
||||||
export BYOBU_CONFIG_DIR="$HOME/.$PKG"
|
|
||||||
fi
|
|
||||||
[ -d "$BYOBU_CONFIG_DIR" ] || mkdir -p "$BYOBU_CONFIG_DIR/bin"
|
[ -d "$BYOBU_CONFIG_DIR" ] || mkdir -p "$BYOBU_CONFIG_DIR/bin"
|
||||||
|
|
||||||
# Grab the global, then local socket directory
|
# Grab the global, then local socket directory
|
||||||
|
|
|
@ -35,7 +35,7 @@ except Exception:
|
||||||
PKG = "byobu"
|
PKG = "byobu"
|
||||||
SHELL = os.getenv("SHELL", "/bin/bash")
|
SHELL = os.getenv("SHELL", "/bin/bash")
|
||||||
HOME = os.getenv("HOME")
|
HOME = os.getenv("HOME")
|
||||||
BYOBU_CONFIG_DIR = os.getenv("BYOBU_CONFIG_DIR", HOME + "/.byobu")
|
BYOBU_CONFIG_DIR = os.getenv("BYOBU_CONFIG_DIR", HOME + "/.config/byobu")
|
||||||
BYOBU_BACKEND = os.getenv("BYOBU_BACKEND", "tmux")
|
BYOBU_BACKEND = os.getenv("BYOBU_BACKEND", "tmux")
|
||||||
choice = -1
|
choice = -1
|
||||||
sessions = []
|
sessions = []
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
[ -r "$HOME/.config/byoburc" ] && . "$HOME/.config/byoburc"
|
||||||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
[ -r "$BYOBU_CONFIG_DIR/statusrc" ] && . "$BYOBU_CONFIG_DIR/statusrc"
|
[ -r "$BYOBU_CONFIG_DIR/statusrc" ] && . "$BYOBU_CONFIG_DIR/statusrc"
|
||||||
|
|
|
@ -28,7 +28,7 @@ __memory() {
|
||||||
;;
|
;;
|
||||||
OpenBSD)
|
OpenBSD)
|
||||||
total=$(($(sysctl -n hw.physmem) / 1024 / 1024))
|
total=$(($(sysctl -n hw.physmem) / 1024 / 1024))
|
||||||
used_mb=$(($(vmstat | tail -1 | awk '{print $4}') / 1024))
|
used_mb=$(vmstat | tail -1 | awk '{print substr($3, 1, length($3)-1)}')
|
||||||
;;
|
;;
|
||||||
FreeBSD)
|
FreeBSD)
|
||||||
total=$(($(sysctl -n hw.realmem) / 1024 / 1024))
|
total=$(($(sysctl -n hw.realmem) / 1024 / 1024))
|
||||||
|
|
|
@ -13,8 +13,10 @@ __release() {
|
||||||
elif [ -r "/etc/os-release" ]; then
|
elif [ -r "/etc/os-release" ]; then
|
||||||
if grep -q -E '^(Arch|Artix|Gentoo|Void)' /etc/os-release; then
|
if grep -q -E '^(Arch|Artix|Gentoo|Void)' /etc/os-release; then
|
||||||
RELEASE="" # ローリングリリースの場合
|
RELEASE="" # ローリングリリースの場合
|
||||||
else
|
elif grep -q -E '^ID=crux' /etc/os-release; then
|
||||||
RELEASE=$(. /etc/os-release && echo "$VERSION")
|
RELEASE=$(. /etc/os-release && echo "$VERSION")
|
||||||
|
else
|
||||||
|
RELEASE=$(. /etc/os-release && echo "$VERSION_ID")
|
||||||
fi
|
fi
|
||||||
elif [ -r "/etc/issue" ]; then
|
elif [ -r "/etc/issue" ]; then
|
||||||
local issue
|
local issue
|
||||||
|
@ -23,12 +25,12 @@ __release() {
|
||||||
Ubuntu*)
|
Ubuntu*)
|
||||||
set -- $issue;
|
set -- $issue;
|
||||||
RELEASE="$2";
|
RELEASE="$2";
|
||||||
;;
|
;;
|
||||||
Debian*)
|
Debian*)
|
||||||
local ver
|
local ver
|
||||||
read ver < /etc/debian_version
|
read ver < /etc/debian_version
|
||||||
RELEASE="$ver"
|
RELEASE="$ver"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
elif eval $BYOBU_TEST sw_vers >/dev/null 2>&1; then
|
elif eval $BYOBU_TEST sw_vers >/dev/null 2>&1; then
|
||||||
RELEASE="$(sw_vers -productVersion)"
|
RELEASE="$(sw_vers -productVersion)"
|
||||||
|
|
|
@ -78,7 +78,7 @@ unbind-key -n C-F9
|
||||||
unbind-key -n M-F11
|
unbind-key -n M-F11
|
||||||
unbind-key -n C-F11
|
unbind-key -n C-F11
|
||||||
unbind-key -n S-F11
|
unbind-key -n S-F11
|
||||||
bind-key -n S-F12 source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux \; source $HOME/.byobu/keybindings.tmux \; display-message "Byobu F-keys: ENABLED"
|
bind-key -n S-F12 source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux \; source $HOME/.config/byobu/keybindings.tmux \; display-message "Byobu F-keys: ENABLED"
|
||||||
unbind-key -n M-F12
|
unbind-key -n M-F12
|
||||||
unbind-key -n C-S-F12
|
unbind-key -n C-S-F12
|
||||||
unbind-key -n M-IC
|
unbind-key -n M-IC
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Load:
|
# Load:
|
||||||
# * the stock byobu profile
|
# * the stock byobu profile
|
||||||
# * any windows
|
# * any windows
|
||||||
# * and the local .screenrc (instead of .byoburc)
|
# * and the local .screenrc (instead of .config/byoburc)
|
||||||
# Used at startup but not profile refresh
|
# Used at startup but not profile refresh
|
||||||
#
|
#
|
||||||
# Copyright (C) 2009-2011 Canonical Ltd.
|
# Copyright (C) 2009-2011 Canonical Ltd.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
# Override these in $BYOBU_CONFIG_DIR/status
|
# Override these in $BYOBU_CONFIG_DIR/status
|
||||||
# where BYOBU_CONFIG_DIR is XDG_CONFIG_HOME if defined,
|
# where BYOBU_CONFIG_DIR is XDG_CONFIG_HOME if defined,
|
||||||
# and $HOME/.byobu otherwise.
|
# and $HOME/.config/byobu otherwise.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2009-2011 Canonical Ltd.
|
# Copyright (C) 2009-2011 Canonical Ltd.
|
||||||
#
|
#
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
# Override these in $BYOBU_CONFIG_DIR/statusrc
|
# Override these in $BYOBU_CONFIG_DIR/statusrc
|
||||||
# where BYOBU_CONFIG_DIR is XDG_CONFIG_HOME if defined,
|
# where BYOBU_CONFIG_DIR is XDG_CONFIG_HOME if defined,
|
||||||
# and $HOME/.byobu otherwise.
|
# and $HOME/.config/byobu otherwise.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2009-2011 Canonical Ltd.
|
# Copyright (C) 2009-2011 Canonical Ltd.
|
||||||
#
|
#
|
||||||
|
|
読み込み中…
新しいイシューから参照