clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

after theme change, keep my backgrounds

sspaeti e92aed91 63f98cf7

+37 -1
+1 -1
hypr/.config/hypr/bindings.conf
··· 110 110 111 111 # Theme and background 112 112 unbind = SUPER, T 113 - bindd = SUPER, T, Pick new theme, exec, omarchy-menu theme 113 + bindd = SUPER, T, Pick new theme, exec, ~/.config/hypr/sspaeti/omarchy-menu-wrapper theme 114 114 #toggle to my personal background images 115 115 bind = SUPER ALT, T, exec, ~/.config/hypr/sspaeti/bg-mode-toggle.sh switch 116 116 bind = SUPER ALT SHIFT, T, exec, ~/.config/hypr/sspaeti/bg-mode-toggle.sh next
+36
hypr/.config/hypr/sspaeti/omarchy-menu-wrapper
··· 1 + #!/bin/bash 2 + 3 + # Wrapper for omarchy-menu that preserves personal backgrounds when switching themes 4 + # This script calls the original omarchy-menu and then restores personal background if needed 5 + 6 + STATE_FILE="$HOME/.config/hypr/sspaeti/.bg_mode_state" 7 + CURRENT_IMAGE_FILE="$HOME/.config/hypr/sspaeti/.current_personal_image" 8 + 9 + # Check if we need to restore personal background after theme change 10 + should_restore=false 11 + if [ -f "$STATE_FILE" ]; then 12 + current_mode=$(cat "$STATE_FILE") 13 + if [ "$current_mode" = "personal" ] && [ -f "$CURRENT_IMAGE_FILE" ]; then 14 + should_restore=true 15 + image_path=$(cat "$CURRENT_IMAGE_FILE") 16 + fi 17 + fi 18 + 19 + # Call the original omarchy-menu with all arguments passed through 20 + ~/.local/share/omarchy/bin/omarchy-menu "$@" 21 + 22 + # Post-processing: Restore personal background if needed 23 + if [ "$should_restore" = true ] && [ -f "$image_path" ]; then 24 + # Background restore happens asynchronously to avoid blocking 25 + { 26 + # Wait briefly for swaybg to be killed and restarted by theme change 27 + sleep 0.15 28 + 29 + # Start new swaybg with personal image 30 + swaybg -i "$image_path" & 31 + sleep 0.05 32 + 33 + # Kill the old swaybg (from theme change) 34 + pkill -o swaybg 35 + } & 36 + fi