diff --git a/.bash_aliases b/.bash_aliases index d778df0..55bc4d2 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -2,6 +2,7 @@ test -n "$PS1" || return 0 test $(id -u) -eq 0 || sudo=sudo +alias jc="$sudo journalctl --boot --unit" alias sc="$sudo systemctl" alias scs="$sudo systemctl status" alias sce="$sudo systemctl enable --now" diff --git a/.config/doom/config.el b/.config/doom/config.el index 2f258a9..ed29121 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -342,7 +342,8 @@ Version 2019-11-04 2021-02-16" (setq org-priority-faces '((65 . error) (66 . "DarkGoldenRod") (67 . warning) (68 . "bisque") (69 . "grey"))) (push "PERM(e)" (cdr (car org-todo-keywords))) - ; #+TODO: IDEA(i!) PROMPT(p!) OUTLINE(o!) DRAFT(t!) | DONE(d!) REVIEWED(r!) ABANDON(a!) + ; #+TODO: IDEA(i!) PROMPT(p!) OUTLINE(o!) DRAFT(t!) | REVIEW(r!) DONE(d!) ABANDON(a!) + ; highlight review keyword ;; Org startup - https://orgmode.org/manual/In_002dbuffer-Settings.html (setq org-startup-folded 'show2levels @@ -770,6 +771,7 @@ Version 2019-11-04 2021-02-16" :map Info-mode-map :desc "Go Home" :n "gu" 'Info-directory :desc "Go Home" :n "gU" 'Info-directory + :desc "Search next" :n "," 'Info-search-next :map thumbs-mode-map :n "q" 'thumbs-kill-buffer ) @@ -991,6 +993,11 @@ Version 2019-11-04 2021-02-16" (use-package! lilypond-mode :mode ("\\.ly\\'" . LilyPond-mode) :config + + (map! :map rdictcc-buffer-mode-map + :leader + "hi" 'LilyPond-info) + (set-file-template! 'LilyPond-mode :mode 'LilyPond-mode) (setq LilyPond-pdf-command "xdg-open") (add-hook 'LilyPond-mode-hook 'turn-on-font-lock) diff --git a/.config/mpd/mpd.conf##template b/.config/mpd/mpd.conf##template index 550ac6b..d61a93d 100644 --- a/.config/mpd/mpd.conf##template +++ b/.config/mpd/mpd.conf##template @@ -4,7 +4,6 @@ state_file "~/.local/state/mpd/state" pid_file "~/.local/state/mpd/mpd.pid" db_file "~/.local/state/mpd/mpd.db" - music_directory "{{ env.MUSIC }}" playlist_directory "{{ env.MUSIC }}/Playlists" playlist_plugin { diff --git a/.config/nvim/init/firenvim.vim b/.config/nvim/init/firenvim.vim index d6edfd0..8d927ec 100644 --- a/.config/nvim/init/firenvim.vim +++ b/.config/nvim/init/firenvim.vim @@ -18,6 +18,7 @@ let g:firenvim_config = { \ }, \ \ '.*wiki.*\.org.*': { 'priority': 9, 'takeover': 'never', }, + \ '://wiki\..*': { 'priority': 9, 'takeover': 'never', }, \ '.*openstreetmap\.org.*': { 'priority': 9, 'takeover': 'once', }, \ '.*openstreetmap\.de.*': { 'priority': 9, 'takeover': 'once', }, \ diff --git a/.local/bin/scripts/clean b/.local/bin/scripts/clean index da1502c..abfe8a3 100755 --- a/.local/bin/scripts/clean +++ b/.local/bin/scripts/clean @@ -51,7 +51,7 @@ highlight "s :: recursively remove logs" highlight "m :: recursively remove mac-files" if [[ $1 =~ "m" ]]; then - find \( -name '__MACOSX' -o -name '._.Trashes' \) -print -exec rm -r {} + + find \( -name '__MACOSX' -o -name '._*' \) -print -exec rm -r {} + find \( -iname '.spotlight*' -o -name 'System Volume Information' -o -name '.fseventsd' \) -print -exec rm -rI {} + find -name '*.DS_Store' -delete echo 'Removed DS Stores' diff --git a/.local/bin/scripts/denest b/.local/bin/scripts/denest index c469f37..c64e4d9 100755 --- a/.local/bin/scripts/denest +++ b/.local/bin/scripts/denest @@ -1,7 +1,9 @@ #!/bin/sh -e # Flatten folder hierarchy # Args: depth -find -mindepth 2 -maxdepth ${depth:-2} -depth -type d "$@" | while read folder; do +depth=$(expr 1 \& $# \| 2) +case $1 in ([0-9]|[0-9][0-9]) depth=$1; shift;; esac +find "$@" -mindepth $depth -maxdepth $depth -depth -type d | while read folder; do newname="$(echo "$folder" | sed 's|^./||;s|/|_|g')" mv -v "$folder" "$newname" parent="$(dirname "$folder")" @@ -9,4 +11,4 @@ find -mindepth 2 -maxdepth ${depth:-2} -depth -type d "$@" | while read folder; rm -d "$parent" && mv -v "$newname" "$parent" done -find -maxdepth ${depth:-2} -empty -type d -delete +find -maxdepth $depth -empty -type d -delete diff --git a/.local/bin/scripts/ex b/.local/bin/scripts/ex index 35c0103..6c4f605 100755 --- a/.local/bin/scripts/ex +++ b/.local/bin/scripts/ex @@ -6,8 +6,8 @@ # optdepends: rewrite(part of my dotfiles, for unzip line rewriting) 7z p7zip unzip # TODO auto-delete archive, auto-extract in current dir, trim .tar.gz fully if test $# -eq 0 -then ex *.zip - exit +then file -- * | grep -e '(*compress*\|*archive*)' | cut -d: -f1 | xargs ex + exit $? fi for arg do diff --git a/.local/bin/scripts/iridion b/.local/bin/scripts/iridion new file mode 100755 index 0000000..f0ad8ac --- /dev/null +++ b/.local/bin/scripts/iridion @@ -0,0 +1,6 @@ +#!/bin/sh +# Upload website to iridion +# TODO: derive from id +site=$1 +shift +scp -r "$@" "iridion:web/$site/public_html$(test "$#" -gt 1 || echo '/index.html')" diff --git a/.local/bin/scripts/qobuz b/.local/bin/scripts/qobuz index 91ccdc6..c161616 100755 --- a/.local/bin/scripts/qobuz +++ b/.local/bin/scripts/qobuz @@ -1,6 +1,8 @@ #!/bin/sh -ex +# Execute in target directory or with that as parameter target="${1:-$PWD}" -cd $DATA/5* +archive=$(find $DATA/5* -maxdepth 2 -name Qobuz-commandes.tar) +cd $(dirname "$archive") mkdir -p qobuz cd qobuz tar xf ../Qobuz-commandes.tar diff --git a/.local/bin/scripts/save-power b/.local/bin/scripts/save-power index ade04f6..2d32ec0 100755 --- a/.local/bin/scripts/save-power +++ b/.local/bin/scripts/save-power @@ -1,8 +1,8 @@ -#!/bin/sh -# TODO set brightness? light -S -pkill electron -pkill --ignore-case discord -pkill signal -pkill aw-server -pkill aw-qt +#!/bin/sh -x +light -S .01 +pkill --echo electron +pkill --echo --ignore-case discord +pkill --echo signal +pkill --echo aw-server +pkill --echo aw-qt systemctl stop --user syncthing plasma-baloorunner kde-baloo openvpn-client@deltaPeak.service diff --git a/.local/bin/scripts/swayscale b/.local/bin/scripts/swayscale new file mode 100755 index 0000000..cf6b51d --- /dev/null +++ b/.local/bin/scripts/swayscale @@ -0,0 +1,11 @@ +#!/bin/sh +# Force Sway Scaling +shift=1 +scale=1 +case $1 in + ("") shift=0;; + ([0-9]*) scale=$1;; + (col) way-displays -s ARRANGE_ALIGN COLUMN MIDDLE; exit $?;; +esac +shift $shift +way-displays -s SCALE '' $scale "$@" || swaymsg output \* scale $scale diff --git a/.local/bin/scripts/vpn b/.local/bin/scripts/vpn index 57ca470..6877cb6 100755 --- a/.local/bin/scripts/vpn +++ b/.local/bin/scripts/vpn @@ -1,2 +1,3 @@ #!/bin/sh -e +test -f "$1" || cd "$XDG_DATA_HOME/openvpn" tmux new-session -s "$@" "sudo openvpn $@"