From 32247d59a2ea42542328071c3784bec753b8ce00 Mon Sep 17 00:00:00 2001 From: krolxon Date: Wed, 13 Aug 2025 15:01:43 +0530 Subject: use Fira Code as font, add setwall script --- .local/bin/genwall | 18 ------------------ .local/bin/randomwall | 17 ----------------- .local/bin/screenshot | 6 +++--- .local/bin/setwall | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 38 deletions(-) delete mode 100755 .local/bin/genwall delete mode 100755 .local/bin/randomwall create mode 100755 .local/bin/setwall (limited to '.local') diff --git a/.local/bin/genwall b/.local/bin/genwall deleted file mode 100755 index ccbe75e..0000000 --- a/.local/bin/genwall +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# Dependencies: -# convert wal xdotool xwallpaper - -wall_dir=~/pix/wall - -if [ -z "$1" ]; then - wall="$(find "$wall_dir" -type f -name "*.jpg" -o -name "*.png" | shuf -n1)" -else - wall="$1" -fi - -convert "$wall" ~/.local/share/bg.jpg -xwallpaper --zoom ~/.local/share/bg.jpg -wal -c -wal -i ~/.local/share/bg.jpg -xdotool key super+F5 diff --git a/.local/bin/randomwall b/.local/bin/randomwall deleted file mode 100755 index fee4482..0000000 --- a/.local/bin/randomwall +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -WALL_DIR="$HOME/pix/wallpapers/onedarkwallpapers/" -NEW_WALL=$(find "$WALL_DIR" -type f | shuf -n 1) - -if ! pgrep -x hyprpaper >/dev/null; then - # hyprpaper not running → write config and start it - cat > ~/.config/hypr/hyprpaper.conf <&2; exit 1 ;; + :) echo "Option -$OPTARG requires an argument." >&2; exit 1 ;; + esac +done + +# Choose wallpaper +case $MODE in + random) + NEW_WALL=$(find "$WALL_DIR" -type f | shuf -n 1) + ;; + path) + if [[ -f "$CUSTOM_PATH" ]]; then + NEW_WALL="$CUSTOM_PATH" + else + echo "Error: File not found -> $CUSTOM_PATH" >&2 + exit 1 + fi + ;; + menu) + WALLPAPER_LIST=$(find "$WALL_DIR" -type f | sort | sed "s|$WALL_DIR||") + CHOSEN=$(echo "$WALLPAPER_LIST" | rofi -dmenu -i -p "Choose wallpaper:") + if [[ -z "$CHOSEN" ]]; then + NEW_WALL=$(find "$WALL_DIR" -type f | shuf -n 1) + else + NEW_WALL="$WALL_DIR$CHOSEN" + fi + ;; +esac + +# Apply wallpaper +if ! pgrep -x hyprpaper >/dev/null; then + # Hyprpaper not running → start with chosen wallpaper + cat > ~/.config/hypr/hyprpaper.conf <