diff options
Diffstat (limited to 'rofi/udt')
| -rw-r--r-- | rofi/udt/grid.rasi | 11 | ||||
| -rw-r--r-- | rofi/udt/header.rasi | 52 | ||||
| -rw-r--r-- | rofi/udt/list.rasi | 11 | ||||
| -rw-r--r-- | rofi/udt/ssh.rasi | 41 |
4 files changed, 73 insertions, 42 deletions
diff --git a/rofi/udt/grid.rasi b/rofi/udt/grid.rasi index b610a16..931aae7 100644 --- a/rofi/udt/grid.rasi +++ b/rofi/udt/grid.rasi @@ -6,15 +6,23 @@ */ @import "common.rasi" +@import "header.rasi" window { width: 1500px; anchor: center; location: center; + padding: 0; } mainbox { - children: [ inputbar, message, listview ]; + children: [ header, message, listview ]; + spacing: 0; +} + +/* The window has no padding, for the banner, so the body is inset here. */ +message { + margin: 12px 16px 0; } listview { @@ -22,6 +30,7 @@ listview { lines: 10; spacing: 6px; fixed-height: false; + padding: 12px 16px 16px; } /* Three wide columns rather than five narrow ones: each row is a glyph plus diff --git a/rofi/udt/header.rasi b/rofi/udt/header.rasi new file mode 100644 index 0000000..921e104 --- /dev/null +++ b/rofi/udt/header.rasi @@ -0,0 +1,52 @@ +/* + * udt header: the wallpaper banner over the searchable layouts. + * Copyright (C) 2026 Danilo M. <danix@danix.xyz> + * Licensed under the GNU General Public License v2 only. + * + * A layout lists `header` in mainbox and sets window padding to 0, so the + * banner runs to the window's edges. The script's -p is the title, an icon + * glyph and a name, lifted out of the inputbar to sit above it. + * + * @WPAPER@ is rewritten by the installer, which is why this file is + * generated rather than linked. rofi does not expand `~` inside a url(). + */ + +header { + expand: false; + orientation: vertical; + children: [ headrow, inputbar ]; + spacing: 12px; + padding: 2.5em 2em; + background-image: url("@WPAPER@", width); + background-color: @mantle; +} + +/* The spacer keeps the title's plate to its own width. */ +headrow { + expand: false; + orientation: horizontal; + children: [ prompt, dummy ]; +} + +dummy { + expand: true; +} + +/* Both sit on plates so they stay legible over any wallpaper. */ +prompt { + font: "Noto Sans Bold 15"; + text-color: @text; + background-color: @base; + border-radius: 6px; + padding: 6px 12px; +} + +inputbar { + background-color: @base; + border: 1px; + border-color: @accent; +} + +entry { + placeholder: "Search"; +} diff --git a/rofi/udt/list.rasi b/rofi/udt/list.rasi index 6812571..f9d3173 100644 --- a/rofi/udt/list.rasi +++ b/rofi/udt/list.rasi @@ -6,11 +6,13 @@ */ @import "common.rasi" +@import "header.rasi" window { width: 680px; anchor: center; location: center; + padding: 0; } /* `message` must be listed, or a `-mesg` passed by a script is silently @@ -18,11 +20,18 @@ window { * costs nothing when unused. rofipass relies on this for its keybinding * cheatsheet. */ mainbox { - children: [ inputbar, message, listview ]; + children: [ header, message, listview ]; + spacing: 0; +} + +/* The window has no padding, for the banner, so the body is inset here. */ +message { + margin: 12px 16px 0; } listview { columns: 1; lines: 12; fixed-height: false; + padding: 12px 16px 16px; } diff --git a/rofi/udt/ssh.rasi b/rofi/udt/ssh.rasi index c40ac05..52899f1 100644 --- a/rofi/udt/ssh.rasi +++ b/rofi/udt/ssh.rasi @@ -9,6 +9,7 @@ */ @import "common.rasi" +@import "header.rasi" window { width: 1100px; @@ -22,46 +23,6 @@ mainbox { spacing: 0; } -/* The wallpaper banner, as in launcher.rasi: the header and the search bar - * share it. @WPAPER@ is rewritten by the installer, which is why this file - * is generated rather than linked. */ -header { - expand: false; - orientation: vertical; - children: [ headrow, inputbar ]; - spacing: 12px; - padding: 2.5em 2em; - background-image: url("@WPAPER@", width); - background-color: @mantle; -} - -/* The prompt is lifted out of the inputbar to sit above it, and kept to its - * own width by the spacer so its plate does not span the banner. */ -headrow { - expand: false; - orientation: horizontal; - children: [ prompt, dummy ]; -} - -dummy { - expand: true; -} - -/* Both sit on plates so they stay legible over any wallpaper. */ -prompt { - font: "Noto Sans Bold 15"; - text-color: @text; - background-color: @base; - border-radius: 6px; - padding: 6px 12px; -} - -inputbar { - background-color: @base; - border: 1px; - border-color: @accent; -} - entry { placeholder: "Search hosts, users, addresses"; } |
