script documentation

This commit is contained in:
Luke Smith 2019-05-31 19:38:43 -04:00
parent ae327871d2
commit 6b334b59fc
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
5 changed files with 26 additions and 6 deletions

View file

@ -1,10 +1,10 @@
#!/bin/sh #!/bin/sh
# This script will compile or run another finishing operation on a document. I # This script will compile or run another finishing operation on a document. I
# have this script run via vim. # have this script run via vim.
# #
# Compiles .tex. groff (.mom, .ms), .rmd, .md. # Compiles .tex. groff (.mom, .ms), .rmd, .md. Opens .sent files as sent
# Opens .sent files as sent presentations. # presentations. Runs scripts based on extention or shebang
# Runs scripts based on extention or shebang
file=$(readlink -f "$1") file=$(readlink -f "$1")
dir=$(dirname "$file") dir=$(dirname "$file")

View file

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
# A general, all-purpose extraction script.
# A general, all-purpose extraction script. Not all extraction programs here
# are installed by LARBS automatically.
# #
# Default behavior: Extract archive into new directory # Default behavior: Extract archive into new directory
# Behavior with `-c` option: Extract contents into current directory # Behavior with `-c` option: Extract contents into current directory

View file

@ -1,4 +1,9 @@
#!/bin/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
# highlighting an area to copy. scrotcucks on suicidewatch right now.
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 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" ;; "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" ;; "current window") maim -i "$(xdotool getactivewindow)" pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;;

View file

@ -1,4 +1,12 @@
#!/bin/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
# images in the same directory. This script "rotates" the content of a
# directory based on the first chosen file, so that if I open the 15th image,
# if I press next, it will go to the 16th etc. Autistic, I know, but this is
# one of the reasons that sxiv is great for being able to read standard input.
[ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1 [ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1
base="$(basename $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; }" 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; }"

View file

@ -1,4 +1,9 @@
#!/bin/sh #!/bin/sh
# Sets the background. If given an argument, will set file as background.
# 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
# argument sets ~/.config/wall.png as the wallpaper, which is required on login
# if you don't want a blakc screen.
[ ! -z "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed." [ ! -z "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed."
xwallpaper --zoom ~/.config/wall.png xwallpaper --zoom ~/.config/wall.png