config: corrections across the board
This commit is contained in:
parent
4796a91295
commit
b1a836ca08
|
@ -68,7 +68,7 @@ Version 2019-11-04 2021-02-16"
|
||||||
(start-process "" nil "xdg-open" $fpath))) $file-list))))))
|
(start-process "" nil "xdg-open" $fpath))) $file-list))))))
|
||||||
|
|
||||||
(defun dragon (&optional @file)
|
(defun dragon (&optional @file)
|
||||||
; Share file in current buffer via dragon
|
"Share file from current buffer via dragon."
|
||||||
(interactive)
|
(interactive)
|
||||||
(shell-command (concat "dragon-drag-and-drop -a -x " (if (not (string-blank-p @file)) @file buffer-file-name)))
|
(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
|
;; https://stackoverflow.com/a/32353255/6723250
|
||||||
(defun org-convert-csv-table (beg end)
|
(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)))
|
(interactive (list (point) (mark)))
|
||||||
(replace-regexp "\\(^\\)\\|\\(\".*?\"\\)\\|," (quote (replace-eval-replacement
|
(replace-regexp "\\(^\\)\\|\\(\".*?\"\\)\\|," (quote (replace-eval-replacement
|
||||||
replace-quote (cond ((equal "^" (match-string 1)) "|")
|
replace-quote (cond ((equal "^" (match-string 1)) "|")
|
||||||
|
@ -314,8 +314,8 @@ Version 2019-11-04 2021-02-16"
|
||||||
(org-export-dispatch))
|
(org-export-dispatch))
|
||||||
)
|
)
|
||||||
|
|
||||||
;; https://emacs.stackexchange.com/questions/38529/make-multiple-lines-todos-at-once-in-org-mode
|
|
||||||
(defun org-change-todo-in-region ()
|
(defun org-change-todo-in-region ()
|
||||||
|
"https://emacs.stackexchange.com/questions/38529/make-multiple-lines-todos-at-once-in-org-mode"
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((scope (if mark-active 'region 'tree))
|
(let ((scope (if mark-active 'region 'tree))
|
||||||
(state (org-fast-todo-selection))
|
(state (org-fast-todo-selection))
|
||||||
|
|
|
@ -79,7 +79,7 @@ d() {
|
||||||
# (score at least ten times above runner-up and score above 20)
|
# (score at least ten times above runner-up and score above 20)
|
||||||
# If not select with fzf, using locate to find extra options
|
# If not select with fzf, using locate to find extra options
|
||||||
cd "$(if test -n "$query" &&
|
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
|
$(echo "$query" | sed 'N;s|/.* \([0-9]\)|> 10 * \1|;q' | sed 's| */.*||') >/dev/null #2>&1
|
||||||
then echo "$query" | head -1
|
then echo "$query" | head -1
|
||||||
else test -n "$query" && echo "$query"; locate-zox "$@"
|
else test -n "$query" && echo "$query"; locate-zox "$@"
|
||||||
|
|
|
@ -2,16 +2,15 @@ GITSTATUS_LOG_LEVEL=DEBUG
|
||||||
# Commands
|
# Commands
|
||||||
if test "$PWD" = "$HOME" && test "$0" != "$SHELL"; then
|
if test "$PWD" = "$HOME" && test "$0" != "$SHELL"; then
|
||||||
neofetch --config $XDG_CONFIG_HOME/neofetch/config-short.conf
|
neofetch --config $XDG_CONFIG_HOME/neofetch/config-short.conf
|
||||||
task next limit:3
|
|
||||||
timew | head -3
|
timew | head -3
|
||||||
fi 2>/dev/null || return 0
|
fi 2>/dev/null || return 0
|
||||||
|
|
||||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
|
# 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]
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
# confirmations, etc.) must go above this block; everything else may go below.
|
# 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
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
#fi
|
fi
|
||||||
|
|
||||||
DEFAULT_USER=$USER
|
DEFAULT_USER=$USER
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# [l]ist [d]isks - disk size usage and partition info
|
# [d]ist [s]ize usage and partition overview
|
||||||
# For an accurate percentage add "f" as argument which uses "df"
|
# For an accurate usage percentage add "f" as argument which uses "df"
|
||||||
if test "$1" = "f"
|
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}'
|
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
|
else
|
Loading…
Reference in New Issue