Feature: Hyprlock Video Fallback & Official Keybind#60
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to make Hyprlock wallpaper selection easier via a dedicated selector script (with video-to-static fallback) and adjust Hyprlock/Hypridle/keybind configuration accordingly.
Changes:
- Added
HyprlockWallpaperSelect.shto select Hyprlock backgrounds and generate static preview frames for selected videos viaffmpeg. - Updated keybind configuration files, including adding a
SUPER+SHIFT+Lbind (currently placed inUserKeybinds.conf). - Modified
hyprlock.conflayout/settings and adjustedhypridle.conflock command.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| config/hypr/UserScripts/HyprlockWallpaperSelect.sh | New Hyprlock wallpaper selector with video frame extraction and config rewriting logic. |
| config/hypr/UserConfigs/UserKeybinds.conf | Adds a Hyprlock wallpaper selector bind and reorganizes user binds content. |
| config/hypr/hyprlock.conf | Updates Hyprlock UI/layout and background path configuration. |
| config/hypr/hypridle.conf | Changes lock command invocation for Hyprlock. |
| config/hypr/configs/Keybinds.conf | Significant rewrite of default keybinds; currently missing the “official” Hyprlock selector bind described in the PR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if grep -qE '^\s*background\s*=' "$CONF"; then | ||
| # Format: background = /path/to/file | ||
| sed -i "s|^\s*background\s*=.*|background = $wallpaper_path|" "$CONF" | ||
| elif grep -qE '^\s*background\s*\{' "$CONF"; then | ||
| # Format: background { path = /path/to/file } | ||
| sed -i "/^\s*background\s*{/,/}/ s|^\(\s*path\s*=\s*\).*|\1$wallpaper_path|" "$CONF" |
| if grep -qE '^\s*background\s*=' "$CONF"; then | ||
| # Format: background = /path/to/file | ||
| sed -i "s|^\s*background\s*=.*|background = $wallpaper_path|" "$CONF" | ||
| elif grep -qE '^\s*background\s*\{' "$CONF"; then | ||
| # Format: background { path = /path/to/file } | ||
| sed -i "/^\s*background\s*{/,/}/ s|^\(\s*path\s*=\s*\).*|\1$wallpaper_path|" "$CONF" |
|
|
||
| # Handle regular images | ||
| else | ||
| printf "%s\x00icon\x1f%s\n" "$(echo "$pic_name" | cut -d. -f1)" "$pic_path" |
| # /* ---- ✴️ Variables ✴️ ---- */ # | ||
| $mainMod = SUPER | ||
| $scriptsDir = $HOME/.config/hypr/scripts | ||
| $UserConfigs = $HOME/.config/hypr/UserConfigs | ||
| $UserScripts = $HOME/.config/hypr/UserScripts | ||
|
|
||
| # settings for User defaults apps - set your default terminal and file manager on this file | ||
| source= $UserConfigs/01-UserDefaults.conf | ||
|
|
||
| #### STANDARD #### | ||
| # Common shortcuts | ||
| #bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window # Super Key to Launch rofi menu | ||
| bindd = $mainMod, D, app launcher, exec, pkill rofi || true && rofi -show drun -modi drun,filebrowser,run,window | ||
| bindd = $mainMod, B, open default browser, exec, xdg-open "https://" | ||
| bindd = $mainMod, A, desktop overview, exec, $scriptsDir/OverviewToggle.sh # toggles quickshell or ags overview (tries QS first, falls back to AGS) | ||
| #bindd = $mainMod, A, ags overview, exec, pkill rofi || true && ags -t 'overview' # desktop overview (if installed) | ||
| #bindd = $mainMod, A, Quickshell overview, global, quickshell:overviewToggle # desktop overview (if installed) | ||
| bindd = $mainMod, Return, Open terminal, exec, $term | ||
| bindd = $mainMod, E, file manager, exec, $files | ||
| bindd = $mainMod, C, SSH session manager, exec, $scriptsDir/rofi-ssh-menu.sh | ||
|
|
||
| # FEATURES / EXTRAS | ||
| bindd = $mainMod, T, Global theme switcher using Wallust, exec, $scriptsDir/ThemeChanger.sh #Global theme switcher | ||
| bindd = $mainMod, H, help / cheat sheet, exec, $scriptsDir/KeyHints.sh | ||
| bindd = $mainMod ALT, R, refresh bar and menus, exec, $scriptsDir/Refresh.sh | ||
| bindd = $mainMod ALT, E, emoji menu, exec, $scriptsDir/RofiEmoji.sh | ||
| bindd = $mainMod, S, web search, exec, $scriptsDir/RofiSearch.sh | ||
| bindd = $mainMod CTRL, S, window switcher, exec, rofi -show window | ||
| bindd = $mainMod ALT, O, toggle blur, exec, $scriptsDir/ChangeBlur.sh | ||
| bindd = $mainMod SHIFT, G, toggle game mode, exec, $scriptsDir/GameMode.sh | ||
| bindd = $mainMod ALT, L, toggle layouts, exec, $scriptsDir/ChangeLayout.sh toggle | ||
| bindd = $mainMod ALT, V, clipboard manager, exec, $scriptsDir/ClipManager.sh | ||
| bindd = $mainMod CTRL, R, rofi theme selector, exec, $scriptsDir/RofiThemeSelector.sh | ||
| bindd = $mainMod CTRL SHIFT, R, rofi theme selector (modified), exec, pkill rofi || true && $scriptsDir/RofiThemeSelector-modified.sh | ||
| bindd = $mainMod CTRL, K, Kitty theme selector, exec, $scriptsDir/Kitty_themes.sh | ||
| bindd = $mainMod SHIFT, B, Set static Rainbow Border, exec, $UserScripts/RainbowBorders-low-cpu.sh --run-once | ||
| bindd = $mainMod SHIFT, H, Toggle Mute/Unmute for Active-Window, exec, $scriptsDir/Toggle-Active-Window-Audio.sh | ||
| bindd = ALT SHIFT, S, Hyprshot Screen Capture, exec, $scriptsDir/hyprshot.sh -m region -o $HOME/Pictures/Screenshots | ||
|
|
||
| bindd = $mainMod SHIFT, F, fullscreen, fullscreen | ||
| bindd = $mainMod CTRL, F, maximize window, fullscreen, 1 | ||
| bindd = $mainMod, SPACE, Float current window, togglefloating, | ||
| bindd = $mainMod ALT, SPACE, Float all windows, exec, $scriptsDir/Float-all-Windows.sh | ||
| bindd = $mainMod SHIFT, Return, DropDown terminal, exec, $scriptsDir/Dropterminal.sh $term | ||
|
|
||
| # Desktop zooming or magnifier | ||
| bindd = $mainMod ALT, mouse_down, zoom in, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 2.0}')" | ||
| bindd = $mainMod ALT, mouse_up, zoom out, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 2.0}')" | ||
|
|
||
| # Waybar / Bar related | ||
| bindd = $mainMod CTRL ALT, B, toggle waybar on/off, exec, pkill -SIGUSR1 waybar | ||
| bindd = $mainMod CTRL, B, waybar styles menu, exec, $scriptsDir/WaybarStyles.sh | ||
| bindd = $mainMod ALT, B, waybar layout menu, exec, $scriptsDir/WaybarLayout.sh | ||
|
|
||
| # Night light toggle (Hyprsunset) | ||
| bindd = $mainMod, N, Toggle Hyprsunset - night light, exec, $scriptsDir/Hyprsunset.sh toggle | ||
|
|
||
| # FEATURES / EXTRAS (UserScripts) | ||
| bindd = $mainMod SHIFT, M, online music, exec, $UserScripts/RofiBeats.sh | ||
| bindd = $mainMod, W, select wallpaper, exec, $UserScripts/WallpaperSelect.sh | ||
| bindd = $mainMod SHIFT, W, wallpaper effects, exec, $UserScripts/WallpaperEffects.sh | ||
| bindd = CTRL ALT, W, random wallpaper, exec, $UserScripts/WallpaperRandom.sh | ||
| bindd = $mainMod CTRL, O, toggle active window opacity, setprop, active opaque toggle | ||
| bindd = $mainMod SHIFT, K, search keybinds, exec, $scriptsDir/KeyBinds.sh | ||
| bindd = $mainMod SHIFT, A, animations menu, exec, $scriptsDir/Animations.sh | ||
| bindd = $mainMod SHIFT, O, change oh-my-zsh theme, exec, $UserScripts/ZshChangeTheme.sh | ||
| bindlnd = ALT_L, SHIFT_L, switch keyboard layout globally, exec, $scriptsDir/KeyboardLayout.sh switch | ||
| bindlnd = SHIFT_L, ALT_L, switch keyboard layout per-window, exec, $scriptsDir/Tak0-Per-Window-Switch.sh | ||
| bindd = $mainMod ALT, C, calculator, exec, $UserScripts/RofiCalc.sh | ||
|
|
||
| # Move current workspaces to monitors (left right up or down) | ||
| bindd = $mainMod CTRL, F9, move workspace to left monitor, movecurrentworkspacetomonitor, l | ||
| bindd = $mainMod CTRL, F10, move workspace to right monitor, movecurrentworkspacetomonitor, r | ||
| bindd = $mainMod CTRL, F11, move workspace to up monitor, movecurrentworkspacetomonitor, u | ||
| bindd = $mainMod CTRL, F12, move workspace to down monitor, movecurrentworkspacetomonitor, d | ||
|
|
||
|
|
||
| #### SYSTEM #### | ||
| bindd = CTRL ALT, Delete, exit Hyprland, exec, hyprctl dispatch exit 0 | ||
| bindd = $mainMod, Q, close active window, killactive, | ||
| bindd = $mainMod SHIFT, Q, Terminate active process, exec, $scriptsDir/KillActiveProcess.sh | ||
| bindd = CTRL ALT, L, lock screen, exec, $scriptsDir/LockScreen.sh | ||
| bindd = CTRL ALT, P, powermenu, exec, $scriptsDir/Wlogout.sh | ||
| bindd = $mainMod SHIFT, N, notification panel, exec, swaync-client -t -sw | ||
| bindd = $mainMod SHIFT, E, Quick settings menu, exec, $scriptsDir/Kool_Quick_Settings.sh | ||
| bind = CTRL ALT, Delete, exec, hyprctl dispatch exit 0 # exit Hyprland | ||
| bind = $mainMod, Q, killactive, # close active (not kill) |
| bind = $mainMod, J, layoutmsg, cyclenext | ||
| bind = $mainMod, K, layoutmsg, cycleprev |
| # Dwindle Layout | ||
| bindd = $mainMod SHIFT, I, toggle split (dwindle), layoutmsg, togglesplit | ||
| bindd = $mainMod, P, toggle pseudo (dwindle), pseudo, | ||
| bind = $mainMod SHIFT, I, togglesplit # only works on dwindle layout | ||
| bind = $mainMod, P, pseudo, # dwindle |
| #path = $HOME/.config/hypr/wallpaper_effects/.wallpaper_modified # by wallpaper effects | ||
| path = $HOME/.config/hypr/wallpaper_effects/.wallpaper_current # current wallpaper | ||
|
|
||
| path = /home/hasan/.cache/video_preview/33. 202511092025110920251109export-34.mp4.png |
| # Put a picture of choice here. Default is the current wallpaper | ||
| # image { | ||
| #image { | ||
| # monitor = | ||
| # #path = $HOME/.config/hypr/wallpaper_effects/.wallpaper_current | ||
| # path = $HOME/.config/hypr/wallpaper_effects/.wallpaper_current | ||
| # size = 160 | ||
| # rounding = -1 | ||
| # border_size = 0 | ||
| # border_color = $color11 | ||
| # rotate = 0 | ||
| # reload_time = -1 | ||
| # position = 0, 400 | ||
| # position = 0, 280 | ||
| # halign = center | ||
| # valign = bottom | ||
| # } | ||
| #} |
| #bind = $mainMod ALT, P, submap, reset | ||
| #submap = reset | ||
| #for hyperlock wallpaper shrt key | ||
| bind = $mainMod SHIFT, L, exec, $UserScripts/HyprlockWallpaperSelect.sh # Select hyprlock wallpaper | ||
|
|
| bindmd = $mainMod, mouse:272, move window, movewindow # NOTE: mouse:272 = left click | ||
| bindmd = $mainMod, mouse:273, resize window, resizewindow # NOTE: mouse:272 = right click | ||
| bindm = $mainMod, mouse:272, movewindow # NOTE: mouse:272 = left click | ||
| bindm = $mainMod, mouse:273, resizewindow # NOTE: mouse:272 = right click No newline at end of file |
57689d1 to
80a81eb
Compare
|
@dwilliam62 So sorry about that! I accidentally copied over my local configuration file which overwrote the pristine repository file during my commit. I just force-pushed a completely clean version based strictly on the I also updated the PR description to explicitly state that this is not a video wallpaper engine for Hyprlock, but rather a smart fallback mechanism to prevent users from crashing their lock screen if they select an mp4 file. Thank you for catching that mess! |
|
You need to check all the other PR's too please. Also for now these have to stay in backlog. I am solely focused on the LUA code conversion and subsequent testing. Which is a huge task alone. I've got maybe two months to have it all done. Regards, |
|
@dwilliam62 Understood completely! I've gone through and double-checked the other PRs as well (I caught a theme consistency issue in the Calculator PR and reverted it to match the pristine LinuxBeginnings style, and the RofiBeats and KeyHints PRs are clean additions). No rush at all on these—they can happily sit in the backlog. Good luck with the massive Lua code conversion, that sounds like a massive undertaking! Thanks for your hard work on the project. Regards! |
Thanks! Re: LUA. Especially since I don't know LUA, yeah it's a lot! haha However, I've made a lot of progress already. Pretty much 80%+ is working. (more or less) Now that 0.55 is out I can more easily test it on all the platforms. So basically all the .conf stuff you have added I have to re-do in LUA. hence I want to get it solid first with what we have now |
|
@dwilliam62 That’s seriously impressive progress, especially picking up Lua on the fly! Getting to 80 percent working already is no small feat. It makes total sense that you want to solidify the core Lua architecture across all platforms before worrying about porting over new config features like these. Take all the time you need, and if you ever need testers for the new Lua build when it drops, just say the word! Good luck with the final stretch! |


Hey everyone!
I noticed there wasn't a quick way to change the lock screen wallpaper directly from the main keybinds, so I promoted the hidden
HyprlockWallpaperSelect.shscript to be an official keybind.1. Official Keybind Promotion
SUPER + SHIFT + Lnow launches the Hyprlock Wallpaper Selector natively viaKeybinds.conf.UserKeybinds.confsince it is now a core feature.2. Smart Video-to-Image Fallback
To clarify: This is NOT a video wallpaper engine for Hyprlock. Hyprlock does not natively support MP4 backgrounds.
However, if a user accidentally selects a video file from the wallpaper menu, it currently breaks the lock screen (showing a black screen or failing to load). I updated
HyprlockWallpaperSelect.shso that if a user selects a video file (MP4, MKV, WebM), the script will automatically extract a high-quality static frame (usingffmpeg) and set that static image as the Hyprlock background. This prevents Hyprlock from breaking while still letting the user select files that match their aesthetic!3. Syntax Fixes
Fixed a few minor syntax errors in the default
hyprlock.conffor the latest v0.9.3 release (e.g., removing the deprecatedgraceoption from the general block).Note: Re-submitted against the development branch as requested.