summaryrefslogtreecommitdiff
path: root/config/essentials/shell
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-02-29 14:26:50 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-02-29 14:26:50 +0100
commitc16799693cb6d780f258833689a6d312506093bb (patch)
treef11e3ba72e632269160275f1c3c36d170fb81a62 /config/essentials/shell
parentda998b5c857aef8903bf791b4e41966cf230562c (diff)
parent8ab76a9ebf8414c720f13bd0aaaa2e6452ff753b (diff)
Merge branch 'main' of debuc.com:dotfiles
Diffstat (limited to 'config/essentials/shell')
-rw-r--r--config/essentials/shell/aliases.sh22
-rw-r--r--config/essentials/shell/functions.sh41
2 files changed, 27 insertions, 36 deletions
diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh
index 57c33fd..2d08e74 100644
--- a/config/essentials/shell/aliases.sh
+++ b/config/essentials/shell/aliases.sh
@@ -77,8 +77,8 @@ alias lst1='ls --tree -L1'
alias lst2='ls --tree -L2'
alias lst3='ls --tree -L3'
alias ls.='ls -dl .*'
-which exa >/dev/null 2>&1 &&
- alias ls='exa --sort extension --group-directories-first --no-time --git' ||
+which eza >/dev/null 2>&1 &&
+ alias ls='eza --sort extension --group-directories-first --no-time --git' ||
alias ls='ls --color --group-directories-first --sort=extension'
# pacman aliases
@@ -156,7 +156,7 @@ alias airpods='bluetoothctl connect 60:93:16:24:00:10'
alias hotpsot='nmcli dev wifi hotspot ifname wlan0 ssid wiefie password "peepeepoopoo"'
alias wtip='wt ip -c -brief addr'
alias fusephone='sshfs myphone: /media/phone'
-alias ttyper='ttyper -l english1000 -w 100'
+alias ttyper='ttyper -l english1000'
alias wgup='doas wg-quick up wg0'
alias wgdown='doas wg-quick down wg0'
@@ -184,7 +184,7 @@ alias gdate='date +%y_%m_%d-%T'
alias tpid='tail -f /dev/null --pid'
alias pwdcp='pwd | clipp'
alias gw="grep -ri"
-alias srcsupd='echo ~/src/{installdrier,dotfiles,password-store} ~/.config/emacs | supd'
+alias srcsupd='echo ~/src/{installdrier,dotfiles,password-store} ~/proj/suckless/*/ ~/proj/personal/scripts/*/ ~/.config/emacs | supd'
# systemctl aliases
alias smc='systemctl'
@@ -225,7 +225,7 @@ alias vb='vbm startvm'
# quick config
alias ez='vi ${ZDOTDIR:-~}/.zshrc'
-alias eza='vi $HOME/.config/shell/aliases.sh'
+alias ezal='vi $HOME/.config/shell/aliases.sh'
alias ezf='vi $HOME/.config/shell/functions.sh'
alias eto='vi ~/sync/TODO'
alias edw='vi ~/proj/suckless/dwm/config.def.h'
@@ -313,7 +313,17 @@ alias dbinf='ssh db dlinfo'
alias sshdb='ssh -t db "tmux a || tmux"'
alias dbsmu='rsync -rlpP db:/media/basilisk/music/ /media/kilimanjaro/music'
-# oh-my-zsh git aliases
+# git
alias config='GIT_WORK_TREE=~/src/dotfiles/ GIT_DIR=~/src/dotfiles/.git'
alias cfg='vi ~/src/dotfiles/"$(config git ls-files | fzf || exit)"'
alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs vi'
+alias gclc='git clone "$(clipo)"'
+
+# docker
+alias dorm='docker container rm $(docker container ls -a | tail -n +2 | fzf -m | awk '\''{print $1}'\'')'
+alias dostop='docker container stop $(docker container ls -a | tail -n +2 | fzf -m | awk '\''{print $1}'\'')'
+alias doirm='docker image rm $(docker image ls | tail -n +2 | fzf -m | awk '\''{print $3}'\'')'
+
+alias -g skip='tail -n +2'
+alias ddeps='pactree -r -d 1'
+alias update-mirrors='reflector -p https | rankmirrors -n 10 -p -w - | doas tee /etc/pacman.d/mirrorlist'
diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh
index 38fae34..22064e4 100644
--- a/config/essentials/shell/functions.sh
+++ b/config/essentials/shell/functions.sh
@@ -68,6 +68,14 @@ sms() { ssh -t phone sendmsg "$1" "'$2'"; }
trcp() { scp "$1" db:/media/basilisk/downloads/transmission/torrents/; }
rln() { ln -s "$(readlink -f "$1")" "$2"; }
getgit() { git clone git@db:"$1"; }
+esc() { eval "$EDITOR '$(which $1)'"; }
+delfile() { curl "${2:-https://upfast.cronyakatsuki.xyz/delete/$1}"; }
+upfile() { curl -F "file=@\"$1\"" "${2:-https://0x0.st}"; }
+to_webm() { ffmpeg -y -i "$1" -vcodec libvpx -cpu-used -12 -deadline realtime "${1%.*}".webm; }
+ngenable() { ln -sf /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/; }
+remove_audio() { ffmpeg -i "$1" -cpu-used -$(nproc) -deadline realtime -c copy -an "${2:-out.mp4}"; }
+nasg() { smbclient //192.168.178.24/Public/ -D ENFANTS/Luca/tmp -N -c "get $1"; }
+trll() { printf "%s\n" "$1" | trl 2>/dev/null; }
ipc()
{
@@ -105,22 +113,6 @@ unzipp() {
rm -- "$1"
}
-# fix long waiting time
-__git_files() {
- _wanted files expl 'local files' _files
-}
-
-esc() {
- eval "$EDITOR '$(which $1)'"
-}
-
-delfile() {
- curl "${2:-https://upfast.cronyakatsuki.xyz/delete/$1}"
-}
-upfile() {
- curl -F "file=@\"$1\"" ${2:-https://0x0.st}
-}
-
# git
sgd() {
d="$PWD"
@@ -141,6 +133,9 @@ sgd() {
unset d
}
+# fix long waiting time
+__git_files() { _wanted files expl 'local files' _files; }
+
ginit()
{
[ "$1" ] || return 1
@@ -207,11 +202,6 @@ gpg_import()
shred -uz public.asc private.asc trust.asc
}
-ngenable()
-{
- ln -sf /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/
-}
-
vbsr()
{
vboxmanage snapshot "$1" restore "$2" &&
@@ -300,12 +290,3 @@ edit_in_dir() {
[ -f "$file" ] || return 1
$EDITOR "$file"
}
-
-to_webm()
-{
- ffmpeg -y -i "$1" -vcodec libvpx -cpu-used -12 -deadline realtime "${1%.*}".webm
-}
-remove_audio() { ffmpeg -i "$1" -cpu-used -$(nproc) -deadline realtime -c copy -an "${2:-out.mp4}"; }
-nasg() { smbclient //192.168.178.24/Public/ -D ENFANTS/Luca/tmp -N -c "get $1"; }
-trll() { printf "%s
-" "$1" | trl 2>/dev/null; }