Drop walker + elephant

This commit is contained in:
David Heinemeier Hansson
2026-05-19 20:54:20 +02:00
parent 7fe472bf8a
commit abf0a68b54
64 changed files with 1024 additions and 1033 deletions
@@ -1,73 +0,0 @@
Name = "omarchyBackgroundSelector"
NamePretty = "Omarchy Background Selector"
Cache = false
HideFromProviderlist = true
SearchName = true
local function ShellEscape(s)
return "'" .. s:gsub("'", "'\\''") .. "'"
end
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")
-- Read current theme name
local theme_name_file = io.open(home .. "/.config/omarchy/current/theme.name", "r")
local theme_name = theme_name_file and theme_name_file:read("*l") or nil
if theme_name_file then
theme_name_file:close()
end
-- Directories to search
local dirs = {
home .. "/.config/omarchy/current/theme/backgrounds",
}
if theme_name then
table.insert(dirs, home .. "/.config/omarchy/backgrounds/" .. theme_name)
end
-- Track added files to avoid duplicates
local seen = {}
for _, background_dir in ipairs(dirs) do
local handle = io.popen(
"find -L " .. ShellEscape(background_dir)
.. " -maxdepth 1 -type f \\( -name '*.jpg' -o -name '*.jpeg' -o -name '*.png' -o -name '*.gif' -o -name '*.bmp' -o -name '*.webp' \\) 2>/dev/null | sort"
)
if handle then
for background in handle:lines() do
local filename = background:match("([^/]+)$")
if filename and not seen[filename] then
seen[filename] = true
table.insert(entries, {
Text = FormatName(filename),
Value = background,
Actions = {
activate = "omarchy-theme-bg-set " .. ShellEscape(background),
},
Preview = background,
PreviewType = "file",
})
end
end
handle:close()
end
end
return entries
end
-96
View File
@@ -1,96 +0,0 @@
--
-- Dynamic Omarchy Theme Menu for Elephant/Walker
--
Name = "omarchythemes"
NamePretty = "Omarchy Themes"
HideFromProviderlist = true
-- Check if file exists using Lua (no subprocess)
local function file_exists(path)
local f = io.open(path, "r")
if f then
f:close()
return true
end
return false
end
-- Get first matching file from directory using ls (single call for fallback)
local function first_image_in_dir(dir)
local handle = io.popen("ls -1 '" .. dir .. "' 2>/dev/null | head -n 1")
if handle then
local file = handle:read("*l")
handle:close()
if file and file ~= "" then
return dir .. "/" .. file
end
end
return nil
end
-- Find preview.png, preview.jpg, or first backgrounds/ image in a theme dir
local function find_preview_path(dir)
local png = dir .. "/preview.png"
local jpg = dir .. "/preview.jpg"
if file_exists(png) then return png end
if file_exists(jpg) then return jpg end
return first_image_in_dir(dir .. "/backgrounds")
end
-- The main function elephant will call
function GetEntries()
local entries = {}
local user_theme_dir = os.getenv("HOME") .. "/.config/omarchy/themes"
local omarchy_path = os.getenv("OMARCHY_PATH") or ""
local default_theme_dir = omarchy_path .. "/themes"
local seen_themes = {}
-- Helper function to process themes from a directory
local function process_themes_from_dir(theme_dir)
-- Single find call to get all theme directories
local handle = io.popen("find -L '" .. theme_dir .. "' -mindepth 1 -maxdepth 1 -type d 2>/dev/null")
if not handle then
return
end
for theme_path in handle:lines() do
local theme_name = theme_path:match(".*/(.+)$")
if theme_name and not seen_themes[theme_name] then
seen_themes[theme_name] = true
-- Check the theme dir, then fall back to the default theme dir
-- (for partial user customizations that don't ship a preview)
local preview_path = find_preview_path(theme_path)
or find_preview_path(default_theme_dir .. "/" .. theme_name)
if preview_path and preview_path ~= "" then
local display_name = theme_name:gsub("_", " "):gsub("%-", " ")
display_name = display_name:gsub("(%a)([%w_']*)", function(first, rest)
return first:upper() .. rest:lower()
end)
display_name = display_name .. " "
table.insert(entries, {
Text = display_name,
Preview = preview_path,
PreviewType = "file",
Actions = {
activate = "omarchy-theme-set " .. theme_name,
},
})
end
end
end
handle:close()
end
-- Process user themes first (they take precedence)
process_themes_from_dir(user_theme_dir)
-- Then process default themes (only if not already seen)
process_themes_from_dir(default_theme_dir)
return entries
end
-92
View File
@@ -1,92 +0,0 @@
--
-- Dynamic Omarchy Unlocks Menu for Elephant/Walker
--
-- A "Default" entry restores the omarchy-shipped Plymouth via
-- omarchy-plymouth-reset. After that, every theme that has a preview-unlock.png
-- appears as a customised unlock; picking one runs omarchy-plymouth-set-by-theme
-- <theme>. Both run in a floating terminal so sudo can prompt.
--
Name = "omarchyunlocks"
NamePretty = "Omarchy Unlocks"
HideFromProviderlist = true
FixedOrder = true
local function file_exists(path)
local f = io.open(path, "r")
if f then
f:close()
return true
end
return false
end
local function shell_escape(s)
return "'" .. s:gsub("'", "'\\''") .. "'"
end
function GetEntries()
local entries = {}
local home = os.getenv("HOME")
local user_themes_dir = home .. "/.config/omarchy/themes"
local omarchy_path = os.getenv("OMARCHY_PATH") or ""
local default_themes_dir = omarchy_path .. "/themes"
local default_preview = omarchy_path .. "/default/plymouth/preview-unlock.png"
local seen_themes = {}
local function process_themes_from_dir(themes_dir)
local handle = io.popen("find -L '" .. themes_dir .. "' -mindepth 1 -maxdepth 1 -type d 2>/dev/null")
if not handle then
return
end
for theme_path in handle:lines() do
local theme_name = theme_path:match(".*/(.+)$")
if theme_name and not seen_themes[theme_name] then
seen_themes[theme_name] = true
local preview_path = theme_path .. "/preview-unlock.png"
if file_exists(preview_path) then
local display_name = theme_name:gsub("_", " "):gsub("%-", " ")
display_name = display_name:gsub("(%a)([%w_']*)", function(first, rest)
return first:upper() .. rest:lower()
end)
display_name = display_name .. " "
table.insert(entries, {
Text = display_name,
Preview = preview_path,
PreviewType = "file",
Actions = {
activate = "omarchy-launch-floating-terminal-with-presentation "
.. shell_escape("omarchy-plymouth-set-by-theme " .. shell_escape(theme_name)),
},
})
end
end
end
handle:close()
end
process_themes_from_dir(user_themes_dir)
process_themes_from_dir(default_themes_dir)
-- Default entry last — restores the shipped Plymouth.
local default_entry = {
Text = "Default ",
Actions = {
activate = "omarchy-launch-floating-terminal-with-presentation "
.. shell_escape("omarchy-plymouth-reset"),
},
}
if file_exists(default_preview) then
default_entry.Preview = default_preview
default_entry.PreviewType = "file"
end
table.insert(entries, default_entry)
return entries
end
+2 -1
View File
@@ -6,7 +6,8 @@
hl.layer_rule({ match = { namespace = "omarchy-bar" }, no_anim = true, animation = "none" })
hl.layer_rule({ match = { namespace = "omarchy-menu" }, no_anim = true, animation = "none" })
-- Image selector, emoji picker, and clipboard overlays should also pop without animation.
-- App launcher, image selector, emoji picker, and clipboard overlays should also pop without animation.
hl.layer_rule({ match = { namespace = "omarchy-app-launcher" }, no_anim = true, animation = "none" })
hl.layer_rule({ match = { namespace = "omarchy-image-selector" }, no_anim = true, animation = "none" })
hl.layer_rule({ match = { namespace = "omarchy-emoji-picker" }, no_anim = true, animation = "none" })
hl.layer_rule({ match = { namespace = "omarchy-clipboard-picker" }, no_anim = true, animation = "none" })
-2
View File
@@ -1,2 +0,0 @@
-- Application-specific animation.
hl.layer_rule({ match = { namespace = "walker" }, no_anim = true, animation = "none" })
+1 -1
View File
@@ -1,4 +1,4 @@
hl.bind("SUPER + SPACE", hl.dsp.exec_cmd("omarchy-launch-walker"), { description = "Launch apps" })
hl.bind("SUPER + SPACE", hl.dsp.exec_cmd("omarchy-shell shell toggle omarchy.app-launcher \"{}\""), { description = "Launch apps" })
hl.bind("SUPER + CTRL + E", hl.dsp.exec_cmd("omarchy-shell shell toggle omarchy.emoji-picker \"{}\""), { description = "Emoji picker" })
hl.bind("SUPER + CTRL + C", hl.dsp.exec_cmd("omarchy-shell menu toggle capture"), { description = "Capture menu" })
hl.bind("SUPER + CTRL + O", hl.dsp.exec_cmd("omarchy-shell menu toggle toggle"), { description = "Toggle menu" })
+5 -6
View File
@@ -2,10 +2,10 @@
name: omarchy
description: >
REQUIRED for end-user customization of Linux desktop, window manager, or system config.
Use when editing ~/.config/hypr/, ~/.config/omarchy/, ~/.config/walker/,
Use when editing ~/.config/hypr/, ~/.config/omarchy/,
~/.config/alacritty/, ~/.config/foot/, ~/.config/kitty/, or ~/.config/ghostty/.
Triggers: Hyprland, window rules, animations, keybindings, monitors, gaps, borders,
blur, opacity, omarchy-shell, bar, walker, terminal config, themes, background,
blur, opacity, omarchy-shell, bar, terminal config, themes, background,
night light, idle, lock screen, screenshots, reminders, layer rules, workspace
settings, display config, and user-facing omarchy commands. Excludes Omarchy
source development in ~/.local/share/omarchy/ and `omarchy dev` workflows.
@@ -23,7 +23,7 @@ It is not for contributing to Omarchy source code.
**ALWAYS invoke this skill for end-user requests involving ANY of these:**
- Editing ANY file in `~/.config/hypr/` (window rules, animations, keybindings, monitors, etc.)
- Editing `~/.config/omarchy/shell.json` (status bar layout, widgets) or `~/.config/walker/`
- Editing `~/.config/omarchy/shell.json` (status bar layout, widgets)
- Editing terminal configs (alacritty, foot, kitty, ghostty)
- Editing ANY file in `~/.config/omarchy/`
- Window behavior, animations, opacity, blur, gaps, borders
@@ -78,7 +78,7 @@ Omarchy is built on:
| **Arch Linux** | Base OS | `/etc/`, `~/.config/` |
| **Hyprland** | Wayland compositor/WM | `~/.config/hypr/` |
| **Omarchy shell** | Status bar + notifications (Quickshell) | `~/.config/omarchy/shell.json` |
| **Walker** | App launcher | `~/.config/walker/` |
| **App launcher** | Quickshell app launcher | `~/.config/omarchy/shell.json` |
| **Alacritty/Foot/Kitty/Ghostty** | Terminals | `~/.config/<terminal>/` |
| **Omarchy OSD** | On-screen display | Quickshell plugin |
@@ -182,7 +182,6 @@ changes. For more invasive changes (new plugin, packaged update):
| lazygit | `~/.config/lazygit/config.yml` |
| starship | `~/.config/starship.toml` |
| git | `~/.config/git/config` |
| walker | `~/.config/walker/config.toml` |
## Safe Customization Patterns
@@ -202,7 +201,7 @@ cp ~/.config/hypr/bindings.conf ~/.config/hypr/bindings.conf.bak.$(date +%s)
# 4. Apply changes
# - Hyprland: auto-reloads on save, but MUST validate with `hyprctl reload` and `hyprctl configerrors`
# - Omarchy shell: shell.json hot-reloads; use `omarchy-restart-shell` for plugin/widget code changes
# - Walker: MUST restart with `omarchy restart walker`
# - App launcher: restart with `omarchy restart shell`
# - Terminals: MUST restart with `omarchy restart terminal`
```
+2 -6
View File
@@ -13,7 +13,7 @@
// checked shell condition; append ✓ when it succeeds
// Root Menu
"apps": {"icon":"󰀻","label":"Apps","aliases":["app","applications"],"keywords":"launch launcher","action":"omarchy-launch-walker -p 'Launch…'"},
"apps": {"icon":"󰀻","label":"Apps","aliases":["app","applications"],"keywords":"launch launcher quickshell","action":"omarchy-shell shell summon omarchy.app-launcher '{}'"},
"learn": {"icon":"󰧑","label":"Learn","keywords":"manual docs help reference"},
"trigger": {"icon":"󱓞","label":"Trigger","keywords":"actions capture share toggle hardware reminder"},
"style": {"icon":"","label":"Style","keywords":"theme background font bar quickshell hyprland appearance"},
@@ -87,7 +87,6 @@
// Style
"style.theme": {"icon":"󰸌","label":"Theme","aliases":["theme","themes"],"keywords":"colors","action":"theme=$(omarchy-theme-switcher); [[ -n $theme ]] && omarchy-theme-set \"$theme\""},
"style.unlock": {"icon":"󰟵","label":"Unlock","keywords":"themes","action":"omarchy-launch-walker -m menus:omarchyunlocks --width 800 --minheight 400"},
"style.font": {"icon":"","label":"Font","keywords":"typeface","provider":"fonts"},
"style.background": {"icon":"","label":"Background","aliases":["background","wallpaper"],"action":"background=$(omarchy-theme-bg-switcher); [[ -n $background ]] && omarchy-theme-bg-set \"$background\""},
"style.bar": {"icon":"󰍜","label":"Bar","keywords":"quickshell top bottom left right settings"},
@@ -158,12 +157,11 @@
"setup.dns.google": {"icon":"󰖩","label":"Google","checked":"[[ $(omarchy-dns) == \"Google\" ]]","action":"omarchy-dns Google"},
"setup.dns.custom": {"icon":"󰖩","label":"Custom","checked":"[[ $(omarchy-dns) == \"Custom\" ]]","action":"omarchy-launch-floating-terminal-with-presentation omarchy-dns Custom"},
"setup.security": {"icon":"","label":"Security","keywords":"fingerprint fido2"},
"setup.config": {"icon":"","label":"Config","keywords":"files hyprland bar quickshell walker"},
"setup.config": {"icon":"","label":"Config","keywords":"files hyprland bar quickshell"},
"setup.security.fingerprint": {"icon":"󰈷","label":"Fingerprint","action":"omarchy-launch-floating-terminal-with-presentation omarchy-setup-security-fingerprint"},
"setup.security.fido2": {"icon":"","label":"Fido2","keywords":"key","action":"omarchy-launch-floating-terminal-with-presentation omarchy-setup-security-fido2"},
"setup.config.hyprland": {"icon":"","label":"Hyprland","action":"omarchy-launch-config-editor \"$HOME/.config/hypr/hyprland.lua\""},
"setup.config.hyprsunset": {"icon":"","label":"Hyprsunset","keywords":"night light","action":"omarchy-launch-config-editor ~/.config/hypr/hyprsunset.conf && omarchy-restart-hyprsunset"},
"setup.config.walker": {"icon":"󰌧","label":"Walker","keywords":"launcher","action":"omarchy-launch-config-editor ~/.config/walker/config.toml && omarchy-restart-walker"},
"setup.config.bar": {"icon":"󰍜","label":"Bar","keywords":"quickshell shell config settings widgets position","action":"omarchy-launch-bar-settings"},
"setup.config.xcompose": {"icon":"󰞅","label":"XCompose","keywords":"compose key","action":"omarchy-launch-config-editor ~/.XCompose && omarchy-restart-xcompose"},
@@ -311,14 +309,12 @@
"update.channel.dev": {"icon":"🔴","label":"Dev","keywords":"development","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-channel-set dev'"},
"update.process.hyprsunset": {"icon":"","label":"Hyprsunset","keywords":"restart","action":"omarchy-restart-hyprsunset"},
"update.process.osd": {"icon":"","label":"OSD","keywords":"restart","action":"omarchy-restart-shell"},
"update.process.walker": {"icon":"󰌧","label":"Walker","keywords":"restart launcher","action":"omarchy-restart-walker"},
"update.process.shell": {"icon":"󰍜","label":"Shell","keywords":"restart bar quickshell omarchy-shell","action":"omarchy-restart-shell"},
"update.config.hyprland": {"icon":"","label":"Hyprland","keywords":"refresh","action":"omarchy-launch-floating-terminal-with-presentation omarchy-refresh-hyprland"},
"update.config.hyprsunset": {"icon":"","label":"Hyprsunset","keywords":"refresh","action":"omarchy-launch-floating-terminal-with-presentation omarchy-refresh-hyprsunset"},
"update.config.plymouth": {"icon":"󱣴","label":"Plymouth","keywords":"refresh","action":"omarchy-launch-floating-terminal-with-presentation omarchy-refresh-plymouth"},
"update.config.osd": {"icon":"","label":"OSD","keywords":"refresh","action":"omarchy-restart-shell"},
"update.config.tmux": {"icon":"","label":"Tmux","keywords":"refresh","action":"omarchy-launch-floating-terminal-with-presentation omarchy-refresh-tmux"},
"update.config.walker": {"icon":"󰌧","label":"Walker","keywords":"refresh","action":"omarchy-launch-floating-terminal-with-presentation omarchy-refresh-walker"},
"update.config.shell": {"icon":"󰍜","label":"Shell","keywords":"refresh bar quickshell","action":"omarchy-launch-floating-terminal-with-presentation omarchy-refresh-shell"},
"update.hardware.audio": {"icon":"","label":"Audio","keywords":"restart pipewire","action":"omarchy-launch-floating-terminal-with-presentation omarchy-restart-pipewire"},
"update.hardware.wifi": {"icon":"󱚾","label":"Wi-Fi","keywords":"restart wireless","action":"omarchy-launch-floating-terminal-with-presentation omarchy-restart-wifi"},
-6
View File
@@ -1,6 +0,0 @@
@define-color selected-text {{ accent }};
@define-color text {{ foreground }};
@define-color base {{ background }};
@define-color border {{ foreground }};
@define-color foreground {{ foreground }};
@define-color background {{ background }};
-3
View File
@@ -1,3 +0,0 @@
[Service]
Restart=always
RestartSec=2
@@ -1,156 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"></requires>
<object class="GtkWindow" id="Window">
<style>
<class name="window"></class>
</style>
<property name="resizable">true</property>
<property name="title">Walker</property>
<child>
<object class="GtkBox" id="BoxWrapper">
<style>
<class name="box-wrapper"></class>
</style>
<property name="width-request">644</property>
<property name="overflow">hidden</property>
<property name="orientation">horizontal</property>
<property name="valign">center</property>
<property name="halign">center</property>
<child>
<object class="GtkBox" id="Box">
<style>
<class name="box"></class>
</style>
<property name="orientation">vertical</property>
<property name="hexpand-set">true</property>
<property name="hexpand">true</property>
<property name="spacing">10</property>
<child>
<object class="GtkBox" id="SearchContainer">
<style>
<class name="search-container"></class>
</style>
<property name="overflow">hidden</property>
<property name="orientation">horizontal</property>
<property name="halign">fill</property>
<property name="hexpand-set">true</property>
<property name="hexpand">true</property>
<child>
<object class="GtkEntry" id="Input">
<style>
<class name="input"></class>
</style>
<property name="halign">fill</property>
<property name="hexpand-set">true</property>
<property name="hexpand">true</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox" id="ContentContainer">
<style>
<class name="content-container"></class>
</style>
<property name="orientation">horizontal</property>
<property name="spacing">10</property>
<property name="vexpand">true</property>
<property name="vexpand-set">true</property>
<child>
<object class="GtkLabel" id="ElephantHint">
<style>
<class name="elephant-hint"></class>
</style>
<property name="hexpand">true</property>
<property name="height-request">100</property>
<property name="label">Waiting for elephant...</property>
</object>
</child>
<child>
<object class="GtkLabel" id="Placeholder">
<style>
<class name="placeholder"></class>
</style>
<property name="label">No Results</property>
<property name="yalign">0.0</property>
<property name="hexpand">true</property>
</object>
</child>
<child>
<object class="GtkScrolledWindow" id="Scroll">
<style>
<class name="scroll"></class>
</style>
<property name="hexpand">true</property>
<property name="can_focus">false</property>
<property name="overlay-scrolling">true</property>
<property name="max-content-width">600</property>
<property name="max-content-height">300</property>
<property name="min-content-height">0</property>
<property name="propagate-natural-height">true</property>
<property name="propagate-natural-width">true</property>
<property name="hscrollbar-policy">automatic</property>
<property name="vscrollbar-policy">automatic</property>
<child>
<object class="GtkGridView" id="List">
<style>
<class name="list"></class>
</style>
<property name="max_columns">1</property>
<property name="can_focus">false</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox" id="Preview">
<style>
<class name="preview"></class>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox" id="Keybinds">
<property name="hexpand">true</property>
<property name="margin-top">10</property>
<style>
<class name="keybinds"></class>
</style>
<child>
<object class="GtkBox" id="GlobalKeybinds">
<property name="spacing">10</property>
<style>
<class name="global-keybinds"></class>
</style>
</object>
</child>
<child>
<object class="GtkBox" id="ItemKeybinds">
<property name="hexpand">true</property>
<property name="halign">end</property>
<property name="spacing">10</property>
<style>
<class name="item-keybinds"></class>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel" id="Error">
<style>
<class name="error"></class>
</style>
<property name="xalign">0</property>
<property name="visible">false</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
@@ -1,122 +0,0 @@
@import "../../../../../../../.config/omarchy/current/theme/walker.css";
@import "../../../../../../../.local/state/omarchy/toggles/walker.css";
* {
all: unset;
}
* {
font-family: monospace;
font-size: 18px;
color: @text;
}
scrollbar {
opacity: 0;
}
.normal-icons {
-gtk-icon-size: 16px;
}
.large-icons {
-gtk-icon-size: 32px;
}
.box-wrapper {
background: alpha(@base, 0.95);
padding: 20px;
border: 2px solid @border;
}
.preview-box {
}
.box {
}
.search-container {
background: @base;
padding: 10px;
}
.input placeholder {
opacity: 0.5;
}
.input {
}
.input:focus,
.input:active {
box-shadow: none;
outline: none;
}
.content-container {
}
.placeholder {
}
.scroll {
}
.list {
}
child,
child > * {
}
child:hover .item-box {
}
child:selected .item-box {
}
child:selected .item-box * {
color: @selected-text;
}
child:selected {
background: alpha(@text, 0.07);
}
.item-box {
padding-left: 14px;
}
.item-text-box {
all: unset;
padding: 14px 0;
}
.item-text {
}
.item-subtext {
font-size: 0px;
min-height: 0px;
margin: 0px;
padding: 0px;
}
.item-image {
margin-right: 14px;
-gtk-icon-transform: scale(0.9);
}
.current {
font-style: italic;
}
.keybind-hints {
background: @background;
padding: 10px;
margin-top: 10px;
}
.preview {
}
-7
View File
@@ -1,7 +0,0 @@
[Desktop Entry]
Name=Walker
Comment=Walker Service
Exec=walker --gapplication-service
StartupNotify=false
Terminal=false
Type=Application