1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-09 19:11:15 +02:00

profile: added source for optional env variables

This commit is contained in:
2024-05-19 06:35:47 +02:00
parent d0ef41d968
commit c6b9ffcc69
10 changed files with 58 additions and 25 deletions

View File

@@ -2,7 +2,7 @@
# copying latex templates from my template repository
# (not included in the dotfiles)
latexdir=~/code/main/latextemplates
[ -z "$LATEX_TEMPLATE_DIR" ] && latexdir="~/code/main/latextemplates" || latexdir="$LATEX_TEMPLATE_DIR"
articletemp=${latexdir}/article/*
beamertemp=${latexdir}/beamer/*

View File

@@ -2,20 +2,23 @@
# Adapted from a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
[ -z "$WALLPAPER_DESKTOP" ] && wall_desk="${XDG_DATA_HOME:-$HOME/.local/share}/bg" || disk="$WALLPAPER_DESKTOP"
[ -z "$WALLPAPER_LOCK" ] && wall_desk="${XDG_DATA_HOME:-$HOME/.local/share}/lock" || disk="$WALLPAPER_LOCK"
case "$1" in
desktop) bgloc="${XDG_DATA_HOME:-$HOME/.local/share}/bg"
desktop) wall_desk="${XDG_DATA_HOME:-$HOME/.local/share}/bg"
trueloc="$(readlink -f "$2")" &&
case "$(file --mime-type -b "$trueloc")" in
image/* ) ln -f "$(readlink -f "$2")" "$bgloc" && notify-send -i "$bgloc" "Desktop wallpaper has been changed." ;;
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random desktop wallpaper chosen." ;;
image/* ) ln -f "$(readlink -f "$2")" "$wall_desk" && notify-send -i "$wall_desk" "Desktop wallpaper has been changed." ;;
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$wall_desk" && notify-send -i "$wall_desk" "Random desktop wallpaper chosen." ;;
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
esac
xwallpaper --zoom "$bgloc" ;;
lock) bgloc="${XDG_DATA_HOME:-$HOME/.local/share}/lock"
xwallpaper --zoom "$wall_desk" ;;
lock) wall_lock="${XDG_DATA_HOME:-$HOME/.local/share}/lock"
trueloc="$(readlink -f "$2")" &&
case "$(file --mime-type -b "$trueloc")" in
image/* ) ln -f "$(readlink -f "$2")" "$bgloc" && notify-send -i "$bgloc" "Lock screen wallpaper has been changed." ;;
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random lock screen wallpaper chosen." ;;
image/* ) ln -f "$(readlink -f "$2")" "$wall_lock" && notify-send -i "$wall_lock" "Lock screen wallpaper has been changed." ;;
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$wall_lock" && notify-send -i "$wall_lock" "Random lock screen wallpaper chosen." ;;
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
esac ;;
*) cat << EOF