This commit is contained in:
ediblerope 2026-05-13 14:17:47 +01:00
parent b06a4333cf
commit 9818a13050

View file

@ -82,7 +82,7 @@
"$mod" = "SUPER";
"$term" = "ghostty";
"$menu" = "killall fuzzel || fuzzel";
"$menu" = "killall anyrun || anyrun";
exec-once = [
"mako"
@ -246,31 +246,63 @@
};
};
programs.fuzzel = {
programs.anyrun = {
enable = true;
settings = {
# Font + colors now come from stylix.targets.fuzzel.
main = {
lines = 8;
width = 32;
horizontal-pad = 0;
vertical-pad = 0;
inner-pad = 16;
icon-theme = "Adwaita";
terminal = "ghostty";
prompt = "\" \"";
keyboard-focus = "yes";
exit-on-keyboard-focus-loss = "yes";
matching-mode = "fzf";
};
border = {
width = 1;
radius = 10;
};
dmenu = {
exit-immediately-if-empty = "yes";
};
config = {
plugins = [ "${pkgs.anyrun}/lib/libapplications.so" ];
x.fraction = 0.5;
y.fraction = 0.0;
width.fraction = 0.3;
height.absolute = 0;
margin = 16;
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = true;
closeOnClick = true;
maxEntries = 8;
};
extraCss =
let c = config.lib.stylix.colors; in
''
* { all: unset; font-family: "FiraMono Nerd Font", monospace; font-size: 13px; }
window { background: transparent; }
box.main {
background: #${c.base00};
border: 1px solid #${c.base03};
border-radius: 10px;
padding: 8px;
margin: 16px;
}
text {
background: #${c.base01};
color: #${c.base05};
caret-color: #${c.base0D};
padding: 8px 16px;
border-radius: 6px;
min-height: 0;
}
list.plugin { background: transparent; }
.matches { background: transparent; }
.match {
padding: 4px 16px;
border-radius: 6px;
color: #${c.base05};
background: transparent;
}
.match:selected {
background: #${c.base02};
border: none;
}
label.match.description { color: #${c.base04}; font-size: 11px; }
'';
extraConfigFiles."applications.ron".text = ''
Config(
desktop_actions: false,
max_entries: Some(8),
terminal: Some("ghostty"),
)
'';
};
programs.waybar = {
@ -336,12 +368,16 @@
tooltip = false;
on-click = "${pkgs.writeShellScript "power-menu" ''
choice=$(printf " Lock\n Logout\n Reboot\n Shutdown" \
| ${pkgs.fuzzel}/bin/fuzzel --dmenu --prompt="Power: " --lines=4 --width=12)
| ${pkgs.anyrun}/bin/anyrun \
--plugins "${pkgs.anyrun}/lib/libstdin.so" \
--show-results-immediately true \
--hide-plugin-info true \
--close-on-click true)
case "$choice" in
Lock) ${pkgs.hyprlock}/bin/hyprlock ;;
Logout) hyprctl dispatch exit ;;
Reboot) systemctl reboot ;;
Shutdown) systemctl poweroff ;;
*Lock) ${pkgs.hyprlock}/bin/hyprlock ;;
*Logout) hyprctl dispatch exit ;;
*Reboot) systemctl reboot ;;
*Shutdown) systemctl poweroff ;;
esac
''}";
};