From b8e4b6f063902e6afb3d703d57866964ab335cf0 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Sat, 3 Jul 2021 20:59:33 +0200 Subject: [PATCH] config: little adjustments --- .config/doom/config.el | 25 +++++++++++++------------ .config/shell/arch | 2 +- .config/shell/functions | 1 + .local/bin/scripts/b | 2 +- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.config/doom/config.el b/.config/doom/config.el index 69957be..33c6ceb 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -37,18 +37,6 @@ ;;;; BINDINGS -(defun dragon () - ; Share file in current buffer via dragon - (interactive) - (shell-command (concat "dragon-drag-and-drop -x " (buffer-file-name))) - ) - -;; rebing C-u - https://emacs.stackexchange.com/a/58320 -(global-set-key (kbd "C-#") 'universal-argument) -(define-key universal-argument-map (kbd "C-#") 'universal-argument-more) -(global-set-key (kbd "C-*") 'universal-argument) -(define-key universal-argument-map (kbd "C-*") 'universal-argument-more) - (defun xah-open-in-external-app (&optional @fname) "Open the current file or dired marked files in external app. When called in emacs lisp, if @fname is given, open that. @@ -81,6 +69,19 @@ Version 2019-11-04 2021-02-16" (mapc (lambda ($fpath) (let ((process-connection-type nil)) (start-process "" nil "xdg-open" $fpath))) $file-list)))))) + +(defun dragon () + ; Share file in current buffer via dragon + (interactive) + (shell-command (concat "dragon-drag-and-drop -x " (buffer-file-name))) + ) + +;; rebing C-u - https://emacs.stackexchange.com/a/58320 +(global-set-key (kbd "C-#") 'universal-argument) +(define-key universal-argument-map (kbd "C-#") 'universal-argument-more) +(global-set-key (kbd "C-*") 'universal-argument) +(define-key universal-argument-map (kbd "C-*") 'universal-argument-more) + (map! :leader "u" 'evil-prev-buffer "i" 'evil-next-buffer diff --git a/.config/shell/arch b/.config/shell/arch index 4b26f8d..071a388 100644 --- a/.config/shell/arch +++ b/.config/shell/arch @@ -29,7 +29,7 @@ yas() { yzf 2 --tiebreak=index --preview="cat $preview_cache 2>/dev/null | grep -v 'Querying' | grep . || yay --color always -Si {2} | tee $preview_cache") if test -n "$pkg" then echo "Installing $pkg..." - cmd="yay -S --nobatchinstall $pkg" + cmd="yay -S --sudoloop --nobatchinstall $pkg" print -s "$cmd" eval "$cmd" rehash diff --git a/.config/shell/functions b/.config/shell/functions index f7fe4b3..46cfc3e 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -30,6 +30,7 @@ ulimit -c unlimited # Enable core dumps which lsb_release >/dev/null && export DIST=$(lsb_release --id | cut -d' ' -f2) || true +compdef help=info unalias rd 2>/dev/null rd() { while test $# -gt 0 diff --git a/.local/bin/scripts/b b/.local/bin/scripts/b index a2340c9..30caac9 100755 --- a/.local/bin/scripts/b +++ b/.local/bin/scripts/b @@ -9,7 +9,7 @@ file "$last" | grep -v --color=never 'directory$' test -e "$last" || exit 1 case "$(file --dereference --mime "$last")" in - *inode/directory*) ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --almost-all "$@";; + *inode/directory*) ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --all "$@";; *binary) ;; *) $(test -f "$last" -a ! -r "$last" && echo "sudo") bat --style header --pager "less --LONG-PROMPT --quit-if-one-screen" "$@" tput setaf 3 && stat --format '%A size %sB, birth: %.10w mod %.10y' "$last"