summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dot/bashrc7
-rwxr-xr-xdot/local/bin/git-ll-remote11
-rwxr-xr-xdot/local/bin/x11-ssh-host18
3 files changed, 28 insertions, 8 deletions
diff --git a/dot/bashrc b/dot/bashrc
index 8cf9144..63b1c0f 100644
--- a/dot/bashrc
+++ b/dot/bashrc
@@ -394,7 +394,7 @@ subvolify()
394 $sudo btrfs subvolume create "$path".subvol || return 394 $sudo btrfs subvolume create "$path".subvol || return
395 $sudo chown --reference="$path" "$path".subvol || return 395 $sudo chown --reference="$path" "$path".subvol || return
396 $sudo chmod --reference="$path" "$path".subvol || return 396 $sudo chmod --reference="$path" "$path".subvol || return
397 $sudo find "$path" -mindepth 1 -maxdepth 1 -print0 | xargs -0 mv -t "$path".subvol 397 $sudo find "$path" -mindepth 1 -maxdepth 1 -print0 | $sudo xargs -0 mv -t "$path".subvol
398 $sudo mv -T "$path" "$path".subvol~ 398 $sudo mv -T "$path" "$path".subvol~
399 $sudo mv -T "$path".subvol "$path" 399 $sudo mv -T "$path".subvol "$path"
400 $sudo rmdir "$path".subvol~ || true 400 $sudo rmdir "$path".subvol~ || true
@@ -475,3 +475,8 @@ ym ()
475{ 475{
476 yt-dlp -f bestaudio --add-metadata "$@" 476 yt-dlp -f bestaudio --add-metadata "$@"
477} 477}
478
479ya ()
480{
481 ym -o "%(playlist_title)s/%(track_number).2d - %(title)s.%(ext)s" "$@"
482}
diff --git a/dot/local/bin/git-ll-remote b/dot/local/bin/git-ll-remote
index 28b996f..dd76b78 100755
--- a/dot/local/bin/git-ll-remote
+++ b/dot/local/bin/git-ll-remote
@@ -18,7 +18,16 @@ do
18 esac 18 esac
19done 19done
20 20
21remote=${1:-origin} 21remote=${1:-$(git remote)}
22
23if ! [ "$remote" ]
24then
25 remote=$(git ls-remote --get-url)
26 if ! [ "$remote" ]
27 then
28 exit 1
29 fi
30fi
22 31
23QUIET=y 32QUIET=y
24SHOW=all 33SHOW=all
diff --git a/dot/local/bin/x11-ssh-host b/dot/local/bin/x11-ssh-host
index 166f491..a8620a7 100755
--- a/dot/local/bin/x11-ssh-host
+++ b/dot/local/bin/x11-ssh-host
@@ -1,15 +1,21 @@
1#!/bin/sh 1#!/bin/sh
2host=$(basename "$0") 2host=$(basename "$0")
3case "$host" in 3case "$host" in
4 x11-ssh-host) host=$1 ;; 4 x11-ssh-host)
5 for host in "$@"
6 do
7 continue
8 done
9 ;;
5esac 10esac
6 11
7SCRIPT="if which tmux && ! test -e .prefer-screen; then tmux attach || tmux new; else screen -xRR -e '^Zz'; fi" 12SCRIPT="if which tmux && ! test -e .prefer-screen; then tmux attach || tmux new; else screen -xRR -e '^Zz'; fi"
8 13
9if [ "$DISPLAY" -a ! -t 0 ]; then 14set -- autossh -- "$@" -t $SCRIPT
10 exec xterm -T "$host" -e \ 15
11 autossh "$host" -- -t $SCRIPT 16if [ "$DISPLAY" -a ! -t 0 ]
17then
18 exec xterm -T "$host" -e "$@"
12else 19else
13 exec \ 20 exec "$@"
14 autossh "$host" -- -t $SCRIPT
15fi 21fi