This commit is contained in:
2026-09-10 08:50:07 +02:00
parent 0afdcf4c83
commit 314e474341
2 changed files with 16 additions and 15 deletions
+6 -6
View File
@@ -33,15 +33,15 @@ The pick goes to stdout and nothing does if you cancel, so exit status is
config:
Flat `key = value` lines, `#` comments, everything optional; a flag beats
the file. Sizes take sway's units - `600px` is absolute, `70ppt` is a
the file. Sizes take sway's units — `600px` is absolute, `70ppt` is a
percentage of the display the grid appears on, so one file suits monitors
of different sizes.
background = #282828 # the grid's backdrop
foreground = #ebdbb2 # label text
selection = #d79921 # the highlighted tile
selection-text = #282828 # its label
border = #d79921
background = #222222 # the grid's backdrop
foreground = #888888 # label text
selection = #285577 # the highlighted tile
selection-text = #ffffff # its label
border = #4c7899
border-width = 2px
max-width = 90ppt # the box the grid may fill
+9 -8
View File
@@ -1,8 +1,9 @@
//! Look and layout.
//!
//! The colours and spacing come from the rofi setup this replaces (mytheme.rasi
//! plus the -theme-str rofigrid built): gruvbox dark, a yellow selection filling
//! the element padding, `title · app` centred under each thumbnail.
//! The colours and spacing come from sway's default client colours:
//! unfocused background `#222222` and text `#888888` for the grid
//! backdrop and labels, focused `#285577`/`#ffffff` for the selection,
//! and focused border `#4c7899`.
//!
//! Sizing works from caps rather than from a thumbnail size. The config gives a
//! box the grid may fill and a column and row limit; a thumbnail is that box
@@ -53,11 +54,11 @@ pub struct Theme {
impl Default for Theme {
fn default() -> Self {
Self {
bg: 0xff282828, // gruvbox-dark-bg0
fg: 0xffebdbb2, // gruvbox-dark-fg1
sel_bg: 0xffd79921, // gruvbox-dark-yellow-dark
sel_fg: 0xff282828,
border: 0xffd79921,
bg: 0xff222222, // sway unfocused background
fg: 0xff888888, // sway unfocused text
sel_bg: 0xff285577, // sway focused background
sel_fg: 0xffffffff, // sway focused text
border: 0xff4c7899, // sway focused border
border_px: 2,
// No cap of their own: Layout clamps to the display, and the
// command line resolves the configured percentage over the top.