diff --git a/.local/bin/compiler b/.local/bin/compiler index f9e80bd..201064e 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 c0e3479..5700571 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 391bdc1..c4eecc3 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 1feb204..6784402 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 8631a13..461a551 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 c4ba6ee..842376e 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 dee53e7..25717a9 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 4abf202..eeae767 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 3f4a0ba..72e2a46 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 c2e0f5c..6fa15ca 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 b0d23e5..baa7cda 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 2c64dcb..8a18280 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 7125e61..0b62107 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 ade24a4..d5d8dff 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 85a7032..d1d3575 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 13ab4a8..bf1eeb8 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 56de2f8..c12a47b 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 a99d37e..32ad03d 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 a1417ec..38c4a53 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 78b5018..b346cf0 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 7313a42..7c81b94 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 8822fc5..4bf87a3 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 88845fc..f2ac87f 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 6125654..5fdf566 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 d2faff8..5896de6 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 dc727b9..d4669ad 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 f6a5062..83fd586 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 04e7a51..16c131f 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 ad2ee7f..cf9450e 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 f1357eb..f96e77c 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 14d7ef0..74aa580 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