diff options
| -rwxr-xr-x | install.sh | 2 | ||||
| -rw-r--r-- | rofi/udt/grid.rasi | 44 | ||||
| -rw-r--r-- | rofi/udt/list.rasi | 6 | ||||
| -rw-r--r-- | rofi/udt/powermenu.rasi | 94 |
4 files changed, 144 insertions, 2 deletions
@@ -11,7 +11,7 @@ mkdir -p "$target" "$HOME/bin" "$HOME/.cache/wal" # Theme files are symlinked individually; accent.rasi is NOT, it points at the # generated file in the wal cache instead. -for f in palette.rasi common.rasi menu.rasi list.rasi; do +for f in palette.rasi common.rasi menu.rasi list.rasi grid.rasi powermenu.rasi; do ln -sfn "$repo/rofi/udt/$f" "$target/$f" done diff --git a/rofi/udt/grid.rasi b/rofi/udt/grid.rasi new file mode 100644 index 0000000..c4ec128 --- /dev/null +++ b/rofi/udt/grid.rasi @@ -0,0 +1,44 @@ +/* + * udt grid layout: a searchable grid for dense, glyph-like entries. + * For the emoji picker, where a single column wastes most of the window. + * Copyright (C) 2026 Danilo M. <danix@danix.xyz> + * Licensed under the GNU General Public License v2 only. + */ + +@import "common.rasi" + +window { + width: 680px; + anchor: center; + location: center; +} + +mainbox { + children: [ inputbar, message, listview ]; +} + +listview { + columns: 5; + lines: 6; + spacing: 6px; + fixed-height: false; +} + +/* Entries are glyphs rather than prose, so they are centered in their cell + * instead of left-aligned, and scaled up to roughly the launcher's icon size. + * + * rofi's emoji mode puts the glyph and its name on the same row, so this font + * applies to both. Noto Color Emoji carries no Latin glyphs, so fontconfig + * falls back for the name text. If the names end up looking wrong, the fix is + * to drop this font line and raise the element padding instead. */ +element { + padding: 10px; + spacing: 0; + border-radius: 6px; +} + +element-text { + font: "Noto Color Emoji 20"; + horizontal-align: 0.5; + vertical-align: 0.5; +} diff --git a/rofi/udt/list.rasi b/rofi/udt/list.rasi index 835c13e..6812571 100644 --- a/rofi/udt/list.rasi +++ b/rofi/udt/list.rasi @@ -13,8 +13,12 @@ window { location: center; } +/* `message` must be listed, or a `-mesg` passed by a script is silently + * dropped. rofi hides the widget when there is no message, so listing it + * costs nothing when unused. rofipass relies on this for its keybinding + * cheatsheet. */ mainbox { - children: [ inputbar, listview ]; + children: [ inputbar, message, listview ]; } listview { diff --git a/rofi/udt/powermenu.rasi b/rofi/udt/powermenu.rasi new file mode 100644 index 0000000..6660e9f --- /dev/null +++ b/rofi/udt/powermenu.rasi @@ -0,0 +1,94 @@ +/* + * udt powermenu layout: a fullscreen overlay with a single row of big icons. + * Copyright (C) 2026 Danilo M. <danix@danix.xyz> + * Licensed under the GNU General Public License v2 only. + * + * The power menu is not a small menu. It is a deliberate, hard-to-mistake + * fullscreen prompt, and the script feeds it a greeting, a uptime message and + * a user avatar. All three are rendered here. + */ + +@import "common.rasi" + +window { + fullscreen: true; + background-color: @base; + border: 0; + border-radius: 0; + padding: 0; +} + +mainbox { + children: [ dummy, userimage, inputbar, listview, message, dummy ]; + spacing: 24px; + padding: 60px; +} + +/* Flexible spacers above and below push the content block to the middle. */ +dummy { + expand: true; +} + +/* The avatar. `both` fills the box, the radius makes it a circle. */ +userimage { + expand: false; + width: 120px; + height: 120px; + horizontal-align: 0.5; + background-image: url("~/.user-icon.jpg", both); + border: 2px; + border-color: @accent; + border-radius: 100%; +} + +/* This layout is the one place a prompt earns its keep: it carries the + * script's greeting, which is the human cue for a destructive menu. */ +inputbar { + expand: false; + background-color: transparent; + padding: 0; + children: [ prompt ]; +} + +prompt { + font: "Noto Sans Bold 28"; + text-color: @text; + horizontal-align: 0.5; +} + +/* Four options in one row: shutdown, reboot, sleep, logout. */ +listview { + expand: false; + columns: 4; + lines: 1; + fixed-height: true; + fixed-columns: true; + spacing: 24px; +} + +element { + padding: 40px; + border-radius: 12px; +} + +/* The entries are single glyphs from a Nerd Font, so they are sized large and + * centered rather than laid out as text. */ +element-text { + font: "Inconsolata Nerd Font Mono 42"; + horizontal-align: 0.5; + vertical-align: 0.5; + text-color: inherit; +} + +/* The uptime line the script passes with -mesg. */ +message { + expand: false; + background-color: transparent; + padding: 0; +} + +textbox { + font: "Noto Sans 12"; + text-color: @subtext0; + horizontal-align: 0.5; +} |
