config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 33ef31416cbf04f466801d1aa02493aa494d8ac0
parent bd07bea86ddbb7b0dcff9f8f2c1370c0c76b5998
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Sun, 22 Nov 2020 17:00:33 -0800

Use standard script heading format

With this you can simply run `egrep -m1 "^#! "' to get a brief
description of what the tool does, more useful for listing all the
script usages.

Diffstat:
Mmodules/scripts/.local/bin/clipswap | 2+-
Mmodules/scripts/.local/bin/dp | 2+-
Mmodules/scripts/.local/bin/feed | 2+-
Mmodules/scripts/.local/bin/fl | 2+-
Mmodules/scripts/.local/bin/fsmenu | 2+-
Mmodules/scripts/.local/bin/gp | 2+-
Mmodules/scripts/.local/bin/loop | 2+-
Mmodules/scripts/.local/bin/mark | 2+-
Mmodules/scripts/.local/bin/mato | 2+-
Mmodules/scripts/.local/bin/mm | 2+-
Mmodules/scripts/.local/bin/notify-send | 2+-
Mmodules/scripts/.local/bin/now | 2+-
Mmodules/scripts/.local/bin/sfeed.awk | 2+-
Mmodules/scripts/.local/bin/snap | 2+-
Mmodules/scripts/.local/bin/tat | 2+-
Mmodules/scripts/.local/bin/w3 | 2+-
Mmodules/scripts/.local/bin/walt | 2+-
Mmodules/scripts/.local/bin/wdef | 2+-
Mmodules/scripts/.local/bin/webq | 2+-
Mmodules/scripts/.local/bin/wex | 2+-
Mmodules/scripts/.local/bin/wid | 2+-
Mmodules/scripts/.local/bin/wpaper | 2+-
22 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/modules/scripts/.local/bin/clipswap b/modules/scripts/.local/bin/clipswap @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# swap primary selection and clipboard contents. +#! clipswap -- swap clipboard and primary selection set -eu diff --git a/modules/scripts/.local/bin/dp b/modules/scripts/.local/bin/dp @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# simplify managing two monitors. +#! dp -- manage multi-monitor setup set -eu diff --git a/modules/scripts/.local/bin/feed b/modules/scripts/.local/bin/feed @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# manage viewing sfeed formatted files. +#! feed -- search and display items from sfeed(5) formatted files set -eu diff --git a/modules/scripts/.local/bin/fl b/modules/scripts/.local/bin/fl @@ -1,5 +1,5 @@ #!/usr/local/bin/rc -e -# Edit locate(1)'s findings +#! fl -- open locate(1)'s findings in EDITOR # A flaw of this method is that you cannot anchor the match. match = `{ locate $* } diff --git a/modules/scripts/.local/bin/fsmenu b/modules/scripts/.local/bin/fsmenu @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# navigate filesystem with dmenu. +#! fsmenu -- navigate the filesystem with dmenu set -e diff --git a/modules/scripts/.local/bin/gp b/modules/scripts/.local/bin/gp @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# copy password who's path matches regex. +#! gp -- find and copy pass(1) passwords to the clipboard set -eu diff --git a/modules/scripts/.local/bin/loop b/modules/scripts/.local/bin/loop @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# loops commands indefinitly. +#! loop -- loop commands indefinitly usage() { echo "usage, `basename $0` [-ehi]" ;} diff --git a/modules/scripts/.local/bin/mark b/modules/scripts/.local/bin/mark @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# select a line from a file via dmenu, useful for bookmarks. +#! mark -- select a line from files copying it to the clipboard set -eu diff --git a/modules/scripts/.local/bin/mato b/modules/scripts/.local/bin/mato @@ -1,5 +1,5 @@ #!/usr/local/bin/rc -e -# Add the current song to a playlist +#! mato -- add current mpd song to an m3u playlist progname = `{ basename $0 } diff --git a/modules/scripts/.local/bin/mm b/modules/scripts/.local/bin/mm @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# mpd menu +#! mm -- play song selected from mpd queue using dmenu set -eu diff --git a/modules/scripts/.local/bin/notify-send b/modules/scripts/.local/bin/notify-send @@ -1,4 +1,4 @@ #!/usr/bin/env dash -# desktop notification via herbe(1) +#! notify-send -- send desktop notification via herbe(1) herbe $@ & diff --git a/modules/scripts/.local/bin/now b/modules/scripts/.local/bin/now @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# display the date, time, or both +#! now -- display system date and or time in an fs friendly format set -eu diff --git a/modules/scripts/.local/bin/sfeed.awk b/modules/scripts/.local/bin/sfeed.awk @@ -1,5 +1,5 @@ #!/usr/bin/awk -f -# display sfeed(1) formatted text as html. +#! sfeed.awk -- display sfeed(5) lines as html BEGIN { FS = "\t" diff --git a/modules/scripts/.local/bin/snap b/modules/scripts/.local/bin/snap @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# take a screenshot in various ways. +#! snap -- take a snapshot of the screen set -e diff --git a/modules/scripts/.local/bin/tat b/modules/scripts/.local/bin/tat @@ -1,5 +1,5 @@ #!/usr/bin/env ksh -# attach to tmux session via an external menu +#! tat -- attach to tmux session via an external menu list() { tmux ls | cut -d: -f1 ;} nth() { head -n $@ | tail -1 ;} diff --git a/modules/scripts/.local/bin/w3 b/modules/scripts/.local/bin/w3 @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# build a searx url from arguments either opening or outputing it. +#! w3 -- build a searx search from the given arguments set -eu diff --git a/modules/scripts/.local/bin/walt b/modules/scripts/.local/bin/walt @@ -1,5 +1,5 @@ #!/usr/local/bin/rc -e -# Moby Thesaurus search utility. +#! walt -- moby thesaurus search utility # For an alphabetically split Moby Thesaurus csv file see my # ``cvsmoby'' repository. diff --git a/modules/scripts/.local/bin/wdef b/modules/scripts/.local/bin/wdef @@ -1,5 +1,5 @@ #!/usr/local/bin/rc -e -# dictionary search tool. +#! wdef -- dictionary search tool fn qdd { dd $* >[2] /dev/null } fn err { printf $* >[1=2]; exit 1 } diff --git a/modules/scripts/.local/bin/webq b/modules/scripts/.local/bin/webq @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# parse, cache, and display searx results. +#! webq -- primitive non-interactive web browser set -eu diff --git a/modules/scripts/.local/bin/wex b/modules/scripts/.local/bin/wex @@ -1,5 +1,5 @@ #!/usr/local/bin/rc -e -# see if a word exists. +#! wex -- word existence check fn qdd { dd $* >[2] /dev/null } fn err { printf $* >[1=2]; exit 1 } diff --git a/modules/scripts/.local/bin/wid b/modules/scripts/.local/bin/wid @@ -1,4 +1,4 @@ #!/usr/bin/env dash -# get focused window's id. +#! wid -- get current window id xprop -root | awk -F"# " 'index($0, "_NET_ACTIVE_WINDOW(WINDOW)") > 0 { print $2; exit }' diff --git a/modules/scripts/.local/bin/wpaper b/modules/scripts/.local/bin/wpaper @@ -1,5 +1,5 @@ #!/usr/bin/env dash -# view all wallpapers or select a wallpaper sub-directory +#! wpaper -- wallpaper selection set -eu