diff --git a/.bashrc b/.bashrc index 9338a0c9..b48fb239 100644 --- a/.bashrc +++ b/.bashrc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash stty -ixon # Disable ctrl-s and ctrl-q. shopt -s autocd #Allows you to cd into directory merely by typing the directory name. HISTSIZE= HISTFILESIZE= # Infinite history. diff --git a/.config/aliasrc b/.config/aliasrc index 241889aa..d67e6716 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh alias ka="killall" \ mkd="mkdir -pv" \ mpv="mpv --input-ipc-server=/tmp/mpvsoc$(date +%s)" \ diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler index 11050ea3..2a142d97 100755 --- a/.config/sxiv/exec/key-handler +++ b/.config/sxiv/exec/key-handler @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh while read file do case "$1" in diff --git a/.local/bin/cron/checkup b/.local/bin/cron/checkup index 0bda0985..927b9d83 100755 --- a/.local/bin/cron/checkup +++ b/.local/bin/cron/checkup @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Syncs repositories and downloads updates, meant to be run as a cronjob. ping -q -c 1 1.1.1.1 > /dev/null || exit diff --git a/.local/bin/cron/cronbat b/.local/bin/cron/cronbat index c09ff427..ee21a17b 100755 --- a/.local/bin/cron/cronbat +++ b/.local/bin/cron/cronbat @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Notify me with notify-send if my battery is below 25%. # You can set this to run via cron. diff --git a/.local/bin/cron/crontog b/.local/bin/cron/crontog index 93c2d30c..237eb9cc 100755 --- a/.local/bin/cron/crontog +++ b/.local/bin/cron/crontog @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Toggles all cronjobs off/on. # Stores disabled crontabs in ~/.consaved until restored. diff --git a/.local/bin/cron/newsup b/.local/bin/cron/newsup index f8949273..6b6a3485 100755 --- a/.local/bin/cron/newsup +++ b/.local/bin/cron/newsup @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env 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. diff --git a/.local/bin/i3cmds/cabl b/.local/bin/i3cmds/cabl index b5b1b3fd..294a30b5 100755 --- a/.local/bin/i3cmds/cabl +++ b/.local/bin/i3cmds/cabl @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Dependencies are xclip and xorg-xprop. # qrencode required for qrcode generation. # groff/zathura required for man pages. diff --git a/.local/bin/i3cmds/camtoggle b/.local/bin/i3cmds/camtoggle index 05679c0c..2a5df443 100755 --- a/.local/bin/i3cmds/camtoggle +++ b/.local/bin/i3cmds/camtoggle @@ -1,2 +1,2 @@ -#!/bin/sh +#!/usr/bin/env sh pkill -f /dev/video || mpv --no-osc --no-input-default-bindings --input-conf=/dev/null --geometry=-0-0 --autofit=30% --title="mpvfloat" /dev/video0 diff --git a/.local/bin/i3cmds/ddspawn b/.local/bin/i3cmds/ddspawn index d4a40342..1c4af36b 100755 --- a/.local/bin/i3cmds/ddspawn +++ b/.local/bin/i3cmds/ddspawn @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Toggle floating dropdown terminal in i3, or start if non-existing. # $1 is the script run in the terminal. diff --git a/.local/bin/i3cmds/displayselect b/.local/bin/i3cmds/displayselect index e5260142..2c3fc044 100755 --- a/.local/bin/i3cmds/displayselect +++ b/.local/bin/i3cmds/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. diff --git a/.local/bin/i3cmds/dmenumount b/.local/bin/i3cmds/dmenumount index 0de5f0f3..1f801447 100755 --- a/.local/bin/i3cmds/dmenumount +++ b/.local/bin/i3cmds/dmenumount @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Gives a dmenu prompt to mount unmounted drives. # If they're in /etc/fstab, they'll be mounted automatically. # Otherwise, you'll be prompted to give a mountpoint from already existsing directories. diff --git a/.local/bin/i3cmds/dmenurecord b/.local/bin/i3cmds/dmenurecord index 6af25a98..22510ec9 100755 --- a/.local/bin/i3cmds/dmenurecord +++ b/.local/bin/i3cmds/dmenurecord @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Usage: # `record`: Ask for recording type via dmenu diff --git a/.local/bin/i3cmds/dmenuumount b/.local/bin/i3cmds/dmenuumount index dee53e7a..25717a9e 100755 --- a/.local/bin/i3cmds/dmenuumount +++ b/.local/bin/i3cmds/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/i3cmds/dmenuunicode b/.local/bin/i3cmds/dmenuunicode index 429e41e0..6771224b 100755 --- a/.local/bin/i3cmds/dmenuunicode +++ b/.local/bin/i3cmds/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/i3cmds/dropdowncalc b/.local/bin/i3cmds/dropdowncalc index 4d41f88b..132d8e19 100755 --- a/.local/bin/i3cmds/dropdowncalc +++ b/.local/bin/i3cmds/dropdowncalc @@ -1,2 +1,2 @@ -#!/bin/sh +#!/usr/bin/env sh ifinstalled bc && echo "Welcome to the Calculator." && bc -lq diff --git a/.local/bin/i3cmds/ducksearch b/.local/bin/i3cmds/ducksearch index 7b5bca68..e8c8eae3 100755 --- a/.local/bin/i3cmds/ducksearch +++ b/.local/bin/i3cmds/ducksearch @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Gives a dmenu prompt to search DuckDuckGo. # Without input, will open DuckDuckGo.com. # URLs will be directly handed to the browser. diff --git a/.local/bin/i3cmds/hover b/.local/bin/i3cmds/hover index 8d03a99a..d02bbbcf 100755 --- a/.local/bin/i3cmds/hover +++ b/.local/bin/i3cmds/hover @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env 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)) diff --git a/.local/bin/i3cmds/i3resize b/.local/bin/i3cmds/i3resize index 11b0992a..f89bdb5c 100755 --- a/.local/bin/i3cmds/i3resize +++ b/.local/bin/i3cmds/i3resize @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # This script was made by `goferito` on Github. # Some cleanup by Luke. diff --git a/.local/bin/i3cmds/killrecording b/.local/bin/i3cmds/killrecording index ec9a6981..38d121f2 100755 --- a/.local/bin/i3cmds/killrecording +++ b/.local/bin/i3cmds/killrecording @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh kill -9 "$(cat ~/.recordingpid)" diff --git a/.local/bin/i3cmds/maimpick b/.local/bin/i3cmds/maimpick index 07d032f9..0690b6ca 100755 --- a/.local/bin/i3cmds/maimpick +++ b/.local/bin/i3cmds/maimpick @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in "a selected area") maim -s pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;; "current window") maim -i "$(xdotool getactivewindow)" pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;; diff --git a/.local/bin/i3cmds/prompt b/.local/bin/i3cmds/prompt index 56de2f8c..c12a47b5 100755 --- a/.local/bin/i3cmds/prompt +++ b/.local/bin/i3cmds/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/i3cmds/samedir b/.local/bin/i3cmds/samedir index 88845fcf..f2ac87fe 100755 --- a/.local/bin/i3cmds/samedir +++ b/.local/bin/i3cmds/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/i3cmds/showclip b/.local/bin/i3cmds/showclip index d2faff8b..5896de63 100755 --- a/.local/bin/i3cmds/showclip +++ b/.local/bin/i3cmds/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/i3cmds/td-toggle b/.local/bin/i3cmds/td-toggle index dc727b90..d4669add 100755 --- a/.local/bin/i3cmds/td-toggle +++ b/.local/bin/i3cmds/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/i3cmds/tmuxdd b/.local/bin/i3cmds/tmuxdd index c194ff11..c8eccbb0 100755 --- a/.local/bin/i3cmds/tmuxdd +++ b/.local/bin/i3cmds/tmuxdd @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env 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 diff --git a/.local/bin/i3cmds/toggletouchpad b/.local/bin/i3cmds/toggletouchpad index 6d8c9c80..6dd1b8b8 100755 --- a/.local/bin/i3cmds/toggletouchpad +++ b/.local/bin/i3cmds/toggletouchpad @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Toggle touchpad. Requires xf86-input-synaptics. (synclient | grep "TouchpadOff.*1" && synclient TouchpadOff=0)>/dev/null && echo "TouchPad reactivated." && exit synclient TouchpadOff=1 && echo "TouchPad deactivated." diff --git a/.local/bin/i3cmds/torwrap b/.local/bin/i3cmds/torwrap index 04e7a519..16c131fa 100755 --- a/.local/bin/i3cmds/torwrap +++ b/.local/bin/i3cmds/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/i3cmds/tutorialvids b/.local/bin/i3cmds/tutorialvids index f1357eb7..f96e77ca 100755 --- a/.local/bin/i3cmds/tutorialvids +++ b/.local/bin/i3cmds/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/i3cmds/winresize b/.local/bin/i3cmds/winresize index 090bbf32..1d983422 100755 --- a/.local/bin/i3cmds/winresize +++ b/.local/bin/i3cmds/winresize @@ -1,2 +1,2 @@ -#!/bin/sh +#!/usr/bin/env sh echo "📐" | dmenu -p "Give width and height:" | xargs xdotool windowsize "$(xdotool getwindowfocus)" diff --git a/.local/bin/statusbar/battery b/.local/bin/statusbar/battery index 25c92697..208bc51b 100755 --- a/.local/bin/statusbar/battery +++ b/.local/bin/statusbar/battery @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Give a battery name (e.g. BAT0) as an argument. case $BLOCK_BUTTON in diff --git a/.local/bin/statusbar/clock b/.local/bin/statusbar/clock index d6d54ef0..ca50afc0 100755 --- a/.local/bin/statusbar/clock +++ b/.local/bin/statusbar/clock @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh date '+%Y %b %d (%a) %I:%M%p' diff --git a/.local/bin/statusbar/cpu b/.local/bin/statusbar/cpu index 3b1394af..08078ba9 100755 --- a/.local/bin/statusbar/cpu +++ b/.local/bin/statusbar/cpu @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh case $BLOCK_BUTTON in 1) notify-send "🖥 CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)" ;; diff --git a/.local/bin/statusbar/disk b/.local/bin/statusbar/disk index d3dd07d7..3d2c2e45 100755 --- a/.local/bin/statusbar/disk +++ b/.local/bin/statusbar/disk @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Status bar module for disk space # $1 should be drive mountpoint diff --git a/.local/bin/statusbar/help b/.local/bin/statusbar/help index 4916d5c3..9b88e656 100755 --- a/.local/bin/statusbar/help +++ b/.local/bin/statusbar/help @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh case $BLOCK_BUTTON in 1) groff -mom ~/.local/share/larbs/readme.mom -Tpdf | zathura - ;; 2) i3 restart ;; diff --git a/.local/bin/statusbar/internet b/.local/bin/statusbar/internet index 1d2f2e80..3a41f55d 100755 --- a/.local/bin/statusbar/internet +++ b/.local/bin/statusbar/internet @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh case $BLOCK_BUTTON in 1) $TERMINAL -e nmtui ;; diff --git a/.local/bin/statusbar/iplocate b/.local/bin/statusbar/iplocate index 4ca4f107..5362330e 100755 --- a/.local/bin/statusbar/iplocate +++ b/.local/bin/statusbar/iplocate @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Gets your public ip address checks which country you are in and # displays that information in the statusbar diff --git a/.local/bin/statusbar/mailbox b/.local/bin/statusbar/mailbox index 21c85aba..f9d3bd80 100755 --- a/.local/bin/statusbar/mailbox +++ b/.local/bin/statusbar/mailbox @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # i3blocks mail module. # Displays number of unread mail and an loading icon if updating. diff --git a/.local/bin/statusbar/memory b/.local/bin/statusbar/memory index dfd3d7b0..c1282613 100755 --- a/.local/bin/statusbar/memory +++ b/.local/bin/statusbar/memory @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh case $BLOCK_BUTTON in 1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;; diff --git a/.local/bin/statusbar/mpdupdate b/.local/bin/statusbar/mpdupdate index afe11bb1..865a4189 100755 --- a/.local/bin/statusbar/mpdupdate +++ b/.local/bin/statusbar/mpdupdate @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Whenever the mpd state changes, update the mpd i3 module. kill -0 "$(cat /tmp/mpdupdate)" 2>/dev/null && exit || echo $$ > /tmp/mpdupdate diff --git a/.local/bin/statusbar/music b/.local/bin/statusbar/music index 93c2c9ca..7324f8b1 100755 --- a/.local/bin/statusbar/music +++ b/.local/bin/statusbar/music @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh filter() { sed "/^volume:/d" | tac | sed -e "s/\\&/&/g;s/\\[paused\\].*//g;s/\\[playing\\].*//g" | tr -d '\n' | sed -e "s/$/<\\/span>/g" diff --git a/.local/bin/statusbar/news b/.local/bin/statusbar/news index b7ca1a7a..9a0c1da3 100755 --- a/.local/bin/statusbar/news +++ b/.local/bin/statusbar/news @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # i3blocks newsboat module. # Displays number of unread news items and an loading icon if updating. diff --git a/.local/bin/statusbar/pacpackages b/.local/bin/statusbar/pacpackages index 418bc2db..e4cd4791 100755 --- a/.local/bin/statusbar/pacpackages +++ b/.local/bin/statusbar/pacpackages @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # i3blocks module for pacman upgrades. # Displays number of upgradeable packages. diff --git a/.local/bin/statusbar/popupgrade b/.local/bin/statusbar/popupgrade index 83035c34..fffa399e 100755 --- a/.local/bin/statusbar/popupgrade +++ b/.local/bin/statusbar/popupgrade @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh printf "Beginning upgrade.\\n" diff --git a/.local/bin/statusbar/torrent b/.local/bin/statusbar/torrent index 0ab811ce..d446a67b 100755 --- a/.local/bin/statusbar/torrent +++ b/.local/bin/statusbar/torrent @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh transmission-remote -l | grep % | sed " # This first sed command is to ensure a desirable order with sort diff --git a/.local/bin/statusbar/volume b/.local/bin/statusbar/volume index 3bbb32b1..e66f0d91 100755 --- a/.local/bin/statusbar/volume +++ b/.local/bin/statusbar/volume @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh case $BLOCK_BUTTON in 1) setsid "$TERMINAL" -e pulsemixer & ;; diff --git a/.local/bin/statusbar/weather b/.local/bin/statusbar/weather index e4de6800..4241a510 100755 --- a/.local/bin/statusbar/weather +++ b/.local/bin/statusbar/weather @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env 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 diff --git a/.local/bin/tools/compiler b/.local/bin/tools/compiler index f9e80bd6..201064ed 100755 --- a/.local/bin/tools/compiler +++ b/.local/bin/tools/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/tools/dmenuhandler b/.local/bin/tools/dmenuhandler index 391bdc19..c4eecc3c 100755 --- a/.local/bin/tools/dmenuhandler +++ b/.local/bin/tools/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/tools/dmenupass b/.local/bin/tools/dmenupass index 4fc464f4..11506c06 100755 --- a/.local/bin/tools/dmenupass +++ b/.local/bin/tools/dmenupass @@ -1,2 +1,2 @@ -#!/bin/sh +#!/usr/bin/env sh dmenu -fn Monospace-18 -sb "#d79921" -sf "#1d2021" -nf "#000000" -nb "#000000" -p "$1" <&- && echo diff --git a/.local/bin/tools/extract b/.local/bin/tools/extract index a63ab105..d351a08a 100755 --- a/.local/bin/tools/extract +++ b/.local/bin/tools/extract @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # A general, all-purpose extraction script. # # Default behavior: Extract archive into new directory diff --git a/.local/bin/tools/getbib b/.local/bin/tools/getbib index ed441c56..4bac1fc6 100755 --- a/.local/bin/tools/getbib +++ b/.local/bin/tools/getbib @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh [ -z "$1" ] && echo "Give either a pdf file or a DOI as an argument." && exit if [ -f "$1" ]; then diff --git a/.local/bin/tools/getkeys b/.local/bin/tools/getkeys index 444f4c08..f464584c 100755 --- a/.local/bin/tools/getkeys +++ b/.local/bin/tools/getkeys @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh cat ~/.config/getkeys/"$1" 2>/dev/null && exit echo "Run command with one of the following arguments for info about that program:" ls ~/.config/getkeys diff --git a/.local/bin/tools/ifinstalled b/.local/bin/tools/ifinstalled index b0d23e5c..baa7cda4 100755 --- a/.local/bin/tools/ifinstalled +++ b/.local/bin/tools/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/tools/linkhandler b/.local/bin/tools/linkhandler index b839da25..556d4a8f 100755 --- a/.local/bin/tools/linkhandler +++ b/.local/bin/tools/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/tools/lmc b/.local/bin/tools/lmc index 18cf2c23..d94c094d 100755 --- a/.local/bin/tools/lmc +++ b/.local/bin/tools/lmc @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # A general audio interface for LARBS. [ -z "$2" ] && num="2" || num="$2" diff --git a/.local/bin/tools/opout b/.local/bin/tools/opout index c742aa95..7f51a6f6 100755 --- a/.local/bin/tools/opout +++ b/.local/bin/tools/opout @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # opout: "open output": A general handler for opening a file's intended output. # I find this useful especially running from vim. diff --git a/.local/bin/tools/pauseallmpv b/.local/bin/tools/pauseallmpv index c5da2206..1db5fdef 100755 --- a/.local/bin/tools/pauseallmpv +++ b/.local/bin/tools/pauseallmpv @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh for i in $(ls /tmp/mpvsoc*); do echo '{ "command": ["set_property", "pause", true] }' | socat - $i; done diff --git a/.local/bin/tools/podentr b/.local/bin/tools/podentr index 13ab4a85..bf1eeb8a 100755 --- a/.local/bin/tools/podentr +++ b/.local/bin/tools/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/tools/qndl b/.local/bin/tools/qndl index a99d37e7..32ad03db 100755 --- a/.local/bin/tools/qndl +++ b/.local/bin/tools/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/tools/queueandnotify b/.local/bin/tools/queueandnotify index a1417ec8..38c4a539 100755 --- a/.local/bin/tools/queueandnotify +++ b/.local/bin/tools/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/tools/remaps b/.local/bin/tools/remaps index df7d6c91..89250447 100755 --- a/.local/bin/tools/remaps +++ b/.local/bin/tools/remaps @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # This script is called by i3 on startup to remap keys. # Increase key speed via a rate change xset r rate 300 50 diff --git a/.local/bin/tools/rotdir b/.local/bin/tools/rotdir index e7103db7..4d26400d 100755 --- a/.local/bin/tools/rotdir +++ b/.local/bin/tools/rotdir @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh [ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1 base="$(basename $1)" ls "$PWD" | awk "BEGIN { lines = \"\"; m = 0; } /^$base$/ { m = 1; } { if (!m) { if (lines) { lines = lines\"\n\"; } lines = lines\"\"\$0; } else { print \$0; } } END { print lines; }" diff --git a/.local/bin/tools/rssadd b/.local/bin/tools/rssadd index 8822fc5a..4bf87a32 100755 --- a/.local/bin/tools/rssadd +++ b/.local/bin/tools/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/tools/setbg b/.local/bin/tools/setbg index 950ae7c6..35cabfb0 100755 --- a/.local/bin/tools/setbg +++ b/.local/bin/tools/setbg @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Sets the background. If given an argument, will set file as background. [ ! -z "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed." xwallpaper --zoom ~/.config/wall.png diff --git a/.local/bin/tools/shortcuts b/.local/bin/tools/shortcuts index 1c4f2787..f3bd3cb8 100755 --- a/.local/bin/tools/shortcuts +++ b/.local/bin/tools/shortcuts @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Output locations. Unactivated progs should go to /dev/null. shell_shortcuts="$HOME/.config/shortcutrc" ranger_shortcuts="/dev/null" diff --git a/.local/bin/tools/texclear b/.local/bin/tools/texclear index f6a5062c..83fd586a 100755 --- a/.local/bin/tools/texclear +++ b/.local/bin/tools/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/tools/transadd b/.local/bin/tools/transadd index ad2ee7f7..cf9450e7 100755 --- a/.local/bin/tools/transadd +++ b/.local/bin/tools/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/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 diff --git a/.profile b/.profile index 6859fed9..83f370e8 100644 --- a/.profile +++ b/.profile @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Profile file. Runs on login. # Adds `~/.local/bin/` and all subdirectories to $PATH diff --git a/.xinitrc b/.xinitrc index 71bf4f96..41990181 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh [ -f "$HOME/.xprofile" ] && . ~/.xprofile diff --git a/.xprofile b/.xprofile index 84bf7c76..e31c4d0b 100644 --- a/.xprofile +++ b/.xprofile @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh setbg & # Set the background sxhkd & # Bind keys