bin: lots of comments

This commit is contained in:
xeruf 2022-08-04 23:53:53 +02:00
parent 5d9efe2ce6
commit 55b50e747e
9 changed files with 17 additions and 6 deletions

View File

@ -225,6 +225,7 @@ Version 2019-11-04 2021-02-16"
time-stamp-end "$") time-stamp-end "$")
:hook before-save) :hook before-save)
(setq image-file-name-regexps "/preview/")
;(add-to-list 'image-file-name-regexps "/preview/") ;(add-to-list 'image-file-name-regexps "/preview/")
;;;; ORG ;;;; ORG

View File

@ -3,7 +3,10 @@
# -- # --
@startuml @startuml
hide empty description hide empty description
!theme bluegray '!theme bluegray 'organigram
'!theme sandstone
'!theme blueprint 'class
'!theme reddress-lightblue 'class
'top to bottom direction 'top to bottom direction
$0 $0
@enduml @enduml

View File

@ -2,6 +2,7 @@
# Rename a file with a backup suffix or revert it # Rename a file with a backup suffix or revert it
# Add -a to act on multiple files, # Add -a to act on multiple files,
# otherwise the second arg is used as suffix rather than the default "bak". # otherwise the second arg is used as suffix rather than the default "bak".
# TODO no sudo for symlinks
if test "$1" = "-a"; then if test "$1" = "-a"; then
shift shift
for arg; do "$0" "$arg"; done for arg; do "$0" "$arg"; done

View File

@ -1,5 +1,6 @@
#!/bin/bash -e #!/bin/bash -e
# interactive diff with pagination and nice coloring # interactive diff with pagination and nice coloring
# TODO diff sqlite repos
if file --brief --mime "$1" "$2" | grep --quiet audio if file --brief --mime "$1" "$2" | grep --quiet audio
then ff() { ffprobe -loglevel warning -print_format default=noprint_wrappers=1 -show_format -pretty "$@"; } then ff() { ffprobe -loglevel warning -print_format default=noprint_wrappers=1 -show_format -pretty "$@"; }
$(test $(tput cols) -gt 120 && echo "diff --color=always --side-by-side" || echo "diff-color") --report-identical-files --label="$1" --label="$2" <(ff "$1") <(ff "$2") $(test $(tput cols) -gt 120 && echo "diff --color=always --side-by-side" || echo "diff-color") --report-identical-files --label="$1" --label="$2" <(ff "$1") <(ff "$2")

View File

@ -2,7 +2,8 @@
# launch my focus playlist or find a matching playlist or song files # launch my focus playlist or find a matching playlist or song files
# depends: mp mpc # depends: mp mpc
# env: MUSIC # env: MUSIC
PLAYLISTS="$MUSIC/Playlists" # args: either a playlist file name, or a list of terms which all have to match
PLAYLISTS="${PLAYLISTS:-$MUSIC/Playlists}"
mpc -q clear mpc -q clear
if test -z "$1" if test -z "$1"
then mp -q "$PLAYLISTS/focus.m3u" then mp -q "$PLAYLISTS/focus.m3u"

View File

@ -3,6 +3,7 @@
# ARGS see git-repo, all arguments beyond the first three are forwarded to git-clone # ARGS see git-repo, all arguments beyond the first three are forwarded to git-clone
remote=$(git-repo "$@") remote=$(git-repo "$@")
echo "Cloning $remote" echo "Cloning $remote"
test $1 = https && shift
case $# in case $# in
(1) dir=$(basename ${remote%.git});; (1) dir=$(basename ${remote%.git});;
(3) test "$3" != "$(git config --get user.name)" && (3) test "$3" != "$(git config --get user.name)" &&

View File

@ -2,6 +2,7 @@
# open info-page, man-page or command help # open info-page, man-page or command help
# depends: unbuffer # depends: unbuffer
# optdepends: highlight(dotfiles) # optdepends: highlight(dotfiles)
# TODO show tldr page
paginate="${PAGER:-less} +Gg" paginate="${PAGER:-less} +Gg"
test "$1" = "-d" && browse=1 && shift test "$1" = "-d" && browse=1 && shift

View File

@ -1,6 +1,7 @@
#!/bin/sh -ex #!/bin/sh -ex
# Turn white (or another color) into transparent for the given images # Turn white (or another color) into transparent for the given images
# TODO https://safe.duckduckgo.com/?q=imagemagick+color+to+alpha&ia=web https://stackoverflow.com/questions/26408022/imagemagick-color-to-alpha-like-the-gimp/27194202#27194202 # TODO https://safe.duckduckgo.com/?q=imagemagick+color+to+alpha&ia=web
# https://stackoverflow.com/questions/26408022/imagemagick-color-to-alpha-like-the-gimp/27194202#27194202
case $1 in (-*) color=${1#-};; esac case $1 in (-*) color=${1#-};; esac
for arg for arg
do extension="-transparent.${arg##*.}" do extension="-transparent.${arg##*.}"

View File

@ -1,6 +1,7 @@
#!/bin/sh -e #!/bin/sh -e
# Type in NoVNC with german layout # Type in NoVNC with german layout
xdotool search --onlyvisible --classname Navigator windowactivate xdotool search --onlyvisible --classname Navigator windowactivate # Activate Firefox
#setxkbmap de setxkbmap de
sleep 0.1
xdotool type --clearmodifiers "$@" xdotool type --clearmodifiers "$@"
#update-keyboard-layout >/dev/null update-keyboard-layout >/dev/null