hypr: update configuration, use new wallpaper menu, fix hyprlock bind

This commit is contained in:
retrozinndev
2025-04-26 22:55:06 -03:00
parent ee820970a4
commit 3155ccd9c9
7 changed files with 58 additions and 28 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
temperature = 4000 temperature = 4500
gamma = 100 gamma = 100
+18 -14
View File
@@ -16,16 +16,6 @@ if [[ -z "$WALLPAPERS_DIR" ]]; then
WALLPAPERS_DIR="$HOME/wallpapers" WALLPAPERS_DIR="$HOME/wallpapers"
fi fi
if [[ -z "$dmenu" ]]; then
notify-send -u normal -a "Wallpaper" "Dmenu not found" "Couldn't find anyrun or wofi for dmenu! Try installing one of these two before selecting wallpaper!"
exit 1
fi
if [[ -z $(ls -A $WALLPAPERS_DIR) ]]; then
notify-send -u normal -a "Wallpaper" "Wallpapers not found" "Couldn't find any wallpaper inside \`~/wallpapers\`, try putting an image you like in there to choose it!"
exit 1
fi
function Write_changes() { function Write_changes() {
echo "[LOG] Writing to hyprpaper config file" echo "[LOG] Writing to hyprpaper config file"
@@ -49,11 +39,22 @@ function Reload_pywal() {
wal -t --cols16 $style -i "$wall" wal -t --cols16 $style -i "$wall"
} }
# Prompt wallpaper list if [[ -z "$dmenu" ]]; then
wall="$WALLPAPERS_DIR/$(ls $WALLPAPERS_DIR | $dmenu)" notify-send -u normal -a "Wallpaper" "Dmenu not found" "Couldn't find anyrun or wofi for dmenu! Try installing one of these two before selecting wallpaper!"
exit 1
fi
# Check if input wallpaper is empty if [[ -z $(ls -A $WALLPAPERS_DIR) ]]; then
if [[ $wall == "$WALLPAPERS_DIR/" ]]; then notify-send -u normal -a "Wallpaper" "Wallpapers not found" "Couldn't find any wallpaper inside \`~/wallpapers\`, try putting an image you like in there to choose it!"
exit 1
fi
if [[ -z $1 ]]; then
# Prompt wallpaper list
wall="$WALLPAPERS_DIR/$(ls $WALLPAPERS_DIR | $dmenu)"
# Check if input wallpaper is empty
if [[ $wall == "$WALLPAPERS_DIR/" ]]; then
echo "No wallpaper has been selected by user!" echo "No wallpaper has been selected by user!"
if [[ $RANDOM_WALLPAPER_WHEN_EMPTY == true ]]; then if [[ $RANDOM_WALLPAPER_WHEN_EMPTY == true ]]; then
wall="$WALLPAPERS_DIR/$(ls $WALLPAPERS_DIR | shuf -n 1)" wall="$WALLPAPERS_DIR/$(ls $WALLPAPERS_DIR | shuf -n 1)"
@@ -62,6 +63,9 @@ if [[ $wall == "$WALLPAPERS_DIR/" ]]; then
echo "Skipping hyprpaper changes and exiting." echo "Skipping hyprpaper changes and exiting."
exit 0 exit 0
fi fi
fi
else
wall=$1
fi fi
Reload_pywal Reload_pywal
+1 -1
View File
@@ -3,5 +3,5 @@
selection=$(cliphist list | anyrun --plugins libstdin.so | cliphist decode) selection=$(cliphist list | anyrun --plugins libstdin.so | cliphist decode)
if [[ ! -z "$selection" ]]; then if [[ ! -z "$selection" ]]; then
printf "%s" $selection | sed -e 's/\n$//g' | wl-copy printf "%s" "$selection" | sed -e 's/\\[n]$//g' | wl-copy
fi fi
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# This script handles taking a screenshot using the
# hyprshot tool.
# --------------
# Licensed under the MIT License
# Made by retrozinndev (João Dias)
# From https://github.com/retrozinndev/Hyprland-Dots
# exit slurp and quit if slurp(region selection) is running
killall slurp && exit 0
if [[ -z $(command -v hyprshot) ]]; then
echo "[err] you don't have hyprshot installed, please install it first"
exit 1
fi
if [[ "$1" == "full" ]]; then
hyprshot -m active -m output -o "$(xdg-user-dir PICTURES)/Screenshots"
exit 0
fi
hyprshot -m region -o "$(xdg-user-dir PICTURES)/Screenshots"
+4 -4
View File
@@ -5,8 +5,8 @@ bind = $mainMod, SPACE, exec, $menu
bind = $mainMod, F11, fullscreen bind = $mainMod, F11, fullscreen
bind = , Print, exec, killall slurp || hyprshot -m region -o "$(xdg-user-dir PICTURES)/Screenshots" bind = , Print, exec, sh $XDG_CONFIG_HOME/hypr/scripts/screenshot.sh
bind = $mainMod, Print, exec, killall slurp || hyprshot -m active -m output -o "$(xdg-user-dir PICTURES)/Screenshots" bind = $mainMod, Print, exec, sh $XDG_CONFIG_HOME/hypr/scripts/screenshot.sh full
# Test-only bind, used by developer # Test-only bind, used by developer
bind = $mainMod, F7, exec, ags request reload bind = $mainMod, F7, exec, ags request reload
@@ -19,9 +19,9 @@ bind = $mainMod, P, pseudo,
bind = $mainMod, J, togglesplit bind = $mainMod, J, togglesplit
bind = $mainMod, N, exec, astal toggle control-center bind = $mainMod, N, exec, astal toggle control-center
bind = $mainMod, M, exec, astal toggle center-window bind = $mainMod, M, exec, astal toggle center-window
bind = $mainMod, L, exec, $lockscreen bind = $mainMod, L, exec, hyprlock
bind = $mainMod, V, exec, sh $XDG_CONFIG_HOME/hypr/scripts/clipboard-menu.sh bind = $mainMod, V, exec, sh $XDG_CONFIG_HOME/hypr/scripts/clipboard-menu.sh
bind = $mainMod, W, exec, sh $XDG_CONFIG_HOME/hypr/scripts/change-wallpaper.sh bind = $mainMod, W, exec, astal runner '##'
bind = $mainMod, $mainMod_L, exec, astal show-ws-numbers bind = $mainMod, $mainMod_L, exec, astal show-ws-numbers
+1 -1
View File
@@ -15,7 +15,7 @@ env = HYPRCURSOR_SIZE, 24
# Wayland stuff # Wayland stuff
env = MOZ_ENABLE_WAYLAND, 1 env = MOZ_ENABLE_WAYLAND, 1
env = ELECTRON_OZONE_PLATFORM_HINT, x11 env = ELECTRON_OZONE_PLATFORM_HINT, auto
# QT # QT
env = QT_QPA_PLATFORM, wayland env = QT_QPA_PLATFORM, wayland
+2
View File
@@ -2,3 +2,5 @@
## DECORATION ## ## DECORATION ##
################ ################
# Wiki: https://wiki.hyprland.org/Configuring/Variables # Wiki: https://wiki.hyprland.org/Configuring/Variables