Skip to content

Commit 9fadf95

Browse files
committed
sherlock: init module
1 parent 25d42c4 commit 9fadf95

2 files changed

Lines changed: 189 additions & 3 deletions

File tree

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
{
2+
config,
3+
lib,
4+
...
5+
}:
6+
let
7+
inherit (lib) mkIf;
8+
9+
cfg = config.khanelinix.programs.graphical.launchers.sherlock;
10+
in
11+
{
12+
options.khanelinix.programs.graphical.launchers.sherlock = {
13+
enable = lib.mkEnableOption "sherlock in the desktop environment";
14+
};
15+
16+
config = mkIf cfg.enable {
17+
programs.sherlock = {
18+
enable = true;
19+
20+
settings = {
21+
appearance = {
22+
width = 1000;
23+
height = 600;
24+
gsk_renderer = "cairo";
25+
icon_size = 32;
26+
opacity = 0.95;
27+
};
28+
29+
caching = {
30+
enable = true;
31+
};
32+
33+
default_apps = {
34+
browser = "firefox";
35+
calendar_client = "thunderbird";
36+
teams = "teams-for-linux --enable-features=UseOzonePlatform --ozone-platform=wayland --url {meeting_url}";
37+
terminal = "kitty";
38+
};
39+
40+
# TODO: revisit when animations work with it
41+
# runtime = {
42+
# daemonize = true;
43+
# };
44+
45+
search_bar_icon = {
46+
enable = true;
47+
};
48+
49+
status_bar.enable = true;
50+
51+
units = {
52+
lengths = "feet";
53+
weights = "lb";
54+
volumes = "oz";
55+
temperatures = "F";
56+
currency = "usd";
57+
};
58+
};
59+
60+
launchers = [
61+
{
62+
name = "Weather";
63+
type = "weather";
64+
args = {
65+
location = "Appleton";
66+
update_interval = 60;
67+
};
68+
priority = 1;
69+
home = "OnlyHome";
70+
async = true;
71+
shortcut = false;
72+
spawn_focus = false;
73+
}
74+
{
75+
name = "App Launcher";
76+
alias = "app";
77+
type = "app_launcher";
78+
args = { };
79+
priority = 2;
80+
home = "Home";
81+
}
82+
{
83+
name = "Web Search";
84+
display_name = "DuckDuckGo Search";
85+
alias = "ddg";
86+
type = "web_launcher";
87+
tag_start = "{keyword}";
88+
tag_end = "{keyword}";
89+
args = {
90+
search_engine = "duckduckgo";
91+
icon = "duckduckgo";
92+
};
93+
priority = 100;
94+
}
95+
{
96+
name = "Calculator";
97+
type = "calculation";
98+
args = {
99+
capabilities = [
100+
"calc.math"
101+
"calc.units"
102+
];
103+
};
104+
priority = 1;
105+
}
106+
{
107+
name = "Clipboard";
108+
type = "clipboard-execution";
109+
args = {
110+
capabilities = [
111+
"url"
112+
"colors.all"
113+
"calc.math"
114+
"calc.units"
115+
];
116+
};
117+
priority = 1;
118+
home = "Home";
119+
}
120+
{
121+
name = "Nix Commands";
122+
alias = "nix";
123+
type = "command";
124+
args = {
125+
commands = {
126+
"Search Packages" = {
127+
icon = "nix-snowflake";
128+
exec = "firefox https://search.nixos.org/packages?query={keyword}";
129+
search_string = "packages;search;nixpkgs";
130+
tag_start = "search:";
131+
tag_end = "";
132+
};
133+
"Search Options" = {
134+
icon = "nix-snowflake";
135+
exec = "firefox https://search.nixos.org/options?query={keyword}";
136+
search_string = "options;config;nixos";
137+
tag_start = "options:";
138+
tag_end = "";
139+
};
140+
"NixOS Wiki" = {
141+
icon = "nix-snowflake";
142+
exec = "firefox https://wiki.nixos.org/w/index.php?search={keyword}";
143+
search_string = "wiki;docs;documentation";
144+
tag_start = "wiki:";
145+
tag_end = "";
146+
};
147+
"Nix Search TV" = {
148+
icon = "nix-snowflake";
149+
exec = "kitty -e nix-search-tv";
150+
search_string = "interactive;search;tv";
151+
};
152+
};
153+
};
154+
priority = 5;
155+
}
156+
{
157+
name = "Emoji Picker";
158+
type = "emoji_picker";
159+
args = {
160+
default_skin_tone = "Simpsons";
161+
};
162+
priority = 4;
163+
home = "Search";
164+
}
165+
{
166+
name = "Kill Process";
167+
alias = "kill";
168+
type = "process";
169+
args = { };
170+
priority = 6;
171+
home = "Search";
172+
}
173+
];
174+
175+
aliases = { };
176+
177+
ignore = ''
178+
hicolor-icon-theme.desktop
179+
user-dirs.desktop
180+
mimeinfo.cache.desktop
181+
org.freedesktop.IBus.Setup.desktop
182+
ca.desrt.dconf-editor.desktop
183+
'';
184+
};
185+
};
186+
}

0 commit comments

Comments
 (0)