vicinae, other tweaks

This commit is contained in:
Reid 2026-03-22 16:59:30 -07:00
parent 8cc93daddc
commit 8b022298e2
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
13 changed files with 254 additions and 43 deletions

View file

@ -17,15 +17,9 @@ in {
modules.desktop.fonts.baseFonts = true;
modules.desktop.thumbnailers.enable = true;
# enable networking
networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd";
networking.wireless.iwd.settings.Settings.AutoConnect = true;
# speed up boot
# https://discourse.nixos.org/t/boot-faster-by-disabling-udev-settle-and-nm-wait-online/6339
systemd.services.systemd-udev-settle.enable = false;
systemd.services.NetworkManager-wait-online.enable = false;
# mounting, trash, and mtp support
services.gvfs.enable = true;

View file

@ -291,44 +291,41 @@ in {
}
];
# TODO: add shadows onto notifications. weird geometry beware !!!
# TODO: add shadows onto waybar again, but make it show the shadow drops behind the windows
# TODO: rounded vicinae
layer-rules = [
{
matches = [
{ namespace = "^notifications$"; }
{ namespace = "^rofi$"; } # a bit silly, but we use rofi for clipboard history
# obliterate all dmenu-like things--too dangerous to stream (clipboard history, passwords)
{ namespace = "^rofi$"; }
{ namespace = "^vicinae$"; }
{ namespace = "^launcher$"; }
];
block-out-from = "screen-capture";
}
{
matches = [
{ namespace = "^launcher$"; }
{ namespace = "^notifications$"; }
{ namespace = "^rofi$"; }
{ namespace = "^waybar$"; }
{ namespace = "^vicinae$"; }
{ namespace = "^wob$"; }
];
shadow = {
enable = true;
};
}
# special rounded corner cases. gah!!
# also for some reason int literals aren't accepted
# so multiply by 1.0 to make it a float
# shadow rounded corner cases...
# defined in program config but we need to edit geometry too for shadows!!
# monospace
{
matches = [
{ namespace = "^launcher$"; }
{ namespace = "^rofi$"; }
{ namespace = "^waybar$"; }
];
geometry-corner-radius = allCorners (config.modules.desktop.fonts.fonts.monospace.size * 1.0); # its 1em, so
}
{
matches = [ { namespace = "^launcher$"; } ];
geometry-corner-radius = allCorners (config.hm.programs.fuzzel.settings.border.radius * 1.0);
}
{
matches = [ { namespace = "^notifications$"; } ];
geometry-corner-radius = allCorners (config.hm.services.dunst.settings.global.corner_radius * 1.0);
}
];
binds = with config.hm.lib.niri.actions; let
@ -336,7 +333,8 @@ in {
in {
"Mod+Shift+Slash".action = show-hotkey-overlay;
"Mod+D".action = spawn "fuzzel";
# "Mod+D".action = spawn "fuzzel";
"Mod+D".action = spawn "vicinae" "vicinae://toggle";
"Mod+Q".action = close-window;
@ -438,7 +436,8 @@ in {
"XF86AudioNext".action = sh "${lib.getExe pkgs.playerctl} next";
"Mod+Shift+C".action = sh "${lib.getExe pkgs.hyprpicker} -a";
"Mod+V".action = sh "${config.modules.desktop.cliphist.summonScript}";
# "Mod+V".action = sh "${config.modules.desktop.cliphist.summonScript}";
"Mod+V".action = spawn "vicinae" "vicinae://extensions/vicinae/clipboard/history";
"Mod+Shift+Control+T".action = toggle-debug-tint;
"Mod+Shift+Control+O".action = debug-toggle-opaque-regions;

View file

@ -48,23 +48,9 @@ in {
fit = "Cover";
};
};
# TODO: move to theme module
theme = with config.modules.desktop.themes.gtkTheme; {
name = name;
package = package;
};
iconTheme = with config.modules.desktop.themes.iconTheme; {
name = name;
package = package;
};
cursorTheme = with config.modules.desktop.themes.cursorTheme; {
name = name;
package = package;
};
font = with config.modules.desktop.fonts.fonts.sansSerif; {
inherit size package;
name = family;
size = size;
package = package;
};
};
};

View file

@ -102,6 +102,8 @@ in {
wezterm = ''
config.color_scheme = 'Catppuccin ${pascalCase variant}'
'';
vicinae = "catppuccin-${variant}";
};
};
}

View file

@ -10,11 +10,8 @@ button, button:hover {
window#waybar {
color: @text;
/* background: alpha(@base, 0.8); */
/* background: @base; */
background: alpha(@base, 0.9999999);
border-radius: 1em;
/* font-family: 'Lexica Ultralegible', 'Atkinson Hyperlegible', "Font Awesome 6 Free", "Noto Sans CJK"; */
font-family: "CozetteVector", monospace, "FontAwesome 6 Free", "Noto Sans CJK";
font-size: 13px;
font-style: normal;

View file

@ -65,11 +65,13 @@ in {
fuzzel = mkOpt (nullOr str) null;
wezterm = mkOpt (nullOr str) null;
vicinae = mkOpt (nullOr str) null;
};
config = mkIf (cfg.active != null) {
programs.dconf.enable = true;
# i think this may be done by ohome-manager already??
# i think this may be done by home-manager already??
# better safe than sorry
hm.dconf = {
enable = true;
@ -114,6 +116,12 @@ in {
package = cfg.iconTheme.package;
};
programs.regreet.settings = {
theme = cfg.gtkTheme;
iconTheme = cfg.iconTheme;
cursorTheme = cfg.cursorTheme;
};
hm.programs.vscode.profiles.default = {
extensions = [
cfg.editor.vscode.colorTheme.extension
@ -146,6 +154,16 @@ in {
icon-theme = cfg.iconTheme.name;
};
hm.services.vicinae.settings.theme = let
themeConf = {
name = cfg.vicinae;
iconTheme = cfg.iconTheme.name;
};
in {
light = themeConf;
dark = themeConf;
};
hm.xdg.configFile = let
iniFmt = pkgs.formats.ini {};

View file

@ -0,0 +1,71 @@
{ inputs, lib, config, pkgs, system, ... }:
with lib;
let
cfg = config.modules.desktop.vicinae;
in {
options.modules.desktop.vicinae = {
enable = mkEnableOption "Enable vicinae, a launcher built in react";
package = mkOption {
type = types.package;
default = inputs.vicinae.packages.${system}.default;
};
};
config = mkIf cfg.enable {
hm.services.vicinae = {
enable = true;
package = cfg.package;
systemd = {
enable = true;
autoStart = true;
environment = {
USE_LAYER_SHELL = 1;
};
};
settings = {
"$schema" = "https://vicinae.com/schemas/config.json";
pop_to_root_on_close = true;
launcher_window = {
opacity = 0.95;
client_side_decorations.enabled = false;
layer_shell = {
enabled = true;
keyboard_interactivity = "exclusive";
layer = "top";
};
};
favorites = [
"core:search-emojis"
"clipboard:history"
];
providers = {
applications = {
preferences = {
defaultAction = "launch";
};
};
files.enabled = false;
};
escape_key_behavior = "close_window";
font = let
fonts = config.modules.desktop.fonts.fonts;
in {
normal = { inherit (fonts.sansSerif) family size; };
};
};
extensions = with inputs.vicinae-extensions.packages.${system}; [
nix
] ++ optional config.modules.desktop.niri.enable niri;
};
};
}