hyprpaper, hyprland scripts

This commit is contained in:
bytequill 2025-07-15 00:58:09 +02:00
parent 55d2c8bbe6
commit 0d7efc942f
No known key found for this signature in database
27 changed files with 84 additions and 3 deletions

View File

@ -97,7 +97,7 @@ exec = gsettings set org.gnome.desktop.interface font-name "IosevkaNerdFont"
general {
gaps_in = 0 # I don't care about seeing the wallpaper all the time. I prefer more
# surface area for actual applications
gaps_out = 5
gaps_out = 0
border_size = 2
@ -205,10 +205,10 @@ misc {
# https://wiki.hyprland.org/Configuring/Variables/#input
input {
kb_layout = us
kb_layout = us, pl
kb_variant =
kb_model =
kb_options =
kb_options = grp:caps_toggle # As someone mentioned this is a pretty good switching mechanism, never really use capsLCK anyway
kb_rules =
follow_mouse = 1
@ -249,6 +249,7 @@ bind = $mainMod, V, togglefloating,
bind = $mainMod, D, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
# bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, F, exec, hyprctl dispatch toggleWindowFullscreen
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
@ -317,6 +318,10 @@ bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
bind = $mainMod SHIFT, R, exec, pkill waybar & hyprctl dispatch exec waybar & blueman-applet # Blueman applet likes to crash
bind = $mainMod, G, exec, ~/.config/hypr/scripts/gaps.sh 25 # A toggle gaps option for experimentation
bind = $mainMod, W, exec, ~/.config/hypr/scripts/wallpaper.sh ~/.config/hypr/scripts/Wallpapers contain
exec = ~/.config/hypr/scripts/wallpaper.sh ~/.config/hypr/scripts/Wallpapers contain
##############################
### WINDOWS AND WORKSPACES ###
##############################

View File

@ -0,0 +1,2 @@
# NOTE: All the actual wallpaper loading is handled in the ./scripts/wallpaper.sh script
splash = false

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

18
.config/hypr/scripts/gaps.sh Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
TARGET=${1:-20}
current=$(
hyprctl getoption general:gaps_in 2>/dev/null \
| grep -oE '[0-9]+' \
| head -n1 \
|| echo 0
)
if [ "$current" -eq 0 ]; then
hyprctl keyword general:gaps_in $TARGET
hyprctl keyword general:gaps_out $TARGET
else
hyprctl keyword general:gaps_in 0
hyprctl keyword general:gaps_out 0
fi

View File

@ -0,0 +1,48 @@
#!/usr/bin/env bash
usage() {
echo "Usage: $(basename "$0") <directory> (mode)
Picks a random file under <directory> (recursively) and sets it
as the wallpaper on all monitors via 'hyprctl hyprpaper'.
Example:
$(basename "$0") ~/Pictures/Wallpapers contain"
exit 1
}
if [[ $# -eq 0 ]]; then
usage
fi
DIR="$1"
if [[ -n $2 ]]; then
MODE="$2:"
echo "Info: Mode set to '$MODE'"
else
MODE=""
fi
if [[ ! -d "$DIR" ]]; then
echo "Error: '$DIR' is not a directory." >&2
exit 2
fi
FILE=$(find "$DIR" -type f | shuf -n1)
if [[ -z "$FILE" ]]; then
echo "Error: No files found in '$DIR'." >&2
exit 3
fi
echo "Info: Chosen file '$FILE' from '$DIR'."
echo "Info: Preloading wallpaper"
hyprctl hyprpaper preload "$FILE"
echo "Info: Selecting wallpaper"
for monitor in $(hyprctl monitors | grep 'Monitor' | awk '{ print $2 }'); do
echo " Info: Selecting wallpaper for: '$monitor'"
hyprctl hyprpaper wallpaper "eDP-1,$MODE$FILE"
done
echo "Info: Unloading unused wallpapers"
hyprctl hyprpaper unload all

View File

@ -15,10 +15,14 @@
nerd-fonts.iosevka-term
];
programs.steam.enable = true;
environment.systemPackages = with pkgs; [
firefox
spotify
vesktop
obsidian
neovim
brightnessctl
networkmanagerapplet
gh # Github CLI
@ -26,6 +30,10 @@
gcc
clang
clang-tools
unzip
stow
distrobox
podman
];
}