diff options
| author | Donald Williams <129223418+dwilliam62@users.noreply.github.com> | 2026-07-01 22:06:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-01 22:06:51 -0400 |
| commit | fed1837fbdcc2acedbb8d6246a2601b26ad40369 (patch) | |
| tree | 648d2d903750729e7e9df8e6af6dba4b602ef7a8 /config/hypr/scripts/sddm_wallpaper.sh | |
| parent | 4361f59928384f1cf7df8e2ef348e3532e348e9b (diff) | |
Development branch to main v2.3.25 (#84)
* Updated version to v2.3.25
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/ENVariables.conf
modified: config/hypr/lua/env.lua
renamed: config/hypr/v2.3.24 -> config/hypr/v2.3.25
* Fixed LayerRule and window rule
Excessive bluring and wrong geometry to qcalculate-gtk
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/LayerRules.conf
modified: config/hypr/configs/WindowRules.conf
* Re-added hyprlock files
Signed-off-by: Don Williams <don.e.williams@gmail.com>
* Added persistant toggle for Dark/Light mode
Default is dark
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/Startup_Apps.conf
modified: config/hypr/lua/startup.lua
new file: config/hypr/scripts/ApplyThemeMode.sh
modified: config/hypr/scripts/DarkLight.sh
* Dynamic wallpaper is now also per-monitor
Before a Dynamic wallpaper would replace wallpaper on all monitors
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/UserScripts/WallpaperSelect.sh
* Improving handling of NVIDIA Hybrid laptops
Especially with GDM login manager
Cursors can get set incorrectly
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: README.md
modified: config/hypr/configs/ENVariables.conf
modified: config/hypr/configs/Startup_Apps.conf
modified: copy.sh
modified: scripts/lib_detect.sh
* Add: Set background for lock screen
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
new file: config/hypr/scripts/HyprlockWallpaperSelect.sh
modified: config/hypr/scripts/Kool_Quick_Settings.sh
* Fixed hyprlock wallper to get current monitor wp
Signed-off-by: Don Williams <don.e.williams@gmail.com>
* upd: sddm/hyprlock images use wp selelctor
Rofi backgrounds come from current monitor looks better
Updated all the rofi menus that use background images
SDDM and Hyprlock set background use wallpaper selector
but also show current monitor background in case you want that
or you can pick from the avalable wallpapers
Also add notification of success/failure with filename
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/configs/Keybinds.conf
modified: config/hypr/lua/keybinds.lua
modified: config/hypr/scripts/HyprlockWallpaperSelect.sh
modified: config/hypr/scripts/Kool_Quick_Settings.sh
new file: config/hypr/scripts/RofiFocusedWallpaperLink.sh
modified: config/hypr/scripts/sddm_wallpaper.sh
modified: config/rofi/themes/KooL_style-1.rasi
modified: config/rofi/themes/KooL_style-13-Vertical.rasi
modified: config/rofi/themes/KooL_style-3-FullScreen-v1.rasi
modified: config/rofi/themes/KooL_style-5.rasi
modified: config/rofi/themes/KooL_style-6.rasi
modified: config/rofi/themes/KooL_style-8.rasi
* Scripts weren't executableo
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: ApplyThemeMode.sh
modified: HyprlockWallpaperSelect.sh
* enabled hypridle timer for monitor off
Signed-off-by: Don Williams <don.e.williams@gmail.com>
* Added icon for wave terminal
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/waybar/ModulesWorkspaces
* Upd to Cachy breaking portals
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/PortalHyprland.sh
* Fix 2 for CachyOS portal
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/PortalHyprland.sh
* Fixing schema dir issue
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/PortalHyprland.sh
* Still trying to fix PortalHyprland
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/PortalHyprland.sh
* Try something else to fix portals in CachyOS
This is occuring after OS upgrade
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/PortalHyprland.sh
* Trying override to fix regression bug in cachyOS
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
new file: config/systemd/user/xdg-desktop-portal.service.d/override.conf
* Hyprland-Portal script to create override
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
new file: hypr/scripts/Add-override-Hyprland-Portal.sh
* Upd CHANGELOG About the new override script
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
* Fixing handling of QT variables
Signed-off-by: Don Williams <don.e.williams@gmail.com>
• config/hypr/configs/ENVariables.conf
◦ Changed default from org.hyprland.style to Basic.
• config/hypr/lua/env.lua
◦ Changed default from org.hyprland.style to Basic.
• scripts/lib_detect.sh
◦ Added adjust_qt_quick_controls_style():
▪ Detects whether the Hyprland QML style module is actually present (*/qml/*/org/hyprland/style or Debian package installed).
▪ Sets style to org.hyprland.style only when available.
▪ Otherwise forces Basic and logs a warning.
• copy.sh
◦ Calls adjust_qt_quick_controls_style "$LOG" during dotfiles setup/upgrade.
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/configs/ENVariables.conf
modified: config/hypr/lua/env.lua
modified: copy.sh
modified: scripts/lib_detect.sh
* Sync'd updated WaybarStartup.sh from main
Makes sure ENV variables are set other waybar fails to start b/c
xdg-desktop-portal fails to start
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/WaybarStartup.sh
* Add: scrolling resize/max sample workspace rules
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/Keybinds.conf
modified: config/hypr/lua/keybind_helpers.lua
modified: config/hypr/lua/keybinds.lua
modified: config/hypr/lua/workspaces.lua
new file: config/hypr/scripts/ScrollCycleColumnWidth.sh
new file: config/hypr/scripts/ScrollMaximizeToggle.sh
modified: config/hypr/workspaces.conf
* Fixed SUPERALT F fullsize toggle in scrolling
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/configs/ENVariables.conf
modified: config/hypr/configs/Startup_Apps.conf
modified: config/hypr/configs/SystemSettings.conf
deleted: config/hypr/hyprlock-1080p.conf
modified: config/hypr/hyprlock-2k.conf
modified: config/hypr/hyprlock.conf
modified: config/hypr/scripts/Refresh.sh
modified: config/hypr/scripts/RefreshNoWaybar.sh
modified: config/hypr/scripts/ScrollMaximizeToggle.sh
* Fixed columwidth resize for hyprlang
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/ScrollCycleColumnWidth.sh
* Fixed keybinds for scrolling toggle and resize
Matches the work done on hyprlang config files
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/lua/keybinds.lua
* Set scripts executable
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/ScrollCycleColumnWidth.sh
modified: config/hypr/scripts/ScrollMaximizeToggle.sh
* Fixing bindings in LUA mode
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/lua/keybind_helpers.lua
modified: config/hypr/lua/user_keybinds_helper.lua
modified: config/hypr/lua/user_overrides.lua
modified: config/hypr/scripts/ScrollMaximizeToggle.sh
* Fixed loading user_decorations Changed 2 keybinds
SUPER + F == Maximize
SUPER + SHIFT + F == FullSreen
Works in all layouts now
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/UserConfigs/user_decorations.lua
modified: config/hypr/configs/Keybinds.conf
modified: config/hypr/lua/keybinds.lua
modified: config/hypr/lua/user_overrides.lua
* user_overrides wasn't loading system_keybinds
Resulting in only user keybinds being availble
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/lua/user_overrides.lua
* Fixed LuaAutoReload script
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/scripts/LuaAutoReload.sh
* In LUA QT_THEME_OVERRIDE was hard code to kvantum
If kvantum not installed then apps like KDENLIVE will fail
Fixed the hyprlang config before but not in LUA workflow
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/ENVariables.conf
modified: config/hypr/lua/env.lua
modified: config/hypr/lua/user_overrides.lua
modified: scripts/lib_detect.sh
* Fixed startup that causes waybar to restart at login
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/Startup_Apps.conf
modified: config/hypr/lua/startup.lua
* Changed $HOME to $(XDG_CONFIG_HOME:$HOME) in all scripts
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: archive/upgrade.sh
modified: config/hypr/UserScripts/00-Readme
modified: config/hypr/UserScripts/RainbowBorders-low-cpu.sh
modified: config/hypr/UserScripts/RainbowBorders.bak.sh
modified: config/hypr/UserScripts/RofiBeats.sh
modified: config/hypr/UserScripts/RofiCalc.sh
modified: config/hypr/UserScripts/WallpaperAutoChange.sh
modified: config/hypr/UserScripts/WallpaperEffects.sh
modified: config/hypr/UserScripts/WallpaperRandom.sh
modified: config/hypr/UserScripts/WallpaperSelect.sh
modified: config/hypr/UserScripts/Weather.py
modified: config/hypr/UserScripts/ZshChangeTheme.sh
modified: config/hypr/initial-boot.sh
modified: config/hypr/scripts/Add-override-Hyprland-Portal.sh
modified: config/hypr/scripts/AirplaneMode.sh
modified: config/hypr/scripts/Animations.sh
modified: config/hypr/scripts/ApplyThemeMode.sh
modified: config/hypr/scripts/Brightness.sh
modified: config/hypr/scripts/BrightnessKbd.sh
modified: config/hypr/scripts/ChangeBlur.sh
modified: config/hypr/scripts/ChangeLayout.sh
modified: config/hypr/scripts/ClipManager.sh
modified: config/hypr/scripts/DarkLight.sh
modified: config/hypr/scripts/Distro_update.sh
modified: config/hypr/scripts/Dropterminal.sh
modified: config/hypr/scripts/ExternalBrightness.sh
modified: config/hypr/scripts/Float-all-Windows.sh
modified: config/hypr/scripts/GameMode.sh
modified: config/hypr/scripts/Ghostty_themes.sh
modified: config/hypr/scripts/HyprLayoutModule.sh
modified: config/hypr/scripts/HyprlockWallpaperSelect.sh
modified: config/hypr/scripts/JavaManager.sh
modified: config/hypr/scripts/KeyBinds.sh
modified: config/hypr/scripts/KeyboardLayout.sh
modified: config/hypr/scripts/KillActiveProcess.sh
modified: config/hypr/scripts/Kitty_themes.sh
modified: config/hypr/scripts/KooLsDotsUpdate.sh
modified: config/hypr/scripts/Kool_Quick_Settings.sh
modified: config/hypr/scripts/LockScreen.sh
modified: config/hypr/scripts/LuaAutoReload.sh
modified: config/hypr/scripts/MediaCtrl.sh
modified: config/hypr/scripts/MonitorProfiles.sh
modified: config/hypr/scripts/OverviewToggle.sh
modified: config/hypr/scripts/Polkit-Diag.sh
modified: config/hypr/scripts/PortalHyprlandUbuntu.sh
modified: config/hypr/scripts/Refresh.sh
modified: config/hypr/scripts/RefreshNoWaybar.sh
modified: config/hypr/scripts/RofiEmoji.sh
modified: config/hypr/scripts/RofiFocusedWallpaperLink.sh
modified: config/hypr/scripts/RofiSearch.sh
modified: config/hypr/scripts/RofiThemeSelector-modified.sh
modified: config/hypr/scripts/RofiThemeSelector.sh
modified: config/hypr/scripts/ScreenShot.sh
modified: config/hypr/scripts/Sounds.sh
modified: config/hypr/scripts/Tak0-Autodispatch.sh
modified: config/hypr/scripts/Tak0-Per-Window-Switch.sh
modified: config/hypr/scripts/ThemeChanger.sh
modified: config/hypr/scripts/Toggle-Active-Window-Audio.sh
modified: config/hypr/scripts/Toggle-weather-waybar-units.sh
modified: config/hypr/scripts/TouchPad.sh
modified: config/hypr/scripts/UserConfigsSwitcher.sh
modified: config/hypr/scripts/Volume.sh
modified: config/hypr/scripts/WallpaperDaemon.sh
modified: config/hypr/scripts/WallustConfig.sh
modified: config/hypr/scripts/WallustSwww.sh
modified: config/hypr/scripts/WaybarLayout.sh
modified: config/hypr/scripts/WaybarScripts.sh
modified: config/hypr/scripts/WaybarStyles.sh
modified: config/hypr/scripts/fastfetch-wrapper.sh
modified: config/hypr/scripts/rofi-emacs-keybinds
modified: config/hypr/scripts/rofi-ssh-menu.sh
modified: config/hypr/scripts/sddm_wallpaper.sh
modified: config/hypr/scripts/set-default-thunar-terminal.sh
modified: config/hypr/scripts/update_WindowRules.sh
modified: copy.sh
modified: scripts/fix-systemsettings-lua.sh
modified: scripts/lib_apps.sh
modified: scripts/lib_backup.sh
modified: scripts/lib_copy.sh
modified: scripts/lib_prompts.sh
modified: scripts/migrate-hypr-to-lua.sh
* Changed return 1 to exit 0 in ubuntu portal check
Signed-off-by: Don Williams <don.e.williams@gmail.com>
* Fixing waybar spacing issues
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
* Fixing formatting issues in waybar style sheets
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
deleted: config/waybar/style/0-VERTICAL-Catpuccin-Mocha.css
deleted: config/waybar/style/0-VERTICAL-Golden-Noir.css
deleted: config/waybar/style/0-VERTICAL-Oglo-Chicklets.css
modified: config/waybar/style/Black-&-White-Monochrome.css
modified: config/waybar/style/Catppuccin-Frappe.css
modified: config/waybar/style/Catppuccin-Mocha.css
modified: config/waybar/style/Colored-Chroma-Glow.css
modified: config/waybar/style/Colored-Translucent.css
modified: config/waybar/style/Colorful-Aurora-Blossom.css
modified: config/waybar/style/Colorful-Aurora.css
modified: config/waybar/style/Colorful-Oglo-Chicklets.css
modified: config/waybar/style/Colorful-Rainbow-Spectrum.css
modified: config/waybar/style/Colorful-stolen-style.css
modified: config/waybar/style/Dark-Golden-Eclipse.css
modified: config/waybar/style/Dark-Golden-Noir.css
modified: config/waybar/style/Dark-Half-Moon.css
modified: config/waybar/style/Dark-Purpl.css
modified: config/waybar/style/Dark-Wallust-Obsidian-Edge.css
modified: config/waybar/style/Extra-Crimson.css
modified: config/waybar/style/Extra-EverForest.css
modified: config/waybar/style/Extra-Mauve.css
modified: config/waybar/style/Extra-Modern-Combined-Transparent.css
modified: config/waybar/style/Extra-Simple-Pink.css
modified: config/waybar/style/Light-Monochrome-Contrast.css
modified: config/waybar/style/Light-Obsidian-Glow.css
modified: config/waybar/style/Rainbow-RGB-Bordered.css
modified: config/waybar/style/Retro-Simple-Style.css
modified: config/waybar/style/Transparent-Crystal-Clear.css
modified: config/waybar/style/VERTICAL-Catpuccin-Mocha.css
modified: config/waybar/style/Wallust-Bordered-Chroma-Fusion-Edge.css
modified: config/waybar/style/Wallust-Bordered-Chroma-Simple.css
modified: config/waybar/style/Wallust-Chroma-Edge.css
modified: config/waybar/style/Wallust-Chroma-Fusion.css
modified: config/waybar/style/Wallust-Chroma-Tally-V2.css
modified: config/waybar/style/Wallust-Chroma-Tally.css
modified: config/waybar/style/Wallust-Colored.css
modified: config/waybar/style/Wallust-Simple.css
modified: config/waybar/style/Wallust-Transparent-Crystal-Clear.css
* Fixed Oglo Chickets.css
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
* Fixed Oglo Chickets.css part 2
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
* Fixed Oglo colors
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
* Working on Oglo still
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
* Refactor of layout configs no longer global
Now it's per monitor/workspace
When you change a layout it's written to ~/.config/hypr/workspaces.conf
to make it persistent
Thank you @aki for finding / reporting this issue
This is a way better option vs. global
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/Keybinds.conf
modified: config/hypr/lua/keybinds.lua
modified: config/hypr/scripts/ChangeLayout.sh
modified: config/hypr/scripts/HyprLayoutModule.sh
modified: config/hypr/scripts/KeyHints.sh
modified: config/hypr/scripts/KeybindsLayoutInit.sh
new file: config/hypr/scripts/LayoutKeybindDispatch.sh
new file: config/hypr/scripts/PersistWorkspaceLayout.sh
modified: config/hypr/scripts/ThemeChanger.sh
modified: config/hypr/scripts/WallustSwww.sh
modified: config/yazi/keymap.toml
modified: config/yazi/package.toml
* Fixed layout script wasn't updating workspaces.conf
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/ChangeLayout.sh
* Moved some scripts, fixed wallpapereffects/changer
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/Keybinds.conf
modified: config/hypr/configs/Startup_Apps.conf
modified: config/hypr/lua/keybinds.lua
modified: config/hypr/lua/startup.lua
renamed: config/hypr/UserScripts/WallpaperAutoChange.sh -> config/hypr/scripts/WallpaperAutoChange.sh
renamed: config/hypr/UserScripts/WallpaperEffects.sh -> config/hypr/scripts/WallpaperEffects.sh
renamed: config/hypr/UserScripts/WallpaperRandom.sh -> config/hypr/scripts/WallpaperRandom.sh
renamed: config/hypr/UserScripts/WallpaperSelect.sh -> config/hypr/scripts/WallpaperSelect.sh
modified: config/hypr/scripts/WallustSwww.sh
renamed: config/hypr/UserScripts/ZshChangeTheme.sh -> config/hypr/scripts/ZshChangeTheme.sh
* Archived UserScripts/Tak0-AutoDispatch.sh
Signed-off-by: Don Williams <don.e.williams@gmail.com>
* Archived UserScripts/Tak0-Autodispatch.sh
Not supported and no longer needed
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
new file: archive/Tak0-Autodispatch.sh
* Updated CHANGELOG
* Fixing some binds in LUA mode
* Fixed window pane binds in LUA mode
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/configs/Keybinds.conf
modified: config/hypr/lua/keybinds.lua
modified: config/hypr/scripts/LayoutKeybindDispatch.sh
* windowrulee: hyprland share picker
* Fixed SUPER Q handing in LUA / fixed migraiton script
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/lua/keybind_helpers.lua
modified: config/hypr/lua/user_keybinds_helper.lua
* Really fixed SUPER Q and migraiton template
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/lua/keybind_helpers.lua
modified: config/hypr/lua/user_keybinds_helper.lua
* Fixed keybinds in LUA config mode
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
new file: config/hypr/configs/system_keybinds.lua
modified: config/hypr/lua/keybinds.lua
* Fixed copy.sh lua files, WallpaperEffects in lua
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/scripts/WallpaperEffects.sh
modified: copy.sh
* Fixed scrolling bindings copy.sh error fixed
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/Keybinds.conf
modified: config/hypr/scripts/LayoutKeybindDispatch.sh
modified: scripts/lib_copy.sh
* Added lua files for remaining user config files
Upd Lua migraiton to either port existing UserConfigs files
or make sure the templates are there instead
Kool_Quick_Settings menu now includes them for bothh hyprlang and lua
workflows
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
new file: config/hypr/UserConfigs/user_animations.lua
new file: config/hypr/UserConfigs/user_defaults.lua
new file: config/hypr/UserConfigs/user_env.lua
new file: config/hypr/UserConfigs/user_laptops.lua
new file: config/hypr/UserConfigs/user_layer_rules.lua
new file: config/hypr/UserConfigs/user_settings.lua
new file: config/hypr/UserConfigs/user_startup.lua
new file: config/hypr/UserConfigs/user_window_rules.lua
modified: config/hypr/scripts/Kool_Quick_Settings.sh
modified: scripts/migrate-hypr-to-lua.sh
* Added another example to sample file
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/UserConfigs/user_settings.lua
* Fixed spacing on powermenus
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/waybar/style/Colorful-Aurora-Blossom.css
modified: config/waybar/style/Colorful-Aurora.css
modified: config/waybar/style/Colorful-Oglo-Chicklets.css
modified: config/waybar/style/Colorful-Rainbow-Spectrum.css
modified: config/waybar/style/Colorful-stolen-style.css
modified: config/waybar/style/Extra-Rose-Pine.css
modified: config/waybar/style/Light-Monochrome-Contrast.css
modified: config/waybar/style/Wallust-Bordered-Chroma-Fusion-Edge.css
modified: config/waybar/style/Wallust-Bordered-Chroma-Simple.css
modified: config/waybar/style/Wallust-Box-type.css
modified: config/waybar/style/Wallust-Chroma-Edge.css
modified: config/waybar/style/Wallust-Chroma-Fusion.css
modified: config/waybar/style/Wallust-Simple.css
* Fixed dup keybinds,thunar launch script
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/Keybinds.conf
modified: config/hypr/configs/system_keybinds.lua
modified: config/hypr/lua/keybinds.lua
new file: config/hypr/scripts/LaunchThunar.sh
modified: scripts/migrate-hypr-to-lua.sh
* Added spring-curves animation
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
new file: config/hypr/animations/Spring-curves.conf
new file: config/hypr/animations/Spring-curves.lua
modified: config/hypr/scripts/Animations.sh
* Added LUA cfg animation files to match hyprlang
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
new file: config/hypr/animations/00-default.lua
new file: config/hypr/animations/01-default - v2.lua
new file: config/hypr/animations/03- Disable Animation.lua
new file: config/hypr/animations/END-4.lua
new file: config/hypr/animations/HYDE - Vertical.lua
new file: config/hypr/animations/HYDE - default.lua
new file: config/hypr/animations/HYDE - minimal-1.lua
new file: config/hypr/animations/HYDE - minimal-2.lua
new file: config/hypr/animations/HYDE - optimized.lua
new file: config/hypr/animations/ML4W - classic.lua
new file: config/hypr/animations/ML4W - dynamic.lua
new file: config/hypr/animations/ML4W - fast.lua
new file: config/hypr/animations/ML4W - high.lua
new file: config/hypr/animations/ML4W - moving.lua
new file: config/hypr/animations/ML4W - standard.lua
new file: config/hypr/animations/Mahaveer - me-1.lua
new file: config/hypr/animations/Mahaveer - me-2.lua
* Fixed layout keybinds in LUA mode (finally, I hope)
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/configs/ENVariables.conf
modified: config/hypr/lua/env.lua
modified: config/hypr/scripts/LayoutKeybindDispatch.sh
* Fixed bindings, added launchers for term and files
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/Keybinds.conf
modified: config/hypr/configs/system_keybinds.lua
modified: config/hypr/lua/keybinds.lua
new file: config/hypr/scripts/LaunchFileManager.sh
new file: config/hypr/scripts/LaunchTerminal.sh
* Fixed SUPERLR in Monocle layout not working
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/configs/system_keybinds.lua
modified: config/hypr/lua/keybinds.lua
modified: config/hypr/scripts/LayoutKeybindDispatch.sh
* Disabled nw-tray for ubuntu, now optional
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/configs/Startup_Apps.conf
modified: config/hypr/lua/startup.lua
* Add: starship sample config files
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
new file: config/starship/starship-1-line-nix.toml
new file: config/starship/starship-1-line-simple.toml
new file: config/starship/starship-2-line-classic-garuda.toml
new file: config/starship/starship-2-line-cool.toml
new file: config/starship/starship-2-line-nixos.toml
new file: config/starship/starship-chris-titus.toml
new file: config/starship/starship-classic.toml
new file: config/starship/starship-eric-dubois.toml
new file: config/starship/starship-garuda-mokka.toml
new file: config/starship/starship-instantos.toml
new file: config/starship/starship-nobara.toml
new file: config/starship/starship-purple-1line.toml
new file: config/starship/starship-ranbow.toml
new file: config/starship/starship-simple-prompt.toml
new file: config/starship/starship-zen.toml
* Added starship config directory to copy.sh
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: scripts/lib_copy.sh
* Added kooldots-add-ssh-agent systemd service for ssh keys
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/ENVariables.conf
modified: config/hypr/configs/Startup_Apps.conf
modified: config/hypr/configs/SystemSettings.conf
modified: config/hypr/lua/env.lua
modified: config/hypr/lua/settings.lua
new file: config/hypr/scripts/kooldots-add-ssh-agent.sh
* Added info on adding keys to agent
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/kooldots-add-ssh-agent.sh
* Add new menu for Change Layour rofi menu
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/scripts/HyprLayoutModule.sh
new file: config/rofi/config-layout.rasi
* Removed starship- from config files look better in menu
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
renamed: config/starship/starship-1-line-nix.toml -> config/starship/1-line-nix.toml
renamed: config/starship/starship-1-line-simple.toml -> config/starship/1-line-simple.toml
renamed: config/starship/starship-2-line-classic-garuda.toml -> config/starship/2-line-classic-garuda.toml
renamed: config/starship/starship-2-line-cool.toml -> config/starship/2-line-cool.toml
renamed: config/starship/starship-2-line-nixos.toml -> config/starship/2-line-nixos.toml
renamed: config/starship/starship-chris-titus.toml -> config/starship/chris-titus.toml
renamed: config/starship/starship-classic.toml -> config/starship/classic.toml
renamed: config/starship/starship-eric-dubois.toml -> config/starship/eric-dubois.toml
renamed: config/starship/starship-garuda-mokka.toml -> config/starship/garuda-mokka.toml
renamed: config/starship/starship-instantos.toml -> config/starship/instantos.toml
renamed: config/starship/starship-nobara.toml -> config/starship/nobara.toml
renamed: config/starship/starship-purple-1line.toml -> config/starship/purple-1line.toml
renamed: config/starship/starship-ranbow.toml -> config/starship/ranbow.toml
renamed: config/starship/starship-simple-prompt.toml -> config/starship/simple-prompt.toml
renamed: config/starship/starship-zen.toml -> config/starship/zen.toml
* Add script to change Starship prompt
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
new file: config/hypr/scripts/ChangeStarshipPrompt.sh
* Added own rofi menu and title
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/ChangeStarshipPrompt.sh
new file: config/rofi/config-starship.rasi
* Adjusted height of starship menu
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/rofi/config-starship.rasi
* Removed a duplicate and bad file
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
deleted: instantos.toml
deleted: zen.toml
* Removed dup prompt, adjusted rasi height add to menu
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/Kool_Quick_Settings.sh
modified: config/rofi/config-starship.rasi
deleted: config/starship/garuda-mokka.toml
* Updated CHANGELOG for starship menu
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
* v2.3.24 title was removed by mistake
Signed-off-by: Don Williams <don.e.williams@gmail.com>
* Restore hyprlock-1080/hyprlock.conf
Signed-off-by: Don Williams <don.e.williams@gmail.com>
* Added script to toggle waybar 12/24hr
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/scripts/Kool_Quick_Settings.sh
new file: config/hypr/scripts/ToggleWaybarTime.sh
* Fixed notifcation on waybar time change
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/ToggleWaybarTime.sh
* Fixed ChangeStarshipPrompt not starting in LUA workflow
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/ChangeStarshipPrompt.sh
* Added vill minimalist starship prompt
Signed-off-by: Don Williams <don.e.williams@gmail.com>
* Updated copy.sh to check for hyprland.lua
Preventing a failed startup on next login
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: copy.sh
---------
Signed-off-by: Don Williams <don.e.williams@gmail.com>
Signed-off-by: Don Williams <Don.e.williams@gmail.com>
Co-authored-by: brockar <martin@mguz.dev>
Diffstat (limited to 'config/hypr/scripts/sddm_wallpaper.sh')
| -rwxr-xr-x | config/hypr/scripts/sddm_wallpaper.sh | 599 |
1 files changed, 527 insertions, 72 deletions
diff --git a/config/hypr/scripts/sddm_wallpaper.sh b/config/hypr/scripts/sddm_wallpaper.sh index deee938c..f30bac9b 100755 --- a/config/hypr/scripts/sddm_wallpaper.sh +++ b/config/hypr/scripts/sddm_wallpaper.sh @@ -7,69 +7,409 @@ # ================================================== # SDDM Wallpaper and Wallust Colors Setter -# for the upcoming changes on the simple_sddm_theme - # variables terminal=kitty PICTURES_DIR="$(xdg-user-dir PICTURES 2>/dev/null || echo "$HOME/Pictures")" wallDIR="$PICTURES_DIR/wallpapers" -SCRIPTSDIR="$HOME/.config/hypr/scripts" -wallpaper_current="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" -wallpaper_modified="$HOME/.config/hypr/wallpaper_effects/.wallpaper_modified" +SCRIPTSDIR="${XDG_CONFIG_HOME:-$HOME/.config}/hypr/scripts" +wallpaper_link="${XDG_CONFIG_HOME:-$HOME/.config}/rofi/.current_wallpaper" +wallpaper_current="${XDG_CONFIG_HOME:-$HOME/.config}/hypr/wallpaper_effects/.wallpaper_current" +wallpaper_modified="${XDG_CONFIG_HOME:-$HOME/.config}/hypr/wallpaper_effects/.wallpaper_modified" +rofi_theme="${XDG_CONFIG_HOME:-$HOME/.config}/rofi/config-wallpaper.rasi" +# Directory for swaync +iDIR="${XDG_CONFIG_HOME:-$HOME/.config}/swaync/images" +iDIRi="${XDG_CONFIG_HOME:-$HOME/.config}/swaync/icons" +video_preview_cache="$HOME/.cache/video_preview" +sddm_video_cache="$HOME/.cache/sddm_preview" +# shellcheck source=/dev/null +. "$SCRIPTSDIR/WallpaperCmd.sh" 2>/dev/null || true + +find_notify_send() { + local candidate="" + if candidate="$(command -v notify-send 2>/dev/null)"; then + if [[ -n "$candidate" && -x "$candidate" ]]; then + printf '%s\n' "$candidate" + return 0 + fi + fi + for candidate in /usr/bin/notify-send /usr/sbin/notify-send /bin/notify-send /sbin/notify-send; do + if [[ -x "$candidate" ]]; then + printf '%s\n' "$candidate" + return 0 + fi + done + return 1 +} + +NOTIFY_SEND_BIN="$(find_notify_send || true)" + +notify_err() { + if [[ -n "$NOTIFY_SEND_BIN" ]]; then + if [[ -f "$iDIR/error.png" ]]; then + "$NOTIFY_SEND_BIN" -i "$iDIR/error.png" "SDDM" "$1" + else + "$NOTIFY_SEND_BIN" "SDDM" "$1" + fi + fi +} + +notify_ok() { + if [[ -n "$NOTIFY_SEND_BIN" ]]; then + if [[ -f "$iDIR/ja.png" ]]; then + "$NOTIFY_SEND_BIN" -i "$iDIR/ja.png" "SDDM" "$1" + else + "$NOTIFY_SEND_BIN" "SDDM" "$1" + fi + fi +} + +read_cached_wallpaper() { + local cache_file="$1" + [[ -f "$cache_file" ]] || return 1 + awk 'NF && $0 !~ /^filter/ {print; exit}' "$cache_file" +} + +read_wallpaper_from_query() { + local monitor="$1" + [[ -n "$monitor" ]] || return 1 + [[ -n "${WWW_CMD:-}" ]] || return 1 + command -v "$WWW_CMD" >/dev/null 2>&1 || return 1 + "$WWW_CMD" query 2>/dev/null | awk -v mon="$monitor" ' + { + line=$0 + sub(/^Monitor[[:space:]]+/, "", line) + sub(/^:[[:space:]]*/, "", line) + mon_name=line + sub(/:.*/, "", mon_name) + gsub(/^[[:space:]]+|[[:space:]]+$/, "", mon_name) + if (mon_name != mon) next + path=line + sub(/^.*image:[[:space:]]*/, "", path) + gsub(/^[[:space:]]+|[[:space:]]+$/, "", path) + if (path != line && length(path) > 0) { + print path + exit + } + } + ' +} + +read_wallpaper_from_cache() { + local monitor="$1" + local cache_root="${WWW_CACHE_DIR:-$HOME/.cache/awww}" + local cache_file="$cache_root/$monitor" + local fallback_cache="" + local path="" + + case "$cache_root" in + "$HOME/.cache/awww") + fallback_cache="$HOME/.cache/swww/$monitor" + ;; + "$HOME/.cache/swww") + fallback_cache="$HOME/.cache/awww/$monitor" + ;; + esac + + path="$(read_cached_wallpaper "$cache_file" 2>/dev/null || true)" + if [[ -z "$path" && -n "$fallback_cache" ]]; then + path="$(read_cached_wallpaper "$fallback_cache" 2>/dev/null || true)" + fi + + [[ -n "$path" && -f "$path" ]] || return 1 + printf '%s\n' "$path" +} + +calculate_rofi_icon_size() { + local monitor="$1" + local scale_factor="" + local monitor_height="" + local icon_size="" + local adjusted_icon_size="" + + if [[ -z "$monitor" ]]; then + monitor="$(get_focused_monitor 2>/dev/null || true)" + fi + + if [[ -z "$monitor" ]]; then + printf '22\n' + return 0 + fi + + if command -v hyprctl >/dev/null 2>&1 && command -v jq >/dev/null 2>&1 && command -v bc >/dev/null 2>&1; then + scale_factor="$(hyprctl monitors -j 2>/dev/null | jq -r --arg mon "$monitor" '.[] | select(.name == $mon) | .scale' | head -n1)" + monitor_height="$(hyprctl monitors -j 2>/dev/null | jq -r --arg mon "$monitor" '.[] | select(.name == $mon) | .height' | head -n1)" + if [[ -n "$scale_factor" && -n "$monitor_height" && "$scale_factor" != "null" && "$monitor_height" =~ ^[0-9]+$ ]]; then + icon_size="$(echo "scale=1; ($monitor_height * 3) / ($scale_factor * 150)" | bc 2>/dev/null || true)" + adjusted_icon_size="$(echo "$icon_size" | awk '{if ($1 < 15) $1 = 20; if ($1 > 25) $1 = 25; print int($1)}')" + if [[ "$adjusted_icon_size" =~ ^[0-9]+$ ]]; then + printf '%s\n' "$adjusted_icon_size" + return 0 + fi + fi + fi + + printf '22\n' +} + +resolve_link_or_file() { + local path="$1" + local resolved="" + if [[ -L "$path" ]]; then + resolved="$(readlink -f "$path" 2>/dev/null || true)" + if [[ -n "$resolved" && -f "$resolved" ]]; then + printf '%s\n' "$resolved" + return 0 + fi + fi + if [[ -f "$path" ]]; then + printf '%s\n' "$path" + return 0 + fi + return 1 +} + +get_active_workspace_monitor() { + if ! command -v hyprctl >/dev/null 2>&1; then + return 1 + fi + if command -v jq >/dev/null 2>&1; then + hyprctl activeworkspace -j 2>/dev/null | jq -r '.monitor // empty' | head -n1 + else + hyprctl monitors 2>/dev/null | awk '/^Monitor/{name=$2} /focused: yes/{print name; exit}' + fi +} + +get_focused_monitor() { + if ! command -v hyprctl >/dev/null 2>&1; then + return 1 + fi + if command -v jq >/dev/null 2>&1; then + hyprctl monitors -j 2>/dev/null | jq -r '.[] | select(.focused) | .name' | head -n1 + else + hyprctl monitors 2>/dev/null | awk '/^Monitor/{name=$2} /focused: yes/{print name; exit}' + fi +} + +monitor_exists() { + local monitor="$1" + [[ -n "$monitor" ]] || return 1 + command -v hyprctl >/dev/null 2>&1 || return 1 + if command -v jq >/dev/null 2>&1; then + hyprctl monitors -j 2>/dev/null | jq -r --arg mon "$monitor" '.[] | select(.name == $mon) | .name' | grep -qx "$monitor" + else + hyprctl monitors 2>/dev/null | awk '/^Monitor/{print $2}' | grep -qx "$monitor" + fi +} + +resolve_target_monitor() { + local requested="$1" + local monitor="" + if monitor_exists "$requested"; then + printf '%s\n' "$requested" + return 0 + fi + monitor="$(get_active_workspace_monitor 2>/dev/null || true)" + if monitor_exists "$monitor"; then + printf '%s\n' "$monitor" + return 0 + fi + monitor="$(get_focused_monitor 2>/dev/null || true)" + if [[ -n "$monitor" ]]; then + printf '%s\n' "$monitor" + return 0 + fi + return 1 +} + +resolve_normal_wallpaper() { + local monitor="$1" + local path="" + local per_monitor_rofi_link="" + local per_monitor_current="" + + if [[ -n "$monitor" ]]; then + per_monitor_rofi_link="${XDG_CONFIG_HOME:-$HOME/.config}/rofi/.current_wallpaper_${monitor}" + per_monitor_current="${XDG_CONFIG_HOME:-$HOME/.config}/hypr/wallpaper_effects/.wallpaper_current_${monitor}" + + path="$(read_wallpaper_from_query "$monitor" 2>/dev/null || true)" + if [[ -z "$path" ]]; then + path="$(resolve_link_or_file "$per_monitor_rofi_link" 2>/dev/null || true)" + fi + if [[ -z "$path" ]]; then + path="$(resolve_link_or_file "$per_monitor_current" 2>/dev/null || true)" + fi + if [[ -z "$path" ]]; then + path="$(read_wallpaper_from_cache "$monitor" 2>/dev/null || true)" + fi + fi + + if [[ -z "$path" ]]; then + path="$(resolve_link_or_file "$wallpaper_current" 2>/dev/null || true)" + fi + if [[ -z "$path" ]]; then + path="$(resolve_link_or_file "$wallpaper_link" 2>/dev/null || true)" + fi + + [[ -n "$path" && -f "$path" ]] || return 1 + printf '%s\n' "$path" +} + +resolve_effects_wallpaper() { + local monitor="$1" + local path="" + local per_monitor_modified="" + + if [[ -n "$monitor" ]]; then + per_monitor_modified="${XDG_CONFIG_HOME:-$HOME/.config}/hypr/wallpaper_effects/.wallpaper_modified_${monitor}" + path="$(resolve_link_or_file "$per_monitor_modified" 2>/dev/null || true)" + fi + + if [[ -z "$path" ]]; then + path="$(resolve_link_or_file "$wallpaper_modified" 2>/dev/null || true)" + fi + if [[ -z "$path" ]]; then + path="$(resolve_normal_wallpaper "$monitor" 2>/dev/null || true)" + fi + + [[ -n "$path" && -f "$path" ]] || return 1 + printf '%s\n' "$path" +} + +resolve_current_sddm_background() { + local sddm_simple="$1" + local candidate="" + for candidate in "$sddm_simple/Backgrounds/default" "$sddm_simple/Backgrounds/default.jpg" "$sddm_simple/Backgrounds/default.png"; do + if [[ -f "$candidate" ]]; then + printf '%s\n' "$candidate" + return 0 + fi + done + return 1 +} + +extract_color() { + local key="$1" + local value + value="$(grep -oP "$key:\\s*\\K#[A-Fa-f0-9]+" "$rofi_wallust" | head -n1)" + printf '%s\n' "$value" +} + +prepare_sddm_wallpaper() { + local selected_file="$1" + local target_monitor="$2" + local prepared_path="$selected_file" + + if [[ ! -f "$selected_file" ]]; then + notify_err "Selected file not found for ${target_monitor:-current context}." + return 1 + fi + + if [[ "$selected_file" =~ \.(mp4|mkv|mov|webm|MP4|MKV|MOV|WEBM)$ ]]; then + if ! command -v ffmpeg >/dev/null 2>&1; then + notify_err "ffmpeg not found; cannot convert selected video wallpaper." + return 1 + fi + mkdir -p "$sddm_video_cache" + local video_name + video_name="$(basename "$selected_file")" + prepared_path="$sddm_video_cache/${video_name}.png" + if ! ffmpeg -v error -y -i "$selected_file" -ss 00:00:01.000 -vframes 1 "$prepared_path"; then + notify_err "Could not generate preview from selected video wallpaper." + return 1 + fi + fi + + printf '%s\n' "$prepared_path" +} + +# Parse arguments +mode="effects" # default +requested_monitor="${SDDM_TARGET_MONITOR:-${HYPRLOCK_TARGET_MONITOR:-}}" +for arg in "$@"; do + case "$arg" in + --normal) + mode="normal" + ;; + --effects) + mode="effects" + ;; + --monitor=*) + requested_monitor="${arg#--monitor=}" + ;; + --*) + ;; + *) + if [[ -z "$requested_monitor" ]]; then + requested_monitor="$arg" + fi + ;; + esac +done + # Resolve SDDM themes directory (standard paths and NixOS path) sddm_themes_dir="/usr/share/sddm/themes" -if [ ! -d "$sddm_themes_dir" ] && [ -d "/run/current-system/sw/share/sddm/themes" ]; then +if [[ ! -d "$sddm_themes_dir" && -d "/run/current-system/sw/share/sddm/themes" ]]; then sddm_themes_dir="/run/current-system/sw/share/sddm/themes" fi sddm_simple="$sddm_themes_dir/simple_sddm_2" +sddm_theme_conf="$sddm_simple/theme.conf" # rofi-wallust-sddm colors path -rofi_wallust="$HOME/.config/rofi/wallust/colors-rofi.rasi" -sddm_theme_conf="$sddm_simple/theme.conf" +rofi_wallust="${XDG_CONFIG_HOME:-$HOME/.config}/rofi/wallust/colors-rofi.rasi" if [[ ! -f "$rofi_wallust" ]]; then - notify-send -i "$iDIR/error.png" "SDDM" "Wallust colors file not found ($rofi_wallust). Aborting." + notify_err "Wallust colors file not found ($rofi_wallust). Aborting." + exit 1 +fi +if [[ ! -d "$sddm_simple/Backgrounds" ]]; then + notify_err "SDDM theme backgrounds not found ($sddm_simple/Backgrounds)." + exit 1 +fi +if [[ ! -f "$sddm_theme_conf" ]]; then + notify_err "SDDM theme config not found ($sddm_theme_conf)." + exit 1 +fi +if [[ ! -d "$wallDIR" ]]; then + notify_err "Wallpaper directory not found ($wallDIR)." + exit 1 +fi +if ! command -v rofi >/dev/null 2>&1; then + notify_err "rofi not found." + exit 1 +fi +if ! command -v "$terminal" >/dev/null 2>&1; then + notify_err "Terminal '$terminal' not found." + exit 1 +fi +if ! command -v sudo >/dev/null 2>&1; then + notify_err "sudo not found." exit 1 fi -# Directory for swaync -iDIR="$HOME/.config/swaync/images" -iDIRi="$HOME/.config/swaync/icons" - -# Parse arguments -mode="effects" # default -if [[ "$1" == "--normal" ]]; then - mode="normal" -elif [[ "$1" == "--effects" ]]; then - mode="effects" +# Abort on NixOS where this repo doesn't manage SDDM and themes are typically read-only +if hostnamectl 2>/dev/null | grep -q 'Operating System: NixOS'; then + notify_err "NixOS detected: skipping SDDM background change." + exit 0 fi # Abort if SDDM is not running (avoid errors on non-SDDM systems) if command -v systemctl >/dev/null 2>&1; then if ! systemctl is-active --quiet sddm; then - notify-send -i "$iDIR/error.png" "SDDM" "SDDM is not running. Skipping SDDM wallpaper update." + notify_err "SDDM is not running. Skipping SDDM wallpaper update." exit 0 fi elif ! pidof sddm >/dev/null 2>&1; then - notify-send -i "$iDIR/error.png" "SDDM" "SDDM is not running. Skipping SDDM wallpaper update." + notify_err "SDDM is not running. Skipping SDDM wallpaper update." exit 0 fi # Extract colors from rofi wallust config - -extract_color() { - local key="$1" - local value - value=$(grep -oP "$key:\s*\K#[A-Fa-f0-9]+" "$rofi_wallust" | head -n1) - echo "$value" -} - -color0=$(extract_color "color1") -color1=$(extract_color "color0") -color7=$(extract_color "color14") -color10=$(extract_color "color10") -color12=$(extract_color "color12") -color13=$(extract_color "color13") -foreground=$(extract_color "foreground") +color0="$(extract_color "color1")" +color1="$(extract_color "color0")" +color7="$(extract_color "color14")" +color10="$(extract_color "color10")" +color12="$(extract_color "color12")" +color13="$(extract_color "color13")" +foreground="$(extract_color "foreground")" missing_colors=() for var in color0 color1 color7 color10 color12 color13 foreground; do @@ -79,57 +419,172 @@ for var in color0 color1 color7 color10 color12 color13 foreground; do done if [[ ${#missing_colors[@]} -gt 0 ]]; then - notify-send -i "$iDIR/error.png" "SDDM" "Missing color(s): ${missing_colors[*]}. Run Wallust first." + notify_err "Missing color(s): ${missing_colors[*]}. Run Wallust first." exit 1 fi -#background-color=$(grep -oP 'background:\s*\K#[A-Fa-f0-9]+' "$rofi_wallust") -# wallpaper to use +target_monitor="$(resolve_target_monitor "$requested_monitor" 2>/dev/null || true)" +current_monitor_path="" if [[ "$mode" == "normal" ]]; then - wallpaper_path="$wallpaper_current" + current_monitor_path="$(resolve_normal_wallpaper "$target_monitor" 2>/dev/null || true)" else - wallpaper_path="$wallpaper_modified" + current_monitor_path="$(resolve_effects_wallpaper "$target_monitor" 2>/dev/null || true)" fi +current_sddm_path="$(resolve_current_sddm_background "$sddm_simple" 2>/dev/null || true)" -# Abort on NixOS where this repo doesn't manage SDDM and themes are typically read-only -if hostnamectl 2>/dev/null | grep -q 'Operating System: NixOS'; then - notify-send -i "$iDIR/error.png" "SDDM" "NixOS detected: skipping SDDM background change." +current_monitor_label="" +if [[ -n "$current_monitor_path" && -f "$current_monitor_path" ]]; then + if [[ -n "$target_monitor" ]]; then + current_monitor_label="Current monitor ($target_monitor): $(basename "$current_monitor_path")" + else + current_monitor_label="Current monitor wallpaper: $(basename "$current_monitor_path")" + fi +fi + +current_sddm_label="" +if [[ -n "$current_sddm_path" && -f "$current_sddm_path" ]]; then + current_sddm_label="Current SDDM background: $(basename "$current_sddm_path")" +fi + +mapfile -d '' WALLPAPERS < <(find -L "$wallDIR" -type f \( \ + -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.gif" -o \ + -iname "*.bmp" -o -iname "*.tiff" -o -iname "*.webp" -o \ + -iname "*.mp4" -o -iname "*.mkv" -o -iname "*.mov" -o -iname "*.webm" \ +\) -print0) + +if [[ ${#WALLPAPERS[@]} -eq 0 ]]; then + notify_err "No wallpapers found in $wallDIR." + exit 1 +fi + +random_wallpaper="${WALLPAPERS[$((RANDOM % ${#WALLPAPERS[@]}))]}" +random_label="Random: $(basename "$random_wallpaper")" + +has_ffmpeg=0 +if command -v ffmpeg >/dev/null 2>&1; then + has_ffmpeg=1 +fi + +menu_message="Select SDDM wallpaper" +if [[ -n "$target_monitor" ]]; then + menu_message="Select SDDM wallpaper for $target_monitor" +fi +rofi_icon_size="$(calculate_rofi_icon_size "$target_monitor")" +rofi_override="element-icon{size:${rofi_icon_size}%;}" + +menu() { + local -a sorted_options=() + local pic_path pic_name cache_preview_image + + mapfile -t sorted_options < <(printf '%s\n' "${WALLPAPERS[@]}" | sort) + + printf "%s\x00icon\x1f%s\n" "$random_label" "$random_wallpaper" + if [[ -n "$current_monitor_label" && -n "$current_monitor_path" ]]; then + printf "%s\x00icon\x1f%s\n" "$current_monitor_label" "$current_monitor_path" + fi + if [[ -n "$current_sddm_label" && -n "$current_sddm_path" ]]; then + printf "%s\x00icon\x1f%s\n" "$current_sddm_label" "$current_sddm_path" + fi + + for pic_path in "${sorted_options[@]}"; do + pic_name="$(basename "$pic_path")" + if [[ "$pic_name" =~ \.(mp4|mkv|mov|webm|MP4|MKV|MOV|WEBM)$ ]]; then + cache_preview_image="$video_preview_cache/${pic_name}.png" + if [[ ! -f "$cache_preview_image" && "$has_ffmpeg" -eq 1 ]]; then + mkdir -p "$video_preview_cache" + ffmpeg -v error -y -i "$pic_path" -ss 00:00:01.000 -vframes 1 "$cache_preview_image" >/dev/null 2>&1 || true + fi + if [[ -f "$cache_preview_image" ]]; then + printf "%s\x00icon\x1f%s\n" "$pic_name" "$cache_preview_image" + else + printf "%s\n" "$pic_name" + fi + else + printf "%s\x00icon\x1f%s\n" "$pic_name" "$pic_path" + fi + done +} + +rofi_cmd=(rofi -i -show -dmenu -mesg "$menu_message" -theme-str "$rofi_override") +if [[ -f "$rofi_theme" ]]; then + rofi_cmd+=(-config "$rofi_theme") +fi + +choice="$(menu | "${rofi_cmd[@]}")" +choice="${choice#"${choice%%[![:space:]]*}"}" +choice="${choice%"${choice##*[![:space:]]}"}" + +if [[ -z "$choice" ]]; then exit 0 fi -# Launch terminal and apply changes -$terminal -e bash -c " -echo 'Enter your password to update SDDM wallpapers and colors'; +selected_file="" +if [[ "$choice" == "$random_label" ]]; then + selected_file="$random_wallpaper" +elif [[ -n "$current_monitor_label" && "$choice" == "$current_monitor_label" ]]; then + selected_file="$current_monitor_path" +elif [[ -n "$current_sddm_label" && "$choice" == "$current_sddm_label" ]]; then + selected_file="$current_sddm_path" +elif [[ -f "$choice" ]]; then + selected_file="$choice" +else + choice_basename="$(basename "$choice" | sed 's/\(.*\)\.[^.]*$/\1/')" + selected_file="$(find -L "$wallDIR" -type f -iname "$choice_basename.*" -print -quit)" +fi -# Update the colors in the SDDM config -sudo sed -i \"s/HeaderTextColor=\\\"#.*\\\"/HeaderTextColor=\\\"$color13\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/DateTextColor=\\\"#.*\\\"/DateTextColor=\\\"$color13\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/TimeTextColor=\\\"#.*\\\"/TimeTextColor=\\\"$color13\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/DropdownSelectedBackgroundColor=\\\"#.*\\\"/DropdownSelectedBackgroundColor=\\\"$color13\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/SystemButtonsIconsColor=\\\"#.*\\\"/SystemButtonsIconsColor=\\\"$color13\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/SessionButtonTextColor=\\\"#.*\\\"/SessionButtonTextColor=\\\"$color13\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/VirtualKeyboardButtonTextColor=\\\"#.*\\\"/VirtualKeyboardButtonTextColor=\\\"$color13\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/HighlightBackgroundColor=\\\"#.*\\\"/HighlightBackgroundColor=\\\"$color12\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/LoginFieldTextColor=\\\"#.*\\\"/LoginFieldTextColor=\\\"$color12\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/PasswordFieldTextColor=\\\"#.*\\\"/PasswordFieldTextColor=\\\"$color12\\\"/\" \"$sddm_theme_conf\" +if [[ -z "$selected_file" || ! -f "$selected_file" ]]; then + notify_err "Selected wallpaper not found: $choice" + exit 1 +fi -sudo sed -i \"s/DropdownBackgroundColor=\\\"#.*\\\"/DropdownBackgroundColor=\\\"$color1\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/HighlightTextColor=\\\"#.*\\\"/HighlightTextColor=\\\"$color10\\\"/\" \"$sddm_theme_conf\" +wallpaper_path="$(prepare_sddm_wallpaper "$selected_file" "$target_monitor" 2>/dev/null || true)" +if [[ -z "$wallpaper_path" || ! -f "$wallpaper_path" ]]; then + notify_err "Could not prepare selected wallpaper for SDDM." + exit 1 +fi + +# Launch terminal and apply changes +if ! "$terminal" -e bash -c ' +set -e +theme_conf="$1" +wallpaper_path="$2" +sddm_simple="$3" +color13="$4" +color12="$5" +color1="$6" +color10="$7" +color7="$8" -sudo sed -i \"s/PlaceholderTextColor=\\\"#.*\\\"/PlaceholderTextColor=\\\"$color7\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/UserIconColor=\\\"#.*\\\"/UserIconColor=\\\"$color7\\\"/\" \"$sddm_theme_conf\" -sudo sed -i \"s/PasswordIconColor=\\\"#.*\\\"/PasswordIconColor=\\\"$color7\\\"/\" \"$sddm_theme_conf\" +echo "Enter your password to update SDDM wallpapers and colors" + +# Update the colors in the SDDM config +sudo sed -i "s/HeaderTextColor=\"#.*\"/HeaderTextColor=\"$color13\"/" "$theme_conf" +sudo sed -i "s/DateTextColor=\"#.*\"/DateTextColor=\"$color13\"/" "$theme_conf" +sudo sed -i "s/TimeTextColor=\"#.*\"/TimeTextColor=\"$color13\"/" "$theme_conf" +sudo sed -i "s/DropdownSelectedBackgroundColor=\"#.*\"/DropdownSelectedBackgroundColor=\"$color13\"/" "$theme_conf" +sudo sed -i "s/SystemButtonsIconsColor=\"#.*\"/SystemButtonsIconsColor=\"$color13\"/" "$theme_conf" +sudo sed -i "s/SessionButtonTextColor=\"#.*\"/SessionButtonTextColor=\"$color13\"/" "$theme_conf" +sudo sed -i "s/VirtualKeyboardButtonTextColor=\"#.*\"/VirtualKeyboardButtonTextColor=\"$color13\"/" "$theme_conf" +sudo sed -i "s/HighlightBackgroundColor=\"#.*\"/HighlightBackgroundColor=\"$color12\"/" "$theme_conf" +sudo sed -i "s/LoginFieldTextColor=\"#.*\"/LoginFieldTextColor=\"$color12\"/" "$theme_conf" +sudo sed -i "s/PasswordFieldTextColor=\"#.*\"/PasswordFieldTextColor=\"$color12\"/" "$theme_conf" +sudo sed -i "s/DropdownBackgroundColor=\"#.*\"/DropdownBackgroundColor=\"$color1\"/" "$theme_conf" +sudo sed -i "s/HighlightTextColor=\"#.*\"/HighlightTextColor=\"$color10\"/" "$theme_conf" +sudo sed -i "s/PlaceholderTextColor=\"#.*\"/PlaceholderTextColor=\"$color7\"/" "$theme_conf" +sudo sed -i "s/UserIconColor=\"#.*\"/UserIconColor=\"$color7\"/" "$theme_conf" +sudo sed -i "s/PasswordIconColor=\"#.*\"/PasswordIconColor=\"$color7\"/" "$theme_conf" # Copy wallpaper to SDDM theme -# Primary: set Backgrounds/default (no extension) for simple_sddm_2 -sudo cp -f \"$wallpaper_path\" \"$sddm_simple/Backgrounds/default\" || true -# Fallbacks: if theme ships default.jpg or default.png, update those too -if [ -e \"$sddm_simple/Backgrounds/default.jpg\" ]; then - sudo cp -f \"$wallpaper_path\" \"$sddm_simple/Backgrounds/default.jpg\" +sudo cp -f "$wallpaper_path" "$sddm_simple/Backgrounds/default" +if [ -e "$sddm_simple/Backgrounds/default.jpg" ]; then + sudo cp -f "$wallpaper_path" "$sddm_simple/Backgrounds/default.jpg" fi -if [ -e \"$sddm_simple/Backgrounds/default.png\" ]; then - sudo cp -f \"$wallpaper_path\" \"$sddm_simple/Backgrounds/default.png\" +if [ -e "$sddm_simple/Backgrounds/default.png" ]; then + sudo cp -f "$wallpaper_path" "$sddm_simple/Backgrounds/default.png" +fi +' _ "$sddm_theme_conf" "$wallpaper_path" "$sddm_simple" "$color13" "$color12" "$color1" "$color10" "$color7"; then + notify_err "Failed to update SDDM for ${target_monitor:-current context}: $(basename "$wallpaper_path")." + exit 1 fi -notify-send -i \"$iDIR/ja.png\" \"SDDM\" \"Background SET\" -"
\ No newline at end of file +notify_ok "Set for ${target_monitor:-current context}: $(basename "$wallpaper_path")." |
