Created dedicated wallapers.sh script and added betterlockscreen to i3

This commit is contained in:
Random936
2024-02-14 21:38:42 -08:00
parent 64432a0a40
commit 5974ae879e
3 changed files with 23 additions and 31 deletions

View File

@@ -1,16 +1,11 @@
#!/bin/bash
# Load screen layout script if it exists
script="$HOME/.screenlayout/layout.sh"
if [ -f "$script" ]; then
$script
fi
function load_script() {
if [ -f "$1" ]; then
$1
fi
}
# Dynamically load background with feh
feh_command="feh --bg-fill"
while read resolution; do
feh_command="$feh_command ~/Pictures/wallpaper-$resolution.jpg"
done < <(xrandr | grep ' connected' | grep -oP '[0-9]+x[0-9]+\+[0-9]+\+[0-9]+' | cut -d '+' -f 1)
load_script "$HOME/.screenlayout/layout.sh" # screen layout script
load_script "$HOME/.screenlayout/wallpapers.sh" # wallpapers script
echo "$feh_command"
eval "$feh_command"

View File

@@ -0,0 +1,10 @@
#!/bin/bash
# Dynamically load background with feh
feh_command="feh --bg-fill"
while read resolution; do
feh_command="$feh_command ~/Pictures/wallpaper-$resolution.jpg"
done < <(xrandr | grep ' connected' | grep -oP '[0-9]+x[0-9]+\+[0-9]+\+[0-9]+' | cut -d '+' -f 1)
echo "$feh_command"
eval "$feh_command"