config/shell: alias tweaks & adjust for debian server
This commit is contained in:
parent
4912f99017
commit
fdeba2e52c
|
@ -35,7 +35,7 @@ yas() {
|
||||||
then echo "Installing $pkg..."
|
then echo "Installing $pkg..."
|
||||||
cmd="yay -S $pkg"
|
cmd="yay -S $pkg"
|
||||||
print -s "$cmd"
|
print -s "$cmd"
|
||||||
eval "$cmd"
|
eval "$cmd" || yay -Sy $pkg
|
||||||
rehash
|
rehash
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
if test "$ZSH_NAME" = "zsh"; then
|
if test "$ZSH_NAME" = "zsh"; then
|
||||||
alias -g ___='"$(eval "$(fc -ln -1)" | tail -n 1)"'
|
alias -g ___='"$(eval "$(fc -ln -1)" | tail -n 1)"'
|
||||||
alias -g G="| grp"
|
alias -g G="| grp"
|
||||||
alias -g X="| xargs"
|
alias -g X="| xargs -d '\n'"
|
||||||
alias -g X1="| xargs -n 1"
|
alias -g X1="| xargs -d '\n' -n 1"
|
||||||
alias -g XC="| xclip -selection clipboard"
|
alias -g XC="| xclip -selection clipboard"
|
||||||
alias -g L="--color=always | ${PAGER:-less}"
|
alias -g L="--color=always | ${PAGER:-less}"
|
||||||
fi
|
fi
|
||||||
|
@ -18,6 +18,7 @@ if test -d "$DATA"; then
|
||||||
d2=$(builtin cd $DATA/2* && pwd)
|
d2=$(builtin cd $DATA/2* && pwd)
|
||||||
d3=$(builtin cd $DATA/3* && pwd)
|
d3=$(builtin cd $DATA/3* && pwd)
|
||||||
d4=$(builtin cd $DATA/4* && pwd)
|
d4=$(builtin cd $DATA/4* && pwd)
|
||||||
|
dd="$d4/downloads"
|
||||||
fi 2>/dev/null
|
fi 2>/dev/null
|
||||||
|
|
||||||
ulimit -c unlimited # Enable core dumps
|
ulimit -c unlimited # Enable core dumps
|
||||||
|
@ -72,8 +73,7 @@ edshell() {
|
||||||
line="$(echo "$grepfile" | cut -d':' -f2)";;
|
line="$(echo "$grepfile" | cut -d':' -f2)";;
|
||||||
(*) file="$(find $CONFIG_SHELLS -name "$1*" | head -1 | grep . || echo "$CONFIG_SHELLS/$1")";;
|
(*) file="$(find $CONFIG_SHELLS -name "$1*" | head -1 | grep . || echo "$CONFIG_SHELLS/$1")";;
|
||||||
esac
|
esac
|
||||||
test -f "$file" || return 2
|
test -f "$file" || checksum="$(md5sum "$file")"
|
||||||
checksum="$(md5sum "$file")"
|
|
||||||
$EDITOR "$(test "$line" && echo "+normal! ${line}ggzx" || echo "--")" "${file%:*}"
|
$EDITOR "$(test "$line" && echo "+normal! ${line}ggzx" || echo "--")" "${file%:*}"
|
||||||
test "$checksum" != "$(md5sum $file)" && source "$HOME/.zprofile" && exec $SHELL
|
test "$checksum" != "$(md5sum $file)" && source "$HOME/.zprofile" && exec $SHELL
|
||||||
}
|
}
|
||||||
|
@ -161,6 +161,7 @@ alias expr='noglob expr'
|
||||||
# Shortcuts
|
# Shortcuts
|
||||||
alias logoff="loginctl terminate-user $USER"
|
alias logoff="loginctl terminate-user $USER"
|
||||||
alias calc='rlwrap -a bc -l'
|
alias calc='rlwrap -a bc -l'
|
||||||
|
alias dt='python -c "import time;print(time.asctime(time.localtime()))"'
|
||||||
|
|
||||||
# Process
|
# Process
|
||||||
alias println='printf "\n"'
|
alias println='printf "\n"'
|
||||||
|
@ -170,7 +171,7 @@ alias lst='( last; last -f /var/log/wtmp.1 ) | grep -v "pts/" | tac | less +G'
|
||||||
|
|
||||||
# Remote
|
# Remote
|
||||||
alias delta="sc restart openvpn-client@deltaPeak.service"
|
alias delta="sc restart openvpn-client@deltaPeak.service"
|
||||||
alias sshl="lemonade server -allow 127.0.0.1 & ssh -R 2489:127.0.0.1:2489"
|
alias sshl="lemonade server -allow 127.0.0.1 & kitty +kitten ssh -R 2489:127.0.0.1:2489"
|
||||||
|
|
||||||
# Listen to loopback of mic
|
# Listen to loopback of mic
|
||||||
alias listen='pactl load-module module-loopback; echo "Press Enter to stop"; read; pactl unload-module module-loopback'
|
alias listen='pactl load-module module-loopback; echo "Press Enter to stop"; read; pactl unload-module module-loopback'
|
||||||
|
@ -266,11 +267,14 @@ killJava() {
|
||||||
|
|
||||||
alias l="ls -l --almost-all --human-readable --group-directories-first --file-type"
|
alias l="ls -l --almost-all --human-readable --group-directories-first --file-type"
|
||||||
|
|
||||||
alias f="noglob fdd"
|
if which fd >/dev/null
|
||||||
|
then alias f="noglob fdd"
|
||||||
fdd() { $(which fd >/dev/null && echo fd || echo fdfind) --color=always --hidden --no-ignore-vcs --one-file-system "$@" | less -F; }
|
fdd() { $(which fd >/dev/null && echo fd || echo fdfind) --color=always --hidden --no-ignore-vcs --one-file-system "$@" | less -F; }
|
||||||
compdef f=fd
|
compdef f=fd
|
||||||
#alias f='find -not -path "*.sync*" -and -not \( -name daten -prune \)'
|
else
|
||||||
#alias f1='find -mindepth 1 -maxdepth 1'
|
alias f='find -not -path "*.sync*" -and -not \( -name daten -prune \)'
|
||||||
|
alias f1='find -mindepth 1 -maxdepth 1'
|
||||||
|
fi
|
||||||
|
|
||||||
lowercase_transliterate="y/A-Z /a-z-/"
|
lowercase_transliterate="y/A-Z /a-z-/"
|
||||||
which perl-rename >/dev/null &&
|
which perl-rename >/dev/null &&
|
||||||
|
@ -278,9 +282,11 @@ which perl-rename >/dev/null &&
|
||||||
alias lowercase="rename -iv '$lowercase_transliterate'"
|
alias lowercase="rename -iv '$lowercase_transliterate'"
|
||||||
|
|
||||||
# rsync directory properly - suffix both dirs with / to act on contents
|
# rsync directory properly - suffix both dirs with / to act on contents
|
||||||
alias rc='rsync --recursive --info=progress2,remove,symsafe,flist,del --human-readable --links'
|
alias rcn='rsync -v --recursive --human-readable --links --dry-run'
|
||||||
alias dsync='rc --delete'
|
alias rc='rcs --links --times'
|
||||||
alias dsynca='rc --specials --times --delete'
|
alias rcu='rc --existing --size-only'
|
||||||
|
alias rcs='rsync --recursive --info=progress2,remove,symsafe,flist,del --human-readable'
|
||||||
|
alias dsync='rc --delete --specials'
|
||||||
alias move='rc --remove-source-files'
|
alias move='rc --remove-source-files'
|
||||||
alias rdiff='rsync --recursive --progress --delete --links --dry-run'
|
alias rdiff='rsync --recursive --progress --delete --links --dry-run'
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@ test "$hasService" && sudo service rsyslog restart || sudo systemctl restart rsy
|
||||||
test "$hasService" && sudo service cron reload || sudo systemctl reload cronie
|
test "$hasService" && sudo service cron reload || sudo systemctl reload cronie
|
||||||
|
|
||||||
highlight "Zsh"
|
highlight "Zsh"
|
||||||
|
mkdir -p $XDG_STATE_HOME
|
||||||
test -n "$ZSH" || export ZSH="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/oh-my-zsh"
|
test -n "$ZSH" || export ZSH="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/oh-my-zsh"
|
||||||
cloneshallow() {
|
cloneshallow() {
|
||||||
url=https://github.com/$2/$1.git
|
url=https://github.com/$2/$1.git
|
||||||
|
@ -70,8 +71,8 @@ cloneshallow zsh-vim-mode softmoth
|
||||||
case "$(grep "^$USER" /etc/passwd | sed 's/.*://')" in (*zsh);; (*) chsh -s $(which zsh);; esac
|
case "$(grep "^$USER" /etc/passwd | sed 's/.*://')" in (*zsh);; (*) chsh -s $(which zsh);; esac
|
||||||
|
|
||||||
### Arch
|
### Arch
|
||||||
highlight "Pacman"
|
|
||||||
if test -f /etc/pacman.conf; then
|
if test -f /etc/pacman.conf; then
|
||||||
|
highlight "Pacman"
|
||||||
sudo sed -i 's/#Color/Color/' /etc/pacman.conf
|
sudo sed -i 's/#Color/Color/' /etc/pacman.conf
|
||||||
sudo sed -i "$(grep -n "\[multilib\]" /etc/pacman.conf | cut -d':' -f1),+1 s/# *//" /etc/pacman.conf
|
sudo sed -i "$(grep -n "\[multilib\]" /etc/pacman.conf | cut -d':' -f1),+1 s/# *//" /etc/pacman.conf
|
||||||
highlight "Reflector"
|
highlight "Reflector"
|
||||||
|
|
|
@ -95,7 +95,7 @@ alt-c:yank
|
||||||
alt-w:toggle-preview-wrap
|
alt-w:toggle-preview-wrap
|
||||||
alt-j:preview-half-page-down,alt-k:preview-half-page-up
|
alt-j:preview-half-page-down,alt-k:preview-half-page-up
|
||||||
shift-down:preview-half-page-down,shift-up:preview-half-page-up
|
shift-down:preview-half-page-down,shift-up:preview-half-page-up
|
||||||
$([[ $(fzf --version | cut -d '.' -f-2) > 0.24 ]] && echo "alt-shift-down:preview-down,alt-shift-up:preview-up")
|
$([[ "$(fzf --version 2>/dev/null | cut -d '.' -f-2)" > 0.24 ]] && echo "alt-shift-down:preview-down,alt-shift-up:preview-up")
|
||||||
esc:close
|
esc:close
|
||||||
" | xargs -I% echo -n "%," | head -c-1)
|
" | xargs -I% echo -n "%," | head -c-1)
|
||||||
#alt-r:preview(bat {}),
|
#alt-r:preview(bat {}),
|
||||||
|
|
39
README.org
39
README.org
|
@ -29,31 +29,30 @@ and configuration for ~less~ and ~fzf~.
|
||||||
* Packages
|
* Packages
|
||||||
: pacman -Qe | cut -d\ -f1 | xclip -selection clipboard
|
: pacman -Qe | cut -d\ -f1 | xclip -selection clipboard
|
||||||
# Use org-yank-visible
|
# Use org-yank-visible
|
||||||
- essentials :: git zsh bat neovim man-db
|
- essentials :: git zsh bat neovim man-db curl
|
||||||
- basic tools :: texinfo fd ripgrep tree jrnl python-pynvim wget zsh-completions unrar mlocate (locate on deb)
|
- basic tools :: texinfo tree wget locate
|
||||||
- common tools :: topgrade ffmpeg imagemagick pandoc [[https://lftp.yar.ru/][lftp]] glances youtube-dl dos2unix zsh-doc pacman-contrib espanso
|
fd python-pynvim zsh-completions mlocate unrar
|
||||||
- pass :: pass pass-otp pass-extension-tail pass-clip
|
|
||||||
-> interesting: pass-steam, pass-autotype, pass-file, pass-qr, pass-ssh, pass-rotate
|
|
||||||
- ssh :: openssh sshfs lemonade-git
|
|
||||||
- dotfiles :: yadm
|
- dotfiles :: yadm
|
||||||
: yadm clone --bootstrap git@git.jfischer.org:xeruf/dotfiles.git
|
: yadm clone --bootstrap git@git.jfischer.org:xeruf/dotfiles.git
|
||||||
: yadm clone --bootstrap https://git.jfischer.org/xeruf/dotfiles.git
|
: yadm clone --bootstrap https://git.jfischer.org/xeruf/dotfiles.git
|
||||||
- aur recommendations :: tldr++ sc-im
|
|
||||||
- git tools :: git-bug git-lfs git-crypt git-remote-gcrypt github-cli
|
|
||||||
- personal aur utils (need configuration) :: [[https://github.com/mookid/diffr][diffr]] bat-extras-git rdictcc-git neovim-symlinks stderred-git
|
|
||||||
: pip install beautifulsoup4
|
|
||||||
- experiments :: kakoune
|
|
||||||
** Applications
|
** Applications
|
||||||
- productivity :: activitywatch-bin
|
- common tools :: ripgrep topgrade ffmpeg imagemagick pandoc [[https://lftp.yar.ru/][lftp]] glances youtube-dl dos2unix zsh-doc pacman-contrib espanso
|
||||||
|
- git tools :: git-bug git-lfs git-crypt git-remote-gcrypt github-cli
|
||||||
|
- aur recommendations :: tldr++ sc-im
|
||||||
|
- pass :: pass pass-otp pass-extension-tail pass-clip
|
||||||
|
-> interesting: pass-steam, pass-autotype, pass-file, pass-qr, pass-ssh, pass-rotate
|
||||||
|
- ssh :: openssh sshfs lemonade-git
|
||||||
|
- productivity :: activitywatch-bin jrnl
|
||||||
- music :: mpd mpc ncmpc mpd-mpris vlc phonon-qt5-vlc sox
|
- music :: mpd mpc ncmpc mpd-mpris vlc phonon-qt5-vlc sox
|
||||||
: mkdir -p ~/.local/state/mpd && systemctl --user enable --now mpd mpd-mpris
|
: mkdir -p ~/.local/state/mpd && systemctl --user enable --now mpd mpd-mpris
|
||||||
: sudo npm install -g bpm
|
: sudo npm install -g bpm
|
||||||
- bluetooth :: bluez bluez-utils pulseaudio-bluetooth
|
- bluetooth :: bluez bluez-utils pulseaudio-bluetooth
|
||||||
- tagging :: puddletag beets picard ffmpegthumbnailer
|
- music tagging :: puddletag beets picard ffmpegthumbnailer
|
||||||
- sync :: syncthing
|
- sync :: syncthing
|
||||||
: systemctl enable --now syncthing
|
: systemctl enable --now syncthing
|
||||||
** Emacs
|
- personal aur utils (need configuration) :: [[https://github.com/mookid/diffr][diffr]] bat-extras-git rdictcc-git neovim-symlinks stderred-git
|
||||||
- mail :: offlineimap mu
|
: pip install beautifulsoup4
|
||||||
|
- experiments :: kakoune
|
||||||
** Graphical
|
** Graphical
|
||||||
- x :: xorg-xserver xorg-xkill xorg-setxkbmap xorg-xinit xterm xclip xprintidle light
|
- x :: xorg-xserver xorg-xkill xorg-setxkbmap xorg-xinit xterm xclip xprintidle light
|
||||||
- music production :: lilypond lilypond-docs timidity++ chordpro-git musescore mixxx-beta-git
|
- music production :: lilypond lilypond-docs timidity++ chordpro-git musescore mixxx-beta-git
|
||||||
|
@ -64,6 +63,8 @@ and configuration for ~less~ and ~fzf~.
|
||||||
- health :: stretchly-xeruf-git redshift acpilight light
|
- health :: stretchly-xeruf-git redshift acpilight light
|
||||||
: scu enable --now redshift
|
: scu enable --now redshift
|
||||||
-> https://www.reddit.com/r/linuxquestions/comments/pm1bxn/setting_brightness_on_amd_ryzen_7_5800h_with
|
-> https://www.reddit.com/r/linuxquestions/comments/pm1bxn/setting_brightness_on_amd_ryzen_7_5800h_with
|
||||||
|
*** Emacs
|
||||||
|
- mail :: offlineimap mu
|
||||||
*** Firefox Addons
|
*** Firefox Addons
|
||||||
**** Password management
|
**** Password management
|
||||||
***** Pass - the unix password manager
|
***** Pass - the unix password manager
|
||||||
|
@ -89,9 +90,9 @@ After running android-studio setup, accept licenses:
|
||||||
: $ANDROID_SDK_ROOT/tools/bin/sdkmanager --licenses
|
: $ANDROID_SDK_ROOT/tools/bin/sdkmanager --licenses
|
||||||
** Server
|
** Server
|
||||||
Setup systemd-resolved and systemd-networkd
|
Setup systemd-resolved and systemd-networkd
|
||||||
- ssh :: lemonade openssh
|
- tools :: fd-find
|
||||||
- webserver :: sudo apt install snapd nginx && snap install certbot
|
|
||||||
- social :: pleroma-bin postgresql caddy
|
|
||||||
- rust :: cargo install zoxide diffr
|
- rust :: cargo install zoxide diffr
|
||||||
: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
*** Funkwhale
|
- ssh (Ubuntu) :: lemonade openssh
|
||||||
|
- webserver :: sudo apt install snapd nginx && snap install certbot
|
||||||
|
- social :: pleroma-bin postgresql caddy
|
||||||
|
|
Loading…
Reference in New Issue