This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # <xbar.title>ping</xbar.title> | |
| # <xbar.version>v1.1</xbar.version> | |
| # <xbar.author>Trung Đinh Quang, Grant Sherrick and Kent Karlsson</xbar.author> | |
| # <xbar.author.github>thealmightygrant</xbar.author.github> | |
| # <xbar.desc>Sends pings to a range of sites to determine network latency</xbar.desc> | |
| # <xbar.image>http://i.imgur.com/lk3iGat.png?1</xbar.image> | |
| # <xbar.dependencies>ping</xbar.dependencies> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # newt: fresh worktree off origin/main (ignores current branch/dirty state) + cd into it | |
| function newt() { | |
| local toplevel parent repo branch newdir | |
| toplevel=$(git rev-parse --show-toplevel 2>/dev/null) || { | |
| echo "newt: not inside a git repository" >&2 | |
| return 1 | |
| } | |
| repo=$(basename "$(dirname "$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null)")") | |
| parent=$(dirname "$toplevel") | |
| branch="$(whoami)-$(date +%s)" |
OlderNewer