summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/X/dunst/dunstrc2
-rw-r--r--config/X/picom/picom.conf3
-rw-r--r--config/essentials/shell/aliases.sh22
-rw-r--r--config/essentials/shell/functions.sh41
-rw-r--r--config/essentials/zsh/.zshrc19
-rw-r--r--config/essentials/zsh/widgets.zsh9
6 files changed, 55 insertions, 41 deletions
diff --git a/config/X/dunst/dunstrc b/config/X/dunst/dunstrc
index a83f45f..31fbae0 100644
--- a/config/X/dunst/dunstrc
+++ b/config/X/dunst/dunstrc
@@ -30,7 +30,7 @@
height = 80
# Position the notification in the top right corner
- origin = top-right
+ origin = top-center
# Offset from the origin
offset = 10x10
diff --git a/config/X/picom/picom.conf b/config/X/picom/picom.conf
index 3e15abf..48d6e20 100644
--- a/config/X/picom/picom.conf
+++ b/config/X/picom/picom.conf
@@ -3,7 +3,8 @@
#################################
corner-radius = 5.0;
rounded-corners-exclude = [
- "class_g = 'Dunst'"
+ "class_g = 'Dunst'",
+ "class_g = 'dwm'"
];
round-borders = 1;
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; }
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc
index 9b105e6..56b7c0d 100644
--- a/config/essentials/zsh/.zshrc
+++ b/config/essentials/zsh/.zshrc
@@ -1,5 +1,7 @@
#!/bin/zsh
+# zmodload zsh/zprof
+
if [ "$(id -u)" -ne 0 ]
then
[ "${TTY%%tty*}" = '/dev/' ] && clear
@@ -23,6 +25,7 @@ zle -N change-surround surround
. $XDG_CONFIG_HOME/shell/functions.sh
. $XDG_CONFIG_HOME/shell/aliases.sh
. $XDG_CONFIG_HOME/zsh/comp.zsh
+. $XDG_CONFIG_HOME/zsh/widgets.zsh
# . $XDG_CONFIG_HOME/zsh/prompt.zsh
# . $XDG_CONFIG_HOME/zsh/plugins.zsh
@@ -32,15 +35,22 @@ eval "$(zoxide init zsh)"
### Plugins
[ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh"
+plug "MichaelAquilina/zsh-you-should-use"
+plug "chivalryq/git-alias"
plug "kutsan/zsh-system-clipboard"
+# plug "marlonrichert/zsh-autocomplete"
plug "xPMo/zsh-toggle-command-prefix"
+plug "zap-zsh/fzf"
plug "zap-zsh/vim"
+plug "zdharma-continuum/fast-syntax-highlighting"
plug "zsh-users/zsh-autosuggestions"
plug "zsh-users/zsh-completions"
-plug "zap-zsh/fzf"
-plug "zdharma-continuum/fast-syntax-highlighting"
plug "zsh-users/zsh-history-substring-search"
-plug "MichaelAquilina/zsh-you-should-use"
+
+plug "MichaelAquilina/zsh-auto-notify"
+export AUTO_NOTIFY_TITLE="zsh"
+export AUTO_NOTIFY_BODY="<b>%command</b> [%exit_code]"
+AUTO_NOTIFY_IGNORE+=("gurk" "ttyper" "pulsemixer")
# Substring search settings
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=blue,fg=black,bold"
@@ -92,6 +102,7 @@ bindkey "^Xa" _expand_alias
bindkey "^Xe" edit-command-line
bindkey "^[." insert-last-word
bindkey "^['" quote-line
+bindkey '\ea' autosuggest-toggle
## Move around using h j k l in completion menu
zmodload zsh/complist
bindkey -M menuselect 'h' vi-backward-char
@@ -133,3 +144,5 @@ setopt histreduceblanks
setopt interactivecomments
setopt notify
setopt cdablevars
+
+# zprof
diff --git a/config/essentials/zsh/widgets.zsh b/config/essentials/zsh/widgets.zsh
new file mode 100644
index 0000000..e0cbf98
--- /dev/null
+++ b/config/essentials/zsh/widgets.zsh
@@ -0,0 +1,9 @@
+# surround line in variable
+surround_in_var()
+{
+ BUFFER=" \$($BUFFER)"
+ zle beginning-of-line
+}
+zle -N surround_in_var
+bindkey '\ev' surround_in_var
+