This commit is contained in:
ediblerope 2026-05-14 10:04:34 +01:00
parent c81c9b8a94
commit 857b145df6

View file

@ -118,7 +118,7 @@ in
"$mod" = "SUPER";
"$term" = "ghostty";
"$menu" = "killall anyrun || anyrun";
"$menu" = "rofi -show drun";
exec-once = [
"mako"
@ -283,63 +283,15 @@ in
};
};
programs.anyrun = {
programs.rofi = {
enable = true;
config = {
plugins = [ "${pkgs.anyrun}/lib/libapplications.so" ];
x.fraction = 0.5;
y.fraction = 0.5;
width.fraction = 0.3;
height.absolute = 0;
margin = 16;
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = true;
closeOnClick = true;
maxEntries = 8;
package = pkgs.rofi-wayland;
terminal = "${pkgs.ghostty}/bin/ghostty";
extraConfig = {
show-icons = true;
location = 0;
hide-scrollbar = true;
};
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"),
)
'';
};
# Scope all HM Wayland services (hyprpaper, waybar, …) to the
@ -408,17 +360,13 @@ in
format = "";
tooltip = false;
on-click = "${pkgs.writeShellScript "power-menu" ''
choice=$(printf " Lock\n Logout\n Reboot\n Shutdown" \
| ${pkgs.anyrun}/bin/anyrun \
--plugins "${pkgs.anyrun}/lib/libstdin.so" \
--show-results-immediately true \
--hide-plugin-info true \
--close-on-click true)
choice=$(printf "Lock\nLogout\nReboot\nShutdown" \
| ${pkgs.rofi-wayland}/bin/rofi -dmenu -p "Power")
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
''}";
};