config: various tweaks and fixes
This commit is contained in:
parent
31fcc64953
commit
3155792de7
|
@ -79,7 +79,7 @@ Version 2019-11-04 2021-02-16"
|
||||||
(defun dragon (&optional @file)
|
(defun dragon (&optional @file)
|
||||||
"Share file from current buffer via dragon."
|
"Share file from current buffer via dragon."
|
||||||
(interactive)
|
(interactive)
|
||||||
(message (concat "dragon-drop -a -x " (or @file (buffer-file-name))))
|
(shell-command (concat "dragon-drop -a -x " (or @file (buffer-file-name))))
|
||||||
)
|
)
|
||||||
|
|
||||||
;; rebing C-u - https://emacs.stackexchange.com/a/58320
|
;; rebing C-u - https://emacs.stackexchange.com/a/58320
|
||||||
|
@ -450,7 +450,7 @@ Version 2019-11-04 2021-02-16"
|
||||||
(interactive)
|
(interactive)
|
||||||
(unless (equal major-mode 'org-journal-mode) (call-interactively 'org-journal-new-entry)))
|
(unless (equal major-mode 'org-journal-mode) (call-interactively 'org-journal-new-entry)))
|
||||||
|
|
||||||
(if (file-exists-p org-journal-dir) (xf/survey-mode))
|
;(if (file-exists-p org-journal-dir) (xf/survey-mode))
|
||||||
; TODO journal at start (call-interactively 'org-journal-new-entry)
|
; TODO journal at start (call-interactively 'org-journal-new-entry)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ Version 2019-11-04 2021-02-16"
|
||||||
:unnarrowed t)
|
:unnarrowed t)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(cl-loop for item in '("health" "own" "list" "notes" "project" "entity:person" "tech:software:list" "faith" "inspiration")
|
(cl-loop for item in '("health" "own" "list" "notes" "project" "entity:person" "tech:software:list" "faith" "inspiration" "writing")
|
||||||
do (add-to-list 'org-roam-capture-templates
|
do (add-to-list 'org-roam-capture-templates
|
||||||
`(,(substring item 0 1) ,(car (split-string item ":")) plain "%?" :target
|
`(,(substring item 0 1) ,(car (split-string item ":")) plain "%?" :target
|
||||||
(file+head ,(concat (car (split-string item ":")) "/" org-roam-extract-new-file-path) ,(concat xf/org-roam-capture-props "#+filetags: :" item ":" xf/org-roam-capture-title))
|
(file+head ,(concat (car (split-string item ":")) "/" org-roam-extract-new-file-path) ,(concat xf/org-roam-capture-props "#+filetags: :" item ":" xf/org-roam-capture-title))
|
||||||
|
|
|
@ -185,11 +185,12 @@ alias jcj='jce -o json-pretty --unit' # JSON View
|
||||||
# Shorthands
|
# Shorthands
|
||||||
alias v='edit'
|
alias v='edit'
|
||||||
alias st='synct'
|
alias st='synct'
|
||||||
|
alias ex='dtrx'
|
||||||
alias expr='noglob expr'
|
alias expr='noglob expr'
|
||||||
alias get='noglob ='
|
alias get='noglob ='
|
||||||
alias kc='kdeconnect-cli --refresh && kdeconnect-cli --list-devices'
|
|
||||||
|
|
||||||
# Shortcuts
|
# Shortcuts
|
||||||
|
alias kc='kdeconnect-cli --refresh && kdeconnect-cli --list-devices'
|
||||||
alias logoff="loginctl terminate-user $USER"
|
alias logoff="loginctl terminate-user $USER"
|
||||||
alias calb='rlwrap -a bc -l'
|
alias calb='rlwrap -a bc -l'
|
||||||
alias dt='python -c "import time;print(time.asctime(time.localtime()))"'
|
alias dt='python -c "import time;print(time.asctime(time.localtime()))"'
|
||||||
|
@ -216,10 +217,11 @@ u() {
|
||||||
sudo pacman -Syy
|
sudo pacman -Syy
|
||||||
if which topgrade >/dev/null
|
if which topgrade >/dev/null
|
||||||
then
|
then
|
||||||
topgrade &&
|
topgrade
|
||||||
topgrade --only emacs --yes
|
builtin cd $XDG_CONFIG_HOME/emacs && git pull --rebase && doom sync -u
|
||||||
# TODO autodetect failure in emacs and rebuild completely
|
# TODO autodetect failure in emacs and rebuild it completely
|
||||||
else yadm l && sudo apt update && sudo apt upgrade
|
else yadm l
|
||||||
|
sudo apt update && sudo apt upgrade
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,13 +252,12 @@ sshl() {
|
||||||
}
|
}
|
||||||
|
|
||||||
alias delta="sudo systemctl restart openvpn-client@deltaPeak.service || jcl --unit openvpn-client@deltaPeak.service"
|
alias delta="sudo systemctl restart openvpn-client@deltaPeak.service || jcl --unit openvpn-client@deltaPeak.service"
|
||||||
# Hardcoded Programs
|
|
||||||
alias startMinecraftServer='curl https://ipinfo.io/ip | xclip -sel clip && cd ~/daten/games/sharedgames/minecraft/server && java -jar forge-1.12.2-14.23.5.2768-universal.jar -mx 8G'
|
|
||||||
alias scenic='/usr/lib/jvm/java-11-openjdk/bin/java --module-path /usr/lib/jvm/java-11-openjfx/lib --add-modules javafx.web,javafx.fxml,javafx.swing -jar scenicview.jar'
|
|
||||||
|
|
||||||
# Listen to loopback of mic
|
# Listen to loopback of mic
|
||||||
alias listen='pactl load-module module-loopback; echo "Press Enter to stop"; read; pactl unload-module module-loopback'
|
alias listen='pactl load-module module-loopback; echo "Press Enter to stop"; read; pactl unload-module module-loopback'
|
||||||
|
|
||||||
|
alias startMinecraftServer='curl https://ipinfo.io/ip | xclip -sel clip && cd ~/daten/games/sharedgames/minecraft/server && java -jar forge-1.12.2-14.23.5.2768-universal.jar -mx 8G'
|
||||||
|
|
||||||
alias sqli='rlwrap sqlite3 -column -header -cmd .tables'
|
alias sqli='rlwrap sqlite3 -column -header -cmd .tables'
|
||||||
|
|
||||||
alias usergroups="cat /etc/passwd | cut -d':' -f1 | xargs -n 1 id"
|
alias usergroups="cat /etc/passwd | cut -d':' -f1 | xargs -n 1 id"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#assume_yes = true
|
#assume_yes = true
|
||||||
|
|
||||||
# Disable specific steps - same options as the command line flag
|
# Disable specific steps - same options as the command line flag
|
||||||
disable = ["node", "nix", "emacs", "config_update"]
|
disable = ["node", "nix", "config_update", "containers"]
|
||||||
|
|
||||||
# Ignore failures for these steps
|
# Ignore failures for these steps
|
||||||
#ignore_failures = ["powershell"]
|
#ignore_failures = ["powershell"]
|
||||||
|
|
|
@ -98,10 +98,10 @@ for arg; do
|
||||||
case "$(file --dereference "$arg")" in
|
case "$(file --dereference "$arg")" in
|
||||||
(*\ ?udio*)
|
(*\ ?udio*)
|
||||||
# TODO preconvert aac - |*\ ADTS\ *
|
# TODO preconvert aac - |*\ ADTS\ *
|
||||||
img="$tmpfile.png"
|
if ! $inspect && which audiowaveform 2>/dev/null >&2; then
|
||||||
case $TERM in (*-kitty) kitty=true; audioheight=2;; (*) audioheight=5;; esac
|
img="$tmpfile.png"
|
||||||
if which audiowaveform 2>/dev/null >&2
|
case $TERM in (*-kitty) kitty=true; audioheight=2;; (*) audioheight=5;; esac
|
||||||
then find "$img" -not -empty 2>/dev/null | grep --quiet . ||
|
find "$img" -not -empty 2>/dev/null | grep --quiet . ||
|
||||||
audiowaveform --quiet --pixels-per-second 2 --height 36 --width 2000 --amplitude-scale auto \
|
audiowaveform --quiet --pixels-per-second 2 --height 36 --width 2000 --amplitude-scale auto \
|
||||||
--background-color 000000 --waveform-color 99BBFF --axis-label-color 000000 \
|
--background-color 000000 --waveform-color 99BBFF --axis-label-color 000000 \
|
||||||
--input-filename "$arg" --output-format png >"$img" && {
|
--input-filename "$arg" --output-format png >"$img" && {
|
||||||
|
@ -187,6 +187,7 @@ if test "$ls" -o $# -le $(echo "$flags" | wc -w); then
|
||||||
checkperm .
|
checkperm .
|
||||||
# Alternative: find -exec ls -dl {} +
|
# Alternative: find -exec ls -dl {} +
|
||||||
{
|
{
|
||||||
|
# TODO handle single quotes in filenames
|
||||||
timeout .6s sh -c "
|
timeout .6s sh -c "
|
||||||
if test '$tree'
|
if test '$tree'
|
||||||
then $elevate tree -a --dirsfirst --du -h -C -L 3 $flags $(printf "'%s' " "${ls[@]:-.}")
|
then $elevate tree -a --dirsfirst --du -h -C -L 3 $flags $(printf "'%s' " "${ls[@]:-.}")
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
# Stage moved files fitting the already staged ones
|
# Stage moved files fitting the already staged ones
|
||||||
|
set -o pipefail
|
||||||
git diff --name-only --cached >/tmp/staged
|
git diff --name-only --cached >/tmp/staged
|
||||||
root=$(git rev-parse --show-toplevel)
|
root=$(git rev-parse --show-toplevel)
|
||||||
git add "$root"
|
git add "$root"
|
||||||
|
|
|
@ -16,7 +16,8 @@ case "$cmd" in
|
||||||
# TODO view fossil ui in terminal
|
# TODO view fossil ui in terminal
|
||||||
shift
|
shift
|
||||||
"$cmd" help "$@" | $paginate;;
|
"$cmd" help "$@" | $paginate;;
|
||||||
(rails) { rails -H && rails --help; } | $paginate;;
|
(doom) "$@" --help;;
|
||||||
|
(rails) { "$@" -H && "$@" --help; } | $paginate;;
|
||||||
(plantuml) unbuffer "$@" -help | $paginate;;
|
(plantuml) unbuffer "$@" -help | $paginate;;
|
||||||
(vlc) shift && unbuffer vlc --full-help "$@" | $paginate;;
|
(vlc) shift && unbuffer vlc --full-help "$@" | $paginate;;
|
||||||
(kdeconnect*) shift && kdeconnect-cli --help-all "$@" | $paginate;;
|
(kdeconnect*) shift && kdeconnect-cli --help-all "$@" | $paginate;;
|
||||||
|
|
|
@ -7,14 +7,16 @@ test "$1" = '-v' && verbose='true' && shift || verbose='false'
|
||||||
case $command in
|
case $command in
|
||||||
(update)
|
(update)
|
||||||
for pl; do
|
for pl; do
|
||||||
highlight $pl
|
highlight $pl >&2
|
||||||
cat $pl | rev | cut -d'/' -f-2 | rev | while read f; do
|
bak="/tmp/$pl"
|
||||||
|
cat $pl | tee "$bak" | rev | cut -d'/' -f-2 | rev | while read f; do
|
||||||
$verbose && printf "\e[31;1mSearching for '$f'\e[0m\n" >&2
|
$verbose && printf "\e[31;1mSearching for '$f'\e[0m\n" >&2
|
||||||
test -n "$f" || continue
|
test -n "$f" || continue
|
||||||
newpath="$(find $MUSIC -path "*${f#*../}" -prune | grep . || find $MUSIC -path "*${f##* - }" -o -path "*${f##*/}" | grep -m 1 .)"
|
newpath="$(find $MUSIC -path "*${f#*../}" -prune | grep . || find $MUSIC -path "*${f##* - }" -o -path "*${f##*/}" | grep -m 1 .)"
|
||||||
$verbose && printf "\e[31;1mFound '$newpath'\e[0m\n" >&2
|
$verbose && printf "\e[31;1mFound '$newpath'\e[0m\n" >&2
|
||||||
test -n "$newpath" && realpath --relative-to $(dirname "$pl") "$newpath" || echo "$f"
|
test -n "$newpath" && realpath --relative-to $(dirname "$pl") "$newpath" || echo "$f"
|
||||||
done | tee $pl
|
done | tee $pl
|
||||||
|
echo "Backup of $pl saved to $bak" >&2
|
||||||
done;;
|
done;;
|
||||||
(edit) ${EDITOR:-nano} $(find $MUSIC/Playlists -iname "$1\.*" | grep . || find $MUSIC/Playlists -iname "$1*");;
|
(edit) ${EDITOR:-nano} $(find $MUSIC/Playlists -iname "$1\.*" | grep . || find $MUSIC/Playlists -iname "$1*");;
|
||||||
(make)
|
(make)
|
||||||
|
|
Loading…
Reference in New Issue