moving along wiht the refactoring
This commit is contained in:
parent
7d73d14ea5
commit
91d4b21cdf
18 changed files with 63 additions and 180 deletions
82
modules/runners/anyrun/anyrun.nix
Normal file
82
modules/runners/anyrun/anyrun.nix
Normal file
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
inherit (config.modules.other.system) username;
|
||||
cfg = config.modules.programs.anyrun;
|
||||
in {
|
||||
options.modules.programs.anyrun.enable = mkEnableOption "anyrun";
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
imports = [inputs.anyrun.homeManagerModules.default];
|
||||
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
config = {
|
||||
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
||||
applications
|
||||
dictionary
|
||||
#rink
|
||||
shell
|
||||
# symbols
|
||||
#translate
|
||||
websearch
|
||||
];
|
||||
hideIcons = false;
|
||||
ignoreExclusiveZones = false;
|
||||
layer = "overlay";
|
||||
hidePluginInfo = true;
|
||||
closeOnClick = true;
|
||||
showResultsImmediately = true;
|
||||
maxEntries = 10;
|
||||
width.fraction = 0.3;
|
||||
y.absolute = 15;
|
||||
};
|
||||
extraCss = builtins.readFile ./style.css;
|
||||
|
||||
extraConfigFiles = {
|
||||
"applications.ron".text = ''
|
||||
Config(
|
||||
max_entries: 10,
|
||||
terminal: Some("foot"),
|
||||
)
|
||||
'';
|
||||
"websearch.ron".text = ''
|
||||
Config(
|
||||
prefix: "?",
|
||||
engines: [DuckDuckGo]
|
||||
)
|
||||
'';
|
||||
|
||||
"symbols.ron".text = ''
|
||||
Config(
|
||||
// The prefix that the search needs to begin with to yield symbol results
|
||||
prefix: ":sy",
|
||||
|
||||
// Custom user defined symbols to be included along the unicode symbols
|
||||
symbols: {
|
||||
// "name": "text to be copied"
|
||||
"shrug": "¯\\_(ツ)_/¯",
|
||||
},
|
||||
|
||||
// The number of entries to be displayed
|
||||
max_entries: 5,
|
||||
)
|
||||
'';
|
||||
|
||||
"translate.ron".text = ''
|
||||
Config(
|
||||
prefix: ":tr",
|
||||
language_delimiter: ">",
|
||||
max_entries: 3,
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
1
modules/runners/anyrun/default.nix
Normal file
1
modules/runners/anyrun/default.nix
Normal file
|
@ -0,0 +1 @@
|
|||
_: {imports = [./anyrun.nix];}
|
69
modules/runners/anyrun/style.css
Normal file
69
modules/runners/anyrun/style.css
Normal file
|
@ -0,0 +1,69 @@
|
|||
* {
|
||||
all: unset;
|
||||
font-size: 1.3rem;
|
||||
font-family: "JetBrains Mono"
|
||||
}
|
||||
|
||||
#window,
|
||||
#match,
|
||||
#entry,
|
||||
#plugin,
|
||||
#main {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#match.activatable {
|
||||
border-radius: 16px;
|
||||
padding: 0.3rem 0.9rem;
|
||||
margin-top: 0.01rem;
|
||||
}
|
||||
#match.activatable:first-child {
|
||||
margin-top: 0.7rem;
|
||||
}
|
||||
#match.activatable:last-child {
|
||||
margin-bottom: 0.6rem;
|
||||
}
|
||||
|
||||
#plugin:hover #match.activatable {
|
||||
border-radius: 10px;
|
||||
padding: 0.3rem;
|
||||
margin-top: 0.01rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#match:selected,
|
||||
#match:hover,
|
||||
#plugin:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
#entry {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 16px;
|
||||
margin: 0.5rem;
|
||||
padding: 0.3rem 1rem;
|
||||
}
|
||||
|
||||
list > #plugin {
|
||||
border-radius: 16px;
|
||||
margin: 0 0.3rem;
|
||||
}
|
||||
list > #plugin:first-child {
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
list > #plugin:last-child {
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
list > #plugin:hover {
|
||||
padding: 0.6rem;
|
||||
}
|
||||
|
||||
box#main {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
box-shadow:
|
||||
inset 0 0 0 1px rgba(255, 255, 255, 0.1),
|
||||
0 0 0 1px rgba(0, 0, 0, 0.5);
|
||||
border-radius: 24px;
|
||||
padding: 0.3rem;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue