From 15b24ab9d782a8e5683f305ec8b1c31849a64246 Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Mon, 19 May 2025 23:03:02 -0700 Subject: initial commit --- home/Documents/pubkey.asc | 0 home/Pictures/pfp/bubblegum.png | Bin 0 -> 443498 bytes home/Pictures/pfp/eejypenguin.png | Bin 0 -> 175119 bytes home/Pictures/pfp/gus.jpg | Bin 0 -> 31578 bytes home/Pictures/pfp/mefr.png | Bin 0 -> 1265644 bytes home/Pictures/pfp/shoppingpenguin.png | Bin 0 -> 277623 bytes home/Pictures/wallpapers/5m5kLI9.png | Bin 0 -> 313297 bytes home/Pictures/wallpapers/Flight1.webp | Bin 0 -> 62148 bytes home/Pictures/wallpapers/Pages.png | Bin 0 -> 1133976 bytes home/Pictures/wallpapers/beach.jpg | Bin 0 -> 169847 bytes .../wallpapers/maciek-sulkowski-fJ-22PLNGvE.jpg | Bin 0 -> 1283226 bytes home/Pictures/wallpapers/rose01.png | Bin 0 -> 1508642 bytes home/Pictures/wallpapers/table.png | Bin 0 -> 608017 bytes home/Pictures/wallpapers/wall.jpg | Bin 0 -> 275592 bytes home/scripts/greet.sh | 29 +++++++++++++++++++ home/scripts/log.sh | 32 +++++++++++++++++++++ home/scripts/pinentry.sh | 20 +++++++++++++ home/scripts/platform.sh | 11 +++++++ home/scripts/system_name.sh | 14 +++++++++ home/scripts/theme.sh | 22 ++++++++++++++ 20 files changed, 128 insertions(+) create mode 100644 home/Documents/pubkey.asc create mode 100644 home/Pictures/pfp/bubblegum.png create mode 100644 home/Pictures/pfp/eejypenguin.png create mode 100644 home/Pictures/pfp/gus.jpg create mode 100644 home/Pictures/pfp/mefr.png create mode 100644 home/Pictures/pfp/shoppingpenguin.png create mode 100644 home/Pictures/wallpapers/5m5kLI9.png create mode 100644 home/Pictures/wallpapers/Flight1.webp create mode 100644 home/Pictures/wallpapers/Pages.png create mode 100644 home/Pictures/wallpapers/beach.jpg create mode 100644 home/Pictures/wallpapers/maciek-sulkowski-fJ-22PLNGvE.jpg create mode 100644 home/Pictures/wallpapers/rose01.png create mode 100644 home/Pictures/wallpapers/table.png create mode 100644 home/Pictures/wallpapers/wall.jpg create mode 100755 home/scripts/greet.sh create mode 100755 home/scripts/log.sh create mode 100755 home/scripts/pinentry.sh create mode 100755 home/scripts/platform.sh create mode 100755 home/scripts/system_name.sh create mode 100755 home/scripts/theme.sh (limited to 'home') diff --git a/home/Documents/pubkey.asc b/home/Documents/pubkey.asc new file mode 100644 index 0000000..e69de29 diff --git a/home/Pictures/pfp/bubblegum.png b/home/Pictures/pfp/bubblegum.png new file mode 100644 index 0000000..171bc62 Binary files /dev/null and b/home/Pictures/pfp/bubblegum.png differ diff --git a/home/Pictures/pfp/eejypenguin.png b/home/Pictures/pfp/eejypenguin.png new file mode 100644 index 0000000..2ae47cb Binary files /dev/null and b/home/Pictures/pfp/eejypenguin.png differ diff --git a/home/Pictures/pfp/gus.jpg b/home/Pictures/pfp/gus.jpg new file mode 100644 index 0000000..8073311 Binary files /dev/null and b/home/Pictures/pfp/gus.jpg differ diff --git a/home/Pictures/pfp/mefr.png b/home/Pictures/pfp/mefr.png new file mode 100644 index 0000000..46e6948 Binary files /dev/null and b/home/Pictures/pfp/mefr.png differ diff --git a/home/Pictures/pfp/shoppingpenguin.png b/home/Pictures/pfp/shoppingpenguin.png new file mode 100644 index 0000000..02c14ec Binary files /dev/null and b/home/Pictures/pfp/shoppingpenguin.png differ diff --git a/home/Pictures/wallpapers/5m5kLI9.png b/home/Pictures/wallpapers/5m5kLI9.png new file mode 100644 index 0000000..bf7b60d Binary files /dev/null and b/home/Pictures/wallpapers/5m5kLI9.png differ diff --git a/home/Pictures/wallpapers/Flight1.webp b/home/Pictures/wallpapers/Flight1.webp new file mode 100644 index 0000000..c59bd58 Binary files /dev/null and b/home/Pictures/wallpapers/Flight1.webp differ diff --git a/home/Pictures/wallpapers/Pages.png b/home/Pictures/wallpapers/Pages.png new file mode 100644 index 0000000..3e4cf16 Binary files /dev/null and b/home/Pictures/wallpapers/Pages.png differ diff --git a/home/Pictures/wallpapers/beach.jpg b/home/Pictures/wallpapers/beach.jpg new file mode 100644 index 0000000..e2e3949 Binary files /dev/null and b/home/Pictures/wallpapers/beach.jpg differ diff --git a/home/Pictures/wallpapers/maciek-sulkowski-fJ-22PLNGvE.jpg b/home/Pictures/wallpapers/maciek-sulkowski-fJ-22PLNGvE.jpg new file mode 100644 index 0000000..c2f6350 Binary files /dev/null and b/home/Pictures/wallpapers/maciek-sulkowski-fJ-22PLNGvE.jpg differ diff --git a/home/Pictures/wallpapers/rose01.png b/home/Pictures/wallpapers/rose01.png new file mode 100644 index 0000000..0b11bcb Binary files /dev/null and b/home/Pictures/wallpapers/rose01.png differ diff --git a/home/Pictures/wallpapers/table.png b/home/Pictures/wallpapers/table.png new file mode 100644 index 0000000..bb86417 Binary files /dev/null and b/home/Pictures/wallpapers/table.png differ diff --git a/home/Pictures/wallpapers/wall.jpg b/home/Pictures/wallpapers/wall.jpg new file mode 100644 index 0000000..f9df8f1 Binary files /dev/null and b/home/Pictures/wallpapers/wall.jpg differ diff --git a/home/scripts/greet.sh b/home/scripts/greet.sh new file mode 100755 index 0000000..00b6be5 --- /dev/null +++ b/home/scripts/greet.sh @@ -0,0 +1,29 @@ +#!/bin/bash +source log.sh "greet.sh" + +pick_greeting() { + path="$1" + greetings=("$1"/*) + greeting="${greetings[$RANDOM % ${#greetings[@]}]}" + echo "$greeting" +} + +GREETINGS_LIST="$XDG_CONFIG_HOME/zsh/greetings" +if [ ! -d "$GREETINGS_LIST" ]; then + log DEBUG "no such file $GREETINGS_LIST" + exit 0 +fi + +for greetings in $(ls "$GREETINGS_LIST" | sort); do + echo + log DEBUG "greeting $greetings" + + path="$GREETINGS_LIST/$greetings" + if [ ! -d "$path" ]; then + log DEBUG "greetings $path is not a directory" + continue + fi + + greeting=$(pick_greeting "$path") + cat "$greeting" +done diff --git a/home/scripts/log.sh b/home/scripts/log.sh new file mode 100755 index 0000000..8895097 --- /dev/null +++ b/home/scripts/log.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# usage: +# > source log.sh +# > log INFO "hello" +# > log "this is epic" +# > log DEBUG "yo" + +_LOG_CALLER=$(basename "$1") + +log() { + LEVEL=$1 + shift + + case "$LEVEL" in + INFO|DEBUG|ERROR) + ;; + *) + set -- "INFO" "$LEVEL" "$@" + LEVEL="INFO" + ;; + esac + + TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S') + MESSAGE="$*" + + if [ "$LEVEL" = "DEBUG" ] && [ -z "$DEBUG" ]; then + return + fi + + echo "[$TIMESTAMP] [$_LOG_CALLER] [$LEVEL] $MESSAGE" +} diff --git a/home/scripts/pinentry.sh b/home/scripts/pinentry.sh new file mode 100755 index 0000000..f02ee6f --- /dev/null +++ b/home/scripts/pinentry.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +source log.sh "pinentry.sh" + +#-- -- +bin="${HOMEBREW_PREFIX:-"/usr"}/bin" +case "$PINENTRY_USER_DATA" in + *USE_TTY*) pe=$bin/pinentry-tty ;; + *USE_CURSES*) pe=$bin/pinentry-curses ;; + *USE_QT*) pe=$bin/pinentry-qt ;; + *USE_MAC*) pe=$bin/pinentry-mac ;; + *USE_GTK2*) pe=$bin/pinentry-gtk-2 ;; + *USE_GNOME3*) pe=$bin/pinentry-gnome3 ;; + *USE_X11*) pe=$bin/pinentry-x11 ;; +esac + +log DEBUG "$pe" + +exec $pe "$@" +#-- -- diff --git a/home/scripts/platform.sh b/home/scripts/platform.sh new file mode 100755 index 0000000..9449ceb --- /dev/null +++ b/home/scripts/platform.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +case "$OSTYPE" in + solaris*) echo "solaris" ;; + darwin*) echo "osx" ;; + linux*) echo "linux" ;; + bsd*) echo "bsd" ;; + msys*) echo "windows" ;; + cygwin*) echo "windows" ;; + *) echo "unknown" ;; +esac diff --git a/home/scripts/system_name.sh b/home/scripts/system_name.sh new file mode 100755 index 0000000..92b714a --- /dev/null +++ b/home/scripts/system_name.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +platform="$(platform.sh)" + +MACHINE="$HOST" +if [ "$platform" = "osx" ]; then + MACHINE="$(scutil --get ComputerName)" +elif [ "$platform" = "linux" ]; then + MACHINE="$(cat /proc/sys/kernel/hostname)" +fi + +echo $MACHINE | awk -F\. '{print $1}' \ + | tr '[:upper:]' '[:lower:]' \ + | tr ' ' '-' diff --git a/home/scripts/theme.sh b/home/scripts/theme.sh new file mode 100755 index 0000000..3608c14 --- /dev/null +++ b/home/scripts/theme.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# usage: theme.sh + +source log.sh "theme.sh" + +THEME="$1" +log DEBUG "setting theme $THEME" + +THEME_SRC="$XDG_CONFIG_HOME/theme" +THEME_DEST="$HOME/.theme" +log DEBUG "src $THEME_SRC -> dest $THEME_DEST" + +THEME_TEMPL="{{THEME}}" + +find "$THEME_SRC/" -type f | while read source_file; do + destination_file=`echo "$source_file" | sed "s|^$THEME_SRC|$THEME_DEST|g"` + mkdir -p `dirname $destination_file` + log DEBUG "src $source_file -> dest $dest_file" + cat "$source_file" | sed "s|$THEME_TEMPL|$THEME|g" > $destination_file +done + -- cgit v1.2.3-70-g09d2