diff options
| -rwxr-xr-x | battery-checknow | 2 | ||||
| -rwxr-xr-x | dmenu-unmount | 3 | ||||
| -rwxr-xr-x | open-file | 6 | ||||
| -rwxr-xr-x | open-stdin | 8 | ||||
| -rwxr-xr-x | terminal | 4 | ||||
| -rwxr-xr-x | xedit | 3 |
6 files changed, 14 insertions, 12 deletions
diff --git a/battery-checknow b/battery-checknow index 66bbd60..4b76488 100755 --- a/battery-checknow +++ b/battery-checknow | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | # Requires: battery-status, notify-battery | 4 | # Requires: battery-status, notify-battery |
| 5 | 5 | ||
| 6 | file="${XDG_DATA_HOME:-$HOME/.local/share}/batterystatus" | 6 | file="${XDG_DATA_HOME:-$HOME/.local/share}/batterystatus" |
| 7 | notify="notify push" | 7 | notify=${NOTIFY:-"notify push"} |
| 8 | low=20 | 8 | low=20 |
| 9 | crit=15 | 9 | crit=15 |
| 10 | 10 | ||
diff --git a/dmenu-unmount b/dmenu-unmount index 8f7a27f..93c8186 100755 --- a/dmenu-unmount +++ b/dmenu-unmount | |||
| @@ -7,8 +7,7 @@ | |||
| 7 | # Example: dmenu-unmount -m slmenu -w echo | 7 | # Example: dmenu-unmount -m slmenu -w echo |
| 8 | 8 | ||
| 9 | menu=dmenu | 9 | menu=dmenu |
| 10 | #writeout=notify-send | 10 | writeout=${NOTIFY:-"notify push"} |
| 11 | writeout="notify push" | ||
| 12 | 11 | ||
| 13 | usage() { | 12 | usage() { |
| 14 | echo "Usage: dmenu-unmount [-m MENU] [-w WRITER]" | 13 | echo "Usage: dmenu-unmount [-m MENU] [-w WRITER]" |
| @@ -9,9 +9,9 @@ | |||
| 9 | menu="dmenu -i -l 15" | 9 | menu="dmenu -i -l 15" |
| 10 | 10 | ||
| 11 | # Change default apps here | 11 | # Change default apps here |
| 12 | video="vlc" | 12 | video=${VIDEO:-vlc} |
| 13 | music="vlc" | 13 | music=${MUSIC:-vlc} |
| 14 | pdf="zathura" | 14 | pdf=${PDF:-zathura} |
| 15 | img="imv" | 15 | img="imv" |
| 16 | word="libreoffice" | 16 | word="libreoffice" |
| 17 | sheet="libreoffice" | 17 | sheet="libreoffice" |
| @@ -1,12 +1,12 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Saves standard input in a download folder and opens it (spawn) | 3 | # Saves standard input in a temporary file and opens it (spawn) |
| 4 | # Usage: open-stdin | 4 | # Usage: open-stdin |
| 5 | # Requires: open-file | 5 | # Requires: open-file (or set $OPENER to e.g. xdg-open) |
| 6 | 6 | ||
| 7 | #folder=$HOME/Downloads/open-stdin | ||
| 8 | folder=${TMPDIR:-/tmp} | 7 | folder=${TMPDIR:-/tmp} |
| 8 | open=${OPENER:-open-file} | ||
| 9 | 9 | ||
| 10 | tempfile=$(mktemp -p "$folder") | 10 | tempfile=$(mktemp -p "$folder") |
| 11 | 11 | ||
| 12 | cat > "$tempfile" && open-file $@ "$tempfile" | 12 | cat > "$tempfile" && $open $@ "$tempfile" |
| @@ -2,4 +2,6 @@ | |||
| 2 | 2 | ||
| 3 | # My default terminal | 3 | # My default terminal |
| 4 | 4 | ||
| 5 | st -e tmux new-session "$@" | 5 | terminal=${TERMINAL:-'st -e tmux new-session "$@"'} |
| 6 | |||
| 7 | $terminal | ||
| @@ -4,5 +4,6 @@ | |||
| 4 | # Requires: terminal | 4 | # Requires: terminal |
| 5 | 5 | ||
| 6 | editor=${EDITOR:-${VISUAL:-vi}} | 6 | editor=${EDITOR:-${VISUAL:-vi}} |
| 7 | xed=${XEDIT:-'terminal "$editor"'} | ||
| 7 | 8 | ||
| 8 | terminal "$editor" "$@" | 9 | $xed "$@" |
