portable shebang

This commit is contained in:
Luke Smith 2019-08-18 12:28:11 -04:00
parent 6e67bd424d
commit 1bca65bfc2
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
31 changed files with 31 additions and 31 deletions

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env 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,4 @@
#!/bin/sh
#!/usr/bin/env 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,4 @@
#!/bin/sh
#!/usr/bin/env 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 @@
#!/bin/sh
#!/usr/bin/env 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 @@
#!/bin/sh
#!/usr/bin/env 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 @@
#!/bin/sh
#!/usr/bin/env sh
# Usage:
# `$0`: Ask for recording type via dmenu

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env 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 @@
#!/bin/sh
#!/usr/bin/env sh
# Give dmenu list of all unicode characters to copy.
# Shows the selected character in dunst if running.

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# This script sets the statusbar with the xsetroot command at the end. Have it
# started by ~/.xinitrc or ~/.xprofile.

View file

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

View file

@ -1,3 +1,3 @@
#!/bin/sh
#!/usr/bin/env 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 @@
#!/bin/sh
#!/usr/bin/env sh
# Feed script a url or file location.
# If an image, it will view in sxiv,

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env 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 @@
#!/bin/sh
#!/usr/bin/env 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 @@
#!/bin/sh
#!/usr/bin/env 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,4 @@
#!/bin/sh
#!/usr/bin/env 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,4 @@
#!/bin/sh
#!/usr/bin/env sh
# A dmenu binary prompt script.
# Gives a dmenu prompt labeled with $1 to perform command $2.
# For example:

View file

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

View file

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

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env 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,4 @@
#!/bin/sh
#!/usr/bin/env 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,4 @@
#!/bin/sh
#!/usr/bin/env 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 @@
#!/bin/sh
#!/usr/bin/env 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,4 @@
#!/bin/sh
#!/usr/bin/env sh
# Display contents of selection via dunst if running.
# Separate script for i3.

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env 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 @@
#!/bin/sh
#!/usr/bin/env 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,4 @@
#!/bin/sh
#!/usr/bin/env 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 i3blocks

View file

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

View file

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