From 78cbd6d92c69af9bcd8c091ed8cb3264dbf1ef3c Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Tue, 5 Aug 2025 11:03:12 -0400 Subject: [PATCH] sherlock --- configs/hypr/hyprland.d/layout.conf | 1 + configs/niri/config.kdl | 2 +- configs/sherlock/config.toml | 47 ++++++ configs/sherlock/fallback.json | 208 ++++++++++++++++++++++++ configs/sherlock/main.css | 0 configs/sherlock/sherlock_actions.json | 0 configs/sherlock/sherlock_alias.json | 1 + configs/sherlock/sherlockignore | 0 modules/nixos/desktop/tiler/default.nix | 1 + 9 files changed, 259 insertions(+), 1 deletion(-) create mode 100644 configs/sherlock/config.toml create mode 100644 configs/sherlock/fallback.json create mode 100644 configs/sherlock/main.css create mode 100644 configs/sherlock/sherlock_actions.json create mode 100644 configs/sherlock/sherlock_alias.json create mode 100644 configs/sherlock/sherlockignore diff --git a/configs/hypr/hyprland.d/layout.conf b/configs/hypr/hyprland.d/layout.conf index 08a1201..d9d35cb 100644 --- a/configs/hypr/hyprland.d/layout.conf +++ b/configs/hypr/hyprland.d/layout.conf @@ -36,4 +36,5 @@ master { misc { force_default_wallpaper = 1 disable_hyprland_logo = false + focus_on_activate = true } \ No newline at end of file diff --git a/configs/niri/config.kdl b/configs/niri/config.kdl index a3fe715..f00f5a1 100644 --- a/configs/niri/config.kdl +++ b/configs/niri/config.kdl @@ -164,7 +164,7 @@ hotkey-overlay { binds { Mod+Shift+H { show-hotkey-overlay; } Mod+T { spawn "ghostty"; } - Mod+Space { spawn "fuzzel"; } + Mod+Space { spawn "sherlock"; } Mod+B { spawn "chromium" "--profile-directory=ProfilePersonal"; } Mod+Alt+B { spawn "chromium" "--profile-directory=ProfileWork"; } Mod+E { spawn "wofi-emoji"; } diff --git a/configs/sherlock/config.toml b/configs/sherlock/config.toml new file mode 100644 index 0000000..3cb2a95 --- /dev/null +++ b/configs/sherlock/config.toml @@ -0,0 +1,47 @@ +[default_apps] +teams = "teams-for-linux --enable-features=UseOzonePlatform --ozone-platform=wayland --url {meeting_url}" +calendar_client = "thunderbird" +terminal = "ghostty" +browser = "chromium %U" + +[units] +lengths = "meters" +weights = "kg" +volumes = "l" +temperatures = "C" +_currency = "cad" + +[debug] +try_suppress_errors = false +try_suppress_warnings = false +app_paths = [] + +[appearance] +width = 900 +height = 593 +gsk_renderer = "cairo" +icon_paths = ["~/.config/sherlock/p'picons/"] +icon_size = 22 +search_icon = false +use_base_css = true +status_bar = true +opacity = 1.0 +mod_key_ascii = ["⇧", "⇧", "⌘", "⌘", "⎇", "✦", "✦", "⌘"] + +[behavior] +cache = "~/.cache/sherlock/sherlock_desktop_cache.json" +caching = false +daemonize = false +animate = true + +[binds] + +[files] +config = "~/.config/sherlock/config.toml" +css = "~/.config/sherlock/main.css" +fallback = "~/.config/sherlock/fallback.json" +alias = "~/.config/sherlock/sherlock_alias.json" +ignore = "~/.config/sherlock/sherlockignore" +actions = "~/.config/sherlock/sherlock_actions.json" + +[pipe] diff --git a/configs/sherlock/fallback.json b/configs/sherlock/fallback.json new file mode 100644 index 0000000..79c103e --- /dev/null +++ b/configs/sherlock/fallback.json @@ -0,0 +1,208 @@ +[ + { + "name": "Weather", + "type": "weather", + "args": { + "location": "berlin", + "update_interval": 60 + }, + "priority": 1, + "home": true, + "only_home": true, + "async": true, + "shortcut": false, + "spawn_focus": false + }, + { + "name": "Teams Event", + "type": "teams_event", + "args": { + "event_date": "now", + "event_start": "-5 minutes", + "event_end": "+15 minutes" + }, + "priority": 1, + "home": true + }, + { + "name": "Calculator", + "type": "calculation", + "args": { + "capabilities": [ + "calc.math", + "calc.units" + ] + }, + "priority": 1 + }, + { + "name": "Spotify", + "type": "audio_sink", + "args": {}, + "async": true, + "priority": 1, + "home": true, + "only_home": true, + "spawn_focus": false + }, + { + "name": "Clipboard", + "type": "clipboard-execution", + "args": { + "capabilities": [ + "url", + "colors.hex", + "colors.rgb", + "colors.hsl", + "calc.math", + "calc.lengths", + "calc.weights", + "calc.temperatures" + ] + }, + "priority": 1, + "home": true + }, + { + "name": "App Launcher", + "alias": "app", + "type": "app_launcher", + "args": {}, + "priority": 2, + "home": true + }, + { + "name": "Categories", + "alias": "cat", + "type": "categories", + "args": { + "Kill Processes": { + "icon": "sherlock-process", + "icon_class": "reactive", + "exec": "kill", + "search_string": "terminate;kill;process" + }, + "Power Menu": { + "icon": "battery-full-symbolic", + "icon_class": "reactive", + "exec": "pm", + "search_string": "powermenu;" + } + }, + "priority": 3, + "home": true + }, + { + "name": "Kill Process", + "alias": "kill", + "type": "process", + "args": {}, + "priority": 0 + }, + { + "name": "Power Management", + "alias": "pm", + "type": "command", + "args": { + "commands": { + "Shutdown": { + "icon": "system-shutdown", + "icon_class": "reactive", + "exec": "systemctl poweroff", + "search_string": "Poweroff;Shutdown" + }, + "Sleep": { + "icon": "system-suspend", + "icon_class": "reactive", + "exec": "systemctl suspend", + "search_string": "Sleep;" + }, + "Lock": { + "icon": "system-lock-screen", + "icon_class": "reactive", + "exec": "systemctl suspend & swaylock", + "search_string": "Lock Screen;" + }, + "Reboot": { + "icon": "system-reboot", + "icon_class": "reactive", + "exec": "systemctl reboot", + "search_string": "reboot;restart" + }, + "Log Oout": { + "icon": "system-log-out", + "icon_class": "reactive", + "exec": "hyprctl dispatch exit", + "search_string": "logout;exit" + } + } + }, + "priority": 5 + }, + { + "name": "Web Search", + "display_name": "Google Search", + "tag_start": "{keyword}", + "tag_end": "{keyword}", + "alias": "gg", + "type": "web_launcher", + "args": { + "search_engine": "google", + "icon": "google" + }, + "priority": 100 + }, + { + "name": "Debug", + "type": "debug", + "alias": "debug", + "args": { + "commands": { + "Show Errors": { + "icon": "sherlock-process", + "exec": "show_errors", + "search_string": "debug;errors" + }, + "Clear Cache": { + "icon": "sherlock-process", + "exec": "clear_cache", + "search_string": "clear;cache;" + }, + "Reset App Counts": { + "icon": "sherlock-process", + "exec": "reset_counts", + "search_string": "reset;clear;counts;appcounts" + } + } + }, + "priority": 0 + }, + { + "name": "Categories", + "alias": "cat", + "type": "categories", + "args": { + "categories": { + "Kill Processes": { + "icon": "sherlock-process", + "exec": "kill", + "search_string": "terminate;kill;process" + }, + "Power Menu": { + "icon": "battery-full-symbolic", + "icon_class": "reactive", + "exec": "pm", + "search_string": "powermenu;" + }, + "Debug": { + "icon": "tools-report-bug", + "icon_class": "reactive", + "exec": "debug", + "search_string": "debug;error" + } + } + }, + "priority": 3, + "home": true + } +] diff --git a/configs/sherlock/main.css b/configs/sherlock/main.css new file mode 100644 index 0000000..e69de29 diff --git a/configs/sherlock/sherlock_actions.json b/configs/sherlock/sherlock_actions.json new file mode 100644 index 0000000..e69de29 diff --git a/configs/sherlock/sherlock_alias.json b/configs/sherlock/sherlock_alias.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/configs/sherlock/sherlock_alias.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/configs/sherlock/sherlockignore b/configs/sherlock/sherlockignore new file mode 100644 index 0000000..e69de29 diff --git a/modules/nixos/desktop/tiler/default.nix b/modules/nixos/desktop/tiler/default.nix index c419903..a7bcb77 100644 --- a/modules/nixos/desktop/tiler/default.nix +++ b/modules/nixos/desktop/tiler/default.nix @@ -39,6 +39,7 @@ in networkmanagerapplet blueman # Apps + sherlock-launcher fuzzel waybar nwg-bar