Reorganize aliases, support misc fns, misc named dirs

Miscellaneous maintenance tasks for my ZSH life.
This commit is contained in:
William Carroll 2019-03-08 18:17:41 +00:00
parent d7c443c7d1
commit 4d7d937df7
4 changed files with 103 additions and 33 deletions

View file

@ -161,6 +161,13 @@ browse() {
nohup "$BROWSER" $@ &
}
lh() {
# Opens http://localhost:<port> in your $BROWSER.
# Usage: `lh 8080`
# Here, in case it wasn't obvious, `lh` stands for "localhost".
browse "http://localhost:$1"
}
essids() {
# Returns a list of all ESSIDs the network card detects
local interface=${1-wlp4s0}
@ -358,6 +365,20 @@ tmux_focused_pane() {
echo 'Not implemented'
}
# Google3
g3_root() {
# Outputs the root of the CitC client in g3
# NOTE: there is probably a function already supported by g4 to cd to the
# root, so support for this function may be dropped shortly.
echo "${PWD%%/google3/*}/google3"
}
# i3
focus() {
# Focuses an i3 window by application name.
i3-msg "[class=\"$1\"] focus" >/dev/null
}
# zsh
fns() {
# Outputs all available functions.