diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-27 18:23:04 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-27 18:23:04 +0200 |
| commit | a6ce7e2a56b90e964e7d609baad6e56d6b35408e (patch) | |
| tree | 4bd20a24f7ab433da0188ac3bdad35cd14a4c5fc | |
| parent | 154bb069476e9e3a438b76774a739e980b49494e (diff) | |
| download | unified-desktop-theme-a6ce7e2a56b90e964e7d609baad6e56d6b35408e.tar.gz unified-desktop-theme-a6ce7e2a56b90e964e7d609baad6e56d6b35408e.zip | |
feat(rofi): fullscreen two-button layout for the screenshot menu
The screenshot menu (Mod+Shift+S) borrowed menu.rasi, a small list
box, so its two options were small glyphs in a narrow column.
screenshot.rasi gives each option half the monitor on the scrim,
centred vertically by spacers because rofi sizes a row by its text.
rofi cannot size a font by percentage, so the calling script passes
the glyph size with -theme-str, derived from the focused monitor and
aware of rotated outputs; the size in the theme is only a fallback.
install.sh links the new file with the other layouts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rwxr-xr-x | install.sh | 2 | ||||
| -rw-r--r-- | rofi/udt/screenshot.rasi | 54 |
2 files changed, 55 insertions, 1 deletions
@@ -22,7 +22,7 @@ fi # 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 grid.rasi powermenu.rasi confirm.rasi; do +for f in palette.rasi common.rasi menu.rasi list.rasi grid.rasi powermenu.rasi confirm.rasi screenshot.rasi; do ln -sfn "$repo/rofi/udt/$f" "$target/$f" done diff --git a/rofi/udt/screenshot.rasi b/rofi/udt/screenshot.rasi new file mode 100644 index 0000000..0eff248 --- /dev/null +++ b/rofi/udt/screenshot.rasi @@ -0,0 +1,54 @@ +/* + * udt screenshot layout: two fullscreen buttons, whole screen or area. + * Copyright (C) 2026 Danilo M. <danix@danix.xyz> + * Licensed under the GNU General Public License v2 only. + * + * Each option takes half the monitor, so the choice is one glance and one + * click. Cells fill whatever monitor rofi opens on; the glyph size cannot be + * a percentage in rofi, so the script passes it with -theme-str, derived from + * the focused monitor's height. The font below is only the fallback. + */ + +@import "common.rasi" + +/* Translucent like the power menu, so it reads as a layer over the session. */ +window { + fullscreen: true; + background-color: @scrim; + border: 0; + border-radius: 0; + padding: 6%; +} + +/* rofi sizes a row by its text, not by the space left, so spacers above and + * below centre the row instead of leaving it pinned to the top edge. */ +mainbox { + children: [ dummy, listview, dummy ]; +} + +dummy { + expand: true; +} + +listview { + expand: false; + columns: 2; + lines: 1; + fixed-height: true; + fixed-columns: true; + flow: horizontal; + spacing: 4%; +} + +element { + padding: 80px 0px; + border-radius: 24px; + background-color: @surface0; +} + +element-text { + font: "Inconsolata Nerd Font Mono 160"; + horizontal-align: 0.5; + vertical-align: 0.5; + text-color: inherit; +} |
