diff options
| -rw-r--r-- | nvim/.config/nvim/init.vim | 10 | ||||
| -rwxr-xr-x | scripts/.local/bin/dmnt | 5 | ||||
| -rw-r--r-- | shell/.config/shell/aliasrc | 36 |
3 files changed, 33 insertions, 18 deletions
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 0323ef9..3877e43 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -184,7 +184,15 @@ let g:slime_default_config = { "socket_name" : "default", "target_pane" : "{last let g:slime_cell_delimiter = "\n" -nmap <C-l> :TmuxNavigateRight<CR> +" disable automatic mappings +let g:tmux_navigator_no_mappings = 1 +" remaping default things to free keys +"nnoremap <C-j> <C-d> +"nnoremap <C-K> <C-U> +" I only use two vertical panels, for more - I have DWM +nnoremap <C-j> :TmuxNavigateLeft<CR> +nnoremap <C-k> :TmuxNavigateRight<CR> + lua << EOF diff --git a/scripts/.local/bin/dmnt b/scripts/.local/bin/dmnt index 1954f8e..1350023 100755 --- a/scripts/.local/bin/dmnt +++ b/scripts/.local/bin/dmnt @@ -86,8 +86,11 @@ case "$chosen" in # Check if now decrypted. test -b "/dev/mapper/usb$num" + echo $num + echo "$mp" + attemptmount "/dev/mapper/usb$num" || getmount - sudo -A mount "/dev/mapper/usb$num" "$mp" -o uid="$(id -u)",gid="$(id -g)" + sudo -A mount -o uid="$(id -u)",gid="$(id -g)" "/dev/mapper/usb$num" "$mp" notify-send "🔓Decrypted drive Mounted." "$chosen decrypted and mounted to $mp." ;; diff --git a/shell/.config/shell/aliasrc b/shell/.config/shell/aliasrc index 7f0cefb..af4e169 100644 --- a/shell/.config/shell/aliasrc +++ b/shell/.config/shell/aliasrc @@ -4,8 +4,8 @@ [ -x "$(command -v nvim)" ] && alias vim='nvim' vimdiff='nvim -d' # sudo not required for some system commands -for command in mount umount sv su ; do - alias $command="sudo $command" +for command in su ; do + alias $command='sudo $command' done; unset command # allow calls of aliases by xargs @@ -48,32 +48,36 @@ alias \ z='zathura' # spawn detached terminal -alias dst="$TERMINAL </dev/null &>/dev/null & disown ;" +alias dst='$TERMINAL\" </dev/null &>/dev/null & disown ;' # run mpv with SVP, if SVP not active, works as usual mpv -alias mpv60="if [ -n $(pidof SVPManager) ]; then $HOME/.local/bin/svpman & fi ; mpv --input-ipc-server=/tmp/mpvsocket --hwdec=auto-copy" +alias mpv60='if [ -n $(pidof SVPManager) ]; then $HOME/.local/bin/svpman & fi ; mpv --input-ipc-server=/tmp/mpvsocket --hwdec=auto-copy' # pass files selected in nnn to a program # e.g. "nsel mpv60" to play multiple videos one after another nsel_internal() { - cat ${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection} | \ + cat "${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}" | \ tr '\0' '\n' | awk 'NF { print "\""$0"\""}' | tr '\n' ' ' - } +} alias nsel='nsel_internal | xargs ' -alias detach="bg && disown" +alias detach='bg && disown' # window swallowing, also autoplay gifs in sxiv -alias sxiv="devour sxiv -a" -alias mpv="devour mpv" -alias zathura="devour zathura" +alias sxiv='devour sxiv -a' +alias mpv='devour mpv' +alias zathura='devour zathura' # required for $HOME cleanup -alias nvidia-settings="nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings" -alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' -alias yarn='yarn --use-yarnrc "$XDG_CONFIG_HOME/yarn/config"' +alias nvidia-settings='nvidia-settings --config=$XDG_CONFIG_HOME/nvidia/settings' +alias wget='wget --hsts-file=$XDG_CACHE_HOME/wget-hsts' +alias yarn='yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config' -alias monerod="monerod --data-dir "$XDG_DATA_HOME"/bitmonero" -alias monero-wallet-cli="monero-wallet-cli --wallet-file $XDG_DATA_HOME/bitmonero/monero-wallet" +alias monerod='monerod --data-dir $XDG_DATA_HOME/bitmonero' +alias monero-wallet-cli='monero-wallet-cli --wallet-file $XDG_DATA_HOME/bitmonero/monero-wallet' -alias wttr="curl https://wttr.in/paris-france" +alias wttr='curl https://wttr.in/paris-france' + +mkdir -p "$XDG_CONFIG_HOME/abook/" +mkdir -p "$XDG_DATA_HOME/abook/" +alias abook='abook --config $XDG_CONFIG_HOME/abook/abookrc --datafile $XDG_DATA_HOME/abook/addressbook' |
