aboutsummaryrefslogtreecommitdiffstats
path: root/rofi/udt/screenshot.rasi
diff options
context:
space:
mode:
Diffstat (limited to 'rofi/udt/screenshot.rasi')
-rw-r--r--rofi/udt/screenshot.rasi52
1 files changed, 39 insertions, 13 deletions
diff --git a/rofi/udt/screenshot.rasi b/rofi/udt/screenshot.rasi
index 0eff248..8748628 100644
--- a/rofi/udt/screenshot.rasi
+++ b/rofi/udt/screenshot.rasi
@@ -1,12 +1,10 @@
/*
- * udt screenshot layout: two fullscreen buttons, whole screen or area.
+ * udt screenshot layout: a compact two-button card, 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.
+ * The window stays fullscreen for the scrim; the buttons sit on a fixed-size
+ * card centred on it, so they read the same on every monitor.
*/
@import "common.rasi"
@@ -17,13 +15,37 @@ window {
background-color: @scrim;
border: 0;
border-radius: 0;
- padding: 6%;
+ padding: 0;
}
-/* 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. */
+/* rofi has no centring property, so spacers on both axes hold the card in
+ * the middle: mainbox centres a column horizontally, column centres the card
+ * vertically. */
mainbox {
- children: [ dummy, listview, dummy ];
+ orientation: horizontal;
+ children: [ dummy, column, dummy ];
+}
+
+/* A horizontal box sizes children by their own width, and listview reports
+ * none, so the card's width is spelled out: two 150px buttons, 16px apart,
+ * plus 24px padding and 2px border each side. */
+column {
+ expand: false;
+ width: 368px;
+ orientation: vertical;
+ children: [ dummy, card, dummy ];
+}
+
+card {
+ expand: false;
+ orientation: vertical;
+ children: [ listview ];
+ spacing: 20px;
+ padding: 24px;
+ background-color: @base;
+ border: 2px;
+ border-color: @accent;
+ border-radius: 18px;
}
dummy {
@@ -37,17 +59,21 @@ listview {
fixed-height: true;
fixed-columns: true;
flow: horizontal;
- spacing: 4%;
+ spacing: 16px;
}
+/* Text only: common.rasi's element spacing still reserves a gap for the
+ * icon, which pushed the glyph off centre. */
element {
- padding: 80px 0px;
- border-radius: 24px;
+ children: [ element-text ];
+ width: 150px;
+ padding: 28px 0px;
+ border-radius: 12px;
background-color: @surface0;
}
element-text {
- font: "Inconsolata Nerd Font Mono 160";
+ font: "Inconsolata Nerd Font Mono 72";
horizontal-align: 0.5;
vertical-align: 0.5;
text-color: inherit;