Jochen Sprickerhof
Last changed: 2022-05-21

Personal Organizer

File System

Browser

Music Manager

Development

Small Scripts

sfs: sshfs wrapper

#!/bin/sh -e

args=""
if [ $# -gt 1 ]; then
    args="$1"
    shift
fi

host=$(echo "$1" | cut -d : -f 1)

if [ -d "$host" ]; then
    fusermount -uz "$host"
    rmdir "$host"
else
    mkdir "$host"
    case "$1" in
    *:*)
        sshfs $args "$1" "$host" || rmdir "$host"
        ;;
    *)
        sshfs $args "$1": "$host" || rmdir "$host"
        ;;
    esac
fi

pp: (un)pause media players:

#!/bin/sh
for i in "/run/user/$(id -u)/mpv_socket_"*; do
    [ -S "$i" ] && echo '{ "command": ["set", "pause", "yes"] }' | nc -w1 -U "$i" >/dev/null &
done
quodlibet --play-pause 2>/dev/null

dwm-status, dmenu_win, kbled, m, n, o, scr, sfs, tv, umount, urldump (unpublished, write me if you are interested).

Other Software