config

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

commit 6b64c2f1e7fc425bafe6c4ee53dfe410c4dea33c
parent 3cdbe65f9fefc4cbbe6047092dc6ef360f57f721
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Wed, 21 Jul 2021 22:43:34 -0700

Remove various scripts

Diffstat:
Dlocal/bin/.local/bin/include | 12------------
Dlocal/bin/.local/bin/jots | 62--------------------------------------------------------------
Dlocal/bin/.local/bin/mato | 40----------------------------------------
Dlocal/bin/.local/bin/open | 9---------
Dlocal/bin/.local/bin/sron | 27---------------------------
Dlocal/bin/.local/bin/svt | 21---------------------
Dlocal/bin/.local/bin/sysconf | 48------------------------------------------------
Dsysconf | 7-------
8 files changed, 0 insertions(+), 226 deletions(-)

diff --git a/local/bin/.local/bin/include b/local/bin/.local/bin/include @@ -1,12 +0,0 @@ -#!/bin/sh -# Copyright 2021 Jacob R. Edwards -# License: GPLv3 -# -# include -- include shell modules - -include() { - for m in "$@" - do - . "${XDG_DATA_HOME:-$HOME/.local/share}/shell/$m" - done -} diff --git a/local/bin/.local/bin/jots b/local/bin/.local/bin/jots @@ -1,62 +0,0 @@ -#!/bin/sh -e -# Copyright 2021 Jacob R. Edwards -# License: GPLv3 -# -# jots -- jot down a note -# -# f[ind] Find notes -# l[ist] Find notes and display with timestamps -# s[how] Show note contents -# e[dit] Edit (or create) notes -# v[oid] Delete notes - -find() command find ${*:-.} -type f - -list() { - stat -t %F -f '%Sc%t%N' `find $*` | - sed -E 's/([^ ]+) \.?\/?(.*)/\1 - \2/' -} - -show() { - for n in `find $*` - do - list $n - awk 'BEGIN { print "" } { print " ", $0 } END { print "" }' $n - done -} - -edit() { - for n in $* - do - mkdir -p `dirname $n` - ${EDITOR:-vi} $n - done -} - -void() { - echo $* | fgrep -q .. && { - printf 'error: '\''..'\'': Invalid sequence in path.\n' 1>&2 - exit 1; - } - rm -r $* - command find . -type d -empty -delete -} - -cd "${XDG_DATA_HOME:-$HOME/.local/share}/note" - -case $1 -in -(f|find) - shift; find $*;; -(l|list) - shift; list $*;; -(s|show) - shift; show $*;; -(e|edit) - shift; edit $*;; -(v|void) - shift; void $*;; -(*) - printf 'usage: %s [list|show|edit|void] [file...]\n' `basename $0` 1>&2 - exit 1 -esac diff --git a/local/bin/.local/bin/mato b/local/bin/.local/bin/mato @@ -1,40 +0,0 @@ -#!/bin/sh -# Copyright 2021 Jacob R. Edwards -# License: GPLv3 -# -# mato -- add current mpd(1) track to playlist -# -# The current track is appended to each specified playlist if the -# playlist exists and the track is not already contained in it. - -set -e - -warn() { printf '%s: ' `basename $0` 1>&2 && printf $* 1>&2; } -edup() ! fgrep -qx ${1:-no track} - -if test -n $XDG_CONFIG_HOME; then - config=$XDG_CONFIG_HOME/mpd/mpd.conf -else - config=$HOME/.mpdconf -fi - -IFS=' -' -track=`mpc current -f '%file%'` -dir=`grep -m1 '^playlist_directory' $config | cut -d\" -f2 | - sed 's!^~!'$HOME'!'` || { - warn 'unable to get playlist directory\n' - exit 1 -} - -for m3u in $* -do - file="$dir/$m3u.m3u" - if ! test -f $file; then - warn "'%s': No such file or directory.\n" $file - elif ! edup $track <$file; then - warn "'%s': Already contains this track.\n" $m3u - else - echo $track >> $file - fi -done diff --git a/local/bin/.local/bin/open b/local/bin/.local/bin/open @@ -1,9 +0,0 @@ -#!/bin/sh -# Copyright 2021 Jacob R. Edwards -# License: GPLv3 -# -# open -- edit locate(1)'s findings, selected by dmenu(1) - -IFS=' -' -paths=`locate ${*:-''} | dmenu` && exec ${EDITOR:-vi} $paths diff --git a/local/bin/.local/bin/sron b/local/bin/.local/bin/sron @@ -1,27 +0,0 @@ -#!/bin/sh -# Copyright 2021 Jacob R. Edwards -# License: GPLv3 -# -# sron -- set root name -# -# Set the root window's name temporarily, restoring the previous -# name and slstatus to there original states afterwords. This is -# useful for notifications when using dwm(1) and it also works along -# side slstatus(1). - -main() -{ - name="`xprop -root WM_NAME | cut -d'"' -f2`" - pids=`pgrep slstatus` - - test -n "$pids" && - kill $pids - xsetroot -name " $* " && { - sleep 4 - xsetroot -name "$name" - } - test -n "$pids" && - exec slstatus -} - -main $* & diff --git a/local/bin/.local/bin/svt b/local/bin/.local/bin/svt @@ -1,21 +0,0 @@ -#!/bin/sh -e -# Copyright 2020 Jacob R. Edwards -# License: GPLv3 -# -# svt -- unportably switch virtual terminals -# -# Switch to the virtual terminal specified by the arguments if -# given, otherwise switch to the previously focused. - -state="${XDG_CACHE_HOME:-$HOME/.cache}/svt" - -focus() { - wsconsctl -n display.focus >"$state" - wsconsctl display.focus="$@" >/dev/null -} - -if test $# -eq 0; then - focus $(cat "$state") -else - focus "$@" -fi diff --git a/local/bin/.local/bin/sysconf b/local/bin/.local/bin/sysconf @@ -1,48 +0,0 @@ -#!/bin/sh -e -# Copyright 2021 Jacob R. Edwards -# License: GPLv3 -# -# sysconf -- install file list -# -# sysconf preprocesses a list of source destination pairs (separated -# by whitespace) from the file `sysconf' with m4(1) and proceeds -# to perform operations on it based on the command given. A command -# can be one of the following: -# -# l[ist] List source and destinations -# c[heck] List installed files -# i[nstall] Install files -# u[ninstall] Uninstall files - -process() { - egrep -ve '^#' -e '^$' $* | m4 -} - -list() column -t $* - -check() { - awk '{ print $NF }' $* | stest -e -} - -install() { - while read line - do - cp -rv $line - done -} - -uninstall() rm -rv `check $*` - -process <sysconf | case $1 in -(l|list) - list;; -(c|check) - check;; -(i|install) - install;; -(u|uninstall) - uninstall;; -(*) - printf 'usage: %s [list|check|install|uninstall]\n' `basename $0` 1>&2 - exit 1 -esac diff --git a/sysconf b/sysconf @@ -1,7 +0,0 @@ -# sysconf config file - -local/git/.config/git/config /etc/gitconfig -local/ksh/.config/kshrc /etc/ksh.kshrc -local/profile/.profile /etc/profile -local/tmux/.config/tmux/tmux.conf /etc/tmux.conf -local/vi/.exrc /etc/vi.exrc