{ config, lib, pkgs, ... }: { programs.niri.settings.binds = with config.lib.niri.actions; { "Mod+Space".action = spawn (lib.getExe pkgs.unstable.app2unit) "-C" "--" ( lib.getExe pkgs.tgc.anyrun ); }; home.packages = [ pkgs.tgc.anyrun ]; xdg.configFile = lib.mapAttrs' (name: value: lib.nameValuePair "anyrun/${name}" { text = value; }) { "config.ron" = '' Config( ignore_exclusive_zones: false, layer: Overlay, hide_plugin_info: false, close_on_click: true, max_entries: None, plugins: [ "${pkgs.tgc.anyrun}/lib/libniri_focus.so", "${pkgs.tgc.anyrun}/lib/libapplications.so", ], keybinds: [ Keybind( key: "Return", action: Select, ), Keybind( key: "Up", action: Up, ), Keybind( key: "Down", action: Down, ), Keybind( key: "Escape", action: Close, ), ], ) ''; "applications.ron" = '' Config( desktop_actions: true, max_entries: 30, preprocess_exec_script: Some("${pkgs.writers.writeDash "anyrun-run.sh" '' if [ "$1" = "term" ] then shift echo "app2unit -T -- $*" echo "app2unit -T -- $*" >> ~/foo else shift echo "app2unit -- $*" fi ''}"), terminal: Some(Terminal( command: "", args: "", )), ) ''; "style.css" = '' window { background: transparent; } * { font-family: "Adwaita Sans", "Symbols Nerd Font"; outline-color: @accent-color; color: white; } .main { padding: 0; margin: 6px; background: @background-color; border-radius: 10px; border: 2px solid @accent-border-color; box-shadow: 0 0 5px black; } text { margin: 8px 10px; font-size: 15pt; } box.info { min-width: 160px; } box.info image { margin: 6px; } list.plugin { background: transparent; } box.matches { border-top: 1px solid @border-color; } box.matches > box { padding: 10px 12px; border-bottom: 1px solid @border-color; } row.match { border: 1px solid transparent; border-radius: 5px; margin: 4px 0; padding: 4px; } row.match:selected { background: @button-hover-color; border: 1px solid @border-color; } row.match box.match:first-child { border-left: 4px solid transparent; margin: -4px; padding: 4px 6px; } row.match:selected box.match:first-child { border-left: 4px solid @accent-color; border-radius: 4px; margin: -4px; padding: 4px 6px; } label.match.description { font-size: 10pt; } ''; }; }