diff --git a/default/elephant/omarchy_background_selector.lua b/default/elephant/omarchy_background_selector.lua index bf614954..61543c49 100644 --- a/default/elephant/omarchy_background_selector.lua +++ b/default/elephant/omarchy_background_selector.lua @@ -4,6 +4,20 @@ Cache = false HideFromProviderlist = true SearchName = true +function FormatName(filename) + -- Remove leading number and dash + local name = filename:gsub("^%d+", ""):gsub("^%-", "") + -- Remove extension + name = name:gsub("%.[^%.]+$", "") + -- Replace dashes with spaces + name = name:gsub("-", " ") + -- Capitalize each word + name = name:gsub("%S+", function(word) + return word:sub(1, 1):upper() .. word:sub(2):lower() + end) + return name +end + function GetEntries() local entries = {} local home = os.getenv("HOME") @@ -38,7 +52,7 @@ function GetEntries() if filename and not seen[filename] then seen[filename] = true table.insert(entries, { - Text = filename, + Text = FormatName(filename), Value = background, Actions = { activate = "omarchy-theme-bg-set '" .. background .. "'", diff --git a/themes/catppuccin-latte/backgrounds/1-catppuccin-latte.png b/themes/catppuccin-latte/backgrounds/1-color-fade.png similarity index 100% rename from themes/catppuccin-latte/backgrounds/1-catppuccin-latte.png rename to themes/catppuccin-latte/backgrounds/1-color-fade.png diff --git a/themes/catppuccin/backgrounds/1-catppuccin.png b/themes/catppuccin/backgrounds/1-totoro.png similarity index 100% rename from themes/catppuccin/backgrounds/1-catppuccin.png rename to themes/catppuccin/backgrounds/1-totoro.png diff --git a/themes/catppuccin/backgrounds/2-cat-waves-mocha.png b/themes/catppuccin/backgrounds/2-waves.png similarity index 100% rename from themes/catppuccin/backgrounds/2-cat-waves-mocha.png rename to themes/catppuccin/backgrounds/2-waves.png diff --git a/themes/catppuccin/backgrounds/3-cat-blue-eye-mocha.png b/themes/catppuccin/backgrounds/3-blue-eye.png similarity index 100% rename from themes/catppuccin/backgrounds/3-cat-blue-eye-mocha.png rename to themes/catppuccin/backgrounds/3-blue-eye.png diff --git a/themes/ethereal/backgrounds/1.jpg b/themes/ethereal/backgrounds/1-cosmic.jpg similarity index 100% rename from themes/ethereal/backgrounds/1.jpg rename to themes/ethereal/backgrounds/1-cosmic.jpg diff --git a/themes/ethereal/backgrounds/2.jpg b/themes/ethereal/backgrounds/2-meadow.jpg similarity index 100% rename from themes/ethereal/backgrounds/2.jpg rename to themes/ethereal/backgrounds/2-meadow.jpg diff --git a/themes/everforest/backgrounds/1-everforest.jpg b/themes/everforest/backgrounds/1-tree-tops.jpg similarity index 100% rename from themes/everforest/backgrounds/1-everforest.jpg rename to themes/everforest/backgrounds/1-tree-tops.jpg diff --git a/themes/flexoki-light/backgrounds/1-flexoki-light-orb.png b/themes/flexoki-light/backgrounds/1-orb.png similarity index 100% rename from themes/flexoki-light/backgrounds/1-flexoki-light-orb.png rename to themes/flexoki-light/backgrounds/1-orb.png diff --git a/themes/flexoki-light/backgrounds/2-flexoki-light-omarchy.png b/themes/flexoki-light/backgrounds/2-omarchy.png similarity index 100% rename from themes/flexoki-light/backgrounds/2-flexoki-light-omarchy.png rename to themes/flexoki-light/backgrounds/2-omarchy.png diff --git a/themes/gruvbox/backgrounds/1-grubox.jpg b/themes/gruvbox/backgrounds/1-the-backwater.jpg similarity index 100% rename from themes/gruvbox/backgrounds/1-grubox.jpg rename to themes/gruvbox/backgrounds/1-the-backwater.jpg diff --git a/themes/gruvbox/backgrounds/2-gruvbox.jpg b/themes/gruvbox/backgrounds/2-leaves.jpg similarity index 100% rename from themes/gruvbox/backgrounds/2-gruvbox.jpg rename to themes/gruvbox/backgrounds/2-leaves.jpg diff --git a/themes/hackerman/backgrounds/1.jpg b/themes/hackerman/backgrounds/1-synth-scape.jpg similarity index 100% rename from themes/hackerman/backgrounds/1.jpg rename to themes/hackerman/backgrounds/1-synth-scape.jpg diff --git a/themes/hackerman/backgrounds/2.jpg b/themes/hackerman/backgrounds/2-geometric.jpg similarity index 100% rename from themes/hackerman/backgrounds/2.jpg rename to themes/hackerman/backgrounds/2-geometric.jpg diff --git a/themes/matte-black/backgrounds/1-matte-black.jpg b/themes/matte-black/backgrounds/1-dark-waters.jpg similarity index 100% rename from themes/matte-black/backgrounds/1-matte-black.jpg rename to themes/matte-black/backgrounds/1-dark-waters.jpg diff --git a/themes/matte-black/backgrounds/2-matte-black-hands.jpg b/themes/matte-black/backgrounds/2-dot-hands.jpg similarity index 100% rename from themes/matte-black/backgrounds/2-matte-black-hands.jpg rename to themes/matte-black/backgrounds/2-dot-hands.jpg diff --git a/themes/nord/backgrounds/0-nord.jpg b/themes/nord/backgrounds/0-black-moon.jpg similarity index 100% rename from themes/nord/backgrounds/0-nord.jpg rename to themes/nord/backgrounds/0-black-moon.jpg diff --git a/themes/nord/backgrounds/1-nord.png b/themes/nord/backgrounds/1-city-view.png similarity index 100% rename from themes/nord/backgrounds/1-nord.png rename to themes/nord/backgrounds/1-city-view.png diff --git a/themes/nord/backgrounds/2-nord.png b/themes/nord/backgrounds/2-night-hawks.png similarity index 100% rename from themes/nord/backgrounds/2-nord.png rename to themes/nord/backgrounds/2-night-hawks.png diff --git a/themes/osaka-jade/backgrounds/1-osaka-jade-bg.jpg b/themes/osaka-jade/backgrounds/1-glowing-city.jpg similarity index 100% rename from themes/osaka-jade/backgrounds/1-osaka-jade-bg.jpg rename to themes/osaka-jade/backgrounds/1-glowing-city.jpg diff --git a/themes/osaka-jade/backgrounds/2-osaka-jade-bg.jpg b/themes/osaka-jade/backgrounds/2-shaded-entrance.jpg similarity index 100% rename from themes/osaka-jade/backgrounds/2-osaka-jade-bg.jpg rename to themes/osaka-jade/backgrounds/2-shaded-entrance.jpg diff --git a/themes/osaka-jade/backgrounds/3-osaka-jade-bg.jpg b/themes/osaka-jade/backgrounds/3-mountain-moon.jpg similarity index 100% rename from themes/osaka-jade/backgrounds/3-osaka-jade-bg.jpg rename to themes/osaka-jade/backgrounds/3-mountain-moon.jpg diff --git a/themes/ristretto/backgrounds/1-ristretto.jpg b/themes/ristretto/backgrounds/1-color-curves.jpg similarity index 100% rename from themes/ristretto/backgrounds/1-ristretto.jpg rename to themes/ristretto/backgrounds/1-color-curves.jpg diff --git a/themes/ristretto/backgrounds/2-ristretto.jpg b/themes/ristretto/backgrounds/2-coffee-beans.jpg similarity index 100% rename from themes/ristretto/backgrounds/2-ristretto.jpg rename to themes/ristretto/backgrounds/2-coffee-beans.jpg diff --git a/themes/ristretto/backgrounds/3-ristretto.jpg b/themes/ristretto/backgrounds/3-industrial-moon.jpg similarity index 100% rename from themes/ristretto/backgrounds/3-ristretto.jpg rename to themes/ristretto/backgrounds/3-industrial-moon.jpg diff --git a/themes/rose-pine/backgrounds/1-rose-pine.jpg b/themes/rose-pine/backgrounds/1-funky-shapes.jpg similarity index 100% rename from themes/rose-pine/backgrounds/1-rose-pine.jpg rename to themes/rose-pine/backgrounds/1-funky-shapes.jpg diff --git a/themes/rose-pine/backgrounds/2-wave-light.png b/themes/rose-pine/backgrounds/2-dot-map.png similarity index 100% rename from themes/rose-pine/backgrounds/2-wave-light.png rename to themes/rose-pine/backgrounds/2-dot-map.png diff --git a/themes/rose-pine/backgrounds/3-leafy-dawn-omarchy.png b/themes/rose-pine/backgrounds/3-omarchy-plants.png similarity index 100% rename from themes/rose-pine/backgrounds/3-leafy-dawn-omarchy.png rename to themes/rose-pine/backgrounds/3-omarchy-plants.png diff --git a/themes/tokyo-night/backgrounds/1-scenery-pink-lakeside-sunset-lake-landscape-scenic-panorama-7680x3215-144.png b/themes/tokyo-night/backgrounds/1-sunset-lake.png similarity index 100% rename from themes/tokyo-night/backgrounds/1-scenery-pink-lakeside-sunset-lake-landscape-scenic-panorama-7680x3215-144.png rename to themes/tokyo-night/backgrounds/1-sunset-lake.png diff --git a/themes/tokyo-night/backgrounds/2-Pawel-Czerwinski-Abstract-Purple-Blue.jpg b/themes/tokyo-night/backgrounds/2-pawel-czerwinski.jpg similarity index 100% rename from themes/tokyo-night/backgrounds/2-Pawel-Czerwinski-Abstract-Purple-Blue.jpg rename to themes/tokyo-night/backgrounds/2-pawel-czerwinski.jpg diff --git a/themes/tokyo-night/backgrounds/3-Milad-Fakurian-Abstract-Purple-Blue.jpg b/themes/tokyo-night/backgrounds/3-milad-fakurian.jpg similarity index 100% rename from themes/tokyo-night/backgrounds/3-Milad-Fakurian-Abstract-Purple-Blue.jpg rename to themes/tokyo-night/backgrounds/3-milad-fakurian.jpg diff --git a/themes/vantablack/backgrounds/1-vantablack.jpg b/themes/vantablack/backgrounds/1-twisted-stairs.jpg similarity index 100% rename from themes/vantablack/backgrounds/1-vantablack.jpg rename to themes/vantablack/backgrounds/1-twisted-stairs.jpg diff --git a/themes/vantablack/backgrounds/2-vantablack.jpg b/themes/vantablack/backgrounds/2-layers-deep.jpg similarity index 100% rename from themes/vantablack/backgrounds/2-vantablack.jpg rename to themes/vantablack/backgrounds/2-layers-deep.jpg diff --git a/themes/vantablack/backgrounds/3-vantablack.jpg b/themes/vantablack/backgrounds/3-layers-stacked.jpg similarity index 100% rename from themes/vantablack/backgrounds/3-vantablack.jpg rename to themes/vantablack/backgrounds/3-layers-stacked.jpg