diff --git a/hyprland/appearance.conf b/hypr/appearance.conf similarity index 92% rename from hyprland/appearance.conf rename to hypr/appearance.conf index 2e4d921..ae345f9 100644 --- a/hyprland/appearance.conf +++ b/hypr/appearance.conf @@ -3,17 +3,18 @@ ## APPEARANCE ## ################ - # See https://wiki.hyprland.org/Configuring/Variables for more information on how to configure appearance +source = ~/.cache/wal/colors-hypr.conf + general { gaps_in = 4 gaps_out = 6 border_size = 2 - col.active_border = rgb(AC8A3D) - col.inactive_border = rgb(313244) + col.active_border = $color1 + col.inactive_border = $background resize_on_border = false diff --git a/hyprland/autostart.conf b/hypr/autostart.conf similarity index 94% rename from hyprland/autostart.conf rename to hypr/autostart.conf index 3566cf5..51ce8c9 100644 --- a/hyprland/autostart.conf +++ b/hypr/autostart.conf @@ -9,6 +9,9 @@ exec-once = swaync # Run notification center / daemon exec-once = hyprpaper exec-once = hypridle # Idle daemon for Hyprland +# Re-run pywal +exec-once = wal -R + # Clipboard manager exec-once = wl-paste --type text --watch cliphist store # Stores text exec-once = wl-paste --type image --watch cliphist store # Stores images diff --git a/hyprland/bindings.conf b/hypr/bindings.conf similarity index 90% rename from hyprland/bindings.conf rename to hypr/bindings.conf index f764c4c..dee3b36 100644 --- a/hyprland/bindings.conf +++ b/hypr/bindings.conf @@ -7,11 +7,12 @@ $terminal = kitty $fileManager = nautilus $menu = anyrun +$dmenu = anyrun --plugins libstdin.so $mainMod = SUPER $lockscreen = hyprlock -$screenshotDir = "$HOME/Screenshots" -$screenshotFull = hyprshot -m output -$screenshotSelect = hyprshot -m region +$screenshotDir = $HOME/Screenshots +$screenshotFull = hyprshot -m output -o $screenshotDir +$screenshotSelect = hyprshot -m region -o $screenshotDir input { @@ -46,6 +47,7 @@ bind = $mainMod, J, togglesplit bind = $mainMod, F11, fullscreen bind = $mainMod, N, exec, swaync-client -t bind = $mainMod, L, exec, $lockscreen +bind = $mainMod, C, centerwindow # Media keys bind = , code:121, exec, pamixer --mute # Mute @@ -62,7 +64,10 @@ bind = , Print, exec, $screenshotSelect bind = $mainMod, Print, exec, $screenshotFull # Open wofi clipboard -bind = $mainMod, V, exec, cliphist list | wofi -S dmenu | cliphist decode | wl-copy +bind = $mainMod, V, exec, cliphist list | $dmenu | cliphist decode | wl-copy + +# Open wallpaper menu +bind = $mainMod, W, exec, /usr/bin/env bash $HOME/.config/hypr/scripts/change-wallpaper.sh # Reloading Components # Waybar diff --git a/hyprland/environment.conf b/hypr/environment.conf similarity index 81% rename from hyprland/environment.conf rename to hypr/environment.conf index 0229637..f79eff2 100644 --- a/hyprland/environment.conf +++ b/hypr/environment.conf @@ -10,4 +10,4 @@ env = QT_QPA_PLATFORMTHEME, qt6ct env = XDG_CURRENT_DESKTOP, Hyprland env = ADW_DISABLE_PORTAL, 1 -env = AQ_DRM_DEVICES, /dev/dri/card0:/dev/dri/card1 +env = WALLPAPER, $wallpaper diff --git a/hypridle/hypridle.conf b/hypr/hypridle.conf similarity index 100% rename from hypridle/hypridle.conf rename to hypr/hypridle.conf diff --git a/hyprland/hyprland.conf b/hypr/hyprland.conf similarity index 100% rename from hyprland/hyprland.conf rename to hypr/hyprland.conf diff --git a/hyprlock/hyprlock.conf b/hypr/hyprlock.conf similarity index 69% rename from hyprlock/hyprlock.conf rename to hypr/hyprlock.conf index 555926f..213f3dd 100644 --- a/hyprlock/hyprlock.conf +++ b/hypr/hyprlock.conf @@ -1,14 +1,15 @@ -# Colors -$text = rgb(ffffff) -$accent = rgb(e6c272) -$clockAccent = rgba(249, 226, 175, .7) -$background = rgb(312d23) -$backgroundAlt = rgb(50462f) +############## +# LOCKSCREEN # +############## + +# Source colors from pywal +source = ~/.cache/wal/colors-hypr.conf # Fonts $font = Cantarell Regular $clockFont = Cantarell Black +$minimalFont = Noto Sans Mono general { disable_loading_bar = true @@ -17,9 +18,9 @@ general { background { monitor = - path = ~/wallpapers/nijika-ijichi-btr.jpg + path = $wallpaper blur_passes = 2 - # color = $COLOR / rgb(COLOR) + color = $background } # Time @@ -27,7 +28,7 @@ label { monitor = text = cmd[update:30000] echo -e "$(date +"%R")" # 24-hour style # text = cmd[update:30000] echo -e "$(date +"%r")" - color = $clockAccent + color = $foreground font_size = 120 font_family = $clockFont position = 0, -60 @@ -39,7 +40,7 @@ label { label { monitor = text = cmd[update:43200000] echo -e "$(date +"%A, %d %B %Y")" - color = $text + color = $foreground font_size = 20 font_family = $font position = 0, -250 @@ -51,7 +52,8 @@ label { label { monitor = font_size = 6 - font_family = Noto Sans Mono + font_family = $minimalFont + color = $foreground text = Currently logged in as $USER halign = center valign = bottom @@ -62,8 +64,8 @@ label { image { monitor = path = ~/.face - size = 70 - border_color = $accent + size = 72 + border_color = $color2 position = 0, 100 halign = center valign = bottom @@ -73,20 +75,20 @@ image { input-field { monitor = size = 180, 35 - outline_thickness = 1 + outline_thickness = 2 dots_size = .15 dots_spacing = .6 dots_center = true - outer_color = $backgroundAlt - inner_color = $background - font_color = $text + outer_color = $background + inner_color = $color3 + font_color = $foreground fade_on_empty = false placeholder_text = hide_input = false - check_color = $accent - fail_color = $accent + check_color = $color4 + fail_color = $color1 fail_text = $FAIL ($ATTEMPTS) - capslock_color = $accent + capslock_color = $color1 position = 0, 40 halign = center valign = bottom diff --git a/hyprpaper/hyprpaper.conf b/hypr/hyprpaper.conf similarity index 54% rename from hyprpaper/hyprpaper.conf rename to hypr/hyprpaper.conf index 7521763..d0455df 100644 --- a/hyprpaper/hyprpaper.conf +++ b/hypr/hyprpaper.conf @@ -1,5 +1,5 @@ -$wallpaper = +$wallpaper = /home/joaov/wallpapers/Ryo Yamada.png splash = true preload = $wallpaper diff --git a/hyprland/monitors.conf b/hypr/monitors.conf similarity index 100% rename from hyprland/monitors.conf rename to hypr/monitors.conf diff --git a/hyprland/rules.conf b/hypr/rules.conf similarity index 74% rename from hyprland/rules.conf rename to hypr/rules.conf index fe5f0eb..3f68fbd 100644 --- a/hyprland/rules.conf +++ b/hypr/rules.conf @@ -10,12 +10,17 @@ windowrulev2 = float, class:moe.launcher.* windowrulev2 = float, title:^(Clapper)$ windowrulev2 = float, class:xdg-desktop-portal* windowrulev2 = float, class:org.pulseaudio.pavucontrol +windowrulev2 = float, class:org.gnome.Loupe +windowrulev2 = float, class:mcpelauncher-webview # Resize -windowrulev2 = size 70% 65%, class:org.pulseaudio.pavucontrol +windowrulev2 = size 50% 50%, class:org.pulseaudio.pavucontrol -# Center -windowrulev2 = center, class:org.pulseaudio.pavucontrol +# Moving +windowrulev2 = move 49.27% 7.28%, class:org.pulseaudio.pavucontrol + +# Maximize +windowrulev2 = tile, title:^(Resources)$ # Animations windowrulev2 = animation slide right, class:org.pulseaudio.pavucontrol @@ -33,6 +38,8 @@ windowrulev2 = opacity , class:kitty # Blur blurls = logout_dialog blurls = kitty -blurls = waybar + +# No blur +windowrulev2 = noblur, title:^() windowrulev2 = suppressevent maximize, class:.* diff --git a/hypr/scripts/change-wallpaper.sh b/hypr/scripts/change-wallpaper.sh new file mode 100644 index 0000000..25fd8ef --- /dev/null +++ b/hypr/scripts/change-wallpaper.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +WALLPAPER_DIR="$HOME/wallpapers" +HYPRPAPER_FILE="$HOME/.config/hypr/hyprpaper.conf" + +WALLPAPER_DMENU="anyrun --plugins libstdin.so" + +if [[ -z $(ls -A $WALLPAPER_DIR) ]] +then + exit 1 +fi + +# Prompt wallpaper list via dmenu +SET_WALLPAPER_NAME="$(ls $WALLPAPER_DIR | $WALLPAPER_DMENU )" +SET_WALLPAPER_FULL="$WALLPAPER_DIR/$SET_WALLPAPER_NAME" + +echo $SET_WALLPAPER_NAME + +# Check if input wallpaper is empty +if [[ $SET_WALLPAPER_NAME == "" ]] || [[ $SET_WALLPAPER_NAME == " " ]] +then + echo "No wallpaper has been selected by user!" + if [ $RANDOM_WALLPAPER_WHEN_EMPTY = true ] + then + SET_WALLPAPER_NAME=$(ls $WALLPAPER_DIR | shuf -n 1) + echo "Selected random wallpaper from $HOME/wallpapers: $SET_WALLPAPER_NAME" + SET_WALLPAPER_FULL="$WALLPAPER_DIR/$SET_WALLPAPER_NAME" + + else + echo "Skipping hyprpaper changes and exiting." + exit 1 + fi +fi + +echo "Writing change to hyprpaper" + +echo "" > $HYPRPAPER_FILE # Cleans hyprpaper file + +echo "\$wallpaper = $SET_WALLPAPER_FULL" >> $HYPRPAPER_FILE +echo "" >> $HYPRPAPER_FILE +echo "splash = true" >> $HYPRPAPER_FILE +echo "preload = \$wallpaper" >> $HYPRPAPER_FILE +echo "wallpaper = , \$wallpaper" >> $HYPRPAPER_FILE + +echo "Reloading pywal colorscheme" +wal -q -s -t -i "$SET_WALLPAPER_FULL" + +echo "Updating hyprpaper wallpaper" +hyprctl hyprpaper unload all +hyprctl hyprpaper preload "$SET_WALLPAPER_FULL" +hyprctl hyprpaper wallpaper ", $SET_WALLPAPER_FULL" + +echo "Reloading stylsheet for SwayNC" +swaync-client -rs + +exit 0 diff --git a/hyprland/scripts/change-wallpaper.sh b/hyprland/scripts/change-wallpaper.sh deleted file mode 100644 index e22647e..0000000 --- a/hyprland/scripts/change-wallpaper.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -HYPRPAPER_FILE="$HOME/.config/hypr/hyprpaper.conf" -SET_WALLPAPER=$(find $HOME/wallpapers/ | wofi --dmenu --allow-images true) - -echo "" > $HYPRPAPER_FILE # Cleans hyprpaper file - -echo "\$wallpaper = $SET_WALLPAPER" >> $HYPRPAPER_FILE -echo "" >> $HYPRPAPER_FILE -echo "splash = true" >> $HYPRPAPER_FILE -echo "preload = \$wallpaper" >> $HYPRPAPER_FILE -echo "wallpaper = , \$wallpaper" >> $HYPRPAPER_FILE - -if ! [[ $SET_WALLPAPER == "" ]] && ! [[ $SET_WALLPAPER == " " ]] -then - killall -q hyprpaper - exec hyprpaper & -fi - -exit 0