init
This commit is contained in:
commit
b4cdb80b5c
137 changed files with 6383 additions and 0 deletions
35
bin/.bin/randwall
Executable file
35
bin/.bin/randwall
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Kill any existing swaybg or feh instances
|
||||
pkill swaybg
|
||||
pkill feh
|
||||
|
||||
# Function to set wallpaper using swaybg on Sway
|
||||
set_wallpaper_sway() {
|
||||
swaymsg -t get_outputs -r | jq -r ".[].name" | parallel 'swaybg -o {} -i $(find ~/Pictures/* -type f | shuf -n 1) &'
|
||||
}
|
||||
|
||||
# Function to set wallpaper using swaybg on Hyprland
|
||||
set_wallpaper_hyprland() {
|
||||
hyprctl monitors -j | jq -r ".[].name" | parallel 'swaybg -o {} -i $(find ~/Pictures/* -type f | shuf -n 1) &'
|
||||
}
|
||||
|
||||
# Function to set wallpaper using feh on i3
|
||||
set_wallpaper_i3() {
|
||||
# Count number of connected monitors
|
||||
monitor_count=$(xrandr --query | grep " connected" | wc -l)
|
||||
|
||||
# Get random wallpapers equal to monitor count
|
||||
readarray -t wallpapers < <(find ~/Pictures/* -type f | shuf -n "$monitor_count")
|
||||
|
||||
# Construct the feh command with multiple --bg-fill arguments
|
||||
cmd="feh"
|
||||
for wallpaper in "${wallpapers[@]}"; do
|
||||
cmd+=" --bg-fill '$wallpaper'"
|
||||
done
|
||||
|
||||
# Execute the command
|
||||
eval "$cmd"
|
||||
}
|
||||
|
||||
set_wallpaper_sway
|
Loading…
Add table
Add a link
Reference in a new issue