Compare commits
No commits in common. "043e96f93e1d9555e865a6063c9a02234f26beba" and "32e6a5fea57efb83068584c338989c0a5ec984f7" have entirely different histories.
043e96f93e
...
32e6a5fea5
2 changed files with 3 additions and 21 deletions
19
bash/.bashrc
19
bash/.bashrc
|
@ -54,15 +54,13 @@ function sshunlock() {
|
||||||
|
|
||||||
# Show a menu of all known Tailscale nodes for the user to select from
|
# Show a menu of all known Tailscale nodes for the user to select from
|
||||||
function tsselect() {
|
function tsselect() {
|
||||||
local jq_filter="$1"
|
|
||||||
[ -z "$jq_filter" ] && jq_filter=".Peer[] | .DNSName"
|
|
||||||
|
|
||||||
local items=()
|
local items=()
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
[ -z "$line" ] && continue
|
[ -z "$line" ] && continue
|
||||||
[[ "$line" =~ ^\# ]] && continue
|
[[ "$line" =~ ^\# ]] && continue
|
||||||
items+=("$line")
|
local name=$(echo "$line" | awk '{ print $2 }')
|
||||||
done <<< $(tailscale status -json | jq -r "$jq_filter" | sort)
|
items+=("$name")
|
||||||
|
done <<< $(tailscale status --self=false | sort -k 2)
|
||||||
|
|
||||||
_COLUMNS=$COLUMNS
|
_COLUMNS=$COLUMNS
|
||||||
# Force options to display in one column
|
# Force options to display in one column
|
||||||
|
@ -144,17 +142,6 @@ function moshwezscrts() {
|
||||||
moshwez $(tsselect) -- screen -RR -d
|
moshwez $(tsselect) -- screen -RR -d
|
||||||
}
|
}
|
||||||
|
|
||||||
# Switch tailscale exit nodes
|
|
||||||
function tsexit() {
|
|
||||||
echo "Current exit node: $(tailscale status -json | jq -r ".Peer[] | select(.ExitNode == true) | .DNSName")"
|
|
||||||
local newsel="$(tsselect ".Peer[] | select(.ExitNodeOption == true) | .DNSName")"
|
|
||||||
[ -z "$newsel" ] || sudo tailscale set --exit-node="$newsel" --exit-node-allow-lan-access=true
|
|
||||||
}
|
|
||||||
|
|
||||||
function tsnoexit() {
|
|
||||||
sudo tailscale set --exit-node="" --exit-node-allow-lan-access=false
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add local to path
|
# Add local to path
|
||||||
export PATH="$PATH:~/.local/bin"
|
export PATH="$PATH:~/.local/bin"
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,3 @@ window-rule {
|
||||||
match is-active=false
|
match is-active=false
|
||||||
opacity 0.98
|
opacity 0.98
|
||||||
}
|
}
|
||||||
|
|
||||||
window-rule {
|
|
||||||
match app-id=r#"mpv$"#
|
|
||||||
default-column-width { proportion 0.9; }
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue