mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-01-11 20:40:24 +01: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
flake.lock
generated
8
flake.lock
generated
@@ -33,17 +33,17 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755604323,
|
||||
"narHash": "sha256-PKxVhfjd2AlzTopuVEx5DJMC4R7LnM5NIoMmirKMsKI=",
|
||||
"lastModified": 1756708978,
|
||||
"narHash": "sha256-01XBO8U2PyhhYXo3oZAu7dghqXkxdemeG82MqnNp4wE=",
|
||||
"owner": "anyrun-org",
|
||||
"repo": "anyrun",
|
||||
"rev": "af1ffe4f17921825ff2a773995604dce2b2df3cd",
|
||||
"rev": "b6d08eea668feb8c183ee2a1822f909949792676",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "anyrun-org",
|
||||
"ref": "v25.9.0",
|
||||
"repo": "anyrun",
|
||||
"rev": "af1ffe4f17921825ff2a773995604dce2b2df3cd",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
# anyrun - a wayland launcher
|
||||
anyrun = {
|
||||
url = "github:/anyrun-org/anyrun/af1ffe4f17921825ff2a773995604dce2b2df3cd";
|
||||
url = "github:/anyrun-org/anyrun/v25.9.0";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
16
home/linux/gui/base/desktop/conf/anyrun/applications.ron
Normal file
16
home/linux/gui/base/desktop/conf/anyrun/applications.ron
Normal file
@@ -0,0 +1,16 @@
|
||||
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 {}",
|
||||
)),
|
||||
)
|
||||
101
home/linux/gui/base/desktop/conf/anyrun/style.css
Normal file
101
home/linux/gui/base/desktop/conf/anyrun/style.css
Normal file
@@ -0,0 +1,101 @@
|
||||
/* ===== Color variables ===== */
|
||||
:root {
|
||||
--bg-color: #313244;
|
||||
--fg-color: #cdd6f4;
|
||||
--primary-color: #89b4fa;
|
||||
--secondary-color: #cba6f7;
|
||||
--border-color: var(--primary-color);
|
||||
--selected-bg-color: var(--primary-color);
|
||||
--selected-fg-color: var(--bg-color);
|
||||
}
|
||||
|
||||
/* ===== Global reset ===== */
|
||||
* {
|
||||
all: unset;
|
||||
font-family: "JetBrainsMono Nerd Font", monospace;
|
||||
}
|
||||
|
||||
/* ===== Transparent window ===== */
|
||||
window {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* ===== Main container ===== */
|
||||
box.main {
|
||||
border-radius: 16px;
|
||||
background-color: color-mix(in srgb, var(--bg-color) 80%, transparent);
|
||||
border: 0.5px solid color-mix(in srgb, var(--fg-color) 25%, transparent);
|
||||
padding: 12px; /* add uniform padding around the whole box */
|
||||
}
|
||||
|
||||
/* ===== Input field ===== */
|
||||
text {
|
||||
font-size: 1.3rem;
|
||||
background: transparent;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 16px;
|
||||
margin-bottom: 12px;
|
||||
padding: 5px 10px;
|
||||
min-height: 44px;
|
||||
caret-color: var(--primary-color);
|
||||
}
|
||||
|
||||
/* ===== List container ===== */
|
||||
.matches {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* ===== Single match row ===== */
|
||||
.match {
|
||||
font-size: 1.1rem;
|
||||
padding: 4px 10px; /* tight vertical spacing */
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* Remove default label margins */
|
||||
.match * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* Selected / hover state */
|
||||
.match:selected,
|
||||
.match:hover {
|
||||
background-color: var(--selected-bg-color);
|
||||
color: var(--selected-fg-color);
|
||||
}
|
||||
|
||||
.match:selected label.plugin.info,
|
||||
.match:hover label.plugin.info {
|
||||
color: var(--selected-fg-color);
|
||||
}
|
||||
|
||||
.match:selected label.match.description,
|
||||
.match:hover label.match.description {
|
||||
color: color-mix(in srgb, var(--selected-fg-color) 90%, transparent);
|
||||
}
|
||||
|
||||
/* ===== Plugin info label ===== */
|
||||
label.plugin.info {
|
||||
color: var(--fg-color);
|
||||
font-size: 1rem;
|
||||
min-width: 160px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* ===== Description label ===== */
|
||||
label.match.description {
|
||||
font-size: 0rem;
|
||||
color: var(--fg-color);
|
||||
}
|
||||
|
||||
/* ===== Fade-in animation ===== */
|
||||
@keyframes fade {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
10
home/linux/gui/base/desktop/conf/anyrun/symbols.ron
Normal file
10
home/linux/gui/base/desktop/conf/anyrun/symbols.ron
Normal file
@@ -0,0 +1,10 @@
|
||||
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,
|
||||
)
|
||||
@@ -17,7 +17,7 @@
|
||||
open = true;
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/nvidia-x11/default.nix
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||
|
||||
# required by most wayland compositors!
|
||||
modesetting.enable = true;
|
||||
|
||||
Reference in New Issue
Block a user