-
Is there a way to remove a couple px, say for example 10px from the width?
Thanks to everyone in advance! AnswerThanks to W-lfchen, check him out, amazing guy! (defpoll random :interval "1s"
:initial 800
"scripts/getrand 0 800")
(defwindow example
:monitor 0
:geometry (geometry
:x "0%"
:y "0%"
:width "100%"
:height "10px"
:anchor "top center"
)
:exclusive true
(box
:style "margin-right: ${random}px; margin-left: ${random}px; background-color:red;"
""
)) Very important! (Some GTK themes might interfere with margins, etc.) * {
all: unset;
}
/* Or define your own class in the .yuck script and unset everything there */ Bash script: #!/bin/sh
# Source: https://stackoverflow.com/a/43537627
low=$1
high=$2
value=$((low + RANDOM % (1 + high - low)))
echo $value |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
Thing is I want it to be perfectly aligned with my compositor if that is possible. Honestly I just need an answer of the capability of it! |
Beta Was this translation helpful? Give feedback.
-
Not to my knowledge, but you could do (defwindow bar
:monitor 0
:geometry (geometry :x "0%"
:y "0%"
:width "100%"
:height "10px"
:anchor "top center")
:exclusive true
(box
; with the new css property
:css "padding-right: 10px"
; or without
:class "bar-insets"
(bar)) with the following in .bar-insets {
padding-right: 10px;
} |
Beta Was this translation helpful? Give feedback.
-
I don't think there is a really simple way to do this if the anchor is "top center", as that disables the
This simply creates a transparent box next to your bar, with a width of 10px. |
Beta Was this translation helpful? Give feedback.
Window sizes have to be fixed as far as I'm concerned.
I have found something new that you might want to try though, it's way less clunky and I honestly don't know why I didn't think of this before:
Unset the window class background by any means.
Then give the box containing your bar stuff the following properties:
Here's an example: