aboutsummaryrefslogtreecommitdiffstats
path: root/rofi/udt/powermenu.rasi
blob: 6660e9f95216c312876f0e9440c6ef8cb6dbf30e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
 * udt powermenu layout: a fullscreen overlay with a single row of big icons.
 * Copyright (C) 2026 Danilo M. <danix@danix.xyz>
 * Licensed under the GNU General Public License v2 only.
 *
 * The power menu is not a small menu. It is a deliberate, hard-to-mistake
 * fullscreen prompt, and the script feeds it a greeting, a uptime message and
 * a user avatar. All three are rendered here.
 */

@import "common.rasi"

window {
    fullscreen:       true;
    background-color: @base;
    border:           0;
    border-radius:    0;
    padding:          0;
}

mainbox {
    children: [ dummy, userimage, inputbar, listview, message, dummy ];
    spacing:  24px;
    padding:  60px;
}

/* Flexible spacers above and below push the content block to the middle. */
dummy {
    expand: true;
}

/* The avatar. `both` fills the box, the radius makes it a circle. */
userimage {
    expand:           false;
    width:            120px;
    height:           120px;
    horizontal-align: 0.5;
    background-image: url("~/.user-icon.jpg", both);
    border:           2px;
    border-color:     @accent;
    border-radius:    100%;
}

/* This layout is the one place a prompt earns its keep: it carries the
 * script's greeting, which is the human cue for a destructive menu. */
inputbar {
    expand:           false;
    background-color: transparent;
    padding:          0;
    children:         [ prompt ];
}

prompt {
    font:             "Noto Sans Bold 28";
    text-color:       @text;
    horizontal-align: 0.5;
}

/* Four options in one row: shutdown, reboot, sleep, logout. */
listview {
    expand:        false;
    columns:       4;
    lines:         1;
    fixed-height:  true;
    fixed-columns: true;
    spacing:       24px;
}

element {
    padding:       40px;
    border-radius: 12px;
}

/* The entries are single glyphs from a Nerd Font, so they are sized large and
 * centered rather than laid out as text. */
element-text {
    font:             "Inconsolata Nerd Font Mono 42";
    horizontal-align: 0.5;
    vertical-align:   0.5;
    text-color:       inherit;
}

/* The uptime line the script passes with -mesg. */
message {
    expand:           false;
    background-color: transparent;
    padding:          0;
}

textbox {
    font:             "Noto Sans 12";
    text-color:       @subtext0;
    horizontal-align: 0.5;
}