Compare commits

...

4 commits

Author SHA1 Message Date
xeruf
5fa14e2189 config: various application updates 2023-03-31 19:11:13 +02:00
xeruf
54f7e8db79 config/puddletag: add some tags 2023-03-31 19:10:36 +02:00
xeruf
97024d9d97 config/shell: texmex 2023-03-31 19:10:12 +02:00
xeruf
81410fe313 bin: colorful helpers 2023-03-31 19:09:55 +02:00
14 changed files with 82 additions and 27 deletions

View file

@ -40,10 +40,11 @@ export LESS="--RAW-CONTROL-CHARS --ignore-case --LONG-PROMPT --jump-target=5 $(t
# ls aliases
export LS_OPTIONS='--human-readable --si --group-directories-first --file-type --dereference-command-line'
export LS_OPTIONS='--human-readable --si --group-directories-first --dereference-command-line'
eval "$(dircolors)"
alias ls='ls --color=auto'
alias ll='ls $LS_OPTIONS -l --all'
alias ll='ls $LS_OPTIONS --file-type -l'
alias la='ll --all'
alias l='ls $LS_OPTIONS --color=always --almost-all'
which bat >/dev/null 2>&1 || alias bat="$(which batcat >/dev/null 2>&1 && echo batcat || echo less -FX)"

View file

@ -338,7 +338,7 @@
},
{
"data": "Take a moment to think about something you appreciate.",
"enabled": false
"enabled": true
},
{
"data": "Take a moment to smile at being alive.",
@ -354,11 +354,11 @@
},
{
"data": "Close your eyes and name the things you hear.",
"enabled": false
"enabled": true
},
{
"data": "Place your fingertips on your shoulders. Roll your shoulders forward for 10 seconds, then backward.",
"enabled": false
"enabled": true
},
{
"data": "Raise your right arm, stretch it over your head to the left, and hold for 10 seconds. Repeat on the other side.",
@ -398,7 +398,7 @@
},
{
"data": "Expose your eyes to natural light.",
"enabled": true
"enabled": false
},
{
"data": "With your eyes closed, slowly and gently move eyes up to the ceiling, then slowly down to the floor.",
@ -406,7 +406,7 @@
},
{
"data": "With your eyes closed, slowly and gently move eyes to the left, then slowly to the right.",
"enabled": false
"enabled": true
},
{
"data": "Shake your hands out to get some relief.",
@ -414,26 +414,38 @@
},
{
"data": "One at a time, touch the tip of each finger to the tip of your thumb so they make an O-shape.",
"enabled": false
"enabled": true
},
{
"data": "Make a fist and then slide your fingers up until they point toward the ceiling, like you're telling someone to stop.",
"enabled": false
"enabled": true
},
{
"data": "Make a fist and then fan your fingers out and stretch them as far as you can.",
"enabled": true
},
{
"data": "Relax your eyes by looking into the distance",
"data": "Relax your face muscles and eyes by looking into the distance.",
"enabled": true
},
{
"data": "Rub your palms and cover your eyes",
"data": "Rub your palms and cover your eyes - or close your eyes and gently move them around",
"enabled": true
},
{
"data": "Stretch up and down",
"data": "Stretch Up and Down",
"enabled": true
},
{
"data": "Lie down with your back on the ground, stretch your limbs up and breathe.",
"enabled": true
},
{
"data": "Go for a pull-up and a glass of water.",
"enabled": true
},
{
"data": "Gently tilt and turn your head to side and bend your opposite hand.",
"enabled": true
},
{

View file

@ -13,6 +13,15 @@ matches:
replace: |-
Greetings from Germany,
Janek
- trigger: ";greb"
replace: |-
Grüße aus Bayreuth,
Janek Fischer
--
Technischer Leiter https://software-challenge.de, deutscher Programmierwettbewerb für Schüler
CTO der FTT Forensic Discovery GmbH - gesunde IT aus Bayreuth: https://forensicdiscovery.de
Software Engineering Student @ https://code.berlin
- trigger: ";date"
replace: "{{mydate}}"
vars:

View file

@ -1,6 +1,7 @@
Ambient
Acoustic
Chillout
Christian
Classical
Dance
Drum & Bass
@ -18,7 +19,6 @@ Trance
<keep>
Progressive House
Deep House
Christian
Theme
Canto
Dance; Techno

View file

@ -18,8 +18,8 @@
},
"main": {
"lang": "auto",
"lastfolder": "/home/janek/data/4-media/music/Worship/Qobuz-commandes",
"maximized": false
"lastfolder": "/home/janek/data/4-media/music/Worship",
"maximized": true
},
"playlist": {
"extinfo": 1,
@ -45,7 +45,7 @@
"fontsize": 10,
"rowsize": 43,
"sort_fields": [
"album"
"__path"
],
"sort_reverse": false
},
@ -115,6 +115,7 @@
"editor": {
"patterns": [
"$num(%track%,2) %title%",
"$num(%track%,2) $replace(%title%, \" [Live]\", \"\")",
"$meta_sep(artist,\" & \") - %title%",
"%artist% - %title%",
"%title%",
@ -123,7 +124,7 @@
"%artist% - %track% - %title%",
"%artist% - %album% - %track% - %title%"
],
"index": 1
"index": 3
},
"functions": {
"last_used": "remove_dupes"
@ -131,14 +132,13 @@
"actions": {
"checked": [
"Standard",
"Artist splitting",
"Genre Splitting",
"Genre: Christian"
]
},
"quick_actions": {
"checked": [
"Artist splitting"
"Genre: Christian"
]
}
}

View file

@ -1,4 +1,6 @@
REPLAYGAIN_TRACK_GAIN
REPLAYGAIN_TRACK_PEAK
album
albumartist
albumartist2
@ -13,6 +15,7 @@ author
band
bpm
comment
comment:ID3v1 Comment
composer
conductor
copyright

View file

@ -99,6 +99,7 @@ locate-zox() {
}
# Switch directory heuristically using zoxide and locate
d() {
# TODO do not use expr, rather test, so there can be floats
test "$1" != "-" -a ! -d "$1" -a $# -eq 1 || { cd "$@" && return; }
local query="$(zoxide-list "$@")"
# First find out whether there is an obvious match
@ -106,7 +107,7 @@ d() {
# which is not the current directory
# If not select with fzf, using locate to find extra options
target="$(if test -n "$query" &&
expr "$(echo "$query" | sed 's| \+\([^ ]\+\).*|\1|;q')" \> 20 \& \
echo "$(echo "$query" | sed 's| \+\([^ ]\+\).*|\1|;q')" \> 20 \& \
$(echo "$query" | sed 'N;s|/.* \([0-9]\+\)|> 10 * \1|;q' | sed 's| */.*||') >/dev/null &&
[[ ! "$(echo "$query" | head -1)" =~ ".*$PWD" ]]
then echo "$query" | head -1

View file

@ -262,7 +262,7 @@ curlh() {
u() {
# Line below handy for users of netkeeper
sudo nft list ruleset | grep -q outall && echo "Suspending netkeeper" >&2 | echo sysupgrade | netkeeper 30 2>/dev/null
sudo nft list ruleset | grep -q outall && echo "Suspending netkeeper" >&2 | echo 'pausing netkeeper for sysupgrade' | netkeeper 30 2>/dev/null
if command -v pacman >/dev/null; then
if test "$(stat /etc/pacman.d/mirrorlist --printf=%y | cut -d'-' -f1-2)" != "$(date +%Y-%m)"
then
@ -429,6 +429,9 @@ npm-reinstall() {
# Reconnect to ONKYO since it is buggy
alias onkyo='bluetoothctl disconnect 00:09:B0:1D:DC:98 && sleep 1 && bluetoothctl connect 00:09:B0:1D:DC:98'
alias pdfcon='TEXMF="" pdfjam -o $(date +%F).pdf'
alias pdfwor='TEXMF="" pdfjam -o collections/$(date +%F)_Akkorde.pdf'
# Custom tools {{{1
sedcomment() { sed -i "s/$1/#\0/" "${@:2}"; }

View file

@ -1,5 +1,5 @@
# Don't ask for confirmations
#assume_yes = true
#assume_yes = ["emacs"]
# Disable specific steps - same options as the command line flag
disable = ["nix", "containers", "config_update"]
@ -14,7 +14,7 @@ disable = ["nix", "containers", "config_update"]
no_retry = true
# Run inside tmux
#run_in_tmux = true
run_in_tmux = true
# List of remote machines with Topgrade installed on them
remote_topgrades = ["tiger"]

View file

@ -34,10 +34,12 @@ checkperm() {
mime="$(test -n "$shifted" || $elevate file --dereference --mime "$@")"
}
fileinfo() {
tput setaf 6
tput setaf 4
for arg
do case "$arg" in (-*) continue;; esac
tput smso
$elevate file --exclude elf -E "$arg"
tput rmso
$elevate ssh-keygen -l -f "$arg" 2>/dev/null || true
# TODO do not grep bitrate but extract properly
#probe="$($elevate ffprobe "$arg" 2>&1)"
@ -138,6 +140,7 @@ for arg; do
;;
(*:\ SQLite\ *\ database*) highlight "Tables" && sqlite3 "$arg" ".tables";;
(*:\ data) ;;
(*\ key) bat+=("$arg");;
(*) bat+=("$arg")
timga+=("$arg")
continue

2
.local/bin/scripts/privatize Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh -e
chmod -vR go-rwx "$@"

13
.local/bin/scripts/qobuz Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh -ex
target="${1:-$PWD}"
cd $DATA/5*
tar xf Qobuz-commandes.tar
mv -v *.jpg Qobuz-commandes/
mv -v Qobuz-commandes $target/qobuz #$d4/music/Worship/
rm -i Qobuz-commandes.tar
cd $target/qobuz
find -type d -exec sh -c 'test $(ls "{}" | wc -l) -eq 1 && find "{}" -maxdepth 1 -type f | xargs -i% mv -v % .' \;
find -type d -empty -delete
formatsongs
find -maxdepth 1 -name "*.jpg" -exec sh -c 'mv -v "{}" "$(echo {} | rev | cut -d"/" -f1 | rev | cut -d"-" -f1-2 | tr -s "-" " " | xargs -i% find -type d -iname "%*")/"' \;
exec zsh

View file

@ -5,5 +5,5 @@ export chars=$(expr $(tput cols) - 60)
case "$1" in (+*) size=${1#+}; depth=2; shift;; esac
case "$1" in ([0-9]) depth=$1; shift;; esac
(du --max-depth "${depth:-1}" -xhat ${size:-50}M "$@" | sort -h | grep -v "^0") |
while read line; do echo "$line $(pacman -Qqo $(echo $line | awk '{print $2}') 2>/dev/null | paste -s -d',' | sed "s/\(.\{${chars}\}\).*/\1.../")"; done || #| column -t ||
while read line; do echo "$(tput smso)$line$(tput rmso) $(pacman -Qqo $(echo $line | awk '{print $2}') 2>/dev/null | paste -s -d',' | sed "s/\(.\{${chars}\}\).*/\1.../")"; done || #| column -t ||
(du --max-depth "${depth:-1}" -xha "$@" | sort -h | tail)

View file

@ -1,6 +1,6 @@
#!/bin/sh -e
test "$1" = "-q" && quiet=$1 && shift
test ! -r "$1" && echo "Usage: sign <document.pdf> [hoffset [voffset [scale [signature-image]]]]" && exit 1
test ! -r "$1" && echo "Usage: sign <document.pdf> [hoffset (-160) [voffset (-310) [scale [signature-image]]]]" && exit 1
signature=$(pass info/signature$(test -n "$5" && echo "-$5"))
@ -12,8 +12,16 @@ tmp_reversed=$tmp_base/$1_reverse.pdf
sig=$tmp_base/signature_offset.pdf
result="${1%.pdf}_${5:-signed}.pdf"
h=${2:--160}
v=${3:--310}
if test $# -lt 2; then
case "$1" in
(*\ TU.pdf) v=-260;;
esac
fi
export TEXMF=""
pdfjam $quiet "$signature" --outfile "$sig" --papersize "{595pt, 842pt}" --noautoscale true \
--offset "${2:--160}pt ${3:--310}pt" --scale "${4:-1}"
--offset "${h}pt ${v}pt" --scale "${4:-1}"
pdfjam $quiet "$1" last "$sig" --outfile "$tmp_signed" --delta "0 -842pt" --nup "1x2" --fitpaper true
timg "$tmp_signed"