Move anyrun/kidex config into common anyrun directory

This commit is contained in:
Evie Litherland-Smith 2023-11-13 14:47:12 +00:00
parent 18c2a2ddfc
commit c2d8923ed1
6 changed files with 132 additions and 97 deletions

View file

@ -1,97 +0,0 @@
{ config, pkgs, anyrun, ... }: {
imports = [ anyrun.homeManagerModules.default ./kidex.nix ];
home.packages = with pkgs; [ rink ];
programs.anyrun = {
enable = true;
config = {
plugins = with anyrun.packages.${pkgs.system}; [
applications
dictionary
kidex
randr
rink
shell
symbols
translate
websearch
];
width.fraction = 0.3;
y.absolute = 15;
hidePluginInfo = true;
closeOnClick = true;
};
extraConfigFiles."websearch.ron".text = ''
Config(
prefix: "!",
// Options: Google, Ecosia, Bing, DuckDuckGo, Custom
//
// Custom engines can be defined as such:
// Custom(
// name: "Searx",
// url: "searx.be/?q={}",
// )
//
// NOTE: `{}` is replaced by the search query and `https://` is automatically added in front.
engines: [DuckDuckGo]
)
'';
extraCss = with config.lib.stylix.colors.withHashtag; ''
* {
all: unset;
font-family: "${config.stylix.fonts.sansSerif.name}";
font-size: 1.3rem;
}
#window,
#match,
#entry,
#plugin,
#main {
background: transparent;
border: 1px solid transparent;
}
#match.activatable {
border-radius: 10px;
padding: .3rem .9rem;
margin-top: .01rem;
}
#match.activatable:first-child { margin-top: .7rem; }
#match.activatable:last-child { margin-bottom: .6rem; }
#plugin:hover #match.activatable {
border-radius: 10px;
padding: .3rem;
margin-top: .01rem;
margin-bottom: 0;
}
#match:hover, #plugin:hover { border: 1px solid ${base03}; }
#match:selected { border: 1px solid ${base0A}; }
#entry {
background: alpha(${base01}, .05);
border: 1px solid ${base03};
border-radius: 10px;
margin: .3rem;
padding: .3rem 1rem;
}
list > #plugin {
border-radius: 10px;
margin: 0 .3rem;
}
list > #plugin:first-child { margin-top: .3rem; }
list > #plugin:last-child { margin-bottom: .3rem; }
list > #plugin:hover { padding: .6rem; }
box#main {
background: alpha(${base00}, .5);
box-shadow: inset 0 0 0 1px alpha(${base05}, .1), 0 0 0 1px alpha(${base00}, .5);
border-radius: 10px;
padding: .3rem;
}
'';
};
}

View file

@ -0,0 +1,71 @@
{ config, pkgs, anyrun, ... }: {
imports = [ anyrun.homeManagerModules.default ./kidex.nix ];
home.packages = with pkgs; [
rink
(pkgs.callPackage ./pkgs/kidex/default.nix { })
];
programs.anyrun = {
enable = true;
config = {
plugins = with anyrun.packages.${pkgs.system}; [
applications
dictionary
kidex
randr
rink
shell
symbols
translate
websearch
];
width.fraction = 0.3;
y.absolute = 15;
hidePluginInfo = true;
closeOnClick = true;
};
extraCss = builtins.readFile ./style.css;
extraConfigFiles."websearch.ron".source = ./websearch.ron;
};
xdg.configFile."kidex.ron".text = ''
Config(
ignored: [".git*"], // A list of patterns to be ignored in all directories
directories: [
WatchDir(
path: "${config.xdg.userDirs.documents}", // The root folder to be indexed
recurse: true, // Recursively index and watch all subfolders
ignored: [], // Ignore patterns specifically for this directory
),
WatchDir(
path: "${config.xdg.userDirs.desktop}", // The root folder to be indexed
recurse: true, // Recursively index and watch all subfolders
ignored: [], // Ignore patterns specifically for this directory
),
WatchDir(
path: "${config.xdg.userDirs.download}", // The root folder to be indexed
recurse: true, // Recursively index and watch all subfolders
ignored: [], // Ignore patterns specifically for this directory
),
WatchDir(
path: "${config.xdg.userDirs.music}", // The root folder to be indexed
recurse: true, // Recursively index and watch all subfolders
ignored: [], // Ignore patterns specifically for this directory
),
WatchDir(
path: "${config.xdg.userDirs.pictures}", // The root folder to be indexed
recurse: true, // Recursively index and watch all subfolders
ignored: [], // Ignore patterns specifically for this directory
),
WatchDir(
path: "${config.xdg.userDirs.templates}", // The root folder to be indexed
recurse: true, // Recursively index and watch all subfolders
ignored: [], // Ignore patterns specifically for this directory
),
WatchDir(
path: "${config.xdg.userDirs.videos}", // The root folder to be indexed
recurse: true, // Recursively index and watch all subfolders
ignored: [], // Ignore patterns specifically for this directory
),
],
)
'';
}

View file

@ -0,0 +1,57 @@
* {
all: unset;
font-family: "Fira Sans";
font-size: 14px;
}
#window,
#match,
#entry,
#plugin,
#main {
background: transparent;
border: 1px solid transparent;
color: #c0caf5;
}
#match.activatable {
border-radius: 10px;
padding: .3rem .9rem;
margin-top: .01rem;
}
#match.activatable:first-child { margin-top: .7rem; }
#match.activatable:last-child { margin-bottom: .6rem; }
#plugin:hover #match.activatable {
border-radius: 10px;
padding: .3rem;
margin-top: .01rem;
margin-bottom: 0;
}
#match:hover, #plugin:hover { border: 1px solid #414868; }
#match:selected { border: 1px solid #bb9af7; }
#entry {
background: alpha(#1a1b26, .05);
border: 1px solid #414868;
border-radius: 10px;
margin: .3rem;
padding: .3rem 1rem;
}
list > #plugin {
border-radius: 10px;
margin: 0 .3rem;
}
list > #plugin:first-child { margin-top: .3rem; }
list > #plugin:last-child { margin-bottom: .3rem; }
list > #plugin:hover { padding: .6rem; }
box#main {
background: alpha(#1a1b26, .5);
box-shadow: inset 0 0 0 1px alpha(#bb9af7, .1), 0 0 0 1px alpha(#1a1b26, .5);
border-radius: 10px;
padding: .3rem;
}

View file

@ -0,0 +1,4 @@
Config(
prefix: "!",
engines: [DuckDuckGo]
)