owlry: migrate config to Lua and refresh for 2.2
Replace the deprecated config.toml with an explicit, self-documenting owlry.lua. Drop config.toml (ignored once owlry.lua exists; removed in owlry 3.0). Disable the ssh provider (SSH is done from a terminal) and keep filesearch out of the global set, enabling it only in a new dev profile scoped to ~/Dev. Bump frecency_weight to 0.5, set tabs to app/clipboard/emoji. Modernize the dmenu scripts to 'owlry dmenu'.
This commit is contained in:
@@ -1,198 +0,0 @@
|
||||
# Owlry Configuration
|
||||
# Copy to: ~/.config/owlry/config.toml
|
||||
#
|
||||
# File Locations (XDG Base Directory compliant):
|
||||
# ┌─────────────────────────────────────────────────────────────────────┐
|
||||
# │ Config: ~/.config/owlry/config.toml Main configuration │
|
||||
# │ Themes: ~/.config/owlry/themes/*.css Custom theme files │
|
||||
# │ Style: ~/.config/owlry/style.css CSS overrides │
|
||||
# │ Plugins: ~/.config/owlry/plugins/ User Lua/Rune plugins │
|
||||
# │ Scripts: ~/.local/share/owlry/scripts/ Executable scripts │
|
||||
# │ Data: ~/.local/share/owlry/frecency.json Usage history │
|
||||
# └─────────────────────────────────────────────────────────────────────┘
|
||||
#
|
||||
# System Plugin Locations:
|
||||
# ┌─────────────────────────────────────────────────────────────────────┐
|
||||
# │ Native: /usr/lib/owlry/plugins/*.so Installed plugins │
|
||||
# │ Runtimes: /usr/lib/owlry/runtimes/*.so Lua/Rune runtimes │
|
||||
# └─────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════════
|
||||
# DMENU MODE
|
||||
# ═══════════════════════════════════════════════════════════════════════
|
||||
#
|
||||
# Dmenu mode provides interactive selection from piped input.
|
||||
# The selected item is printed to stdout (not executed), so pipe
|
||||
# the output to execute it:
|
||||
#
|
||||
# ┌─────────────────────────────────────────────────────────────────────┐
|
||||
# │ # Screenshot menu │
|
||||
# │ printf '%s\n' \ │
|
||||
# │ "grimblast --notify copy screen" \ │
|
||||
# │ "grimblast --notify copy area" \ │
|
||||
# │ | owlry -m dmenu -p "Screenshot" \ │
|
||||
# │ | sh │
|
||||
# │ │
|
||||
# │ # Git branch checkout │
|
||||
# │ git branch | owlry -m dmenu -p "checkout" | xargs git checkout │
|
||||
# │ │
|
||||
# │ # Package search │
|
||||
# │ pacman -Ssq | owlry -m dmenu -p "install" | xargs sudo pacman -S │
|
||||
# └─────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════════
|
||||
# GENERAL
|
||||
# ═══════════════════════════════════════════════════════════════════════
|
||||
|
||||
[general]
|
||||
show_icons = true
|
||||
max_results = 100
|
||||
|
||||
# Terminal emulator for SSH, scripts, etc.
|
||||
# Auto-detection order: $TERMINAL → xdg-terminal-exec → DE-native → Wayland → X11 → xterm
|
||||
# Uncomment to override:
|
||||
terminal_command = "kitty"
|
||||
|
||||
# Enable uwsm (Universal Wayland Session Manager) for launching apps.
|
||||
# When enabled, apps are launched via "uwsm app --" which starts them
|
||||
# in a proper systemd user session for better process management.
|
||||
# Requires: uwsm to be installed
|
||||
use_uwsm = true
|
||||
|
||||
# Header tabs - providers shown as toggle buttons (Ctrl+1, Ctrl+2, etc.)
|
||||
# Values: app, cmd, uuctl, bookmark, calc, clip, dmenu, emoji, file, script, ssh, sys, web
|
||||
tabs = ["app", "cmd", "uuctl"]
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════════
|
||||
# APPEARANCE
|
||||
# ═══════════════════════════════════════════════════════════════════════
|
||||
|
||||
[appearance]
|
||||
width = 850
|
||||
height = 650
|
||||
font_size = 14
|
||||
border_radius = 12
|
||||
|
||||
# Theme name - loads ~/.config/owlry/themes/{name}.css
|
||||
# Built-in: owl
|
||||
# Or leave unset/empty for GTK default
|
||||
theme = "apex-neon"
|
||||
|
||||
# Color overrides (applied on top of theme)
|
||||
# [appearance.colors]
|
||||
# background = "#1a1b26"
|
||||
# background_secondary = "#24283b"
|
||||
# border = "#414868"
|
||||
# text = "#c0caf5"
|
||||
# text_secondary = "#565f89"
|
||||
# accent = "#7aa2f7"
|
||||
# accent_bright = "#89b4fa"
|
||||
#
|
||||
# Provider badge colors (optional)
|
||||
# badge_app = "#7aa2f7"
|
||||
# badge_cmd = "#9ece6a"
|
||||
# badge_bookmark = "#e0af68"
|
||||
# badge_calc = "#bb9af7"
|
||||
# badge_clip = "#7dcfff"
|
||||
# badge_dmenu = "#c0caf5"
|
||||
# badge_emoji = "#f7768e"
|
||||
# badge_file = "#73daca"
|
||||
# badge_script = "#ff9e64"
|
||||
# badge_ssh = "#2ac3de"
|
||||
# badge_sys = "#f7768e"
|
||||
# badge_uuctl = "#9ece6a"
|
||||
# badge_web = "#7aa2f7"
|
||||
# badge_media = "#bb9af7"
|
||||
# badge_weather = "#7dcfff"
|
||||
# badge_pomo = "#f7768e"
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════════
|
||||
# PLUGINS
|
||||
# ═══════════════════════════════════════════════════════════════════════
|
||||
#
|
||||
# All installed plugins are loaded by default. Use 'disabled_plugins' to blacklist.
|
||||
# Plugin IDs: calculator, system, ssh, clipboard, emoji, scripts, bookmarks,
|
||||
# websearch, filesearch, systemd, weather, media, pomodoro
|
||||
|
||||
[plugins]
|
||||
enabled = true # Master switch for all plugins
|
||||
|
||||
# Plugins to disable (by ID)
|
||||
disabled_plugins = ["filesearch"]
|
||||
|
||||
# Examples:
|
||||
# disabled_plugins = ["emoji", "pomodoro"] # Disable specific plugins
|
||||
# disabled_plugins = ["weather", "media"] # Disable widget plugins
|
||||
|
||||
# Custom plugin registry URL (defaults to official registry)
|
||||
# registry_url = "https://my-registry.example.com/plugins.json"
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
# Sandbox settings (for Lua/Rune script plugins)
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
# [plugins.sandbox]
|
||||
# allow_filesystem = false # Allow file system access beyond plugin dir
|
||||
# allow_network = false # Allow network requests
|
||||
# allow_commands = false # Allow shell command execution
|
||||
# memory_limit = 67108864 # Memory limit in bytes (64 MB default)
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════════
|
||||
# PROVIDERS
|
||||
# ═══════════════════════════════════════════════════════════════════════
|
||||
#
|
||||
# Enable/disable providers and configure their settings.
|
||||
# Core providers (applications, commands) are built into the binary.
|
||||
# Plugin providers require their .so to be installed.
|
||||
|
||||
[providers]
|
||||
# Core providers (always available)
|
||||
applications = true # .desktop applications from XDG dirs
|
||||
commands = true # Executables from $PATH
|
||||
|
||||
# Frecency - boost frequently/recently used items
|
||||
# Data stored in: ~/.local/share/owlry/frecency.json
|
||||
frecency = true
|
||||
frecency_weight = 0.3 # 0.0 = disabled, 1.0 = strong boost
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
# Plugin provider toggles (require corresponding plugin installed)
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
uuctl = true # systemd user units
|
||||
system = true # System commands (shutdown, reboot, etc.)
|
||||
ssh = true # SSH hosts from ~/.ssh/config
|
||||
clipboard = true # Clipboard history (requires cliphist)
|
||||
bookmarks = true # Browser bookmarks
|
||||
emoji = true # Emoji picker
|
||||
scripts = true # Custom scripts from ~/.local/share/owlry/scripts/
|
||||
files = true # File search (requires fd or mlocate)
|
||||
calculator = true # Calculator (= expression)
|
||||
websearch = true # Web search (? query)
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
# Widget providers (displayed at top of results)
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
media = true # MPRIS media player controls
|
||||
weather = false # Weather widget (disabled by default)
|
||||
pomodoro = false # Pomodoro timer (disabled by default)
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
# Provider settings
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
|
||||
# Web search engine
|
||||
# Options: google, duckduckgo, bing, startpage, searxng, brave, ecosia
|
||||
# Or custom URL: "https://search.example.com/?q={query}"
|
||||
search_engine = "duckduckgo"
|
||||
|
||||
# File search
|
||||
file_search_max_results = 50
|
||||
# file_search_paths = ["/home", "/etc"] # Custom paths (default: $HOME)
|
||||
|
||||
# Weather settings (when weather = true)
|
||||
# weather_provider = "wttr.in" # Options: wttr.in, openweathermap, open-meteo
|
||||
# weather_location = "Berlin" # City name or coordinates
|
||||
# weather_api_key = "" # Required for openweathermap
|
||||
|
||||
# Pomodoro settings (when pomodoro = true)
|
||||
# pomodoro_work_mins = 25 # Work session duration
|
||||
# pomodoro_break_mins = 5 # Break duration
|
||||
+96
-52
@@ -1,58 +1,102 @@
|
||||
-- Generated by `owlry migrate-config` from /home/mpuchstein/.config/owlry/config.toml.
|
||||
-- Edit freely; this file is the canonical owlry config from 2.1 onwards.
|
||||
-- owlry.lua — canonical owlry config (Lua-first since 2.1; TOML removed in 3.0).
|
||||
-- Spec: https://somegit.dev/Owlibou/owlry/src/branch/main/docs/lua-api.md
|
||||
-- Local: ~/Dev/packages/owlry/docs/lua-api.md
|
||||
--
|
||||
-- Preserved from your config.toml:
|
||||
-- Owlry Configuration
|
||||
-- Copy to: ~/.config/owlry/config.toml
|
||||
--
|
||||
-- File Locations (XDG Base Directory compliant):
|
||||
-- ┌─────────────────────────────────────────────────────────────────────┐
|
||||
-- │ Config: ~/.config/owlry/config.toml Main configuration │
|
||||
-- │ Themes: ~/.config/owlry/themes/*.css Custom theme files │
|
||||
-- │ Style: ~/.config/owlry/style.css CSS overrides │
|
||||
-- │ Plugins: ~/.config/owlry/plugins/ User Lua/Rune plugins │
|
||||
-- │ Scripts: ~/.local/share/owlry/scripts/ Executable scripts │
|
||||
-- │ Data: ~/.local/share/owlry/frecency.json Usage history │
|
||||
-- └─────────────────────────────────────────────────────────────────────┘
|
||||
--
|
||||
-- System Plugin Locations:
|
||||
-- ┌─────────────────────────────────────────────────────────────────────┐
|
||||
-- │ Native: /usr/lib/owlry/plugins/*.so Installed plugins │
|
||||
-- │ Runtimes: /usr/lib/owlry/runtimes/*.so Lua/Rune runtimes │
|
||||
-- └─────────────────────────────────────────────────────────────────────┘
|
||||
--
|
||||
-- ═══════════════════════════════════════════════════════════════════════
|
||||
-- DMENU MODE
|
||||
-- ═══════════════════════════════════════════════════════════════════════
|
||||
--
|
||||
-- Dmenu mode provides interactive selection from piped input.
|
||||
-- The selected item is printed to stdout (not executed), so pipe
|
||||
-- the output to execute it:
|
||||
--
|
||||
-- ┌─────────────────────────────────────────────────────────────────────┐
|
||||
-- │ # Screenshot menu │
|
||||
-- │ printf '%s\n' \ │
|
||||
-- │ "grimblast --notify copy screen" \ │
|
||||
-- │ "grimblast --notify copy area" \ │
|
||||
-- │ | owlry -m dmenu -p "Screenshot" \ │
|
||||
-- │ | sh │
|
||||
-- │ │
|
||||
-- │ # Git branch checkout │
|
||||
-- │ git branch | owlry -m dmenu -p "checkout" | xargs git checkout │
|
||||
-- │ │
|
||||
-- │ # Package search │
|
||||
-- │ pacman -Ssq | owlry -m dmenu -p "install" | xargs sudo pacman -S │
|
||||
-- └─────────────────────────────────────────────────────────────────────┘
|
||||
--
|
||||
-- ═══════════════════════════════════════════════════════════════════════
|
||||
-- GENERAL
|
||||
-- ═══════════════════════════════════════════════════════════════════════
|
||||
-- The daemon watches this file and hot-reloads on save — no `systemctl reload`.
|
||||
-- A broken edit is logged and surfaced via `owlry doctor`; the previous good
|
||||
-- state stays live. Validate explicitly with `owlry config validate`.
|
||||
--
|
||||
-- Everything below is set explicitly even where it matches the built-in
|
||||
-- default, so this file documents intent rather than leaning on invisible
|
||||
-- defaults. `owlry config show` prints the resolved effective config.
|
||||
|
||||
-- Global settings (only values differing from defaults).
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
-- 1. Global settings (owlry.set merges; later calls override per-key)
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
owlry.set {
|
||||
theme = "apex-neon",
|
||||
terminal = "kitty",
|
||||
use_uwsm = true,
|
||||
theme = "apex-neon", -- ~/.config/owlry/themes/{name}.css wins
|
||||
-- over the bundled theme of the same name.
|
||||
width = 850,
|
||||
height = 650,
|
||||
font_size = 14,
|
||||
border_radius = 12,
|
||||
terminal = "kitty", -- for items marked terminal=true; omit to
|
||||
-- autodetect ($TERMINAL → xdg-terminal-exec).
|
||||
use_uwsm = true, -- launch desktop entries via `uwsm app --`.
|
||||
show_icons = true,
|
||||
max_results = 100,
|
||||
frecency = true, -- boost frequently/recently launched items.
|
||||
frecency_weight = 0.5, -- 0.0 = off … 1.0 = strong.
|
||||
search_engine = "duckduckgo", -- google|duckduckgo|bing|startpage|searxng|
|
||||
-- brave|ecosia, or a custom "{query}" URL.
|
||||
|
||||
-- File search is opt-in and only runs under :file / the `/` trigger.
|
||||
-- Empty searches $HOME; "~/" is expanded, missing entries are dropped.
|
||||
-- filesearch is enabled only in the `dev` profile (below), so this scopes
|
||||
-- Super+D's `/` search to the code tree.
|
||||
filesearch_roots = { "~/Dev" },
|
||||
}
|
||||
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
-- 2. Enabled providers (replaces the set; not additive — use one call)
|
||||
-- The global set backs bare `owlry` (Super+Space) and the `-m <mode>`
|
||||
-- binds (Super+C → clipboard, Super+X → uuctl). `ssh` is omitted (SSH is
|
||||
-- always done from a terminal); `filesearch` is omitted here and enabled
|
||||
-- only in the `dev` profile below.
|
||||
-- Built-in IDs: app cmd calc conv power systemd(uuctl) ssh clipboard
|
||||
-- emoji websearch filesearch dmenu.
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
owlry.providers {
|
||||
"app", "cmd", -- core launchers
|
||||
"calc", "conv", -- `=` / `>` triggers
|
||||
"power", -- :power lock/reboot (owlry-power-menu is the modal menu)
|
||||
"systemd", -- user units (:uuctl) — backs the -m uuctl bind
|
||||
"emoji", "clipboard", -- pickers — clipboard backs the -m clipboard bind
|
||||
"websearch", -- `?` trigger
|
||||
}
|
||||
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
-- 3. Tab bar (subset of enabled providers; Ctrl+1..N in listed order)
|
||||
-- The implicit "All" tab is always at Ctrl+0 and cannot be hidden.
|
||||
-- Providers not listed are still fully searchable via their prefix /
|
||||
-- trigger — they just lack a permanent tab button.
|
||||
-- Tabs are GLOBAL and inherited by profiles (filtered to the active
|
||||
-- enabled set), so the `dev` profile shows only [All] app as tabs.
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
owlry.tabs { "app", "clipboard", "emoji" }
|
||||
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
-- 4. Theme overrides (optional) — layer colours on top of the named theme.
|
||||
-- Left to themes/apex-neon.css; uncomment to tweak without editing CSS.
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
-- owlry.theme {
|
||||
-- background = "#…", background_secondary = "#…", border = "#…",
|
||||
-- text = "#…", text_secondary = "#…", accent = "#…", accent_bright = "#…",
|
||||
-- badge_app = "#…", badge_cmd = "#…", badge_power = "#…", badge_uuctl = "#…",
|
||||
-- }
|
||||
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
-- 5. Named profiles — `owlry --profile <name>` swaps the enabled set for
|
||||
-- that launch; inherits owlry.set / owlry.theme / owlry.tabs.
|
||||
-- `dev` is bound to Super+D in Hyprland. filesearch_roots (above) scopes
|
||||
-- its `/` search to ~/Dev.
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
owlry.profiles {
|
||||
dev = { "app", "cmd", "filesearch", "calc", "websearch" },
|
||||
}
|
||||
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
-- 6. User-defined providers (optional) — register a custom search source.
|
||||
-- items() is cached at startup (static only until 2.3). Host helpers:
|
||||
-- owlry.util.{shell,shell_lines,read_file,glob,env,hostname}.
|
||||
-- ──────────────────────────────────────────────────────────────────────
|
||||
-- owlry.provider {
|
||||
-- id = "hs", prefix = ":hs", tab_label = "Shutdown", icon = "system-shutdown",
|
||||
-- items = function()
|
||||
-- return {
|
||||
-- { name = "Lock", command = "hyprlock" },
|
||||
-- { name = "Shutdown", command = "systemctl poweroff" },
|
||||
-- { name = "Reboot", command = "systemctl reboot" },
|
||||
-- }
|
||||
-- end,
|
||||
-- }
|
||||
|
||||
@@ -7,7 +7,7 @@ choice=$(printf '%s\n' \
|
||||
"logout" \
|
||||
"reboot" \
|
||||
"shutdown" \
|
||||
| owlry -m dmenu -p "Power")
|
||||
| owlry dmenu -p "Power")
|
||||
|
||||
case "$choice" in
|
||||
lock) swaylock -f ;;
|
||||
|
||||
@@ -8,5 +8,5 @@ printf '%s\n' \
|
||||
"grimblast --notify edit screen" \
|
||||
"grimblast --notify edit output" \
|
||||
"grimblast --notify edit area" \
|
||||
| owlry -m dmenu -p "Screenshot" \
|
||||
| owlry dmenu -p "Screenshot" \
|
||||
| { read -r cmd && sleep 0.2 && sh -c "$cmd"; }
|
||||
|
||||
Reference in New Issue
Block a user