config/shell: script adjustments
This commit is contained in:
parent
d174be33eb
commit
2f3d9a4471
|
@ -54,5 +54,5 @@ d() {
|
||||||
}
|
}
|
||||||
di() {
|
di() {
|
||||||
test $# -eq 1 && test "$1" = "-" -o -d "$1" || local dir=$({ zf "$@"; locz "$@" } | zfz)
|
test $# -eq 1 && test "$1" = "-" -o -d "$1" || local dir=$({ zf "$@"; locz "$@" } | zfz)
|
||||||
cd "${dir:-1}"
|
cd "${dir:-$1}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ which lsb_release >/dev/null && export DIST=$(lsb_release --id | cut -d' ' -f2)
|
||||||
|
|
||||||
unalias rd 2>/dev/null
|
unalias rd 2>/dev/null
|
||||||
|
|
||||||
# Basic aliases {{{1
|
# System helpers {{{1
|
||||||
|
|
||||||
alias h='help'
|
alias h='help'
|
||||||
compdef help=man
|
compdef help=man
|
||||||
|
@ -131,6 +131,7 @@ alias jcj='jcl -o json-pretty -u'
|
||||||
# Applications {{{1
|
# Applications {{{1
|
||||||
|
|
||||||
alias u='topgrade'
|
alias u='topgrade'
|
||||||
|
alias st='synct'
|
||||||
alias expr='noglob expr'
|
alias expr='noglob expr'
|
||||||
|
|
||||||
alias lst='( last; last -f /var/log/wtmp.1 ) | grep -v "pts/" | tac | less +G'
|
alias lst='( last; last -f /var/log/wtmp.1 ) | grep -v "pts/" | tac | less +G'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# launch my focus playlist
|
# launch my focus playlist
|
||||||
playlistPath="$MUSIC/Playlists"
|
playlistPath="$MUSIC/Playlists"
|
||||||
test -z "$1" && vp "$MUSIC/focus.m3u" ||
|
test -z "$1" && vp "$playlistPath/focus.m3u" ||
|
||||||
(find -L $MUSIC -iname "focus-$1.m3u" -print0 | grep --null-data . ||
|
(find -L $playlistPath -iname "focus-$1.m3u" -print0 | grep --null-data . ||
|
||||||
find -L $playlistPath -iname "$1.m3u*" -print0 | grep --null-data . ||
|
find -L $playlistPath -iname "$1.m3u*" -print0 | grep --null-data . ||
|
||||||
find -L $MUSIC -iname "*$1*" -prune -exec find {} -size +2M -type f -not -iregex ".*.\(jpe?g\|png\)" -print0 \;) |
|
find -L $MUSIC -iname "*$1*" -prune -exec find {} -size +2M -type f -not -iregex ".*.\(jpe?g\|png\)" -print0 \;) |
|
||||||
xargs -0 vp
|
xargs -0 vp
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# Generate a key if it does not exist
|
||||||
|
# Print and copy its public part
|
||||||
|
# ARGS
|
||||||
|
# - key filename
|
||||||
|
# - encryption method (default ed25519)
|
||||||
|
# - further args for ssh-keygen
|
||||||
keys="$HOME/.ssh/keys"
|
keys="$HOME/.ssh/keys"
|
||||||
name="${1:-id_ed25519}"
|
name="${1:-id_ed25519}"
|
||||||
mkdir -p "$keys"
|
mkdir -p "$keys"
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Clones a fork and sets a corresponding upstream
|
# Clones a fork and sets a corresponding upstream
|
||||||
# Args:
|
# ARGS
|
||||||
# - repo name
|
# - repo name
|
||||||
# - upstream user
|
# - upstream user
|
||||||
# - local user
|
# - local user
|
||||||
|
# - url
|
||||||
# - target directory name (and further arguments to clone)
|
# - target directory name (and further arguments to clone)
|
||||||
set -e
|
set -e
|
||||||
git-get github.com "$1" "$3" "${@:4}"
|
git-get "${4:-github.com}" "$1" "$3" "${@:5}"
|
||||||
test "$2" && git remote add upstream "$(git-repo github.com "$1" "$2")"
|
cd $(expr "$5" \| "$1")
|
||||||
|
test "$2" && git remote add upstream "$(git-repo "${4:-github.com}" "$1" "$2")"
|
||||||
git remote -v
|
git remote -v
|
||||||
|
|
|
@ -4,4 +4,5 @@ set -e
|
||||||
remote=$(git-repo "$@")
|
remote=$(git-repo "$@")
|
||||||
echo "Cloning $remote"
|
echo "Cloning $remote"
|
||||||
git clone $remote ${@:4} --recurse-submodules
|
git clone $remote ${@:4} --recurse-submodules
|
||||||
cd "$(test $4 && echo $4 || basename ${remote%.git})"
|
cd "$(expr "$1" || basename ${remote%.git})"
|
||||||
|
exec "$SHELL"
|
||||||
|
|
|
@ -31,12 +31,12 @@ and configuration for ~less~ and ~fzf~.
|
||||||
# Use org-yank-visible
|
# Use org-yank-visible
|
||||||
- essentials :: git zsh bat neovim man-db texinfo
|
- essentials :: git zsh bat neovim man-db texinfo
|
||||||
- basic tools :: fd ripgrep tree jrnl python-pynvim wget zsh-completions mlocate
|
- basic tools :: fd ripgrep tree jrnl python-pynvim wget zsh-completions mlocate
|
||||||
- common tools :: ffmpeg imagemagick pandoc [[https://lftp.yar.ru/][lftp]] zsh-doc glances pacman-contrib pass
|
- common tools :: ffmpeg imagemagick pandoc [[https://lftp.yar.ru/][lftp]] zsh-doc glances pacman-contrib pass youtube-dl
|
||||||
- ssh :: openssh sshfs lemonade-git
|
- ssh :: openssh sshfs lemonade-git
|
||||||
- dotfiles :: yadm
|
- dotfiles :: yadm
|
||||||
: yadm clone --bootstrap git.jfischer.org:xeruf/dotfiles.git
|
: yadm clone --bootstrap git.jfischer.org:xeruf/dotfiles.git
|
||||||
- aur recommendations :: tldr++ sc-im
|
- aur recommendations :: tldr++ sc-im
|
||||||
- personal aur utils :: diffr bat-extras-git rdictcc-git
|
- personal aur utils :: [[https://github.com/mookid/diffr][diffr]] bat-extras-git rdictcc-git
|
||||||
- experiments :: kakoune
|
- experiments :: kakoune
|
||||||
** Applications
|
** Applications
|
||||||
- productivity :: activitywatch-bin
|
- productivity :: activitywatch-bin
|
||||||
|
@ -77,4 +77,8 @@ After running android-studio setup, accept licenses:
|
||||||
** Server
|
** Server
|
||||||
Setup systemd-resolved and systemd-networkd
|
Setup systemd-resolved and systemd-networkd
|
||||||
- ssh :: lemonade openssh
|
- ssh :: lemonade openssh
|
||||||
|
- webserver :: sudo apt install snapd nginx && snap install certbot
|
||||||
- social :: pleroma-bin postgresql caddy
|
- social :: pleroma-bin postgresql caddy
|
||||||
|
- rust :: cargo install zoxide diffr
|
||||||
|
: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
*** Funkwhale
|
||||||
|
|
Loading…
Reference in New Issue