config: little adjustments

This commit is contained in:
xeruf 2021-07-03 20:59:33 +02:00
parent 3ded9c6793
commit b8e4b6f063
4 changed files with 16 additions and 14 deletions

View File

@ -37,18 +37,6 @@
;;;; BINDINGS ;;;; 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) (defun xah-open-in-external-app (&optional @fname)
"Open the current file or dired marked files in external app. "Open the current file or dired marked files in external app.
When called in emacs lisp, if @fname is given, open that. When called in emacs lisp, if @fname is given, open that.
@ -81,6 +69,19 @@ Version 2019-11-04 2021-02-16"
(mapc (mapc
(lambda ($fpath) (let ((process-connection-type nil)) (lambda ($fpath) (let ((process-connection-type nil))
(start-process "" nil "xdg-open" $fpath))) $file-list)))))) (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 (map! :leader
"u" 'evil-prev-buffer "u" 'evil-prev-buffer
"i" 'evil-next-buffer "i" 'evil-next-buffer

View File

@ -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") 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" if test -n "$pkg"
then echo "Installing $pkg..." then echo "Installing $pkg..."
cmd="yay -S --nobatchinstall $pkg" cmd="yay -S --sudoloop --nobatchinstall $pkg"
print -s "$cmd" print -s "$cmd"
eval "$cmd" eval "$cmd"
rehash rehash

View File

@ -30,6 +30,7 @@ ulimit -c unlimited # Enable core dumps
which lsb_release >/dev/null && export DIST=$(lsb_release --id | cut -d' ' -f2) || true which lsb_release >/dev/null && export DIST=$(lsb_release --id | cut -d' ' -f2) || true
compdef help=info
unalias rd 2>/dev/null unalias rd 2>/dev/null
rd() { rd() {
while test $# -gt 0 while test $# -gt 0

View File

@ -9,7 +9,7 @@ file "$last" | grep -v --color=never 'directory$'
test -e "$last" || exit 1 test -e "$last" || exit 1
case "$(file --dereference --mime "$last")" in 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) ;; *binary) ;;
*) $(test -f "$last" -a ! -r "$last" && echo "sudo") bat --style header --pager "less --LONG-PROMPT --quit-if-one-screen" "$@" *) $(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" tput setaf 3 && stat --format '%A size %sB, birth: %.10w mod %.10y' "$last"