Skip to content

feat(rice-switch): redesign the menu as a frosted row list - #82

Merged
Schnee111 merged 2 commits into
mainfrom
feat/issue-80-rice-switch-list
Oct 25, 2026
Merged

Schnee111 merged 2 commits into
mainfrom
feat/issue-80-rice-switch-list

Conversation

@Schnee111

Copy link
Copy Markdown
Owner

Fixes #80

What this changes

Visual only. Selection by row index, Esc/cancel handling and name validation are unchanged. The only script changes are the row markup and the footer text.

This replaces #81, which was closed without merging: the icon-tile grid was not the direction we wanted. This one keeps the row list and redesigns it, with no icons and no emoji.

common/rofi/rice-switch.rasi, rewritten:

  • Panel: neutral frosted glass, rgba(30, 30, 34, 66%) with a 1 px rgba(255, 255, 255, 14%) border and a 24 px radius, 540 px wide. It no longer imports colors.rasi; the palette accent is not used.
  • Header: "Switch Desktop" title (Inter Display Semi-Bold 16) on the left and a rounded search pill on the right, followed by a hairline. Typing still filters, and matches are shown in bold rather than underlined.
  • Rows: two lines each, the name in semibold, then compositor · shell at 55 % alpha. Rows use 9px 14px padding with a 12 px radius, and the selection is a soft rgba(255, 255, 255, 10%) pill.
  • Footer: behind a hairline, centred and dim: Switching logs you out · ↵ switch · esc cancel.

bin/rice-switch:

  • A leading column holds a dot (80 %) for the current rice. Both lines of every row start with the same monospace ● glyph, invisible where unused, so the name and the subtitle stay aligned in a proportional font.
  • The footer text is updated; the current rice is shown by the dot instead.

tests/rice-switch.sh: exactly one visible dot, on the end4 row.

Verification

  • bash tests/run.sh: all test files pass. shellcheck -S warning is clean. rofi -dump-theme parses the theme.
  • Negative control: with bin/rice-switch from main, the test fails with expected one visible dot, for the current rice.
  • Live on end4 (1920x1080), running the real bin/rice-switch -n. Screenshots were checked by hand:
    • all 8 rows are visible with nothing cut off, and names line up with their subtitles;
    • the dot sits on end4, which is preselected;
    • Down moves the selection pill to ii-p3drovfx;
    • Escape exits 0 with no output.

Risk

Low. On rices without a blur rule for the rofi layer, the panel is a 66 % dark translucent box.

Rework the rice-switch theme from the ground up while keeping the row
list: neutral frosted glass with a hairline border, a header with a
"Switch Desktop" title and a search pill, two-line rows (name, then
compositor · shell), a leading dot column marking the current rice, bold
instead of underlined search matches, and a centred footer that says
switching logs out. No icons, no emoji.

Visual only: selection, cancel and validation are unchanged.

Fixes #80
Copilot AI balanced review requested due to automatic review settings October 25, 2026 00:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@Schnee111 Schnee111 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autonomous Code Review

Verdict: Changes Requested
Target Commit: dc7a317

Summary

The redesign is clean and well-structured, but the title textbox in the rofi theme uses an invalid property name that prevents the header text from rendering.

Logic & Invariants

  • common/rofi/rice-switch.rasi:53: Rofi textbox widgets do not support the CSS-style content property. Static text must be declared using str: "Switch Desktop"; instead of content: "Switch Desktop";. Because content is ignored by rofi's theme parser, textbox-title renders as an empty widget without the title text.

Recommendations

  • In tests/rice-switch.sh:86, consider using integer comparison (-eq 1) rather than string comparison (== 1) for wc -l output to avoid fragility across environments where wc emits leading whitespace.
  • In bin/rice-switch:97, alpha="0%" or fgcolor="transparent" would be more idiomatic than alpha="1%" for a fully invisible placeholder gutter.

Shorekeeper Sentinel · Autonomous Quality Gate

@Schnee111

Copy link
Copy Markdown
Owner Author

Follow-ups in 4e399f4:

  • textbox-title now uses str:. For the record, content: was not broken. rofi 2.0.0 documents both (man rofi-theme: "str/content: the string to display by this textbox"), and live screenshots showed the title with content. The switch only makes the review pass; the title still renders with str (checked live again).
  • The dot count is compared with -eq 1.
  • alpha="1%" stays. Pango's alpha range starts at 1, so 0% is not a valid value. The line now has a comment saying so.

@Schnee111 Schnee111 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autonomous Code Review

Verdict: Approved
Target Commit: 4e399f4

Summary

The redesign of the rice-switcher menu as a frosted row list is clean and well-structured, with previous review feedback on theme properties and test assertions properly resolved.


Shorekeeper Sentinel · Autonomous Quality Gate

@Schnee111
Schnee111 merged commit 1ef43d6 into main Oct 25, 2026
1 check passed
@Schnee111
Schnee111 deleted the feat/issue-80-rice-switch-list branch October 25, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rice-switch: redesign the menu as a frosted row list

2 participants