From ca968c4e5040f1ff4b5b5e12d9312360d807dcc1 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 3 Jun 2024 19:56:39 +0800 Subject: added submodules, change . -> dot (see man stow --dotfiles) --- dot-config/rofi/scripts/rofi_wallpaper | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 dot-config/rofi/scripts/rofi_wallpaper (limited to 'dot-config/rofi/scripts/rofi_wallpaper') diff --git a/dot-config/rofi/scripts/rofi_wallpaper b/dot-config/rofi/scripts/rofi_wallpaper new file mode 100755 index 00000000..b0be1000 --- /dev/null +++ b/dot-config/rofi/scripts/rofi_wallpaper @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +#CM_LAUNCHER=rofi +DIR="$HOME/.config/rofi" +RASI="$DIR/wallpaper.rasi" +mesg="Please Select a Wallpaper" + +# Define the directory to list files from +directory="$HOME/Pictures/wallpapers" + +# Use `ls` to list the files in the directory +files=$(ls $directory) + +# Use rofi to display the list of files +chosen=$(echo $files | tr " " "\n" | rofi -dmenu -theme ${RASI} -separator-style plain) + +# Check if a file was selected +if [ -n "$chosen" ]; then + # Run a command with the selected file as an argument + feh $chosen +fi -- cgit v1.2.3