Several hyprland updates:

plugins, new cursor, light/dark themes, new app launcher, ...
This commit is contained in:
Miguel Palhas
2026-02-16 17:33:40 +00:00
parent 48225afa6d
commit e8086e8528
48 changed files with 1436 additions and 290 deletions
@@ -0,0 +1,94 @@
import Quickshell
import Quickshell.Hyprland
import QtQuick
import QtQuick.Layouts
Scope {
id: root
property bool barVisible: false
Variants {
model: Quickshell.screens
Scope {
id: perScreen
required property var modelData
// invisible trigger zone at the top edge
PanelWindow {
id: trigger
screen: perScreen.modelData
visible: !root.barVisible
anchors {
top: true
left: true
right: true
}
exclusionMode: ExclusionMode.Ignore
implicitHeight: 4
color: "transparent"
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: root.barVisible = true
}
}
// the actual bar
PanelWindow {
id: bar
screen: perScreen.modelData
visible: root.barVisible
anchors {
top: true
left: true
right: true
}
exclusionMode: ExclusionMode.Ignore
implicitHeight: 32
color: "#e611111b"
MouseArea {
anchors.fill: parent
hoverEnabled: true
propagateComposedEvents: true
// keep bar visible while mouse is on it
onExited: hideTimer.restart()
}
RowLayout {
anchors.fill: parent
anchors.leftMargin: 12
anchors.rightMargin: 12
spacing: 0
Workspaces {
Layout.alignment: Qt.AlignLeft
}
Item { Layout.fillWidth: true }
SysTray {
Layout.alignment: Qt.AlignRight
Layout.rightMargin: 16
}
ClockWidget {
Layout.alignment: Qt.AlignRight
}
}
}
Timer {
id: hideTimer
interval: 500
onTriggered: root.barVisible = false
}
}
}
}
@@ -0,0 +1,20 @@
import QtQuick
import QtQuick.Layouts
RowLayout {
spacing: 12
Text {
text: Time.date
font.family: "FiraCode Nerd Font"
font.pixelSize: 13
color: "#6c7086"
}
Text {
text: Time.clock
font.family: "FiraCode Nerd Font"
font.pixelSize: 14
color: "#bac2de"
}
}
@@ -0,0 +1,47 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Quickshell
import Quickshell.Services.SystemTray
RowLayout {
spacing: 6
Repeater {
model: SystemTray.items
Image {
required property SystemTrayItem modelData
Layout.preferredWidth: 18
Layout.preferredHeight: 18
source: modelData.icon
fillMode: Image.PreserveAspectFit
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: (mouse) => {
if (mouse.button === Qt.RightButton || modelData.onlyMenu) {
modelData.display(bar, parent.x, bar.height)
} else {
modelData.activate()
}
}
}
ToolTip {
id: tooltip
visible: hoverArea.containsMouse
text: modelData.tooltipTitle || modelData.title || ""
}
MouseArea {
id: hoverArea
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.NoButton
}
}
}
}
@@ -0,0 +1,15 @@
pragma Singleton
import Quickshell
import QtQuick
Singleton {
id: root
readonly property string clock: Qt.formatDateTime(sysClock.date, "hh:mm")
readonly property string date: Qt.formatDateTime(sysClock.date, "ddd MMM d")
SystemClock {
id: sysClock
precision: SystemClock.Minutes
}
}
@@ -0,0 +1,41 @@
import QtQuick
import QtQuick.Layouts
import Quickshell.Hyprland
RowLayout {
spacing: 4
Repeater {
model: [1, 2, 3, 4, 5, 6]
Rectangle {
required property int modelData
property bool active: Hyprland.focusedMonitor?.activeWorkspace?.id === modelData
property bool occupied: {
for (let i = 0; i < Hyprland.workspaces.values.length; i++) {
let ws = Hyprland.workspaces.values[i];
if (ws.id === modelData && ws.windows > 0) return true;
}
return false;
}
Layout.preferredWidth: 24
Layout.preferredHeight: 24
radius: 4
color: active ? "#b4befe" : "transparent"
Text {
anchors.centerIn: parent
text: modelData
font.family: "FiraCode Nerd Font"
font.pixelSize: 13
color: active ? "#11111b" : occupied ? "#bac2de" : "#6c7086"
}
MouseArea {
anchors.fill: parent
onClicked: Hyprland.dispatch("workspace " + modelData)
}
}
}
}
@@ -0,0 +1,5 @@
import Quickshell
Scope {
Bar {}
}