aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-27 18:23:04 +0200
committerDanilo M. <danix@danix.xyz>2026-09-27 18:23:04 +0200
commita6ce7e2a56b90e964e7d609baad6e56d6b35408e (patch)
tree4bd20a24f7ab433da0188ac3bdad35cd14a4c5fc
parent154bb069476e9e3a438b76774a739e980b49494e (diff)
downloadunified-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-xinstall.sh2
-rw-r--r--rofi/udt/screenshot.rasi54
2 files changed, 55 insertions, 1 deletions
diff --git a/install.sh b/install.sh
index 8a5755d..36903ea 100755
--- a/install.sh
+++ b/install.sh
@@ -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;
+}