diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2024-06-03 18:23:35 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-03 18:23:35 +0900 |
| commit | 45b61327e9dc7c40181cc3046eeb75bce4cb0d9c (patch) | |
| tree | 809c3bd4a1298804e17c4601612ac54befd42bb6 /config/hypr | |
| parent | 203b530e6b61e53cff322fd822dc70a5e611b35f (diff) | |
| parent | 8f64f407e24e89f2115287804200eb186e175ca9 (diff) | |
Merge pull request #323 from JaKooLit/development
Development to main - Pre-release
Diffstat (limited to 'config/hypr')
| -rw-r--r-- | config/hypr/UserConfigs/ENVariables.conf | 1 | ||||
| -rw-r--r-- | config/hypr/UserConfigs/UserSettings.conf | 2 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperEffects.sh | 99 | ||||
| -rw-r--r-- | config/hypr/configs/Keybinds.conf | 1 | ||||
| -rw-r--r-- | config/hypr/hyprlock.conf | 12 | ||||
| -rwxr-xr-x | config/hypr/initial-boot.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/WallustSwww.sh | 4 | ||||
| -rw-r--r-- | config/hypr/wallpaper_effects/.wallpaper_current | bin | 0 -> 8355381 bytes | |||
| -rw-r--r-- | config/hypr/wallpaper_effects/.wallpaper_modified | bin | 0 -> 8355381 bytes | |||
| -rw-r--r-- | config/hypr/wallust/wallust-hyprland.conf | 36 |
10 files changed, 131 insertions, 28 deletions
diff --git a/config/hypr/UserConfigs/ENVariables.conf b/config/hypr/UserConfigs/ENVariables.conf index c6bea01b..ea4af035 100644 --- a/config/hypr/UserConfigs/ENVariables.conf +++ b/config/hypr/UserConfigs/ENVariables.conf @@ -38,6 +38,7 @@ env = ELECTRON_OZONE_PLATFORM_HINT,auto #env = NVD_BACKEND,direct # FOR VM and POSSIBLY NVIDIA +#env = WLR_NO_HARDWARE_CURSORS,1 #env = WLR_RENDERER_ALLOW_SOFTWARE,1 # nvidia firefox (for hardware acceleration on FF)? diff --git a/config/hypr/UserConfigs/UserSettings.conf b/config/hypr/UserConfigs/UserSettings.conf index be8e4845..8d137cc8 100644 --- a/config/hypr/UserConfigs/UserSettings.conf +++ b/config/hypr/UserConfigs/UserSettings.conf @@ -150,4 +150,4 @@ xwayland { # cursor section for Hyprland v0.41.0 or newer #cursor { # enable_hyprcursor = true -#}
\ No newline at end of file +#} diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh new file mode 100755 index 00000000..9122da34 --- /dev/null +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -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 diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index a270ab6f..dbec4d10 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -34,6 +34,7 @@ bind = $mainMod SHIFT, N, exec, swaync-client -t -sw # swayNC panel bind = $mainMod, E, exec, $UserScripts/QuickEdit.sh # Quick Edit Hyprland Settings bind = $mainMod SHIFT, M, exec, $UserScripts/RofiBeats.sh # online music bind = $mainMod, W, exec, $UserScripts/WallpaperSelect.sh # Select wallpaper to apply +bind = $mainMod SHIFT, W, exec, $UserScripts/WallpaperEffects.sh # Wallpaper Effects by imagemagickWW bind = CTRL ALT, W, exec, $UserScripts/WallpaperRandom.sh # Random wallpapers # Waybar / Bar related diff --git a/config/hypr/hyprlock.conf b/config/hypr/hyprlock.conf index c763bc90..94dc6375 100644 --- a/config/hypr/hyprlock.conf +++ b/config/hypr/hyprlock.conf @@ -12,13 +12,13 @@ general { background { monitor = - path = screenshot # screenshot of your desktop - # path = $HOME/.config/rofi/.current_wallpaper # NOTE only png supported for now - color = $color7 + #path = screenshot # screenshot of your desktop + path = $HOME/.config/hypr/wallpaper_effects/.wallpaper_modified # NOTE only png supported for now + #color = $color7 # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations - blur_size = 6 - blur_passes = 2 # 0 disables blurring + blur_size = 5 + blur_passes = 1 # 0 disables blurring noise = 0.0117 contrast = 1.3000 # Vibrant!!! brightness = 0.8000 @@ -124,7 +124,7 @@ label { # Put a picture of choice here. Default is the current wallpaper image { monitor = - path = $HOME/.config/rofi/.current_wallpaper + path = $HOME/.config/hypr/wallpaper_effects/.wallpaper_current size = 230 rounding = -1 border_size = 2 diff --git a/config/hypr/initial-boot.sh b/config/hypr/initial-boot.sh index 75d88c1b..0e922632 100755 --- a/config/hypr/initial-boot.sh +++ b/config/hypr/initial-boot.sh @@ -7,8 +7,8 @@ # Variables scriptsDir=$HOME/.config/hypr/scripts -wallpaper=$HOME/Pictures/wallpapers/Lofi-Computer.png -waybar_style="$HOME/.config/waybar/style/[Colored] Chroma Glow.css" +wallpaper=$HOME/Pictures/wallpapers/Lofi-Anime-Room.png +waybar_style="$HOME/.config/waybar/[Wallust] Box type.css" kvantum_theme="Catppuccin-Mocha" color_scheme="prefer-dark" gtk_theme="Andromeda-dark" diff --git a/config/hypr/scripts/WallustSwww.sh b/config/hypr/scripts/WallustSwww.sh index 2a711028..dbf5c32f 100755 --- a/config/hypr/scripts/WallustSwww.sh +++ b/config/hypr/scripts/WallustSwww.sh @@ -22,10 +22,12 @@ if [ -f "$cache_file" ]; then # Get the wallpaper path from the cache file wallpaper_path=$(cat "$cache_file") echo $wallpaper_path - # Copy the wallpaper to the location Rofi can access + # symlink the wallpaper to the location Rofi can access if ln -sf "$wallpaper_path" "$HOME/.config/rofi/.current_wallpaper"; then ln_success=true # Set the flag to true upon successful execution fi + # copy the wallpaper for wallpaper effects + cp -r "$wallpaper_path" "$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" fi # Check the flag before executing further commands diff --git a/config/hypr/wallpaper_effects/.wallpaper_current b/config/hypr/wallpaper_effects/.wallpaper_current Binary files differnew file mode 100644 index 00000000..54ccecf0 --- /dev/null +++ b/config/hypr/wallpaper_effects/.wallpaper_current diff --git a/config/hypr/wallpaper_effects/.wallpaper_modified b/config/hypr/wallpaper_effects/.wallpaper_modified Binary files differnew file mode 100644 index 00000000..54ccecf0 --- /dev/null +++ b/config/hypr/wallpaper_effects/.wallpaper_modified diff --git a/config/hypr/wallust/wallust-hyprland.conf b/config/hypr/wallust/wallust-hyprland.conf index dbd7785e..0b964a31 100644 --- a/config/hypr/wallust/wallust-hyprland.conf +++ b/config/hypr/wallust/wallust-hyprland.conf @@ -1,18 +1,18 @@ -$background = rgb(060402) -$foreground = rgb(D1F8FD) -$color0 = rgb(060402) -$color1 = rgb(7A6835) -$color2 = rgb(677762) -$color3 = rgb(2586B5) -$color4 = rgb(998C72) -$color5 = rgb(94A7B8) -$color6 = rgb(5CB1BC) -$color7 = rgb(B5EDF4) -$color8 = rgb(7EA6AB) -$color9 = rgb(A38A46) -$color10 = rgb(899F83) -$color11 = rgb(31B2F1) -$color12 = rgb(CCBA98) -$color13 = rgb(C6DEF5) -$color14 = rgb(7BECFA) -$color15 = rgb(B5EDF4) +$background = rgb(010001) +$foreground = rgb(FBF8ED) +$color0 = rgb(010001) +$color1 = rgb(020102) +$color2 = rgb(421C20) +$color3 = rgb(2C3034) +$color4 = rgb(475654) +$color5 = rgb(986356) +$color6 = rgb(B6B099) +$color7 = rgb(F1ECDD) +$color8 = rgb(A8A59B) +$color9 = rgb(030203) +$color10 = rgb(58252B) +$color11 = rgb(3B4045) +$color12 = rgb(5F7370) +$color13 = rgb(CB8473) +$color14 = rgb(F3EACC) +$color15 = rgb(F1ECDD) |
