diff --git a/.config/doom/config.el b/.config/doom/config.el index 91e7d17..9abba6e 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -68,7 +68,7 @@ Version 2019-11-04 2021-02-16" (start-process "" nil "xdg-open" $fpath))) $file-list)))))) (defun dragon (&optional @file) - ; Share file in current buffer via dragon + "Share file from current buffer via dragon." (interactive) (shell-command (concat "dragon-drag-and-drop -a -x " (if (not (string-blank-p @file)) @file buffer-file-name))) ) @@ -284,7 +284,7 @@ Version 2019-11-04 2021-02-16" ;; https://stackoverflow.com/a/32353255/6723250 (defun org-convert-csv-table (beg end) - ;; convert csv to org-table considering "12,12" + "convert csv to org-table considering '12,12'" (interactive (list (point) (mark))) (replace-regexp "\\(^\\)\\|\\(\".*?\"\\)\\|," (quote (replace-eval-replacement replace-quote (cond ((equal "^" (match-string 1)) "|") @@ -314,8 +314,8 @@ Version 2019-11-04 2021-02-16" (org-export-dispatch)) ) - ;; https://emacs.stackexchange.com/questions/38529/make-multiple-lines-todos-at-once-in-org-mode (defun org-change-todo-in-region () + "https://emacs.stackexchange.com/questions/38529/make-multiple-lines-todos-at-once-in-org-mode" (interactive) (let ((scope (if mark-active 'region 'tree)) (state (org-fast-todo-selection)) diff --git a/.config/shell/browse b/.config/shell/browse index 9a6eda8..5e86bfb 100644 --- a/.config/shell/browse +++ b/.config/shell/browse @@ -79,7 +79,7 @@ d() { # (score at least ten times above runner-up and score above 20) # If not select with fzf, using locate to find extra options cd "$(if test -n "$query" && - expr "$(echo "$query" | head -1 | cut -d' ' -f1)" \> 20 \& \ + expr "$(echo "$query" | sed 's| \+\([^ ]\+\).*|\1|;q')" \> 20 \& \ $(echo "$query" | sed 'N;s|/.* \([0-9]\)|> 10 * \1|;q' | sed 's| */.*||') >/dev/null #2>&1 then echo "$query" | head -1 else test -n "$query" && echo "$query"; locate-zox "$@" diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 066dbf5..47f9c9d 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -2,16 +2,15 @@ GITSTATUS_LOG_LEVEL=DEBUG # Commands if test "$PWD" = "$HOME" && test "$0" != "$SHELL"; then neofetch --config $XDG_CONFIG_HOME/neofetch/config-short.conf - task next limit:3 timew | head -3 fi 2>/dev/null || return 0 # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. -#if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then -# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -#fi +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi DEFAULT_USER=$USER diff --git a/.local/bin/scripts/ld b/.local/bin/scripts/ds similarity index 87% rename from .local/bin/scripts/ld rename to .local/bin/scripts/ds index f4c46e4..9e91527 100755 --- a/.local/bin/scripts/ld +++ b/.local/bin/scripts/ds @@ -1,6 +1,6 @@ #!/bin/sh -# [l]ist [d]isks - disk size usage and partition info -# For an accurate percentage add "f" as argument which uses "df" +# [d]ist [s]ize usage and partition overview +# For an accurate usage percentage add "f" as argument which uses "df" if test "$1" = "f" then df -B1M -x tmpfs -x devtmpfs -x squashfs | awk -v a="\033[31m" -v b="\033[33m" -v c="\033[35m" -v n="\033[0m" 'NR==1 {printf "%-20s %6s %7s %9s %s\n",$1,$5,$3,$4,$6} NR>1 {u=strtonum($5); printf (u > 99) ? a : (u > 97) ? b : (u > 94) ? c : ""; printf "%-20s %6s %6.1fG %8.1fG %s\n",$1,$5,$3/1024,$4/1024,$6; printf n}' else