dot

packages and services management
Log | Files | Refs | README

commit bfa1b18e6762c632486654533aee7c996f7f48e8
parent 449c42b6a04fdc023f5bee0f43e02791e7884ffd
Author: Josuah Demangeon <mail@josuah.net>
Date:   Mon, 26 Feb 2018 01:05:15 +0100

add ssh-music: el cheapo opus music streaming over ssh

Diffstat:
Abin/ssh-music | 9+++++++++
Mbin/xdg-open | 25+++++++++++++++++++------
Mman/agenda.1 | 20+++++++-------------
3 files changed, 35 insertions(+), 19 deletions(-)

diff --git a/bin/ssh-music b/bin/ssh-music @@ -0,0 +1,9 @@ +#!/bin/sh -e + +ssh nas " + . ./.profile + flac -cd '$( + ssh nas '. ./.profile; find lib/music -name "*.flac"' | + sort | iomenu + )' | opusenc - - +" | opusdec - diff --git a/bin/xdg-open b/bin/xdg-open @@ -173,6 +173,15 @@ esac #--- files --------------------------------------------------------------------- +case "$(uname)" in +(Linux) + play="aucat" + ;; +(*BSD) + play="aucat -r 44100 -i -" + ;; +esac + [ -e "$1" ] && case "$1" in (*.torrent) exec transmission-cli "$1" @@ -196,19 +205,23 @@ esac (*.gif) exec mplayer -loop 0 "$1" ;; -(*.webm|*.mp4|*.mkv|*.ogv|*.avi|*.opus|*.mp3|*.flac|*.ogg) +(*.opus) + exec opusdec "$1" + ;; +(*.webm|*.mp4|*.mkv|*.ogv|*.avi|*.mp3|*.flac|*.ogg) exec avplay "$1" ;; (*/music/*) find "$1" -type f | sort | while IFS='' read -r song do - avplay "$song" + printf '%s\n' "$song" + o "$song" done exit ;; #--- pager --------------------------------------------------------------------- (*.[0-9]|*.[0-9]p|*.[0-9].gz) - exec mandoc -a "$1" + exec mandoc -a -T utf8 "$1" ;; (*.o|*.a) exec radare2 "$1" @@ -218,15 +231,15 @@ esac ;; #--- archive ------------------------------------------------------------------- (*.tgz) - mv "$1" "${1%.tgz}.tar.gz" + mv "$1" "${1%.tgz}.tar.gz" exec "$0" "${1%.tgz}.tar.gz" ;; (*.tbz) - mv "$1" "${1%.tbz}.tar.bz2" + mv "$1" "${1%.tbz}.tar.bz2" exec "$0" "${1%.tbz}.tar.bz2" ;; (*.txz) - mv "$1" "${1%.txz}.tar.xz" + mv "$1" "${1%.txz}.tar.xz" exec "$0" "${1%.txz}.tar.xz" ;; (*.bz2) diff --git a/man/agenda.1 b/man/agenda.1 @@ -27,9 +27,9 @@ by hand, or imported from an .Pa ics file. . +.Bl -tag -width indent . -.Ss Nm Fl a Ar name Ar YYYY/MM/DD Ar HH:MM Oo Ar YYYY/MM/DD Oc Ar HH:MM -. +.It Nm Fl a Ar name Ar YYYY/MM/DD Ar HH:MM Oo Ar YYYY/MM/DD Oc Ar HH:MM Create a new .Xr agenda 5 entry in the @@ -39,9 +39,7 @@ with specified start and end date and open this file with an editor. If the end date is ommited, the end date is set to the same day as the begin day. . -. -.Ss Nm Ic -i Ar ics_file Ar name Op +- Ns Ar HH -. +.It Nm Ic -i Ar ics_file Ar name Op +- Ns Ar HH Convert .Ar ics_file to the @@ -55,9 +53,7 @@ is the timezone offset of the agenda imported, optionnaly preceded by a or .Ql + . . -. -.Ss Nm Op Ar name Op Ar sort -. +.It Nm Op Ar name Op Ar sort If .Ar name is ommited, the agendas are listed. @@ -74,16 +70,14 @@ characters .Po .Ql BECLS by default -.Pc , -among: -. -.Bd -ragged -offset 6n +.Pc : .Do B Dc Ns egin, .Do E Dc Ns nd, .Do S Dc Ns ummary, .Do C Dc Ns ategory, .Do L Dc Ns ocation -.Ed +. +.El . . .Sh ENVIRONMENT