feat(desktop): fold calc into combi and rebind the power menu (task 0024)
Move the calc mode into the combi prompt so math results show inline alongside apps, leaving emoji as the one tab-away mode. Rebind the power menu from Super+Escape to Super+Shift+X, pairing it with lock on Super+X. Shorten the layer fade-in so the launcher appears quicker.
This commit is contained in:
@@ -23,12 +23,12 @@ Structure it so it is reusable as the dmenu-style frontend for later utility men
|
|||||||
|
|
||||||
- `rofi-wayland` no longer exists as a separate package: nixpkgs merged the Wayland fork into `pkgs.rofi` (now 2.0.0), and `rofi-emoji-wayland` into `rofi-emoji`.
|
- `rofi-wayland` no longer exists as a separate package: nixpkgs merged the Wayland fork into `pkgs.rofi` (now 2.0.0), and `rofi-emoji-wayland` into `rofi-emoji`.
|
||||||
The module uses the plain `pkgs.rofi`, which is the Wayland-capable build.
|
The module uses the plain `pkgs.rofi`, which is the Wayland-capable build.
|
||||||
- The combined prompt is rofi's `combi` mode: `combi-modi = "drun,run,window"` merges the three run/switch modes into one list, and `modi = "combi,calc,emoji"` makes calc (via the `rofi-calc` plugin) and emoji (via `rofi-emoji`) the two further modes the same window tabs between.
|
- The combined prompt is rofi's `combi` mode: `combi-modi = "drun,run,window,calc"` merges the run/switch modes and calc (via the `rofi-calc` plugin) into one list, so math results appear inline in the same view.
|
||||||
|
`modi = "combi,emoji"` leaves emoji (via `rofi-emoji`) as the one further mode the same window tabs to.
|
||||||
`Super+R` runs `rofi -show combi`.
|
`Super+R` runs `rofi -show combi`.
|
||||||
- The dmenu-style reuse is the themed rofi itself, not a separate abstraction: any `rofi -dmenu` invocation reads the same config and Stylix theme, so the power menu — and later clipboard/utility menus — look uniform for free.
|
- The dmenu-style reuse is the themed rofi itself, not a separate abstraction: any `rofi -dmenu` invocation reads the same config and Stylix theme, so the power menu — and later clipboard/utility menus — look uniform for free.
|
||||||
- The launcher and power-menu keybinds live in this module rather than in `hyprland.nix`, contributed through `settings.bind`, which the module system concatenates with the compositor's own binds in the single `hyprland.conf`.
|
- The launcher and power-menu keybinds live in this module rather than in `hyprland.nix`, contributed through `settings.bind`, which the module system concatenates with the compositor's own binds in the single `hyprland.conf`.
|
||||||
This keeps each command next to its binding and referenced by store path, so a rename cannot silently break the bind.
|
This keeps each command next to its binding and referenced by store path, so a rename cannot silently break the bind.
|
||||||
- The power menu is bound to `Super+Escape`, a key the parent spec's keybind table does not enumerate.
|
- The power menu is bound to `Super+Shift+X`, chosen by the operator.
|
||||||
The table lists the launcher and lock but no power-menu key, so this is an added binding: a power menu needs a trigger to be reachable at all, and `Super+Escape` is otherwise unused.
|
It pairs with lock on `Super+X` (a key the spec's table does list), so the two session actions sit together, and the parent spec's table has no power-menu key of its own.
|
||||||
Flagged for the operator to ratify — the alternative is to leave the menu launchable only from within rofi's run mode.
|
|
||||||
- No Waybar `window-rewrite` icon mapping was added: rofi renders as a Wayland layer-shell overlay, not a tiled window with a class on a workspace, so it never appears on the workspace indicator the convention governs.
|
- No Waybar `window-rewrite` icon mapping was added: rofi renders as a Wayland layer-shell overlay, not a tiled window with a class on a workspace, so it never appears on the workspace indicator the convention governs.
|
||||||
|
|||||||
@@ -98,6 +98,9 @@ in
|
|||||||
animation = [
|
animation = [
|
||||||
"windows, 1, 3, ease"
|
"windows, 1, 3, ease"
|
||||||
"fade, 1, 3, ease"
|
"fade, 1, 3, ease"
|
||||||
|
# Layer surfaces like the launcher appear quicker than windows.
|
||||||
|
"layersIn, 1, 2, ease"
|
||||||
|
"fadeLayersIn, 1, 2, ease"
|
||||||
"workspaces, 1, 3, ease"
|
"workspaces, 1, 3, ease"
|
||||||
"border, 1, 3, ease"
|
"border, 1, 3, ease"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
package = rofiPkg;
|
package = rofiPkg;
|
||||||
|
|
||||||
# drun, run and window merge into one prompt through combi.
|
# drun, run, window and calc share one prompt through combi.
|
||||||
# calc and emoji are the other two modes the same window tabs between.
|
# emoji is the separate mode the same window tabs to.
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
modi = "combi,calc,emoji";
|
modi = "combi,emoji";
|
||||||
combi-modi = "drun,run,window";
|
combi-modi = "drun,run,window,calc";
|
||||||
show-icons = true;
|
show-icons = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -54,7 +54,7 @@ in
|
|||||||
# $mod is defined by the compositor config these binds share.
|
# $mod is defined by the compositor config these binds share.
|
||||||
wayland.windowManager.hyprland.settings.bind = [
|
wayland.windowManager.hyprland.settings.bind = [
|
||||||
"$mod, R, exec, ${rofiPkg}/bin/rofi -show combi"
|
"$mod, R, exec, ${rofiPkg}/bin/rofi -show combi"
|
||||||
"$mod, Escape, exec, ${powerMenu}"
|
"$mod SHIFT, X, exec, ${powerMenu}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user