#!/bin/sh shebang. newline after universalized.

This commit is contained in:
Luke Smith 2020-02-08 18:43:37 -05:00
parent a25e8b640a
commit 2b5df860de
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
62 changed files with 88 additions and 61 deletions

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# This script will compile or run another finishing operation on a document. I
# have this script run via vim.

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# Syncs repositories and downloads updates, meant to be run as a cronjob.
ping -q -c 1 1.1.1.1 > /dev/null || exit

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# Notify me with notify-send if my battery is below 25%.
# You can set this to run via cron.

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# Toggles all cronjobs off/on.
# Stores disabled crontabs in ~/.consaved until restored.

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# Set as a cron job to check for new RSS entries for newsboat.
# If newsboat is open, sends it an "R" key to refresh.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# A UI for detecting and selecting all displays. Probes xrandr for connected
# displays and lets user select one to use. User may also select "manual

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# Feed this script a link and it will give dmenu
# some choice programs to use to open it.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Gives a dmenu prompt to mount unmounted drives and Android phones. If
# they're in /etc/fstab, they'll be mounted automatically. Otherwise, you'll

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# This script is the SUDO_ASKPASS variable, meaning that it will be used as a
# password prompt if needed.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Usage:
# `$0`: Ask for recording type via dmenu

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# A dmenu prompt to unmount drives.
# Provides you with mounted partitions, select one to unmount.
# Drives mounted at /, /boot and /home will not be options to unmount.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# The famous "get a menu of emojis to copy" script.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# A general, all-purpose extraction script. Not all extraction programs here
# are installed by LARBS automatically.

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
cat ~/.local/share/larbs/getkeys/"$1" 2>/dev/null && exit
echo "Run command with one of the following arguments for info about that program:"
ls ~/.local/share/larbs/getkeys

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Toggle floating dropdown terminal in i3, or start if non-existing.
# $1 is the script run in the terminal.

View file

@ -1,2 +1,3 @@
#!/usr/bin/env sh
#!/bin/sh
ifinstalled bc && echo "Welcome to the Calculator." && bc -lq

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
[ -z "$1" ] && exit # If $1 is left, hovers in the bottom left, if right, the bottom right
current=$(xdotool getwindowfocus)
newwidth=$(($(xdotool getdisplaygeometry | awk '{print $2}') / 3))

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# This script was made by `goferito` on Github.
# Some cleanup by Luke.

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# This is the script that i3 runs to either start tmux in
# the dropdown terminal or log into a previous session.
tmux a || tmux

View file

@ -1,3 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# If $1 command is not available, error code and notify.
command -v "$1" >/dev/null || { notify-send "📦 $1" "must be installed for this function." && exit 1 ;}

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Terminate already running bar instances
killall -q polybar

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Feed script a url or file location.
# If an image, it will view in sxiv,

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# This is bound to Shift+PrintScreen by default, requires maim. It lets you
# choose the kind of screenshot to take, including copying the image or even

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# This loop will update the mpd statusbar module whenever a command changes the
# music player's status. mpd must be running on X's start for this to work.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# opout: "open output": A general handler for opening a file's intended output,
# usually the pdf of a compiled document. I find this useful especially

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# You might notice all mpv commands are aliased to have this input-ipc-server
# thing. That's just for this particular command, which allows us to pause

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# entr command to run `queueandnotify` when newsboat queue is changed
[ "$(pgrep -x $(basename $0) | wc -l)" -gt 2 ] && exit

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# A dmenu binary prompt script.
# Gives a dmenu prompt labeled with $1 to perform command $2.
# For example:

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# $1 is a url; $2 is a command
[ -z "$1" ] && exit
base="$(basename "$1")"

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# Podboat sucks. This script replaces it.
# It reads the newsboat queue, queuing downloads with taskspooler.
# It also removes the junk from extentions.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Refresh the dwmbar.
# Send SIGTRAP signal to dwmbar script, which will handle it with a trap.

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# This script is called on startup to remap keys.
# Increase key speed via a rate change
xset r rate 300 50

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# When I open an image from the file manager in sxiv (the image viewer), I want
# to be able to press the next/previous keys to key through the rest of the

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null &&
notify-send "That doesn't look like a full URL." && exit
RSSFILE="$HOME/.config/newsboat/urls"

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
PID=$(xprop -id "$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')" | grep -m 1 PID | cut -d " " -f 3)
PID=$(echo "$(pstree -lpA "$PID" | tail -n 1)" | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g')
cd "$(readlink /proc/"$PID"/cwd)"

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# In LARBS, ~/.config/wall.png is the location of the system wallpaper. This
# script, if given an argument, moves it there. This script without an

View file

@ -1,4 +1,5 @@
#!/usr/bin/env bash
# Output locations. Unactivated progs should go to /dev/null.
shell_shortcuts="$HOME/.config/shortcutrc"
ranger_shortcuts="$HOME/.config/ranger/shortcuts.conf"

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Display contents of selection via dunst if running.
# Separate script for i3.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Give a battery name (e.g. BAT0) as an argument.
case $BLOCK_BUTTON in

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
date '+%Y %b %d (%a) %I:%M%p'

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
case $BLOCK_BUTTON in
1) notify-send "🖥 CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)" ;;

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Status bar module for disk space
# $1 should be drive mountpoint

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
case $BLOCK_BUTTON in
1) groff -mom ~/.local/share/larbs/readme.mom -Tpdf | zathura - ;;
2) i3 restart ;;

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
case $BLOCK_BUTTON in
1) $TERMINAL -e nmtui ;;

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Gets your public ip address checks which country you are in and
# displays that information in the statusbar

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# i3blocks mail module.
# Displays number of unread mail and an loading icon if updating.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
case $BLOCK_BUTTON in
1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
filter() {
sed "/^volume:/d" | tac | sed -e "s/\\&/&amp;/g;s/\\[paused\\].*/<span color=\"gray\" font_style=\"italic\">/g;s/\\[playing\\].*/<span>/g" | tr -d '\n' | sed -e "s/$/<\\/span>\n/g"

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# i3blocks newsboat module.
# Displays number of unread news items and an loading icon if updating.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# i3blocks module for pacman upgrades.
# Displays number of upgradeable packages.

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
printf "Beginning upgrade.\\n"

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
transmission-remote -l | grep % |
sed " # This first sed command is to ensure a desirable order with sort

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
case $BLOCK_BUTTON in
1) setsid "$TERMINAL" -e alsamixer & ;;

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
location="$1"; [ -z "$location" ] || { location="$location+" && rm -f "$HOME/.local/share/weatherreport" ;}
getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
# If transmission-daemon is running, will ask to kill, else will ask to start.
if pgrep -x transmission-da >/dev/null ;
then

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Clears the build files of a LaTeX/XeLaTeX build.
# I have vim run this file whenever I exit a .tex file.

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
ifinstalled transmission-remote-cli transmission-cli || exit
! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}"

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# Mimeapp script for adding torrent to transmission-daemon, but will also start the daemon first if not running.

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
vidlist="
status bar https://www.youtube.com/watch?v=gKumet6b-WY
sxiv (image viewer) https://www.youtube.com/watch?v=GYW9i_u5PYs

View file

@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/sh
#original artwork by http://www.sanderfocus.nl/#/portfolio/tech-heroes
#converted to shell by #nixers @ irc.unix.chat

View file

@ -1,4 +1,5 @@
#!/usr/bin/env bash
[ -z "$FIFO_UEBERZUG" ] && exit
readonly ID_PREVIEW="preview"

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
# This is a wrapper for vifm to allow ueberzug images.