16 changed files with 200 additions and 70 deletions
@ -0,0 +1,99 @@ |
|||||||
|
#!/bin/bash |
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # |
||||||
|
# Wallpaper Effects using imagemagick |
||||||
|
# Inspiration from ML4W - Stephan Raabe https://gitlab.com/stephan-raabe/dotfiles |
||||||
|
|
||||||
|
# variables |
||||||
|
current_wallpaper="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" |
||||||
|
wallpaper_output="$HOME/.config/hypr/wallpaper_effects/.wallpaper_modified" |
||||||
|
SCRIPTSDIR="$HOME/.config/hypr/scripts" |
||||||
|
focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') |
||||||
|
|
||||||
|
# Directory for swaync |
||||||
|
iDIR="$HOME/.config/swaync/images" |
||||||
|
|
||||||
|
# swww transition config |
||||||
|
FPS=60 |
||||||
|
TYPE="wipe" |
||||||
|
DURATION=2 |
||||||
|
BEZIER=".43,1.19,1,.4" |
||||||
|
SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION" |
||||||
|
|
||||||
|
# Define ImageMagick effects |
||||||
|
# https://imagemagick.org/script/magick.php |
||||||
|
|
||||||
|
declare -A effects=( |
||||||
|
["Black & White"]="magick $current_wallpaper -set colorspace Gray -separate -average $wallpaper_output" |
||||||
|
["Blurred"]="magick $current_wallpaper -blur "20x30" $wallpaper_output" |
||||||
|
["Solarize"]="magick $current_wallpaper -solarize 80% $wallpaper_output" |
||||||
|
["Sepia Tone"]="magick $current_wallpaper -sepia-tone 65% $wallpaper_output" |
||||||
|
["Negate"]="magick $current_wallpaper -negate $wallpaper_output" |
||||||
|
["Charcoal"]="magick $current_wallpaper -charcoal "10x10" $wallpaper_output" |
||||||
|
["No Effects"]="no-effects" |
||||||
|
) |
||||||
|
|
||||||
|
# Function to apply no effects |
||||||
|
no_effects() { |
||||||
|
swww img -o "$focused_monitor" "$current_wallpaper" $SWWW_PARAMS & |
||||||
|
# Wait for swww command to complete |
||||||
|
wait $! |
||||||
|
# Run other commands after swww |
||||||
|
wallust run "$current_wallpaper" -s & |
||||||
|
# Wait to complete |
||||||
|
wait $! |
||||||
|
# Refresh rofi, waybar, wallust palettes |
||||||
|
"${SCRIPTSDIR}/Refresh.sh" |
||||||
|
notify-send -u low -i "$iDIR/bell.png" "No wallpaper effects" |
||||||
|
|
||||||
|
# copying wallpaper for rofi menu |
||||||
|
cp $current_wallpaper $wallpaper_output |
||||||
|
} |
||||||
|
|
||||||
|
# Function to run rofi menu |
||||||
|
main() { |
||||||
|
# Populate rofi menu options |
||||||
|
options="No Effects\n" |
||||||
|
for effect in "${!effects[@]}"; do |
||||||
|
if [ "$effect" != "No Effects" ]; then |
||||||
|
options+="$effect\n" |
||||||
|
fi |
||||||
|
done |
||||||
|
|
||||||
|
# rofi |
||||||
|
choice=$(echo -e "$options" | rofi -i -dmenu -config ~/.config/rofi/config-wallpaper-effect.rasi) |
||||||
|
if [ ! -z "$choice" ]; then |
||||||
|
# Check if the choice exists in the array |
||||||
|
if [[ "${effects[$choice]+exists}" ]]; then |
||||||
|
if [ "$choice" == "No Effects" ]; then |
||||||
|
no_effects |
||||||
|
else |
||||||
|
# Apply selected effect |
||||||
|
notify-send -u normal -i "$iDIR/bell.png" "Applying $choice effects" |
||||||
|
eval "${effects[$choice]}" |
||||||
|
# Wait for effects to be applied |
||||||
|
sleep 1 |
||||||
|
# Execute swww command after image conversion |
||||||
|
swww img -o "$focused_monitor" "$wallpaper_output" $SWWW_PARAMS & |
||||||
|
# Wait for swww command to complete |
||||||
|
wait $! |
||||||
|
# Run other commands after swww |
||||||
|
wallust run "$wallpaper_output" -s & |
||||||
|
# Wait for other commands to finish |
||||||
|
wait $! |
||||||
|
# Refresh rofi, waybar, wallust palettes |
||||||
|
"${SCRIPTSDIR}/Refresh.sh" |
||||||
|
notify-send -u low -i "$iDIR/bell.png" "$choice effects applied" |
||||||
|
fi |
||||||
|
else |
||||||
|
echo "Effects not recognized." |
||||||
|
fi |
||||||
|
fi |
||||||
|
} |
||||||
|
|
||||||
|
# Check if rofi is already running |
||||||
|
if pidof rofi > /dev/null; then |
||||||
|
pkill rofi |
||||||
|
exit 0 |
||||||
|
fi |
||||||
|
|
||||||
|
main |
||||||
|
After Width: | Height: | Size: 8.0 MiB |
|
After Width: | Height: | Size: 8.0 MiB |
@ -1,18 +1,18 @@ |
|||||||
$background = rgb(060402) |
$background = rgb(010001) |
||||||
$foreground = rgb(D1F8FD) |
$foreground = rgb(FBF8ED) |
||||||
$color0 = rgb(060402) |
$color0 = rgb(010001) |
||||||
$color1 = rgb(7A6835) |
$color1 = rgb(020102) |
||||||
$color2 = rgb(677762) |
$color2 = rgb(421C20) |
||||||
$color3 = rgb(2586B5) |
$color3 = rgb(2C3034) |
||||||
$color4 = rgb(998C72) |
$color4 = rgb(475654) |
||||||
$color5 = rgb(94A7B8) |
$color5 = rgb(986356) |
||||||
$color6 = rgb(5CB1BC) |
$color6 = rgb(B6B099) |
||||||
$color7 = rgb(B5EDF4) |
$color7 = rgb(F1ECDD) |
||||||
$color8 = rgb(7EA6AB) |
$color8 = rgb(A8A59B) |
||||||
$color9 = rgb(A38A46) |
$color9 = rgb(030203) |
||||||
$color10 = rgb(899F83) |
$color10 = rgb(58252B) |
||||||
$color11 = rgb(31B2F1) |
$color11 = rgb(3B4045) |
||||||
$color12 = rgb(CCBA98) |
$color12 = rgb(5F7370) |
||||||
$color13 = rgb(C6DEF5) |
$color13 = rgb(CB8473) |
||||||
$color14 = rgb(7BECFA) |
$color14 = rgb(F3EACC) |
||||||
$color15 = rgb(B5EDF4) |
$color15 = rgb(F1ECDD) |
||||||
|
|||||||
@ -1,28 +1,28 @@ |
|||||||
* { |
* { |
||||||
active-background: #0B0E22; |
active-background: #030203; |
||||||
active-foreground: #F7F0FA; |
active-foreground: #FBF8ED; |
||||||
normal-background: #020206; |
normal-background: #010001; |
||||||
normal-foreground: #F7F0FA; |
normal-foreground: #FBF8ED; |
||||||
urgent-background: #805673; |
urgent-background: #5F7370; |
||||||
urgent-foreground: #F7F0FA; |
urgent-foreground: #FBF8ED; |
||||||
|
|
||||||
alternate-active-background: #737EA6; |
alternate-active-background: #986356; |
||||||
alternate-active-foreground: #F7F0FA; |
alternate-active-foreground: #FBF8ED; |
||||||
alternate-normal-background: #020206; |
alternate-normal-background: #010001; |
||||||
alternate-normal-foreground: #F7F0FA; |
alternate-normal-foreground: #FBF8ED; |
||||||
alternate-urgent-background: #020206; |
alternate-urgent-background: #010001; |
||||||
alternate-urgent-foreground: #F7F0FA; |
alternate-urgent-foreground: #FBF8ED; |
||||||
|
|
||||||
selected-active-background: #0B0E22; |
selected-active-background: #030203; |
||||||
selected-active-foreground: #F7F0FA; |
selected-active-foreground: #FBF8ED; |
||||||
selected-normal-background: #EBE1F0; |
selected-normal-background: #F1ECDD; |
||||||
selected-normal-foreground: #F7F0FA; |
selected-normal-foreground: #FBF8ED; |
||||||
selected-urgent-background: #805673; |
selected-urgent-background: #5F7370; |
||||||
selected-urgent-foreground: #F7F0FA; |
selected-urgent-foreground: #FBF8ED; |
||||||
|
|
||||||
background-color: #020206; |
background-color: #010001; |
||||||
background: rgba(0,0,0,0.7); |
background: rgba(0,0,0,0.7); |
||||||
foreground: #EBE1F0; |
foreground: #F1ECDD; |
||||||
border-color: #0B0E22; |
border-color: #030203; |
||||||
} |
} |
||||||
|
|
||||||
|
|||||||
@ -1,20 +1,20 @@ |
|||||||
@define-color foreground #F7F0FA; |
@define-color foreground #FBF8ED; |
||||||
@define-color background rgba(2,2,6,0.25); |
@define-color background rgba(1,0,1,0.25); |
||||||
@define-color cursor #F7F0FA; |
@define-color cursor #FBF8ED; |
||||||
|
|
||||||
@define-color color0 #020206; |
@define-color color0 #010001; |
||||||
@define-color color1 #080A19; |
@define-color color1 #020102; |
||||||
@define-color color2 #1B2453; |
@define-color color2 #421C20; |
||||||
@define-color color3 #1E295C; |
@define-color color3 #2C3034; |
||||||
@define-color color4 #604156; |
@define-color color4 #475654; |
||||||
@define-color color5 #737EA6; |
@define-color color5 #986356; |
||||||
@define-color color6 #AE9FB5; |
@define-color color6 #B6B099; |
||||||
@define-color color7 #EBE1F0; |
@define-color color7 #F1ECDD; |
||||||
@define-color color8 #A59EA8; |
@define-color color8 #A8A59B; |
||||||
@define-color color9 #0B0E22; |
@define-color color9 #030203; |
||||||
@define-color color10 #24316E; |
@define-color color10 #58252B; |
||||||
@define-color color11 #28367A; |
@define-color color11 #3B4045; |
||||||
@define-color color12 #805673; |
@define-color color12 #5F7370; |
||||||
@define-color color13 #99A8DD; |
@define-color color13 #CB8473; |
||||||
@define-color color14 #E8D4F1; |
@define-color color14 #F3EACC; |
||||||
@define-color color15 #EBE1F0; |
@define-color color15 #F1ECDD; |
||||||
|
|||||||
|
Before Width: | Height: | Size: 12 MiB |
|
After Width: | Height: | Size: 8.0 MiB |
Loading…
Reference in new issue