This commit is contained in:
ediblerope 2026-05-14 10:15:56 +01:00
parent 2c0c649e49
commit 678eeccac5

View file

@ -118,7 +118,7 @@ in
"$mod" = "SUPER"; "$mod" = "SUPER";
"$term" = "ghostty"; "$term" = "ghostty";
"$menu" = "rofi -show drun"; "$menu" = "killall anyrun || anyrun";
exec-once = [ exec-once = [
"mako" "mako"
@ -222,8 +222,21 @@ in
"$mod, J, movefocus, d" "$mod, J, movefocus, d"
# L freed for hyprlock — arrow keys still handle right-focus. # L freed for hyprlock — arrow keys still handle right-focus.
# Lock screen # Power menu (contains lock option)
"$mod, L, exec, hyprlock" "$mod, L, exec, ${pkgs.writeShellScript "power-menu" ''
choice=$(printf "Lock\nLogout\nReboot\nShutdown" \
| ${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 ;;
esac
''}"
# Move windows # Move windows
"$mod SHIFT, left, movewindow, l" "$mod SHIFT, left, movewindow, l"
@ -283,16 +296,63 @@ in
}; };
}; };
programs.rofi = { programs.anyrun = {
enable = true; enable = true;
package = pkgs.rofi; config = {
terminal = "${pkgs.ghostty}/bin/ghostty"; plugins = [ "${pkgs.anyrun}/lib/libapplications.so" ];
extraConfig = { x.fraction = 0.5;
show-icons = true; y.fraction = 0.5;
location = 0; width.fraction = 0.2;
hide-scrollbar = true; height.absolute = 0;
click-to-exit = true; 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"),
)
'';
}; };
# Scope all HM Wayland services (hyprpaper, waybar, …) to the # Scope all HM Wayland services (hyprpaper, waybar, …) to the
@ -311,7 +371,7 @@ in
modules-left = [ "hyprland/workspaces" ]; modules-left = [ "hyprland/workspaces" ];
modules-center = [ "clock" ]; modules-center = [ "clock" ];
modules-right = [ "group/tray-drawer" "custom/power" ]; modules-right = [ "group/tray-drawer" ];
"hyprland/workspaces" = { "hyprland/workspaces" = {
format = "{name}"; format = "{name}";
@ -356,21 +416,6 @@ in
icon-size = 16; icon-size = 16;
spacing = 8; spacing = 8;
}; };
"custom/power" = {
format = "";
tooltip = false;
on-click = "${pkgs.writeShellScript "power-menu" ''
choice=$(printf "Lock\nLogout\nReboot\nShutdown" \
| ${pkgs.rofi}/bin/rofi -dmenu -p "Power")
case "$choice" in
Lock) ${pkgs.hyprlock}/bin/hyprlock ;;
Logout) hyprctl dispatch exit ;;
Reboot) systemctl reboot ;;
Shutdown) systemctl poweroff ;;
esac
''}";
};
}; };
style = '' style = ''
@ -414,8 +459,7 @@ in
} }
#pulseaudio, #pulseaudio,
#tray, #tray {
#custom-power {
padding: 0 10px; padding: 0 10px;
color: @base05; color: @base05;
} }
@ -425,16 +469,8 @@ in
color: @base03; color: @base03;
} }
#custom-power:hover {
color: @base08;
}
#custom-power {
margin-right: 6px;
}
#tray { #tray {
margin-right: 0; margin-right: 6px;
} }
#custom-tray-toggle { #custom-tray-toggle {