diff options
Diffstat (limited to 'ar/.config')
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua | 6 | ||||
| -rw-r--r-- | ar/.config/dunst/dunstrc | 2 | ||||
| -rw-r--r-- | ar/.config/lf/lfrc | 7 | ||||
| -rw-r--r-- | ar/.config/mpv/input.conf | 6 | ||||
| -rwxr-xr-x | ar/.config/nsxiv/exec/key-handler | 94 | ||||
| -rw-r--r-- | ar/.config/shell/aliasrc | 12 | ||||
| -rw-r--r-- | ar/.config/vim/init.vim | 3 | ||||
| -rw-r--r-- | ar/.config/zsh/scripts.zsh | 5 |
8 files changed, 68 insertions, 67 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua index 139b0a7..5ff20f9 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua @@ -256,9 +256,9 @@ vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { }) -- TeX for .tex files -vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { - pattern = { "*.tex" }, - command = "set filetype=tex", +vim.api.nvim_create_autocmd("VimLeavePre", { + pattern = "*.tex", + command = "!latexmk -c %", }) -- When shortcut files are updated, renew bash and lf configs with new material: diff --git a/ar/.config/dunst/dunstrc b/ar/.config/dunst/dunstrc index 84d9cc5..9f1330e 100644 --- a/ar/.config/dunst/dunstrc +++ b/ar/.config/dunst/dunstrc @@ -4,7 +4,7 @@ width = (350, 600) height = (0, 300) origin = top-right - offset = 5x20 + offset = (0,19) scale = 0 progress_bar = true diff --git a/ar/.config/lf/lfrc b/ar/.config/lf/lfrc index 207da85..64b2c5f 100644 --- a/ar/.config/lf/lfrc +++ b/ar/.config/lf/lfrc @@ -80,7 +80,8 @@ cmd compress ${{ # Copy cmd copyto ${{ set -f - dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --prompt 'Copy to where? ' | sed 's|~|$HOME|') + clear; tput cup $(($(tput lines)/3)) + dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --layout=reverse --height 40% --prompt 'Copy to where? ' | sed 's|~|$HOME|') [ -z "$dest" ] && exit destpath=$(eval printf '%s' \"$dest\") clear; tput cup $(($(tput lines)/3)); tput bold @@ -235,7 +236,9 @@ cmd create-ipynb ${{ # Move cmd moveto ${{ - dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --prompt 'Move to where? ' | sed 's|~|$HOME|') + set -f + clear; tput cup $(($(tput lines)/3)) + dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --layout=reverse --height 40% --prompt 'Move to where? ' | sed 's|~|$HOME|') [ -z "$dest" ] && exit destpath=$(eval printf '%s' \"$dest\") clear; tput cup $(($(tput lines)/3)); tput bold diff --git a/ar/.config/mpv/input.conf b/ar/.config/mpv/input.conf index a2cb715..87e7fe3 100644 --- a/ar/.config/mpv/input.conf +++ b/ar/.config/mpv/input.conf @@ -104,12 +104,14 @@ TAB script-binding visibility 7 seek 70 absolute-percent # Seek 70% of a video 8 seek 80 absolute-percent # Seek 80% of a video 9 seek 90 absolute-percent # Seek 90% of a video +( seek 99 absolute-percent # Seek 99% of a video 0 seek 0 absolute-percent # Seek 0% of a video +) seek 99.9 absolute-percent # Seek 99.9% of a video alt+1 set current-window-scale 0.5 # Halve the window size alt+2 set current-window-scale 1.0 # Reset the window size alt+3 set current-window-scale 2.0 # Double the window size -- seek 99 absolute-percent # Seek 99% of a video -+ seek 99.9 absolute-percent # Seek 99.9% of a video +- add video-zoom -0.1 # Zoom out ++ add video-zoom 0.1 # Zoom in [ script-binding UndoRedo/undo # Jump to previous position { script-binding UndoRedo/undoCaps # Jump to previous position ] script-binding UndoRedo/redo # Jump to undo position diff --git a/ar/.config/nsxiv/exec/key-handler b/ar/.config/nsxiv/exec/key-handler index fc48110..a315b02 100755 --- a/ar/.config/nsxiv/exec/key-handler +++ b/ar/.config/nsxiv/exec/key-handler @@ -1,9 +1,9 @@ #!/bin/sh while read -r file; do - case "$1" in - "h") - notify-send "Macro <C-x> key bindings:" "\- b: Set as wallpaper + case "$1" in + "h") + notify-send "Macro <C-x> key bindings:" "\- b: Set as wallpaper - c: Copy file - d: Delete file - h: Help key bindings @@ -17,51 +17,45 @@ while read -r file; do - S: Change resolution - y: Copy file name to clipboard - Y: Copy file path to clipboard" & - ;; - "b") setbg "$file" & ;; - "c") - [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" - [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit - cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & - ;; - "d") - [ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." - ;; - "f") - magick "$file" -flop "$file" - ;; - "g") ifinstalled gimp && setsid -f gimp "$file" ;; - "i") notify-send "File information" "$(mediainfo "$file" | sed "s/[ ]\+:/:/g;s/: /: <b>/;s/$/<\/b>/" | grep "<b>")" ;; - "m") - [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" - [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit - mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & - ;; - "r") - magick "$file" -rotate 90 "$file" - ;; - "R") - magick "$file" -rotate -90 "$file" - ;; - "s") - size="$(echo "" | dmenu -i -p "Enter a size to resize $file ($(identify -format "%wx%h" $file)): ")" - magick "$file" -resize "$size" "$file" && notify-send "$file size has changed to $size." - ;; - "S") - resolution="$(printf low\\nmedium\\nhigh | dmenu -i -p "Choose a resolution: ")" - case "$resolution" in - low) magick "$file" -resample 72 "$file" ;; - medium) magick "$file" -resample 150 "$file" ;; - high) magick "$file" -resample 300 "$file" ;; - esac && notify-send "Changed $file resolution to $resolution." - ;; - "y") - printf "%s" "$file" | tr -d '\n' | xclip -selection clipboard && - notify-send "$file copied to clipboard" & - ;; - "Y") - readlink -f "$file" | tr -d '\n' | xclip -selection clipboard && - notify-send "$(readlink -f "$file") copied to clipboard" & - ;; - esac + ;; + "b") setbg "$file" & ;; + "c") + [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & + ;; + "d") + [ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." + ;; + "f") magick "$file" -flop "$file" ;; + "g") ifinstalled gimp && setsid -f gimp "$file" ;; + "i") notify-send "File information" "$(mediainfo "$file" | sed "s/[ ]\+:/:/g;s/: /: <b>/;s/$/<\/b>/" | grep "<b>")" ;; + "m") + [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & + ;; + "r") magick "$file" -rotate 90 "$file" ;; + "R") magick "$file" -rotate -90 "$file" ;; + "s") + size="$(echo "" | dmenu -i -p "Enter a size to resize $file ($(identify -format "%wx%h" $file)): ")" + magick "$file" -resize "$size" "$file" && notify-send "$file size has changed to $size." + ;; + "S") + resolution="$(printf low\\nmedium\\nhigh | dmenu -i -p "Choose a resolution: ")" + case "$resolution" in + low) magick "$file" -resample 72 "$file" ;; + medium) magick "$file" -resample 150 "$file" ;; + high) magick "$file" -resample 300 "$file" ;; + esac && notify-send "Changed $file resolution to $resolution." + ;; + "y") + printf "%s" "$file" | tr -d '\n' | xclip -selection clipboard && + notify-send "$file copied to clipboard" & + ;; + "Y") + readlink -f "$file" | tr -d '\n' | xclip -selection clipboard && + notify-send "$(readlink -f "$file") copied to clipboard" & + ;; + esac done diff --git a/ar/.config/shell/aliasrc b/ar/.config/shell/aliasrc index 0aee138..a862e3c 100644 --- a/ar/.config/shell/aliasrc +++ b/ar/.config/shell/aliasrc @@ -6,10 +6,10 @@ [ -x "$(command -v nvim)" ] && alias vimdiff="nvim -d" # Use $XINITRC variable if file exists. -[ -f "$XINITRC" ] && alias startx="startx $XINITRC" +[ -f "$XINITRC" ] && alias startx='startx $XINITRC' # Use $MBSYNCRC variable if file exists to sync mailbox. -[ -f "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC" +[ -f "$MBSYNCRC" ] && alias mbsync='mbsync -c $MBSYNCRC' # sudo not required for some system commands for command in blkid lsblk mount umount pacman poweroff reboot shutdown su sv updatedb; do @@ -277,9 +277,9 @@ alias p8='ping 8.8.8.8' alias p9='ping 9.9.9.9' # nvim -alias v="$EDITOR" -alias v.="$EDITOR ." -alias ve="$EDITOR -c enew" +alias v'"$EDITOR' +alias v.='$EDITOR .' +alias ve='$EDITOR -c enew' alias nv.='nvim .' alias nve='nvim -c enew' alias nts='NVIM_APPNAME=TheSiahxyz nvim' @@ -369,7 +369,7 @@ alias tofish="sudo chsh $USER -s /bin/fish && 'Now log out.'" alias shck='shellcheck --color=always' # shortcut -alias ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/shortcutenvrc ; source ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/zshnameddirrc" +alias ref='shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/shortcutrc; source ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/shortcutenvrc; source ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/zshnameddirrc' # skype alias skype='skypeforlinux' diff --git a/ar/.config/vim/init.vim b/ar/.config/vim/init.vim index 384f7b7..78350b7 100644 --- a/ar/.config/vim/init.vim +++ b/ar/.config/vim/init.vim @@ -243,7 +243,8 @@ if !exists('g:airline_symbols') endif let g:airline_symbols.colnr = ' C:' let g:airline_symbols.linenr = ' L:' -let g:airline_symbols.maxlinenr = '☰ ' +let g:airline_symbols.maxlinenr = ' ' +let g:airline#extensions#whitespace#symbol = '!' " colorscheme if isdirectory(expand("~/.config/vim/plugged/catppuccin")) diff --git a/ar/.config/zsh/scripts.zsh b/ar/.config/zsh/scripts.zsh index 8a45ae5..05561d7 100644 --- a/ar/.config/zsh/scripts.zsh +++ b/ar/.config/zsh/scripts.zsh @@ -293,8 +293,9 @@ function fzf_directory() { # search scripts in ~/.local/bin alias sscs=search_scripts function search_scripts() { - choice="$(find ~/.local/bin -mindepth 1 \( -type f -o -type l \) -not -name '*.md' -not -path '*/zsh/*' -printf '%P\n' | fzf --cycle)" - ([ -n "$choice" ] && [ -f "$HOME/.local/bin/$choice" ]) && ${EDITOR:-nvim} "$HOME/.local/bin/$choice" + scripts=("${HOME}/.local/bin/"**/*(.)) + choice="$(print -lnr ${scripts:t:r} | fzf)" + [[ "${choice}" ]] && "${EDITOR}" ${${(M)scripts:#*/${choice}*}[1]} } # check git status by directories in specific path |
