Bar Position Questions #206
-
|
Hi, I am new to quickshell and have some questions. how does this work? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi, that part is basically making the anchors change depending on where the bar is placed. For example: top: barPosition !== "bottom" This means:
So it is still using true or false, but instead of writing them manually, the value is calculated from barPosition. For example, if: barPosition: "top" then this becomes: top: true That makes the panel stick to the top, left, and right sides, which creates a top bar. If it was just hardcoded as true or false, the layout would only work for one position. This way, the same code works for top, bottom, left, and right bar positions. |
Beta Was this translation helpful? Give feedback.
Hi, that part is basically making the anchors change depending on where the bar is placed.
For example:
top: barPosition !== "bottom"
bottom: barPosition !== "top"
left: barPosition !== "right"
right: barPosition !== "left"
This means:
So it is still using true or false, but instead of writing them manually, the value is calculated from barPosition.
For example, if:
barPosition: "top"
then this becomes:
top: true
bottom: false
left: true
right: true
That makes the pa…