diff --git a/.local/bin/cmus-track b/.local/bin/cmus-track index fd96529..4f03027 100755 --- a/.local/bin/cmus-track +++ b/.local/bin/cmus-track @@ -1,10 +1,11 @@ #!/bin/bash +# cmus-track # -# Remove or move the current playing cmus track and play the next track. +# cmus track control for moving or removing the current track. # # Usage: -# cmus-track rm +# cmus-track rm # will also switch to the next track # cmus-track mv path/to/new/dir # diff --git a/.local/bin/cmusctl b/.local/bin/cmusctl index 33d7ed1..543e068 100755 --- a/.local/bin/cmusctl +++ b/.local/bin/cmusctl @@ -1,5 +1,10 @@ #!/bin/bash +# cmusctl +# +# Allows executing 'cmus-remote' commands and writes the currently +# playing song to a file so be consumed by e.g. i3status. + SCRIPT_NAME="$(basename -- "$0")" function usage() { diff --git a/.local/bin/csview b/.local/bin/csview index 62c745c..a1451fe 100755 --- a/.local/bin/csview +++ b/.local/bin/csview @@ -1,6 +1,8 @@ #!/bin/bash -# Simple console CSV viewer +# csview +# +# A very simple and crude terminal CSV viewer - nothing more. file="${1:?}" || exit 1 sed -e 's/,,/, ,/g' "$file" | column -s, -t | less -#5 --LINE-NUMBERS --chop-long-lines --RAW-CONTROL-CHARS diff --git a/.local/bin/cx b/.local/bin/cx index 91c900e..3894856 100755 --- a/.local/bin/cx +++ b/.local/bin/cx @@ -1,5 +1,7 @@ #!/bin/bash +# cx - Kubernetes context switcher + LAST=/tmp/last_kube_context CURR="$(kubectl config current-context)" [[ -z "$1" ]] && kubectl config get-contexts && exit diff --git a/.local/bin/dmenuexit b/.local/bin/dmenuexit index a15333f..bef64bc 100755 --- a/.local/bin/dmenuexit +++ b/.local/bin/dmenuexit @@ -1,5 +1,9 @@ #!/bin/bash +# dmenuexit +# +# Provides a dmenu for the various commands available through ./i3exit + # shellcheck disable=SC2086 DMENU_ARGS="-i -nb #e74c3c -nf #303030 -sb #c0392b -sf #ecf0f1" diff --git a/.local/bin/dmenugtranslate b/.local/bin/dmenugtranslate index 2728658..fa98bf9 100755 --- a/.local/bin/dmenugtranslate +++ b/.local/bin/dmenugtranslate @@ -1,5 +1,7 @@ #!/bin/bash +# dmenugtranslate +# # Translate the current clipboard with the help of dmenu # # Utilized gtranslate. Install instructions here: diff --git a/.local/bin/dmenuxautolock b/.local/bin/dmenuxautolock index 011208a..78d596f 100755 --- a/.local/bin/dmenuxautolock +++ b/.local/bin/dmenuxautolock @@ -1,5 +1,11 @@ #!/bin/bash +# dmenuxautolock +# +# Provides a dmenu for configuring the lock timeout and notification duration +# for xautolock - a utility which triggers screen lock - in this case using +# 'loginctl lock-session'. + SCRIPT_NAME="$(basename -- "$0")" FILE="/tmp/dmenuxautolock" DEFAULT_TIMEOUT=60 diff --git a/.local/bin/i3-config-builder b/.local/bin/i3-config-builder index ad744b6..cb60990 100755 --- a/.local/bin/i3-config-builder +++ b/.local/bin/i3-config-builder @@ -1,7 +1,6 @@ #!/bin/bash -# -# Title: i3-config-builder +# i3-config-builder # Version: 0.1.0 # Author: dabruh # GitLab: https://gitlab.com/dabruh @@ -22,7 +21,6 @@ # executes this script. # # The contents of the .layer files are read first, and then sorted. -# HOSTNAME="$(hostname | cut -d. -f1)" PATTERNS=( diff --git a/.local/bin/i3exit b/.local/bin/i3exit index 519426d..1c261f0 100755 --- a/.local/bin/i3exit +++ b/.local/bin/i3exit @@ -1,5 +1,8 @@ #!/bin/bash -# /usr/bin/i3exit + +# i3exit +# +# Provide simple arguments for various locking and power related tasks. # with openrc use loginctl [[ $(cat /proc/1/comm) == "systemd" ]] && logind=systemctl || logind=loginctl diff --git a/.local/bin/kill-remote-sessions b/.local/bin/kill-remote-sessions index 764704a..685a7f0 100755 --- a/.local/bin/kill-remote-sessions +++ b/.local/bin/kill-remote-sessions @@ -1,5 +1,8 @@ #!/bin/bash +# kill-remote-sessions +# +# Kills *any* active or inactive 'kubectl exec' or 'ssh' sessions. + pkill -fe 'kubectl exec' pkill -fe 'ssh ' - diff --git a/.local/bin/pavolctl b/.local/bin/pavolctl index 3582caf..46f5b1f 100755 --- a/.local/bin/pavolctl +++ b/.local/bin/pavolctl @@ -1,5 +1,10 @@ #!/bin/bash +# pavolctl +# +# Provides an easy method of setting the default sink volume in PulseAudio and +# allows toggling mute on the sink. + PULSEAUDIO_SINK="${PULSEAUDIO_SINK:-"@DEFAULT_SINK@"}" VOLUME_LIMIT="${VOLUME_LIMIT:-150}" diff --git a/.local/bin/randverse b/.local/bin/randverse index 49c58ca..70fc87d 100755 --- a/.local/bin/randverse +++ b/.local/bin/randverse @@ -1,5 +1,9 @@ #!/bin/bash +# randverse +# +# Display a random Bible verse. + BIBLE=~/.local/share/dabruh/bible.txt LINES="$(wc -l <"$BIBLE")" LINE=$(( RANDOM % LINES + 2 )) # + 2 to skip first line diff --git a/.local/bin/send-bankid-token b/.local/bin/send-bankid-token index 571d214..b6c1e54 100755 --- a/.local/bin/send-bankid-token +++ b/.local/bin/send-bankid-token @@ -1,5 +1,7 @@ #!/bin/bash +# send-bankid-token +# # Takes a bankid URI as input, extracts the token and writes the token to disk # on a target Windows SSH host. The target host is expected to watch for this # file, just like the following PowerShell script does: diff --git a/.local/bin/vidstab b/.local/bin/vidstab index 1979833..fe48005 100755 --- a/.local/bin/vidstab +++ b/.local/bin/vidstab @@ -1,5 +1,7 @@ #!/bin/bash +# vidstab +# # Stabilizes a video input=${1:?}