dot

packages and services management
Log | Files | Refs | README

commit be8bfa43ae1d29ff2a1dbecb4733ef850281b911
parent ed48fffcde10309457c8b70e6f14a981745e4e58
Author: josuah <mail@josuah.net>
Date:   Fri,  3 Feb 2017 11:28:49 +0100

Added shebangs and descriptions (#3) and updated lightsaber (#2)

Diffstat:
M.profile | 3++-
M.xinitrc | 6++----
Mbin/adagio | 14++++----------
Mbin/blawk | 9++-------
Mbin/build | 1+
Mbin/calendar | 1+
Mbin/dna | 3++-
Mbin/fig1 | 8++------
Mbin/fig2 | 8++------
Mbin/git-prompt | 2++
Mbin/icaldir | 2+-
Mbin/ii-client | 1+
Mbin/ii-server | 1+
Mbin/lightsaber | 6++++--
Mbin/music-rename | 3++-
Mbin/piano | 13+++++--------
Mbin/play | 3+++
Mbin/status | 3++-
Mbin/tty-theme | 2+-
Mbin/updd | 6+-----
Mbin/version | 2+-
Mbin/www | 3++-
22 files changed, 44 insertions(+), 56 deletions(-)

diff --git a/.profile b/.profile @@ -61,6 +61,7 @@ alias r='io-run' alias g='io-grep' alias v='io-files' alias m='io-man' +alias mb='io-mblaze' alias f='find ! -path "*/.git/*" -type f | iomenu' alias d='find ! -path "*/.git/*" -type d | iomenu' alias c='cd "$(d)"' @@ -140,7 +141,7 @@ light() # mnt() { - sudo mount -o uid=$USER -o rw "${1-/dev/sdb1}" "${2-/mnt}" + sudo mount -o uid="$USER" -o rw "${1-/dev/sdb1}" "${2-/mnt}" } diff --git a/.xinitrc b/.xinitrc @@ -3,10 +3,8 @@ setxkbmap -layout us -option compose:ralt -variant dvorak while xsetroot -name "$(status)" -do sleep 5 +do + sleep 5 done & -pulseaudio & -st & - exec dwm diff --git a/bin/adagio b/bin/adagio @@ -1,13 +1,8 @@ -# | * -# ,--. .--| ,--. ,--, , ,--. -# ,--| | | ,--| | | | | | -# `--` `--` `--` `--| ' `--' 2016-11-16 -#--------------- `--' ---------------------------------------------------------- +#!/bin/sh # Albinoni, Adagio fog G minor adapted to 'beep' -# NOTES FREQUENCIES -#------------------------------------------------------------------------------- +# notes frequencies ------------------------------------------------------------ C0=16 Cd0=17 Db0=17 D0=18 Dd0=19 Eb0=19 E0=21 F0=22 Fd0=23 Gb0=23 G0=25 Gd0=26 Ab0=26 A0=28 Ad0=29 Bb0=29 B0=31 @@ -29,8 +24,7 @@ C8=4186 Cd8=4435 Db8=4435 D8=4699 Dd8=4978 Eb8=4978 E8=5274 F8=5588 Fd8=5920 Gb8=5920 G8=6272 Gd8=6645 Ab8=6645 A8=7040 Ad8=7459 Bb8=7459 B8=7902 -# MUSIC SCORE -#------------------------------------------------------------------------------- +# music score ------------------------------------------------------------------ # with $n the note from above, and $d the duration in millisecond. # Use '1' for silent note. @@ -241,4 +235,4 @@ main() } -main +main "$@" diff --git a/bin/blawk b/bin/blawk @@ -1,10 +1,5 @@ -#!/usr/bin/awk -f -# | | | -# |--. | ,--. , , , | / -# | | | ,--| | | | |-< -# '--' ' `--` `-'-' ' ` 2016-10-07 -#------------------------------------------------------------------------------- -# Draw an image using block characters +#!/bin/awk -f +# draw an image using block characters # USAGE: # blawk [columns lines] file [imagemagick_arguments] diff --git a/bin/build b/bin/build @@ -1,3 +1,4 @@ +#!/bin/sh # Install sources from build receipes diff --git a/bin/calendar b/bin/calendar @@ -1,4 +1,5 @@ #!/usr/bin/awk -f +# command line calendar (WIP) function is_bissextile(year) { return (year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0); diff --git a/bin/dna b/bin/dna @@ -1,4 +1,5 @@ -# Prints nucleotides with full structure, sequentially +#!/bin/sh +# prints nucleotides with full structure, sequentially # Usage: dna [ATCG]... diff --git a/bin/fig1 b/bin/fig1 @@ -1,9 +1,5 @@ -# Figlet without all the bells and fanciness. 2016-11-27 -# _ -# /_ . _ /| -# | | (_| | -# _| -#_______________________________________________________________________________ +#!/bin/sh +# figlet without all the bells and fanciness. if [ $# = 0 ] then diff --git a/bin/fig2 b/bin/fig2 @@ -1,9 +1,5 @@ -# ,-- ' -# | | ,--, -# |- | | | -# | | `--| 2016-10-07 -#-------`--'-------------------------------------------------------------------- -# Figlet without all the bells and fanciness. +#!/bin/sh +# figlet without all the bells and fanciness. if [ $# = 0 ] then diff --git a/bin/git-prompt b/bin/git-prompt @@ -1,3 +1,5 @@ +#!/bin/sh + git rev-parse 2> /dev/null && git status --porcelain -b | awk ' /^## / { branch = $0; diff --git a/bin/icaldir b/bin/icaldir @@ -1,5 +1,5 @@ exec awk -v DIR="${2:-.}" ' -# icaldir - store an ical one file per event +# store an ical one file per event # icaldir FILE [DIRECTORY] diff --git a/bin/ii-client b/bin/ii-client @@ -1,3 +1,4 @@ +#!/bin/sh # wrapper script for ii irc client http://tools.suckless.org/ii diff --git a/bin/ii-server b/bin/ii-server @@ -1,3 +1,4 @@ +#!/bin/sh # connect to an irc server with ii and maintain connection active diff --git a/bin/lightsaber b/bin/lightsaber @@ -1,3 +1,4 @@ +#!/bin/sh # Author: L. S., a long time ago # Thank you to jansen.price@gmail.com for the original idea. @@ -70,7 +71,7 @@ print_blade() wait_button() { printf ' ' - read -r + read -r unused printf '\033[u' # reset the previous state @@ -136,7 +137,7 @@ close_saber() print_handle '=' - printf '\n\n\n' + printf '\n\n\n\033[?25h' exit 0 } @@ -159,6 +160,7 @@ main() trap 'close_saber "$length" 4' INT { + printf '\n\n\n\033[?25l' print_handle '=' wait_button 4 print_blade "$color" "$length" diff --git a/bin/music-rename b/bin/music-rename @@ -1,4 +1,5 @@ -# Extract bandcamp downloaded album and reformat titles +#!/bin/sh +# extract bandcamp downloaded album and reformat titles transform() { diff --git a/bin/piano b/bin/piano @@ -1,10 +1,5 @@ #!/usr/bin/awk -f -# ---. * -# |__| , ,--. ---. ,--. -# | | ,--| | | | | -# ' ' `--` ' ' `--' 2016-10-08 -#------------------------------------------------------------------------------- -# Console speaker-test piano +# console piano using speaker-test BEGIN { @@ -114,7 +109,7 @@ BEGIN { row2 = C4 Cd4 D4 Dd4 E4 F4 Fd4 G4 Gd4 A4 Ad4 B4 C5 Cd5 D5 Dd5 E5 F5 Fd5 G5; # convert the text line of frequencies into an array of frequencies - split(row1 row2, frequencies, ""); + split(row1 row2, frequencies, " "); # main execution loop @@ -135,7 +130,9 @@ BEGIN { # else, get the note from the array using key position in layout } else if (note = frequencies[index(layout, key)]) { # play the note with this frequency with some command - system("beep -f " note "&"); + print("\n\n\n\n\n" note " " index(layout, key) "\n\n\n\n\n") + system("speaker-test -t sine -f " note "&" \ + "(sleep 0.5 && kill -9 $!) &"); } } } diff --git a/bin/play b/bin/play @@ -1,3 +1,6 @@ +#!/bin/sh +# play all music from directories and files passed as argument with mplayer + IFS=' ' diff --git a/bin/status b/bin/status @@ -1,4 +1,5 @@ -# Plain text status line for wherever useful 2016-12-20 +#!/bin/sh +# plain text status line for wherever useful SEPARATOR=' ' diff --git a/bin/tty-theme b/bin/tty-theme @@ -1,5 +1,5 @@ #!/bin/sh -# Set the theme for the tty from a simple file format +# set the theme for the tty from a simple file format # normal bold # 0 8 black diff --git a/bin/updd b/bin/updd @@ -1,8 +1,4 @@ -# | | -# , , ---. .--| .--| -# | | | | | | | | -# `--` |--' `--` `--` 2016-10-07 -#----- | ----------------------------------------------------------------------- +#!/bin/sh # UPDate Date at the end of sime line or add one to it. IFS=' diff --git a/bin/version b/bin/version @@ -1,5 +1,5 @@ #!/bin/sh -# version - Simple version control system to store data using hashs +# simple version control system to store data using hashs # dependencies: # mkdir find sort xargs sha256sum rm test mv chmod comm sed printf tac tail diff --git a/bin/www b/bin/www @@ -1,4 +1,5 @@ -# Mostly plain text static website generator +#!/bin/sh +# mostly plain text static website generator LAYOUT="layout.html"