diff --git a/.local/bin/compiler b/.local/bin/compiler index f9e80bd6..201064ed 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -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. diff --git a/.local/bin/displayselect b/.local/bin/displayselect index c0e34795..57005716 100755 --- a/.local/bin/displayselect +++ b/.local/bin/displayselect @@ -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 diff --git a/.local/bin/dmenuhandler b/.local/bin/dmenuhandler index 391bdc19..c4eecc3c 100755 --- a/.local/bin/dmenuhandler +++ b/.local/bin/dmenuhandler @@ -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. diff --git a/.local/bin/dmenumount b/.local/bin/dmenumount index 1feb204d..67844024 100755 --- a/.local/bin/dmenumount +++ b/.local/bin/dmenumount @@ -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 diff --git a/.local/bin/dmenupass b/.local/bin/dmenupass index 8631a134..461a5511 100755 --- a/.local/bin/dmenupass +++ b/.local/bin/dmenupass @@ -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. diff --git a/.local/bin/dmenurecord b/.local/bin/dmenurecord index c4ba6eed..842376e5 100755 --- a/.local/bin/dmenurecord +++ b/.local/bin/dmenurecord @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Usage: # `$0`: Ask for recording type via dmenu diff --git a/.local/bin/dmenuumount b/.local/bin/dmenuumount index dee53e7a..25717a9e 100755 --- a/.local/bin/dmenuumount +++ b/.local/bin/dmenuumount @@ -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. diff --git a/.local/bin/dmenuunicode b/.local/bin/dmenuunicode index 4abf2028..eeae767e 100755 --- a/.local/bin/dmenuunicode +++ b/.local/bin/dmenuunicode @@ -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. diff --git a/.local/bin/dwmbar b/.local/bin/dwmbar index 3f4a0ba7..72e2a461 100755 --- a/.local/bin/dwmbar +++ b/.local/bin/dwmbar @@ -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. diff --git a/.local/bin/ext b/.local/bin/ext index c2e0f5c3..6fa15ca2 100755 --- a/.local/bin/ext +++ b/.local/bin/ext @@ -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. diff --git a/.local/bin/ifinstalled b/.local/bin/ifinstalled index b0d23e5c..baa7cda4 100755 --- a/.local/bin/ifinstalled +++ b/.local/bin/ifinstalled @@ -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 ;} diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler index 2c64dcbc..8a18280e 100755 --- a/.local/bin/linkhandler +++ b/.local/bin/linkhandler @@ -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, diff --git a/.local/bin/maimpick b/.local/bin/maimpick index 7125e615..0b621072 100755 --- a/.local/bin/maimpick +++ b/.local/bin/maimpick @@ -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 diff --git a/.local/bin/opout b/.local/bin/opout index ade24a4a..d5d8dffb 100755 --- a/.local/bin/opout +++ b/.local/bin/opout @@ -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 diff --git a/.local/bin/pauseallmpv b/.local/bin/pauseallmpv index 85a7032c..d1d35756 100755 --- a/.local/bin/pauseallmpv +++ b/.local/bin/pauseallmpv @@ -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 diff --git a/.local/bin/podentr b/.local/bin/podentr index 13ab4a85..bf1eeb8a 100755 --- a/.local/bin/podentr +++ b/.local/bin/podentr @@ -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 diff --git a/.local/bin/prompt b/.local/bin/prompt index 56de2f8c..c12a47b5 100755 --- a/.local/bin/prompt +++ b/.local/bin/prompt @@ -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: diff --git a/.local/bin/qndl b/.local/bin/qndl index a99d37e7..32ad03db 100755 --- a/.local/bin/qndl +++ b/.local/bin/qndl @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # $1 is a url; $2 is a command [ -z "$1" ] && exit base="$(basename "$1")" diff --git a/.local/bin/queueandnotify b/.local/bin/queueandnotify index a1417ec8..38c4a539 100755 --- a/.local/bin/queueandnotify +++ b/.local/bin/queueandnotify @@ -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. diff --git a/.local/bin/refbar b/.local/bin/refbar index 78b50188..b346cf04 100755 --- a/.local/bin/refbar +++ b/.local/bin/refbar @@ -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. diff --git a/.local/bin/rotdir b/.local/bin/rotdir index 7313a424..7c81b94e 100755 --- a/.local/bin/rotdir +++ b/.local/bin/rotdir @@ -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 diff --git a/.local/bin/rssadd b/.local/bin/rssadd index 8822fc5a..4bf87a32 100755 --- a/.local/bin/rssadd +++ b/.local/bin/rssadd @@ -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" diff --git a/.local/bin/samedir b/.local/bin/samedir index 88845fcf..f2ac87fe 100755 --- a/.local/bin/samedir +++ b/.local/bin/samedir @@ -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)" diff --git a/.local/bin/setbg b/.local/bin/setbg index 6125654a..5fdf5662 100755 --- a/.local/bin/setbg +++ b/.local/bin/setbg @@ -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 diff --git a/.local/bin/showclip b/.local/bin/showclip index d2faff8b..5896de63 100755 --- a/.local/bin/showclip +++ b/.local/bin/showclip @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Display contents of selection via dunst if running. # Separate script for i3. diff --git a/.local/bin/td-toggle b/.local/bin/td-toggle index dc727b90..d4669add 100755 --- a/.local/bin/td-toggle +++ b/.local/bin/td-toggle @@ -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 diff --git a/.local/bin/texclear b/.local/bin/texclear index f6a5062c..83fd586a 100755 --- a/.local/bin/texclear +++ b/.local/bin/texclear @@ -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. diff --git a/.local/bin/torwrap b/.local/bin/torwrap index 04e7a519..16c131fa 100755 --- a/.local/bin/torwrap +++ b/.local/bin/torwrap @@ -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 diff --git a/.local/bin/transadd b/.local/bin/transadd index ad2ee7f7..cf9450e7 100755 --- a/.local/bin/transadd +++ b/.local/bin/transadd @@ -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. diff --git a/.local/bin/tutorialvids b/.local/bin/tutorialvids index f1357eb7..f96e77ca 100755 --- a/.local/bin/tutorialvids +++ b/.local/bin/tutorialvids @@ -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 diff --git a/.local/bin/unix b/.local/bin/unix index 14d7ef0a..74aa5809 100755 --- a/.local/bin/unix +++ b/.local/bin/unix @@ -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