diff options
-rwxr-xr-x | git-create | 2 | ||||
-rw-r--r-- | github-mirror.sh | 3 | ||||
-rwxr-xr-x | i3blocks-net.sh | 6 | ||||
-rwxr-xr-x | i3blocks-uptime.sh | 2 | ||||
-rwxr-xr-x | imager.sh | 2 | ||||
-rwxr-xr-x | transcode-screencast.sh | 11 | ||||
-rwxr-xr-x | yt.sh | 5 |
7 files changed, 24 insertions, 7 deletions
@@ -1,5 +1,7 @@ #!/bin/sh +# TODO: update this for gitea, insta-creation of repo + # create a repo of provided name on macon and make it the upstream name=$1 [[ ! $(echo "$name" | grep ".git" -) ]] && name="$1.git" diff --git a/github-mirror.sh b/github-mirror.sh new file mode 100644 index 0000000..5d9cb00 --- /dev/null +++ b/github-mirror.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +# Should mirror a gitea repo into github using the public API diff --git a/i3blocks-net.sh b/i3blocks-net.sh index 396faa6..26aad7b 100755 --- a/i3blocks-net.sh +++ b/i3blocks-net.sh @@ -4,12 +4,12 @@ icon_down= icon_wireless= is_ethernet=$(ifconfig em0 | grep status | cut -d\: -f2) +inet=$(ifconfig lagg0 | grep inet\ | cut -w -f3) if [ "$is_ethernet" = " active" ]; then - inet=$(ifconfig lagg0 | grep inet\ | cut -w -f3) - printf "%s%s\n" $icon_ethernet $inet + printf "%s%s" $icon_ethernet $inet elif [ "$(ifconfig wlan0 | grep status | cut -d\: -f2)" = " associated" ]; then ssid=$(ifconfig wlan0 | sed -n 's/^.*ssid \(.*\) channel.*$/\1/p') - [ -n "$ssid" ] && printf "%s%s" $icon_wireless "$ssid" + [ -n "$ssid" ] && printf "%s%s %s" $icon_wireless "$ssid" $inet else printf "%sNo connection" $icon_down fi diff --git a/i3blocks-uptime.sh b/i3blocks-uptime.sh index 515f056..778b71f 100755 --- a/i3blocks-uptime.sh +++ b/i3blocks-uptime.sh @@ -1,4 +1,4 @@ #!/bin/sh icon= -printf "$icon%s\n" "$(uptime -p | cut -d, -f1,2)" +printf "$icon%s\n" "$(uptime | grep -o 'up[^,]*' )" @@ -1,2 +1,2 @@ #!/bin/sh -find . -type f -exec sxiv "$1" "{}" + +find . -type f -maxdepth 1 -exec sxiv "$1" "{}" + diff --git a/transcode-screencast.sh b/transcode-screencast.sh new file mode 100755 index 0000000..61a9306 --- /dev/null +++ b/transcode-screencast.sh @@ -0,0 +1,11 @@ +#!/bin/sh +INPUT_VIDEO=$1 +INPUT_AUDIO=$2 +OUTPUT=$3 +ffmpeg -i "$INPUT_VIDEO" \ + -i "$INPUT_AUDIO" \ + -vcodec libx264 \ + -pix_fmt yuv420p \ + -acodec aac \ + -b:a 320k \ + "$OUTPUT" @@ -47,7 +47,8 @@ prompt_url() { ## Grab url from clipboard/primary selection, else get via prompt grab_url() { - if url=$(xclip -o -selection clipboard 2>/dev/null || echo) && check_if_youtube $url; then + if url="$1" && check_if_youtube $url; then + elif url=$(xclip -o -selection clipboard 2>/dev/null || echo) && check_if_youtube $url; then elif url=$(xclip -o 2>/dev/null || echo) && check_if_youtube $url; then elif url=$(grab_url_stdin) && check_if_youtube $url; then elif url=$(prompt_url) && check_if_youtube $url; then @@ -131,7 +132,7 @@ print_info() { ## Main mkdir -p "$DOWNLOAD_DIR" -url=$(grab_url) +url=$(grab_url "$1") case "$(get_action_single)" in 5) |