Made the bar scaling relative and ia a config file

This commit is contained in:
Hannes
2026-06-08 19:25:33 +02:00
parent bddebdb983
commit 57d0a2d6a5
11 changed files with 157 additions and 90 deletions
+12 -11
View File
@@ -4,26 +4,27 @@ import Quickshell.Hyprland
import Quickshell.Services.SystemTray
import Quickshell.Io
import "../../../colors"
import "../../../config"
Row { // Workspace Row
id: trayRow
spacing: 4
spacing: Math.floor(bar.height/8)
Repeater {
model: SystemTray.items
Column{
Rectangle{
width: iconImage.width + 8
height: (bar.height-trayItem.height)/2
width: iconImage.width + Config.spacing
height: Math.floor((bar.height-trayItem.height)/2)
color: "transparent"
}
Rectangle { //trayItem
id: trayItem
width: iconImage.width + 8
height: iconImage.height + 8
radius: 4
width: iconImage.width + Config.spacing
height: iconImage.height + Config.spacing
radius: Config.small_radius
color: "transparent"
border.width: 2
border.width: Config.border_width
Process {
id: steamRunner
@@ -74,7 +75,7 @@ Row { // Workspace Row
border.color: workspaceButton.containsMouse ? Colors.tertiaryContainer_fg
: modelData.active ? Colors.primaryContainer_fg
: Colors.secondaryContainer_fg
radius: 6
radius: Config.radius
}
}
@@ -86,8 +87,8 @@ Row { // Workspace Row
anchors.centerIn: parent
width: bar.height*0.5
height: bar.height*0.5
width: Config.big_font_size(bar.height)
height: Config.big_font_size(bar.height)
// Component.onCompleted: {
// // Default to the original icon
@@ -119,7 +120,7 @@ Row { // Workspace Row
}
Timer {
interval: 10000
interval: Config.reload_interval
running: true
repeat: true
triggeredOnStart: true