Add anyrun and replace rofi
This commit is contained in:
parent
40f93b4d6f
commit
c37687b393
6 changed files with 172 additions and 3 deletions
45
flake.lock
45
flake.lock
|
@ -1,5 +1,26 @@
|
|||
{
|
||||
"nodes": {
|
||||
"anyrun": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1692476235,
|
||||
"narHash": "sha256-NGUDp/24HCIVWE0xZNHIdzz3q2WDk7MQz1wC7ub/e2U=",
|
||||
"owner": "Kirottu",
|
||||
"repo": "anyrun",
|
||||
"rev": "76af3eb198f376303194c31a83f2399a043acf1b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Kirottu",
|
||||
"repo": "anyrun",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"caddy-with-plugins": {
|
||||
"inputs": {
|
||||
"flake-parts": [
|
||||
|
@ -170,6 +191,27 @@
|
|||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"anyrun",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685662779,
|
||||
"narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
|
@ -519,11 +561,12 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"anyrun": "anyrun",
|
||||
"caddy-with-plugins": "caddy-with-plugins",
|
||||
"disko": "disko",
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
"eww": "eww",
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"flake-utils": "flake-utils",
|
||||
"ha-now-playing": "ha-now-playing",
|
||||
"home-manager": "home-manager",
|
||||
|
|
|
@ -86,6 +86,11 @@
|
|||
};
|
||||
};
|
||||
|
||||
anyrun = {
|
||||
url = "github:Kirottu/anyrun";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
caddy-with-plugins = {
|
||||
url = "github:eboskma/caddy-with-plugins";
|
||||
inputs = {
|
||||
|
|
117
home-manager/modules/anyrun/default.nix
Normal file
117
home-manager/modules/anyrun/default.nix
Normal file
|
@ -0,0 +1,117 @@
|
|||
{ pkgs, config, lib, flake-inputs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.eboskma.programs.anyrun;
|
||||
anyrunPkgs = flake-inputs.anyrun.packages."${pkgs.system}";
|
||||
in
|
||||
{
|
||||
options.eboskma.programs.anyrun = { enable = mkEnableOption "anyrun"; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
config = {
|
||||
plugins = with anyrunPkgs; [
|
||||
applications
|
||||
dictionary
|
||||
rink
|
||||
stdin
|
||||
shell
|
||||
symbols
|
||||
translate
|
||||
];
|
||||
width = { fraction = 0.3; };
|
||||
x = { fraction = 0.5; };
|
||||
y = { absolute = 60; };
|
||||
layer = "overlay";
|
||||
};
|
||||
|
||||
extraConfigFiles = {
|
||||
"applications.ron".text = ''
|
||||
Config(
|
||||
desktop_actions: true,
|
||||
max_entries: 0,
|
||||
terminal: Some("${config.wayland.windowManager.sway.config.terminal}")
|
||||
)
|
||||
'';
|
||||
};
|
||||
extraCss = ''
|
||||
window {
|
||||
background: transparent; /* rgba(0, 0, 0, 0.8);*/
|
||||
}
|
||||
|
||||
#match,
|
||||
#entry,
|
||||
#plugin,
|
||||
#main {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#match.activatable {
|
||||
padding: 12px 14px;
|
||||
border-radius: 12px;
|
||||
|
||||
color: white;
|
||||
margin-top: 4px;
|
||||
border: 2px solid transparent;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
#match.activatable:not(:first-child) {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
border-top: 2px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
#match.activatable #match-title {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
#match.activatable:hover {
|
||||
border: 2px solid rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
#match-title, #match-desc {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#match.activatable:hover, #match.activatable:selected {
|
||||
border-top-left-radius: 12px;
|
||||
border-top-right-radius: 12px;
|
||||
}
|
||||
|
||||
#match.activatable:selected + #match.activatable, #match.activatable:hover + #match.activatable {
|
||||
border-top: 2px solid transparent;
|
||||
}
|
||||
|
||||
#match.activatable:selected, #match.activatable:hover:selected {
|
||||
background: rgba(255,255,255,0.1);
|
||||
border: 2px solid #333333;
|
||||
border-top: 2px solid #333333;
|
||||
}
|
||||
|
||||
#match, #plugin {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#entry {
|
||||
color: white;
|
||||
box-shadow: none;
|
||||
border-radius: 12px;
|
||||
border: 2px solid #333333;
|
||||
}
|
||||
|
||||
box#main {
|
||||
background: rgba(36, 39, 58, 0.7);
|
||||
border-radius: 16px;
|
||||
padding: 8px;
|
||||
box-shadow: 0px 2px 33px -5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
row:first-child {
|
||||
margin-top: 6px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -127,7 +127,8 @@ in
|
|||
input = cfg.input;
|
||||
output = cfg.output;
|
||||
|
||||
menu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab";
|
||||
# menu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab";
|
||||
menu = "${config.programs.anyrun.package}/bin/anyrun";
|
||||
|
||||
keybindings = {
|
||||
"${mod}+Return" = "exec ${config.wayland.windowManager.sway.config.terminal}";
|
||||
|
|
|
@ -87,7 +87,8 @@ in
|
|||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
# SDL_VIDEODRIVER = "wayland";
|
||||
AMD_VULKAN_ICD = "RADV";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
})
|
||||
];
|
||||
|
|
|
@ -22,6 +22,7 @@ in
|
|||
eboskma = {
|
||||
programs = {
|
||||
alacritty.enable = false;
|
||||
anyrun.enable = true;
|
||||
atuin.enable = true;
|
||||
bat.enable = true;
|
||||
cargo = {
|
||||
|
@ -308,6 +309,7 @@ in
|
|||
|
||||
imports = [
|
||||
../../modules/options
|
||||
inputs.anyrun.nixosModules.home-manager
|
||||
] ++ (map (mod: (../../home-manager/modules + "/${mod}")) (builtins.attrNames (builtins.readDir ../../home-manager/modules)));
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue