From 32b8c8e1283178408c66917a3bc03233cdad89c5 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Fri, 8 Oct 2021 12:28:22 +0200 Subject: [PATCH] config: utility adjustments --- .config/shell/functions | 2 ++ .config/yadm/bootstrap | 30 ++++++++++++++++-------------- .local/bin/scripts/focus | 4 ++-- .local/bin/scripts/git-aur | 2 +- .local/bin/scripts/grpf | 2 +- .local/bin/scripts/linkurl | 2 +- .local/bin/scripts/onkyo | 5 +++++ .local/bin/scripts/roam | 7 +++++++ .zprofile | 1 + README.org | 29 ++++++++++++++++++++++++----- 10 files changed, 60 insertions(+), 24 deletions(-) create mode 100755 .local/bin/scripts/onkyo create mode 100755 .local/bin/scripts/roam diff --git a/.config/shell/functions b/.config/shell/functions index 8bf00b5..1e6142a 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -182,6 +182,8 @@ alias hx='sudo hexedit --maximize --color' # Paginated hexyl hex() { hexyl "$@" | "${PAGER:-less}" } +alias dic="cat $XDG_DATA_HOME/dictcc/dict.txt | tail -n +16 | + fzf --tiebreak=length --bind='alt-bspace:clear-query'" alias dict="rlwrap rdictcc -d $XDG_DATA_HOME/dictcc" alias dictu="dict -i $XDG_DATA_HOME/dictcc/dict.txt" 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' diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index abf90d6..c4dc11b 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -61,6 +61,18 @@ ln -sv "$XDG_DATA_HOME/applications/signal-tray.desktop" "$XDG_CONFIG_HOME/autos ln -sv /usr/share/applications/stretchly.desktop "$XDG_CONFIG_HOME/autostart/" ln -sv python3 /usr/bin/python +highlight "Cron logging" +echo 'cron.* /var/log/cron.log' | sudo tee /etc/rsyslog.d/60-cron.conf +hasService=$(which service 2>/dev/null) +test "$hasService" && sudo service rsyslog restart || sudo systemctl restart rsyslog + +highlight "Reload cron" +test "$hasService" && sudo service cron reload || sudo systemctl reload cronie + +highlight "SSH Permissions" +chmod og= ~/.ssh -R + +### Arch highlight "Configure pacman" if test -f /etc/pacman.conf; then sudo sed -i 's/#Color/Color/' /etc/pacman.conf @@ -75,23 +87,13 @@ if test -f /etc/pacman.conf; then sudo systemctl enable reflector.timer fi -highlight "Mixxx symlinks" -mkdir -p ~/.mixxx -ln -s -t ~/.mixxx ${XDG_DATA_HOME:-$HOME/.local/share}/mixxx/* ${XDG_CONFIG_HOME:-$HOME/.config}/mixxx/* - +### Applications highlight "Block internet at night & on weekdays in the morning to force focus" walli 22 --save -highlight "Cron logging" -echo 'cron.* /var/log/cron.log' | sudo tee /etc/rsyslog.d/60-cron.conf -hasService=$(which service 2>/dev/null) -test "$hasService" && sudo service rsyslog restart || sudo systemctl restart rsyslog - -highlight "Reload cron" -test "$hasService" && sudo service cron reload || sudo systemctl reload cronie - -highlight "SSH Permissions" -chmod og= ~/.ssh -R +highlight "Mixxx symlinks" +mkdir -p ~/.mixxx +ln -s -t ~/.mixxx ${XDG_DATA_HOME:-$HOME/.local/share}/mixxx/* ${XDG_CONFIG_HOME:-$HOME/.config}/mixxx/* highlight "Setup kakoune for plugins" plugkak="${XDG_CONFIG_HOME:-$HOME/.config}/kak/plugins/plug.kak" diff --git a/.local/bin/scripts/focus b/.local/bin/scripts/focus index 54d34d7..6123c12 100755 --- a/.local/bin/scripts/focus +++ b/.local/bin/scripts/focus @@ -1,7 +1,7 @@ # launch my focus playlist playlistPath="$MUSIC/Playlists" -test -z "$1" && vp "$playlistPath/focus.m3u8" || -(find -L $playlistPath -iname "focus-$1.m3u8" -print0 | grep --null-data . || +test -z "$1" && vp "$MUSIC/focus.m3u" || +(find -L $MUSIC -iname "focus-$1.m3u" -print0 | grep --null-data . || find -L $playlistPath -iname "$1.m3u*" -print0 | grep --null-data . || find -L $MUSIC -iname "*$1*" -prune -exec find {} -size +2M -type f -not -iregex ".*.\(jpe?g\|png\)" -print0 \;) | xargs -0 vp diff --git a/.local/bin/scripts/git-aur b/.local/bin/scripts/git-aur index 69bd41c..c3045f4 100755 --- a/.local/bin/scripts/git-aur +++ b/.local/bin/scripts/git-aur @@ -21,7 +21,7 @@ case $command in git aur push --amend;; (push) makepkg --printsrcinfo > .SRCINFO - git add -f .SRCINFO + git add -f .SRCINFO *.install git commit -v -a "$@" git push;; esac diff --git a/.local/bin/scripts/grpf b/.local/bin/scripts/grpf index 9e73ae7..bbba561 100755 --- a/.local/bin/scripts/grpf +++ b/.local/bin/scripts/grpf @@ -1,3 +1,3 @@ #!/bin/sh # Grep in files matching the name pattern given as first argument -find -name "$1" | while read f; do grep --color=always --line-number --ignore-case -H "${@:2}" "$f"; done | less -F +find -name "$1" | while read f; do grep --color=always --with-filename --line-number --ignore-case "${@:2}" "$f"; done | less -F diff --git a/.local/bin/scripts/linkurl b/.local/bin/scripts/linkurl index 72059b9..aee4d94 100755 --- a/.local/bin/scripts/linkurl +++ b/.local/bin/scripts/linkurl @@ -2,4 +2,4 @@ echo "[Desktop Entry] Icon=text-html Type=Link -URL=$1">${2:-$1}.desktop +URL=$1" >"$(test -n "$2" && echo $2 || echo $1 | cut -d'/' -f3).desktop" diff --git a/.local/bin/scripts/onkyo b/.local/bin/scripts/onkyo new file mode 100755 index 0000000..d9e474e --- /dev/null +++ b/.local/bin/scripts/onkyo @@ -0,0 +1,5 @@ +#!/bin/sh +# Reconnect to ONKYO since it is buggy +bluetoothctl disconnect 00:09:B0:1D:DC:98 +sleep 1 +bluetoothctl connect 00:09:B0:1D:DC:98 diff --git a/.local/bin/scripts/roam b/.local/bin/scripts/roam new file mode 100755 index 0000000..dd18c27 --- /dev/null +++ b/.local/bin/scripts/roam @@ -0,0 +1,7 @@ +#!/bin/sh -e +# Move roam files into subfolders +cd $DATA/2-standards/notes/roam +grep -l --directories=skip "roam_tags: person" * | xargs --no-run-if-empty mv -t people +grep -l --directories=skip "roam_tags: tech" * | xargs --verbose --no-run-if-empty mv -t tech +grep -l --directories=skip "roam_tags: project" * | xargs --verbose --no-run-if-empty mv -t projects +grep -l --directories=skip "roam_tags: health" * | xargs --verbose --no-run-if-empty mv -t health diff --git a/.zprofile b/.zprofile index 5e5e62c..041270e 100644 --- a/.zprofile +++ b/.zprofile @@ -52,6 +52,7 @@ export IGNOREDIRS="-x dev -x .sync -x .stfolder -x .git -x .gradle -x .idea -x o # red stderr test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}" # software config +export TEXMF=/usr/share/context export KSCRIPT_IDEA_COMMAND=intellij-idea-ultimate-edition ## enable pass extensions export PASSWORD_STORE_ENABLE_EXTENSIONS="true" diff --git a/README.org b/README.org index f138136..52888c5 100644 --- a/README.org +++ b/README.org @@ -27,18 +27,37 @@ and configuration for ~less~ and ~fzf~. most have a short documentation header - including many essential git scripts * Packages +: pacman -Qe | cut -d\ -f1 | xclip -selection clipboard # Use org-yank-visible - essentials :: git zsh bat neovim man-db texinfo - basic tools :: fd ripgrep tree jrnl python-pynvim wget zsh-completions mlocate -- common tools :: ffmpeg imagemagick pandoc [[https://lftp.yar.ru/][lftp]] zsh-doc glances pacman-contrib -- aur :: diffr bat-extras-git tldr++ rdictcc-git stretchly-xeruf-git sc-im +- common tools :: ffmpeg imagemagick pandoc [[https://lftp.yar.ru/][lftp]] zsh-doc glances pacman-contrib pass +- aur recommendations :: tldr++ sc-im +- personal aur utils :: diffr bat-extras-git rdictcc-git +** Applications +- productivity :: activitywatch-bin +- music :: mpd mpc ncmpc mpd-mpris vlc phonon-qt5-vlc + : mkdir -p ~/.local/state/mpd && systemctl --user enable --now mpd mpd-mpris +- bluetooth :: bluez bluez-utils pulseaudio-bluetooth ** Graphical - x :: xorg-xserver xorg-xkill xorg-setxkbmap xorg-xinit xterm xclip xprintidle -- music :: mpd mpc ncmpc vlc phonon-qt5-vlc - : mkdir -p ~/.local/state/mpd && systemctl --user enable --now mpd - music production :: lilypond lilypond-docs timidity++ chordpro-git -- kde :: plasma-desktop plasma-nm spectacle breeze systemsettings konsole ktorrent dolphin kdeplasma-addons kinfocenter partitionmanager kdeconnect kwallet-pam kwalletmanager ksshaskpass okular +- kde :: plasma-desktop plasma-nm spectacle breeze systemsettings konsole ktorrent dolphin kdeplasma-addons kinfocenter partitionmanager kdeconnect kwallet-pam kwalletmanager ksshaskpass okular bluedevil - office :: emacs texlive-core texlive-latexextra libreoffice-fresh +- health :: stretchly-xeruf-git redshift acpilight + : scu enable --now redshift +** Firefox +*** Password management +**** Pass - the unix password manager +Store all kinds of secrets in plain text +https://addons.mozilla.org/firefox/addon/passff +: passff-host +**** MasterPassword - the stateless password manager +> Keep different passwords for every site you log into without having to remember anything but a single master password. +> And without the risk of your getting your password list stolen. +https://addons.mozilla.org/firefox/addon/masterpassword-firefox +*** [[https://addons.mozilla.org/en-US/firefox/collections/15727735/integration?collection_sort=-popularity][System Integration]] +*** [[https://addons.mozilla.org/en-US/firefox/collections/15727735/privacy?collection_sort=-popularity][Privacy]] ** Dev #+begin_source sh yays intellij-idea-ultimate-edition intellij-idea-ultimate-edition-jre \