diff options
| -rwxr-xr-x | install.sh | 6 | ||||
| -rw-r--r-- | rofi/udt/powermenu.rasi | 17 |
2 files changed, 15 insertions, 8 deletions
@@ -15,9 +15,9 @@ for f in palette.rasi common.rasi menu.rasi list.rasi grid.rasi powermenu.rasi; ln -sfn "$repo/rofi/udt/$f" "$target/$f" done -# launcher.rasi is generated rather than symlinked: it references the wallpaper -# by absolute path, which cannot live in a committed file. Regenerating it is -# why re-running this script after moving the repo is safe. +# launcher.rasi is generated rather than symlinked: its wallpaper path comes +# from the wal cache and cannot be committed. Regenerating it is why re-running +# this script after moving the repo is safe. rm -f "$target/launcher.rasi" sed "s|@WPAPER@|$HOME/.cache/wal/wpaper|" \ "$repo/rofi/udt/launcher.rasi" > "$target/launcher.rasi" diff --git a/rofi/udt/powermenu.rasi b/rofi/udt/powermenu.rasi index 6660e9f..864f571 100644 --- a/rofi/udt/powermenu.rasi +++ b/rofi/udt/powermenu.rasi @@ -29,13 +29,20 @@ dummy { expand: true; } -/* The avatar. `both` fills the box, the radius makes it a circle. */ +/* The avatar. + * + * Sized by horizontal margin rather than width/height, which is how the + * original type-4 theme did it: the widget expands to the window and the + * margin squeezes it back to a square. Setting an explicit width and height + * instead collapses it and nothing is drawn. + * + * The margin is therefore tied to screen width. It is expressed in calc() from + * 50% so it stays centered on any monitor, rather than the original's hardcoded + * 710px, which assumed one specific resolution. */ userimage { - expand: false; - width: 120px; - height: 120px; - horizontal-align: 0.5; + margin: 0px calc(50% - 70px); background-image: url("~/.user-icon.jpg", both); + background-color: transparent; border: 2px; border-color: @accent; border-radius: 100%; |
