mirror of https://gitlab.com/dabruh/dotfiles.git
Updated comments.
This commit is contained in:
parent
c3e7c1dfa3
commit
b0605fa018
|
@ -1,10 +1,11 @@
|
||||||
#!/bin/bash
|
#!/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:
|
# Usage:
|
||||||
# cmus-track rm
|
# cmus-track rm # will also switch to the next track
|
||||||
# cmus-track mv path/to/new/dir
|
# cmus-track mv path/to/new/dir
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/bash
|
#!/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")"
|
SCRIPT_NAME="$(basename -- "$0")"
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Simple console CSV viewer
|
# csview
|
||||||
|
#
|
||||||
|
# A very simple and crude terminal CSV viewer - nothing more.
|
||||||
|
|
||||||
file="${1:?}" || exit 1
|
file="${1:?}" || exit 1
|
||||||
sed -e 's/,,/, ,/g' "$file" | column -s, -t | less -#5 --LINE-NUMBERS --chop-long-lines --RAW-CONTROL-CHARS
|
sed -e 's/,,/, ,/g' "$file" | column -s, -t | less -#5 --LINE-NUMBERS --chop-long-lines --RAW-CONTROL-CHARS
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# cx - Kubernetes context switcher
|
||||||
|
|
||||||
LAST=/tmp/last_kube_context
|
LAST=/tmp/last_kube_context
|
||||||
CURR="$(kubectl config current-context)"
|
CURR="$(kubectl config current-context)"
|
||||||
[[ -z "$1" ]] && kubectl config get-contexts && exit
|
[[ -z "$1" ]] && kubectl config get-contexts && exit
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# dmenuexit
|
||||||
|
#
|
||||||
|
# Provides a dmenu for the various commands available through ./i3exit
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
DMENU_ARGS="-i -nb #e74c3c -nf #303030 -sb #c0392b -sf #ecf0f1"
|
DMENU_ARGS="-i -nb #e74c3c -nf #303030 -sb #c0392b -sf #ecf0f1"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# dmenugtranslate
|
||||||
|
#
|
||||||
# Translate the current clipboard with the help of dmenu
|
# Translate the current clipboard with the help of dmenu
|
||||||
#
|
#
|
||||||
# Utilized gtranslate. Install instructions here:
|
# Utilized gtranslate. Install instructions here:
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/bash
|
#!/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")"
|
SCRIPT_NAME="$(basename -- "$0")"
|
||||||
FILE="/tmp/dmenuxautolock"
|
FILE="/tmp/dmenuxautolock"
|
||||||
DEFAULT_TIMEOUT=60
|
DEFAULT_TIMEOUT=60
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
# i3-config-builder
|
||||||
# Title: i3-config-builder
|
|
||||||
# Version: 0.1.0
|
# Version: 0.1.0
|
||||||
# Author: dabruh
|
# Author: dabruh
|
||||||
# GitLab: https://gitlab.com/dabruh
|
# GitLab: https://gitlab.com/dabruh
|
||||||
|
@ -22,7 +21,6 @@
|
||||||
# executes this script.
|
# executes this script.
|
||||||
#
|
#
|
||||||
# The contents of the .layer files are read first, and then sorted.
|
# The contents of the .layer files are read first, and then sorted.
|
||||||
#
|
|
||||||
|
|
||||||
HOSTNAME="$(hostname | cut -d. -f1)"
|
HOSTNAME="$(hostname | cut -d. -f1)"
|
||||||
PATTERNS=(
|
PATTERNS=(
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# /usr/bin/i3exit
|
|
||||||
|
# i3exit
|
||||||
|
#
|
||||||
|
# Provide simple arguments for various locking and power related tasks.
|
||||||
|
|
||||||
# with openrc use loginctl
|
# with openrc use loginctl
|
||||||
[[ $(cat /proc/1/comm) == "systemd" ]] && logind=systemctl || logind=loginctl
|
[[ $(cat /proc/1/comm) == "systemd" ]] && logind=systemctl || logind=loginctl
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# kill-remote-sessions
|
||||||
|
#
|
||||||
|
# Kills *any* active or inactive 'kubectl exec' or 'ssh' sessions.
|
||||||
|
|
||||||
pkill -fe 'kubectl exec'
|
pkill -fe 'kubectl exec'
|
||||||
pkill -fe 'ssh '
|
pkill -fe 'ssh '
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/bash
|
#!/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@"}"
|
PULSEAUDIO_SINK="${PULSEAUDIO_SINK:-"@DEFAULT_SINK@"}"
|
||||||
VOLUME_LIMIT="${VOLUME_LIMIT:-150}"
|
VOLUME_LIMIT="${VOLUME_LIMIT:-150}"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# randverse
|
||||||
|
#
|
||||||
|
# Display a random Bible verse.
|
||||||
|
|
||||||
BIBLE=~/.local/share/dabruh/bible.txt
|
BIBLE=~/.local/share/dabruh/bible.txt
|
||||||
LINES="$(wc -l <"$BIBLE")"
|
LINES="$(wc -l <"$BIBLE")"
|
||||||
LINE=$(( RANDOM % LINES + 2 )) # + 2 to skip first line
|
LINE=$(( RANDOM % LINES + 2 )) # + 2 to skip first line
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# send-bankid-token
|
||||||
|
#
|
||||||
# Takes a bankid URI as input, extracts the token and writes the token to disk
|
# 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
|
# on a target Windows SSH host. The target host is expected to watch for this
|
||||||
# file, just like the following PowerShell script does:
|
# file, just like the following PowerShell script does:
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# vidstab
|
||||||
|
#
|
||||||
# Stabilizes a video
|
# Stabilizes a video
|
||||||
|
|
||||||
input=${1:?}
|
input=${1:?}
|
||||||
|
|
Loading…
Reference in New Issue