1
0
mirror of https://github.com/dustinkirkland/byobu.git synced 2025-03-12 04:35:50 -07:00

* usr/bin/manifest:

- fix manifest url
* usr/bin/wifi-status:
  - use tmux target pane
This commit is contained in:
Dustin Kirkland 2016-05-09 18:20:30 -05:00
parent e329186dd8
commit 202663727d
3 changed files with 22 additions and 8 deletions

4
debian/changelog vendored

@ -2,6 +2,10 @@ byobu (5.107) unreleased; urgency=medium
* usr/bin/manifest:
- remove http, breaks pastebinit
* usr/bin/manifest:
- fix manifest url
* usr/bin/wifi-status:
- use tmux target pane
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 14 Apr 2016 11:21:51 -0500

@ -29,7 +29,7 @@ export_packages() {
if [ "$OBJECT" = "-" ]; then
dpkg -l
elif echo "$OBJECT" | grep -qs ".*://.*"; then
dpkg -l | gzip -9 | base64 | pastebinit -b "$OBJECT"
dpkg -l | gzip -9 | base64 | pastebinit -b "${OBJECT##*/}"
else
dpkg -l > "$OBJECT"
fi
@ -67,7 +67,7 @@ fi
if [ "$ACTION" = "import" ]; then
import_packages
elif [ "$ACTION" = "export" ]; then
[ -n "$OBJECT" ] || OBJECT="paste.ubuntu.com"
[ -n "$OBJECT" ] || OBJECT="http://paste.ubuntu.com"
export_packages
else
usage

@ -19,8 +19,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
trap "pkill -f -9 wifi-status >/dev/null 2>&1; exit 0" EXIT HUP INT QUIT TERM
if [ -z "$1" ]; then
dev=$(iwconfig 2>/dev/null | grep '802.11' | tail -n1 | awk '{print $1}')
dev=$(iwconfig 2>/dev/null | grep '802.11' | tail -n1 | awk '{print $1}')
else
dev="$1"
fi
@ -29,9 +31,17 @@ if [ -z "$TMUX" ]; then
watch -n1 "iwconfig $dev; ifconfig $dev; route -n; echo; (grep $dev: /var/log/syslog | tail -n 10 | sort -r); echo; ping -I $dev -c 1 8.8.8.8"
else
tmux new-window -n wifi-status "watch -c iwconfig $dev \| ccze -A" \; \
split-window -v "watch -c ifconfig $dev \| ccze -A" \; \
split-window -v "watch -c route -n \| ccze -A" \; \
split-window -h "ping -I $dev 8.8.8.8" \; \
split-window -v "watch -c grep $dev: /var/log/syslog \| tail -n 10 \| sort -r \| ccze -A" \; \
select-layout tiled
split-window -t wifi-status -v "watch -c ifconfig $dev \| ccze -A" \; \
split-window -t wifi-status -v "watch -c route -n \| ccze -A" \; \
split-window -t wifi-status -h "ping -I $dev 8.8.8.8" \; \
split-window -t wifi-status -v "watch -c grep $dev: /var/log/syslog \| tail -n 10 \| sort -r \| ccze -A" \; \
select-layout -t wifi-status tiled
fi
while true; do
if [ $(tmux list-panes -t wifi-status | wc -l) -lt 5 ]; then
tmux kill-window -t wifi-status
exit 0
fi
sleep 1
done