diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-06-03 19:56:39 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-06-03 19:56:39 +0800 |
| commit | ca968c4e5040f1ff4b5b5e12d9312360d807dcc1 (patch) | |
| tree | 9900920e8f566794560c1519678e344351d2803b /dot-config/rofi/scripts/rofi_wallpaper | |
| parent | 5f3deaff0bf006a1a353e57b82ad48c0e8f143bc (diff) | |
added submodules, change . -> dot (see man stow --dotfiles)
Diffstat (limited to 'dot-config/rofi/scripts/rofi_wallpaper')
| -rwxr-xr-x | dot-config/rofi/scripts/rofi_wallpaper | 21 |
1 files changed, 21 insertions, 0 deletions
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 |
