From 81a3e2c2937a3e2c28017a69fa0557b2dc23c1df Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Mon, 11 Apr 2022 08:31:13 +0200 Subject: [PATCH] config: adjustments and additions all around --- .config/doom/config.el | 4 ++-- .config/shell/browse | 1 + .config/shell/music | 7 +++++++ .config/topgrade.toml | 2 +- .config/yadm/bootstrap | 12 ++++++++++-- .local/bin/scripts/drag | 2 +- .local/bin/scripts/help | 3 ++- .zshenv | 2 +- 8 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.config/doom/config.el b/.config/doom/config.el index 47f842b..50461ac 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -213,11 +213,11 @@ Version 2019-11-04 2021-02-16" (map! :map org-mode-map :leader - "j" 'org-insert-heading "\\" 'org-ctrl-c-ctrl-c :localleader "C" 'org-clock-in - "j" 'org-insert-heading + "v" 'org-insert-heading + "jj" 'org-insert-heading "k" 'org-latex-export-to-pdf "t" 'org-todo-or-insert "n" 'org-add-note diff --git a/.config/shell/browse b/.config/shell/browse index 0c3d384..099382f 100644 --- a/.config/shell/browse +++ b/.config/shell/browse @@ -52,6 +52,7 @@ cd() { } # LOCATE {{{1 +# TODO no double heading with bat alias fselect='fzf -0 -1 --reverse --height=30% | while read f; do test -d "$f" && cd "$f" || { highlight "$f" && b "$f" }; done' loci() { locate --all --ignore-case --basename --existing "$@" | diff --git a/.config/shell/music b/.config/shell/music index 008393c..2d7adce 100644 --- a/.config/shell/music +++ b/.config/shell/music @@ -8,6 +8,13 @@ findsongs() { -regex "${1:-.*\.(mp3|flac|wav|m4a)}" -printf "%P\n" } +addtopl() { + pl=$1 + shift + playlists=$MUSIC/Playlists + realpath --relative-to $playlists "$@" | tee -a $playlists/$pl* +} + addmix() { mv -v "$1.cue" "$AUDIO/recordings/cues" addsong "$1.flac" Mixes diff --git a/.config/topgrade.toml b/.config/topgrade.toml index 9103a0b..9cf6654 100644 --- a/.config/topgrade.toml +++ b/.config/topgrade.toml @@ -2,7 +2,7 @@ #assume_yes = true # Disable specific steps - same options as the command line flag -disable = ["node", "pnpm", "nix", "emacs", "config-update"] +disable = ["node", "pnpm", "nix", "emacs"] #, "config-update"] # Ignore failures for these steps #ignore_failures = ["powershell"] diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index 4ae7945..094c55a 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -45,7 +45,14 @@ link fdfind /usr/bin/fd link batcat /usr/bin/bat highlight "SSH Permissions" -chmod og= "$HOME/.ssh" -R +chmod og= $HOME/.ssh -R +chmod a+r $HOME/.ssh/keys/*.pub +_ovpn="$XDG_DATA_HOME/openvpn" +test -d "$_ovpn" && + sudo rm -vdf /etc/openvpn/client && + sudo ln -vsf "$_ovpn" /etc/openvpn/client && + sudo chmod -vR ugo-rwx,ug+rX,u+w "$_ovpn" && + sudo chown -vR janek:openvpn "$_ovpn" highlight "Cron" echo 'cron.* /var/log/cron.log' | sudo tee /etc/rsyslog.d/60-cron.conf @@ -105,7 +112,8 @@ then mkdir "$mx" && ln -sv -t "$mx" ${XDG_DATA_HOME:-$HOME/.local/share}/mixxx/* fi subhighlight "Block internet at night & on weekdays in the morning to force focus" -walli 22 --save +#walli 22 --save +# TODO netkeeper subhighlight "Setup kakoune plugin loader" cloneshallow plug.kak robertmeta "${XDG_CONFIG_HOME:-$HOME/.config}/kak/plugins/plug.kak" diff --git a/.local/bin/scripts/drag b/.local/bin/scripts/drag index 5688ad3..c765d82 100755 --- a/.local/bin/scripts/drag +++ b/.local/bin/scripts/drag @@ -1,3 +1,3 @@ #!/bin/sh # Start single all-in-one dragon-drag-and-drop with args or pwd -$(command which dragon 2>/dev/null || echo dragon-drag-and-drop) -x -a "${@:-.}" +$(command which dragon 2>/dev/null || echo dragon-drop) -x -a "${@:-.}" diff --git a/.local/bin/scripts/help b/.local/bin/scripts/help index c1f8690..4260cd0 100755 --- a/.local/bin/scripts/help +++ b/.local/bin/scripts/help @@ -12,6 +12,7 @@ case $1 in LESS="$LESS +/^ *$last *\\[" man zshall;; (gh|chordpro|bat|pdfjam|reflector|topgrade|r128gain|7z) unbuffer "$@" --help | $paginate;; (caddy|stretchly|go) "$1" help "${@:2}" | $paginate;; + (rails) { rails -H && rails --help; } | $paginate;; (plantuml) unbuffer "$@" -help | $paginate;; (vlc) unbuffer vlc --full-help "${@:2}" | $paginate;; (kdeconnect*) kdeconnect-cli --help-all "${@:2}" | $paginate;; @@ -21,7 +22,7 @@ case $1 in (*) man "$@" || { info "$1" -w | grep -v "manpages" && pinfo "$@"; } || if which "$1" >/dev/null - then "$@" --help || echo $? == 1 && "$@" -help || echo $? == 1 && "$@" -h 2>&1 | $paginate + then "$@" --help || { test $? == 1 && "$@" -help; } || { test $? == 1 && "$@" -h; } 2>&1 | $paginate fi;; esac docs="/usr/share/doc/$1" diff --git a/.zshenv b/.zshenv index 3a41aa0..56a5727 100644 --- a/.zshenv +++ b/.zshenv @@ -11,7 +11,7 @@ export XDG_CACHE_HOME="$HOME/.local/cache" export XDG_CONFIG_HOME="$HOME/.config" export JOURNAL="$(eval "dirname $(grep -1 journals $XDG_CONFIG_HOME/jrnl/jrnl.yaml | tail -1 | cut -d':' -f2-)" || echo "$DATA/2-standards/box/journal")" -export PATH="$HOME/.local/bin/scripts:$HOME/.local/bin:$PATH:$XDG_CONFIG_HOME/emacs/bin:$GOPATH/bin" +export PATH="$HOME/.local/bin/scripts:$HOME/.local/bin:$PATH:$XDG_CONFIG_HOME/emacs/bin:$GOPATH/bin:$XDG_DATA_HOME/gem/ruby/3.0.0/bin" # adjust programs to use xdg export MNT=/run/media/$USER export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority