mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 18:28:41 +02:00
feat: update anyrun & use gtk4 css, revert nvidia to prod driver (#220)
fix: nvidia: revert to prod driver to fix GTK4 apps hang on close
This commit is contained in:
@@ -8,6 +8,19 @@ let
|
||||
anyrunPackages = anyrun.packages.${pkgs.system};
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
(
|
||||
{ modulesPath, ... }:
|
||||
{
|
||||
# Important! We disable home-manager's module to avoid option
|
||||
# definition collisions
|
||||
disabledModules = [ "${modulesPath}/programs/anyrun.nix" ];
|
||||
}
|
||||
)
|
||||
anyrun.homeManagerModules.default
|
||||
];
|
||||
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
# The package should come from the same flake as all the plugins to avoid breakage.
|
||||
@@ -42,118 +55,12 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
extraConfigFiles."applications.ron".text = ''
|
||||
Config(
|
||||
// Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf
|
||||
desktop_actions: true,
|
||||
|
||||
max_entries: 5,
|
||||
|
||||
// The terminal used for running terminal based desktop entries, if left as `None` a static list of terminals is used
|
||||
// to determine what terminal to use.
|
||||
terminal: Some(Terminal(
|
||||
// The main terminal command
|
||||
command: "alacritty",
|
||||
// What arguments should be passed to the terminal process to run the command correctly
|
||||
// {} is replaced with the command in the desktop entry
|
||||
args: "-e {}",
|
||||
)),
|
||||
)
|
||||
'';
|
||||
|
||||
extraConfigFiles."symbols.ron".text = ''
|
||||
Config(
|
||||
// The prefix that the search needs to begin with to yield symbol results
|
||||
prefix: "",
|
||||
// Custom user defined symbols to be included along the unicode symbols
|
||||
symbols: {
|
||||
// "name": "text to be copied"
|
||||
"shrug": "¯\\_(ツ)_/¯",
|
||||
},
|
||||
max_entries: 3,
|
||||
)
|
||||
'';
|
||||
|
||||
# https://github.com/anyrun-org/anyrun/discussions/179
|
||||
extraCss = ''
|
||||
/* GTK Vars */
|
||||
@define-color bg-color #313244;
|
||||
@define-color fg-color #cdd6f4;
|
||||
@define-color primary-color #89b4fa;
|
||||
@define-color secondary-color #cba6f7;
|
||||
@define-color border-color @primary-color;
|
||||
@define-color selected-bg-color @primary-color;
|
||||
@define-color selected-fg-color @bg-color;
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
font-family: JetBrainsMono Nerd Font;
|
||||
}
|
||||
|
||||
#window {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
box#main {
|
||||
border-radius: 16px;
|
||||
background-color: alpha(@bg-color, 0.8);
|
||||
border: 0.5px solid alpha(@fg-color, 0.25);
|
||||
}
|
||||
|
||||
entry#entry {
|
||||
font-size: 1.25rem;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
border-radius: 16px;
|
||||
padding: 16px 24px;
|
||||
min-height: 40px;
|
||||
caret-color: @primary-color;
|
||||
}
|
||||
|
||||
list#main {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#plugin {
|
||||
background-color: transparent;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
#match {
|
||||
font-size: 1.1rem;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
#match:selected,
|
||||
#match:hover {
|
||||
background-color: @selected-bg-color;
|
||||
color: @selected-fg-color;
|
||||
}
|
||||
|
||||
#match:selected label#info,
|
||||
#match:hover label#info {
|
||||
color: @selected-fg-color;
|
||||
}
|
||||
|
||||
#match:selected label#match-desc,
|
||||
#match:hover label#match-desc {
|
||||
color: alpha(@selected-fg-color, 0.9);
|
||||
}
|
||||
|
||||
#match label#info {
|
||||
color: transparent;
|
||||
color: @fg-color;
|
||||
}
|
||||
|
||||
label#match-desc {
|
||||
font-size: 1rem;
|
||||
color: @fg-color;
|
||||
}
|
||||
|
||||
label#plugin {
|
||||
font-size: 16px;
|
||||
}
|
||||
'';
|
||||
extraConfigFiles = {
|
||||
"symbols.ron".source = ./conf/anyrun/symbols.ron;
|
||||
"applications.ron".source = ./conf/anyrun/applications.ron;
|
||||
};
|
||||
};
|
||||
|
||||
# https://github.com/anyrun-org/anyrun/discussions/179
|
||||
xdg.configFile."anyrun/style.css".source = ./conf/anyrun/style.css;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user