mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-05-30 10:10:38 +02:00
Merge pull request #219 from ryan4yin/anyrun
polish: anyrun - update config & css style
This commit is contained in:
Generated
+3
-2
@@ -35,14 +35,15 @@
|
|||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755604323,
|
"lastModified": 1755604323,
|
||||||
"narHash": "sha256-PKxVhfjd2AlzTopuVEx5DJMC4R7LnM5NIoMmirKMsKI=",
|
"narHash": "sha256-PKxVhfjd2AlzTopuVEx5DJMC4R7LnM5NIoMmirKMsKI=",
|
||||||
"owner": "Kirottu",
|
"owner": "anyrun-org",
|
||||||
"repo": "anyrun",
|
"repo": "anyrun",
|
||||||
"rev": "af1ffe4f17921825ff2a773995604dce2b2df3cd",
|
"rev": "af1ffe4f17921825ff2a773995604dce2b2df3cd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Kirottu",
|
"owner": "anyrun-org",
|
||||||
"repo": "anyrun",
|
"repo": "anyrun",
|
||||||
|
"rev": "af1ffe4f17921825ff2a773995604dce2b2df3cd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,12 +16,10 @@
|
|||||||
nixConfig = {
|
nixConfig = {
|
||||||
# substituers will be appended to the default substituters when fetching packages
|
# substituers will be appended to the default substituters when fetching packages
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
"https://anyrun.cachix.org"
|
|
||||||
# "https://nix-gaming.cachix.org"
|
# "https://nix-gaming.cachix.org"
|
||||||
# "https://nixpkgs-wayland.cachix.org"
|
# "https://nixpkgs-wayland.cachix.org"
|
||||||
];
|
];
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
|
||||||
# "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
# "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||||
# "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
# "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||||
];
|
];
|
||||||
@@ -79,9 +77,10 @@
|
|||||||
|
|
||||||
# community wayland nixpkgs
|
# community wayland nixpkgs
|
||||||
# nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
# nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||||
|
|
||||||
# anyrun - a wayland launcher
|
# anyrun - a wayland launcher
|
||||||
anyrun = {
|
anyrun = {
|
||||||
url = "github:Kirottu/anyrun";
|
url = "github:/anyrun-org/anyrun/af1ffe4f17921825ff2a773995604dce2b2df3cd";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,78 +7,146 @@
|
|||||||
programs.anyrun = {
|
programs.anyrun = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
plugins = with anyrun.packages.${pkgs.system}; [
|
# The horizontal position.
|
||||||
applications
|
# when using `fraction`, it sets a fraction of the width or height of the screen
|
||||||
randr
|
x.fraction = 0.5; # at the middle of the screen
|
||||||
rink
|
# The vertical position.
|
||||||
shell
|
y.fraction = 0.05; # at the top of the screen
|
||||||
symbols
|
# The width of the runner.
|
||||||
translate
|
width.fraction = 0.3; # 30% of the screen
|
||||||
];
|
|
||||||
|
|
||||||
width.fraction = 0.3;
|
hideIcons = false;
|
||||||
y.absolute = 15;
|
ignoreExclusiveZones = false;
|
||||||
hidePluginInfo = true;
|
layer = "overlay";
|
||||||
|
hidePluginInfo = false;
|
||||||
closeOnClick = true;
|
closeOnClick = true;
|
||||||
|
showResultsImmediately = true;
|
||||||
|
maxEntries = null;
|
||||||
|
|
||||||
|
# https://github.com/anyrun-org/anyrun/tree/master/plugins
|
||||||
|
plugins = with anyrun.packages.${pkgs.system}; [
|
||||||
|
applications # Launch applications
|
||||||
|
dictionary # Look up word definitions using the Free Dictionary API.
|
||||||
|
nix-run # search & run graphical apps from nixpkgs via `nix run`, without installing it.
|
||||||
|
# randr # quickly change monitor configurations on the fly
|
||||||
|
rink # A simple calculator plugin
|
||||||
|
symbols # Look up unicode symbols and custom user defined symbols.
|
||||||
|
translate # ":zh <text to translate>" Quickly translate text using the Google Translate API.
|
||||||
|
niri-focus # Search for & focus the window via title/appid on Niri
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# custom css for anyrun, based on catppuccin-mocha
|
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 = ''
|
extraCss = ''
|
||||||
@define-color bg-col rgba(30, 30, 46, 0.7);
|
/* GTK Vars */
|
||||||
@define-color bg-col-light rgba(150, 220, 235, 0.7);
|
@define-color bg-color #313244;
|
||||||
@define-color border-col rgba(30, 30, 46, 0.7);
|
@define-color fg-color #cdd6f4;
|
||||||
@define-color selected-col rgba(150, 205, 251, 0.7);
|
@define-color primary-color #89b4fa;
|
||||||
@define-color fg-col #D9E0EE;
|
@define-color secondary-color #cba6f7;
|
||||||
@define-color fg-col2 #F28FAD;
|
@define-color border-color @primary-color;
|
||||||
|
@define-color selected-bg-color @primary-color;
|
||||||
|
@define-color selected-fg-color @bg-color;
|
||||||
|
|
||||||
* {
|
* {
|
||||||
transition: 200ms ease;
|
all: unset;
|
||||||
font-family: "Maple Mono NF CN";
|
font-family: JetBrainsMono Nerd Font;
|
||||||
font-size: 1.3rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#window {
|
#window {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#plugin,
|
|
||||||
#main {
|
|
||||||
border: 3px solid @border-col;
|
|
||||||
color: @fg-col;
|
|
||||||
background-color: @bg-col;
|
|
||||||
}
|
|
||||||
/* anyrun's input window - Text */
|
|
||||||
#entry {
|
|
||||||
color: @fg-col;
|
|
||||||
background-color: @bg-col;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* anyrun's output matches entries - Base */
|
|
||||||
#match {
|
|
||||||
color: @fg-col;
|
|
||||||
background: @bg-col;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* anyrun's selected entry - Red */
|
|
||||||
#match:selected {
|
|
||||||
color: @fg-col2;
|
|
||||||
background: @selected-col;
|
|
||||||
}
|
|
||||||
|
|
||||||
#match {
|
|
||||||
padding: 3px;
|
|
||||||
border-radius: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry, #plugin:hover {
|
|
||||||
border-radius: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
box#main {
|
box#main {
|
||||||
background: rgba(30, 30, 46, 0.7);
|
border-radius: 16px;
|
||||||
border: 1px solid @border-col;
|
background-color: alpha(@bg-color, 0.8);
|
||||||
border-radius: 15px;
|
border: 0.5px solid alpha(@fg-color, 0.25);
|
||||||
padding: 5px;
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user