This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ask user to create todo.txt file if it doesn't exist | |
def "todo ensure-file" [ | |
file: path = ~/todo.txt # Path to the todo file | |
]: nothing -> bool { | |
if not ($file | path exists) { | |
print "The todo file does not exist. Would you like to create it? [y/N]: " | |
let response = input -sn 1 --default 'n' | str downcase | |
if $response == 'y' { | |
print $"Creating todo.txt file at ($file | path expand)." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from pathlib import Path | |
from typing import Any | |
import argparse | |
import datetime | |
import json | |
import os | |
import sys | |
import textwrap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
getTitle() { | |
ffprobe "$1" 2>&1 | sed -En 's/^ *title *: (.*)/\1/p' | |
} | |
getArtist() { | |
ffprobe "$1" 2>&1 | sed -En 's/^ *artist *: (.*)/\1/p' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Initialize variables to customize output | |
: "${FFILE:="${HOME}/.fonts/i/impact.ttf"}" # Let user choose font file | |
: "${FSIZE:=72}" # Let user choose font size in px | |
: "${BSIZE:=5}" # Let user choose stroke size in px | |
: "${OFFSET:='(h*0.05)'}" # Let user choose text offset in px | |
# TTEXT - Text to display at the top of the image | |
# BTEXT - Text to display at the bottom of the image | |
# Exit value index: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
repo=${RCREPOPATH:-/usr/local/repo/custom/custom.db.tar.gz} | |
repo_name=$(echo "$repo" | awk -F '/' '{print $(NF-1)}') | |
list=$(pacman -Sl "$repo_name" | sed '/\[installed\]/d' | cut -d ' ' -f 2) | |
if [ -n "$list" ]; then | |
printf 'Remove packages: %s? [Y/n]: ' "$list" | |
read -r ans |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
: "${IRIVER_DIR:=$(xdg-user-dir PICTURES)/iriver}" | |
if [ -z "$1" ]; then | |
[ -d "${IRIVER_DIR}" ] || mkdir -p "${IRIVER_DIR}" | |
outfile="${IRIVER_DIR}/$(date '+%FT%T%z').png" | |
else | |
_base=$(dirname "$1") | |
if [ -d "$_base" ]; then | |
outfile=$1 | |
else |