-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
video-wall: add init and dmenu selection scripts
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
# Script to initialize the list of video wallpapers downloaded from the Wallpaper Engine Steam Workshop or other sources | ||
|
||
|
||
# Path to the Wallpaper Engine Steam Workshop directory | ||
WALLENGINE_DIR="/mnt/storage/SteamLibrary/steamapps/workshop/content/431960" | ||
# Path to the directory where you store your own video wallpapers | ||
VIDEOWALL_DIR="$HOME/Videos/wallpapers" | ||
# Path to the file where the list of video wallpapers will be stored | ||
LIST_FILE="/tmp/video-wallpapers" | ||
|
||
# Get the list of video files from the Wallpaper Engine Steam Workshop | ||
echo "Getting the list of video files from the Wallpaper Engine Steam Workshop..." | ||
echo "This may take a while..." | ||
find $WALLENGINE_DIR -type f -exec file -N -i -- {} + | grep video | cut --delimiter=":" --fields=1 | sort > $LIST_FILE | ||
echo "Done." | ||
echo "Getting the list of video files from the $VIDEOWALL_DIR directory..." | ||
find $VIDEOWALL_DIR -type f -exec file -N -i -- {} + | grep video | cut --delimiter=":" --fields=1 | sort >> $LIST_FILE | ||
echo "Done." | ||
|
||
echo "The list of video wallpapers is stored in $LIST_FILE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
# Script to select a video wallpaper downloaded from the Wallpaper Engine Steam Workshop | ||
# and set it as the current wallpaper with mpvpaper. | ||
# Requires: mpvpaper, file, grep, cut | ||
# | ||
# Usage: select-video-wallpaper.sh | ||
# Author: wizzdom | ||
|
||
# dmenu to use | ||
DMENU="wofi --dmenu" | ||
|
||
# default video wallpaper | ||
DEFAULT="$HOME/Videos/wallpapers/default.mp4" | ||
|
||
LIST_FILE="/tmp/video-wallpapers" | ||
|
||
SELECTED=$(cat $LIST_FILE | $DMENU -i -p "Select a video wallpaper") | ||
|
||
# Set the selected video as default wallpaper | ||
if [ -f "$DEFAULT" ]; then | ||
rm -f "$DEFAULT" | ||
fi | ||
|
||
ln -sf "$SELECTED" "$DEFAULT" | ||
|
||
# Set the selected video as the current wallpaper | ||
$HOME/scripts/video-wall.sh "$SELECTED" |