initial commit

This commit is contained in:
2023-03-08 15:02:58 +01:00
commit ac1442d89f
11 changed files with 775 additions and 0 deletions

12
i3/scripts/i3lock_blur.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
tmp1=$(mktemp --suffix=.png)
tmp2=$(mktemp --suffix=.png)
scrot -o $tmp1
ffmpeg -i $tmp1 -vf "boxblur=10:1" -vframes 1 -y $tmp2 -loglevel quiet
i3lock -i $tmp2
rm $tmp1
rm $tmp2

14
i3/scripts/i3lock_pixel.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
tmp1=$(mktemp --suffix=.png)
tmp2=$(mktemp --suffix=.png)
scrot -o $tmp1
rescale_factor=20
dimensions=$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of "csv=p=0:s=\:" -loglevel quiet $tmp1)
ffmpeg -i $tmp1 -filter_complex "[0:v] scale='iw/$rescale_factor:-1', scale='$dimensions:flags=neighbor'" -loglevel quiet -y $tmp2
i3lock -i $tmp2
rm $tmp1
rm $tmp2

44
i3/scripts/wallpapercolor.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/bash
alpha="95"
saturation="0.5"
colorscheme="sexy-zenburn"
# Backends: colorthief, colorz, haishoku, wal
backend="colorz"
# "$@" ist das erste Argument
#img="$(find ./ -type f | shuf -n 1)"
if [[ -d "$@" ]]; then
cd "$@"
img="$(find $@/ -type f | shuf -n 1)"
elif [[ -f "$@" ]]; then
img="$@"
else echo "usage: ./wallpapercolor.sh [file/dir ...]";
exit 1
fi
cp $img "$HOME/.cache/background"
if [[ $I3SOCK = *i3/ipc-socket* ]]; then
killall polybar
#feh --bg-fill $img
#wal -a $alpha -n --theme $colorscheme
#wal -a $alpha --saturate $saturation --backend $backend -i "$img"
wal -a 99 --saturate $saturation --backend $backend -i "$img" -n
feh --bg-fill $img
~/.config/polybar/start-polybar.sh
killall dunst; notify-send -u low "extracted colors from $img"
fi
if [[ $DESKTOP_SESSION = *sway ]]; then
killall waybar
~/.config/mako/mako-walcolors.sh
wal -a $alpha -n --saturate $saturation --backend $backend -i "$img"
waybar
fi
#wal -a $alpha -n --theme $colorscheme
# Sway i3 config to make this work:
# ~/.config/sway/config
# output * bg $HOME/.cache/background fill