Compare commits
No commits in common. "8bc648a7d0b27c6a5078f92f2cbb0bcccdba1b2d" and "fd716ae8a2b2eab8efe1b03921086d0c6620f79e" have entirely different histories.
8bc648a7d0
...
fd716ae8a2
|
@ -1 +0,0 @@
|
||||||
2854
|
|
|
@ -1,61 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
##set working directory to location of this script
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
|
|
||||||
PIDFILE=bg_slideshow.pid
|
|
||||||
remove_pidfile()
|
|
||||||
{
|
|
||||||
rm -f "$PIDFILE"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -f "$PIDFILE" ]; then
|
|
||||||
kill -9 "$(cat $PIDFILE)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${1} == kill ]]; then
|
|
||||||
echo "killing myslef, byeeee"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo $$ > "$PIDFILE"
|
|
||||||
|
|
||||||
|
|
||||||
bgsDirectory="/home/andrzej/bgs/"
|
|
||||||
path=${1}
|
|
||||||
duration=${2}
|
|
||||||
|
|
||||||
|
|
||||||
echo "path: ${path}, duration: ${duration}"
|
|
||||||
|
|
||||||
#ARGS $1:directory e.g. chsck
|
|
||||||
chooseRandom(){
|
|
||||||
shopt -s nullglob
|
|
||||||
files=("${bgsDirectory}${1}/"*)
|
|
||||||
length=$((${#files[@]}))
|
|
||||||
echo "length: ${length}"
|
|
||||||
randomIndex=$(($RANDOM % $length))
|
|
||||||
echo "random index: ${randomIndex}"
|
|
||||||
##re-roll if the result is a directory
|
|
||||||
while [[ -d ${files[$randomIndex]} ]]
|
|
||||||
do
|
|
||||||
echo "${files[randomIndex]} is a directory!"
|
|
||||||
randomIndex=$(($RANDOM % $length))
|
|
||||||
done
|
|
||||||
image="${files[$randomIndex]}"
|
|
||||||
echo ${image}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
chooseRandom ${path}
|
|
||||||
hyprctl hyprpaper preload "${image}"
|
|
||||||
hyprctl hyprpaper wallpaper ",contain:${image}"
|
|
||||||
sleep $duration
|
|
||||||
hyprpaper unload all
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
bgsDirectory="${HOME}/bgs/"
|
|
||||||
|
|
||||||
##set working directory to location of this script
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
|
|
||||||
##stop slideshow if running
|
|
||||||
sh ./hyprland-slideshow.sh kill
|
|
||||||
|
|
||||||
|
|
||||||
preloadImage(){
|
|
||||||
hyprctl hyprpaper preload "${image}"
|
|
||||||
}
|
|
||||||
|
|
||||||
setImage() {
|
|
||||||
hyprctl hyprpaper wallpaper ",contain:${image}"
|
|
||||||
}
|
|
||||||
|
|
||||||
#ARGS $1:directory e.g. chsck
|
|
||||||
chooseRandom(){
|
|
||||||
shopt -s nullglob
|
|
||||||
files=("${bgsDirectory}${1}/"*)
|
|
||||||
length=$((${#files[@]}))
|
|
||||||
echo "length: ${length}"
|
|
||||||
randomIndex=$(($RANDOM % $length))
|
|
||||||
echo "random index: ${randomIndex}"
|
|
||||||
##re-roll if the result is a directory
|
|
||||||
while [[ -d ${files[$randomIndex]} ]]
|
|
||||||
do
|
|
||||||
echo "${files[randomIndex]} is a directory!"
|
|
||||||
randomIndex=$(($RANDOM % $length))
|
|
||||||
done
|
|
||||||
image="${files[$randomIndex]}"
|
|
||||||
echo ${image}
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
image="${bgsDirectory}default.jpg"
|
|
||||||
preloadImage image
|
|
||||||
setImage image
|
|
||||||
else
|
|
||||||
chooseRandom ${1}
|
|
||||||
preloadImage
|
|
||||||
setImage
|
|
||||||
fi
|
|
||||||
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
hyprctl hyprpaper unload all
|
|
|
@ -187,8 +187,8 @@ bind = $mainMod, k, movefocus, u
|
||||||
bind = $mainMod, j, movefocus, d
|
bind = $mainMod, j, movefocus, d
|
||||||
|
|
||||||
#background bg switcheroo
|
#background bg switcheroo
|
||||||
bind = $mainMod SHIFT, W, exec, $HOME/.config/hypr/bg-scripts/hyprland-switch-bg.sh chsck
|
bind = $mainMod SHIFT, W, exec, /home/andrzej/scripts/hyprland-switch-bg.sh chsck
|
||||||
bind = $mainMod , W, exec, $HOME/.config/hypr/bg-scripts/hyprland-switch-bg.sh
|
bind = $mainMod , W, exec, /home/andrzej/scripts/hyprland-switch-bg.sh
|
||||||
|
|
||||||
# Switch workspaces with mainMod + [0-9]
|
# Switch workspaces with mainMod + [0-9]
|
||||||
bind = $mainMod, 1, workspace, 1
|
bind = $mainMod, 1, workspace, 1
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
alias update="apt update && apt upgrade -y"
|
alias update="apt update && apt upgrade -y"
|
||||||
alias tidal="/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=com.mastermindzh.tidal-hifi com.mastermindzh.tidal-hifi &"
|
alias tidal="/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=com.mastermindzh.tidal-hifi com.mastermindzh.tidal-hifi &"
|
||||||
alias devsesh="$HOME/scripts/tmux-dev-session.sh"
|
alias devsesh="$HOME/scripts/tmux-dev-session.sh"
|
||||||
alias slides="nohup ${HOME}/.config/hypr/bg-scripts/hyprland-slideshow.sh"
|
alias slides="nohup ${HOME}/scripts/hyprland-slideshow.sh"
|
||||||
alias ls="ls --color=auto"
|
alias ls="ls --color=auto"
|
||||||
|
|
||||||
alias fzf='fzf --preview='\''
|
alias fzf='fzf --preview='\''
|
||||||
|
|
Loading…
Reference in New Issue