Compare commits
9 Commits
160ae56e03
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d09cfeea1 | |||
| 892ae40180 | |||
| 4a1cd4804d | |||
| 31fa6033b0 | |||
| b88445e529 | |||
| e3597c147a | |||
| e1e1b316cf | |||
| 184e939bb6 | |||
| 103c8e803a |
@@ -0,0 +1,37 @@
|
|||||||
|
import QtQuick // for Text
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import Quickshell.Widgets
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
import Quickshell
|
||||||
|
|
||||||
|
Item {
|
||||||
|
implicitWidth: t.contentWidth + 10
|
||||||
|
implicitHeight: 30
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 5
|
||||||
|
anchors.fill: parent
|
||||||
|
Text {
|
||||||
|
id: t
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: {
|
||||||
|
if(hws.toplevels.values.length > 0) {
|
||||||
|
return Hyprland.activeToplevel.title
|
||||||
|
} else {
|
||||||
|
return " Desktop"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
property HyprlandWorkspace hws: Hyprland.focusedWorkspace
|
||||||
|
|
||||||
|
onHwsChanged: {
|
||||||
|
Hyprland.refreshToplevels()
|
||||||
|
Hyprland.refreshWorkspaces()
|
||||||
|
}
|
||||||
|
|
||||||
|
font.pointSize: 11
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
170
home-manager/users/nathan/dotfiles/quickshell/modules/Bar.qml
Normal file
170
home-manager/users/nathan/dotfiles/quickshell/modules/Bar.qml
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
import Quickshell // for PanelWindow
|
||||||
|
import QtQuick // for Text
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import Quickshell.Io
|
||||||
|
import Quickshell.Widgets
|
||||||
|
import Quickshell.Wayland
|
||||||
|
|
||||||
|
PanelWindow {
|
||||||
|
anchors {
|
||||||
|
top: true
|
||||||
|
//left: true
|
||||||
|
//right: true
|
||||||
|
//bottom: true
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
id: bar
|
||||||
|
|
||||||
|
exclusionMode: ExclusionMode.Ignore
|
||||||
|
WlrLayershell.layer: WlrLayer.Background
|
||||||
|
|
||||||
|
color: "#a0706050"
|
||||||
|
|
||||||
|
|
||||||
|
implicitHeight: 40
|
||||||
|
implicitWidth: 1900
|
||||||
|
|
||||||
|
/*RowLayout {
|
||||||
|
width: bar.width
|
||||||
|
}*/
|
||||||
|
RowLayout {
|
||||||
|
//Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
id: left
|
||||||
|
x: 0
|
||||||
|
y: parent.y + (parent.height - height) / 2
|
||||||
|
//width: center.x
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Launcher {
|
||||||
|
id: l
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
Layout.preferredWidth: width
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
Workspaces {
|
||||||
|
id: ws
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
/*ActiveWindow {
|
||||||
|
id: aw
|
||||||
|
Layout.margins: 5
|
||||||
|
|
||||||
|
Layout.maximumWidth: Math.min(implicitWidth, center.x - (parent.x + x + Layout.margins))
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
//Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
|
id: center
|
||||||
|
x: (parent.width - cl.width) / 2 + parent.x - centerLeft.width
|
||||||
|
//y: parent.y + (parent.height - height) / 2
|
||||||
|
y: parent.y + (parent.height - height) / 2
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: centerLeft
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Volume {
|
||||||
|
id: v
|
||||||
|
window: bar
|
||||||
|
popupOffset: center.x
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
Battery {
|
||||||
|
id: bat
|
||||||
|
window: bar
|
||||||
|
popupOffset: center.x
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
Hyprsunset {
|
||||||
|
id: hs
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Clock {
|
||||||
|
id: cl
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
IdleInhibitor {
|
||||||
|
id: ii
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
Wifi {
|
||||||
|
id: wifi
|
||||||
|
window: bar
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
Bluetooth {
|
||||||
|
id: bt
|
||||||
|
window: bar
|
||||||
|
popupOffset: center.x + center.width
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
//Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
|
id: right
|
||||||
|
//implicitWidth: bar.width - (spacer.x + spacer.width)
|
||||||
|
x: bar.width - implicitWidth
|
||||||
|
y: parent.y + (parent.height - height) / 2
|
||||||
|
//Layout.maximumWidth: bar.width - (center.x + center.width)
|
||||||
|
//Layout.preferredWidth: 10
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Media {
|
||||||
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
|
id: media
|
||||||
|
|
||||||
|
implicitWidth: Math.min(textWidth, bar.width - (righter.width) - (center.x + center.width) - 10)
|
||||||
|
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: righter
|
||||||
|
spacing: 0
|
||||||
|
Tray {
|
||||||
|
id: tray
|
||||||
|
window: bar
|
||||||
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
|
Layout.margins: 5
|
||||||
|
popupOffset: right.x + righter.x + x
|
||||||
|
}
|
||||||
|
|
||||||
|
Notifications {
|
||||||
|
id: notif
|
||||||
|
window: bar
|
||||||
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
Power {
|
||||||
|
id: power
|
||||||
|
window: bar
|
||||||
|
popupOffset: bar.width
|
||||||
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
import Quickshell // for PanelWindow
|
import Quickshell // for PanelWindow
|
||||||
import QtQuick // for Text
|
import QtQuick // for Text
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Services.UPower
|
import Quickshell.Services.UPower
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
@@ -16,5 +18,54 @@ ClippingWrapperRectangle {
|
|||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
//icon.color: "red"
|
//icon.color: "red"
|
||||||
//icon.source: "/nix/store/c4dcn4vl0v5njv4d587sazrad1xgyd9h-rose-pine-icon-theme-unstable-2022-09-01/share/icons/rose-pine/symbolic/devices/battery-symbolic.svg"
|
//icon.source: "/nix/store/c4dcn4vl0v5njv4d587sazrad1xgyd9h-rose-pine-icon-theme-unstable-2022-09-01/share/icons/rose-pine/symbolic/devices/battery-symbolic.svg"
|
||||||
|
onClicked: {
|
||||||
|
menu.visible = true
|
||||||
|
grab.active = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
required property var window
|
||||||
|
required property real popupOffset
|
||||||
|
id: root
|
||||||
|
|
||||||
|
PopupWindow {
|
||||||
|
|
||||||
|
id: menu
|
||||||
|
|
||||||
|
anchor.window: window
|
||||||
|
anchor.rect.x: popupOffset
|
||||||
|
anchor.rect.y: 50
|
||||||
|
implicitWidth: 250
|
||||||
|
implicitHeight: 150
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 5
|
||||||
|
|
||||||
|
implicitHeight: parent.height - 20
|
||||||
|
implicitWidth: parent.width
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Button {
|
||||||
|
Layout.topMargin: 5
|
||||||
|
x: (parent.width - width) / 2
|
||||||
|
implicitWidth: parent.width - 10
|
||||||
|
implicitHeight: parent.height / 5 - parent.spacing
|
||||||
|
|
||||||
|
text: 'shutdown'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
id: grab
|
||||||
|
windows: [ menu ]
|
||||||
|
onCleared: menu.visible = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,141 @@
|
|||||||
import Quickshell // for PanelWindow
|
import Quickshell // for PanelWindow
|
||||||
import QtQuick // for Text
|
import QtQuick // for Text
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
import Quickshell.Bluetooth
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
|
|
||||||
|
|
||||||
radius: 5
|
radius: 5
|
||||||
implicitWidth: 30; implicitHeight: 30
|
implicitWidth: 30; implicitHeight: 30
|
||||||
Button {
|
Button {
|
||||||
id: button
|
id: button
|
||||||
text: ""
|
text: ""
|
||||||
font.pointSize: 16
|
font.pointSize: 16
|
||||||
Process {
|
|
||||||
id: launcher
|
onClicked: {
|
||||||
running: false
|
menu.visible = true
|
||||||
command: ["rofi", "-show", "drun"]
|
grab.active = true
|
||||||
}
|
}
|
||||||
onClicked: launcher.running = true
|
|
||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
}
|
}
|
||||||
|
|
||||||
|
required property PanelWindow window
|
||||||
|
required property real popupOffset
|
||||||
|
id: root
|
||||||
|
|
||||||
|
PopupWindow {
|
||||||
|
|
||||||
|
id: menu
|
||||||
|
|
||||||
|
anchor.window: window
|
||||||
|
anchor.rect.x: popupOffset - width
|
||||||
|
anchor.rect.y: 50
|
||||||
|
implicitWidth: 250
|
||||||
|
implicitHeight: 150
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 5
|
||||||
|
|
||||||
|
implicitHeight: parent.height - 20
|
||||||
|
implicitWidth: parent.width
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 5
|
||||||
|
implicitWidth: parent.width - 2 * Layout.margins
|
||||||
|
implicitHeight: 30
|
||||||
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
|
Layout.margins: 5
|
||||||
|
color: "#ff3333aa"
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Text {
|
||||||
|
text: 'Bluetooth'
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
Layout.margins: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
Switch {
|
||||||
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
|
//Layout.margins: 5
|
||||||
|
checked: Bluetooth.defaultAdapter.enabled
|
||||||
|
onClicked: Bluetooth.defaultAdapter.enabled = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
|
Layout.margins: 5
|
||||||
|
|
||||||
|
implicitWidth: parent.width - 4 * Layout.margins
|
||||||
|
implicitHeight: menu.height / 2
|
||||||
|
|
||||||
|
id: scroll
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
|
||||||
|
id: rep
|
||||||
|
|
||||||
|
model: Bluetooth.devices.values
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 5
|
||||||
|
color: "#ff3333aa"
|
||||||
|
|
||||||
|
implicitWidth: menu.width - 3 * scroll.x
|
||||||
|
implicitHeight: 40
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
|
Layout.margins: 5
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Text {
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
Layout.margins: 5
|
||||||
|
|
||||||
|
text: rep.model[index].name
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
|
Layout.rightMargin: 5
|
||||||
|
text: 'Connect'
|
||||||
|
|
||||||
|
onClicked: rep.model[index].connected = !rep.model[index].connected
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
id: grab
|
||||||
|
windows: [ menu ]
|
||||||
|
onCleared: menu.visible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,13 +5,16 @@ import Quickshell.Widgets
|
|||||||
import Quickshell
|
import Quickshell
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: 250
|
implicitWidth: t.contentWidth + 10
|
||||||
height: 30
|
implicitHeight: 30
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
radius: 5
|
radius: 5
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Button {
|
Text {
|
||||||
|
id: t
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: Qt.formatDateTime(clock.date, "dddd HH:mm:ss MM/dd/yyyy")
|
text: Qt.formatDateTime(clock.date, "dddd HH:mm:ss MM/dd/yyyy")
|
||||||
font.pointSize: 11
|
font.pointSize: 11
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import Quickshell // for PanelWindow
|
||||||
|
import QtQuick // for Text
|
||||||
|
import QtQuick.Controls
|
||||||
|
import Quickshell.Io
|
||||||
|
import Quickshell.Widgets
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 5
|
||||||
|
implicitWidth: 30; height: 30
|
||||||
|
Button {
|
||||||
|
id: button
|
||||||
|
text: " "
|
||||||
|
font.pointSize: 16
|
||||||
|
Process {
|
||||||
|
id: idlent
|
||||||
|
running: false
|
||||||
|
command: ["hyprsunset", "-t", "4000"]
|
||||||
|
|
||||||
|
onExited: {
|
||||||
|
running = button.text == " " ? false : true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
idlent.running = button.text == " " ? true : false
|
||||||
|
button.text = button.text == " " ? " " : " "
|
||||||
|
}
|
||||||
|
implicitHeight: parent.height
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import Quickshell // for PanelWindow
|
||||||
|
import QtQuick // for Text
|
||||||
|
import QtQuick.Controls
|
||||||
|
import Quickshell.Io
|
||||||
|
import Quickshell.Widgets
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
|
||||||
|
property real interval: 100
|
||||||
|
id: root
|
||||||
|
|
||||||
|
radius: 5
|
||||||
|
implicitWidth: 30; height: 30
|
||||||
|
Button {
|
||||||
|
id: button
|
||||||
|
text: " "
|
||||||
|
font.pointSize: 16
|
||||||
|
Process {
|
||||||
|
id: idlent
|
||||||
|
running: false
|
||||||
|
command: ["systemd-inhibit", "--what=idle", "sleep", root.interval.toString()]
|
||||||
|
|
||||||
|
onExited: {
|
||||||
|
running = button.text == " " ? false : true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
idlent.running = button.text == " " ? true : false
|
||||||
|
button.text = button.text == " " ? " " : " "
|
||||||
|
}
|
||||||
|
implicitHeight: parent.height
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,17 +6,20 @@ import Quickshell.Widgets
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: media
|
id: media
|
||||||
width: 250 > 9 * button.text.length ? 250 : 9 * button.text.length
|
|
||||||
height: 30
|
height: 30
|
||||||
|
|
||||||
|
readonly property real textWidth: info.contentWidth + 10
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
radius: 5
|
radius: 5
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Button {
|
Text {
|
||||||
|
|
||||||
id: button
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
|
id: info
|
||||||
|
|
||||||
property real offset: 0
|
|
||||||
text: {
|
text: {
|
||||||
let s = ''
|
let s = ''
|
||||||
let players = []
|
let players = []
|
||||||
@@ -35,31 +38,11 @@ Item {
|
|||||||
s += ' - ' + players[0].trackArtist
|
s += ' - ' + players[0].trackArtist
|
||||||
}
|
}
|
||||||
|
|
||||||
let a = offset % s.length
|
media.visible = players.length > 0
|
||||||
let b = (offset + s.length - 1) % s.length
|
|
||||||
|
|
||||||
if(s == '')
|
return s
|
||||||
media.visible = false
|
|
||||||
else
|
|
||||||
media.visible = true
|
|
||||||
if(b < a) {
|
|
||||||
return s.substring(a, s.length) + ' ' + s.substring(0, b)
|
|
||||||
} else {
|
|
||||||
return s.substring(a, b) + ' '
|
|
||||||
}
|
|
||||||
//return s
|
|
||||||
}
|
}
|
||||||
font.pointSize: 11
|
font.pointSize: 11
|
||||||
|
|
||||||
Timer {
|
|
||||||
interval: 225
|
|
||||||
|
|
||||||
running: true
|
|
||||||
|
|
||||||
repeat: true
|
|
||||||
|
|
||||||
onTriggered: button.offset = (button.offset + 1) % (2 * button.text.length)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,183 @@
|
|||||||
|
import Quickshell
|
||||||
import QtQuick // for Text
|
import QtQuick // for Text
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Services.Notifications
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: 30
|
width: 50
|
||||||
height: 30
|
height: 30
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
|
id: barbutton
|
||||||
radius: 5
|
radius: 5
|
||||||
width: 30; height: 30
|
anchors.fill: parent
|
||||||
Button {
|
Button {
|
||||||
id: button
|
id: button
|
||||||
text: ""
|
text: ""
|
||||||
|
//text: server.trackedNotifications.values.length == 0 ? "" : ' ' + server.trackedNotifications.values.length
|
||||||
|
//icon.source: ''
|
||||||
font.pointSize: 16
|
font.pointSize: 16
|
||||||
Process {
|
|
||||||
id: launcher
|
onClicked: {
|
||||||
running: false
|
|
||||||
command: ["rofi", "-show", "drun"]
|
|
||||||
|
menu.visible = true
|
||||||
|
grab.active = true
|
||||||
}
|
}
|
||||||
onClicked: launcher.running = true
|
|
||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NotificationServer {
|
||||||
|
id: server
|
||||||
|
persistenceSupported: true
|
||||||
|
imageSupported: true
|
||||||
|
actionsSupported: true
|
||||||
|
bodyImagesSupported: true
|
||||||
|
bodySupported: true
|
||||||
|
bodyHyperlinksSupported: true
|
||||||
|
inlineReplySupported: true
|
||||||
|
actionIconsSupported: true
|
||||||
|
|
||||||
|
onNotification: (n) => {
|
||||||
|
n.tracked = true
|
||||||
|
console.log(n?.body)
|
||||||
|
button.text = ' ' + (server.trackedNotifications.values.length + 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
required property PanelWindow window
|
||||||
|
id: root
|
||||||
|
|
||||||
|
PopupWindow {
|
||||||
|
|
||||||
|
id: menu
|
||||||
|
|
||||||
|
anchor.window: window
|
||||||
|
anchor.rect.x: window.width - width
|
||||||
|
anchor.rect.y: 50
|
||||||
|
implicitWidth: 400
|
||||||
|
implicitHeight: 1080 - anchor.rect.y
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 5
|
||||||
|
|
||||||
|
color: "#ff706050"
|
||||||
|
|
||||||
|
implicitHeight: parent.height - 20
|
||||||
|
implicitWidth: parent.width
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: lay
|
||||||
|
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 5
|
||||||
|
Layout.margins: 5
|
||||||
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignTop
|
||||||
|
implicitWidth: menu.width - 2 * Layout.margins
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
width: parent.width
|
||||||
|
Text {
|
||||||
|
Layout.margins: 5
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
text: 'Notifications'
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
|
Layout.margins: 5
|
||||||
|
implicitWidth: 20
|
||||||
|
implicitHeight: 20
|
||||||
|
|
||||||
|
text: 'x'
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
while(server.trackedNotifications.values.length > 0) {
|
||||||
|
server.trackedNotifications.values[0].dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
id: rep
|
||||||
|
|
||||||
|
model: server.trackedNotifications.values
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
|
Layout.margins: 5
|
||||||
|
radius: 10
|
||||||
|
implicitWidth: parent.width - 2 * Layout.margins
|
||||||
|
implicitHeight: 100
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Image {
|
||||||
|
//anchors.fill: parent
|
||||||
|
source: {
|
||||||
|
let icon = rep.model[index].image
|
||||||
|
if (icon.includes("?path=")) {
|
||||||
|
const [name, path] = icon.split("?path=");
|
||||||
|
icon = Qt.resolvedUrl(`${path}/${name.slice(name.lastIndexOf("/") + 1)}`);
|
||||||
|
}
|
||||||
|
return icon
|
||||||
|
}
|
||||||
|
|
||||||
|
Layout.maximumWidth: 100
|
||||||
|
Layout.maximumHeight: 100
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.topMargin: 10
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||||
|
Text {
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||||
|
text: rep.model[index].summary
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
font.pointSize: 14
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
text: rep.model[index].body
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
font.pointSize: 12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
|
|
||||||
|
onClicked: mouse => {
|
||||||
|
if(mouse.button == Qt.LeftButton) {
|
||||||
|
button.text = rep.count - 1 <= 0 ? "" : ' ' + (rep.count - 1)
|
||||||
|
rep.model[index].dismiss()
|
||||||
|
//button.text = server.trackedNotifications.values.length == 0 ? "" : ' ' + server.trackedNotifications.values.length
|
||||||
|
} else if(mouse.button == Qt.RightButton) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
id: grab
|
||||||
|
windows: [ menu ]
|
||||||
|
onCleared: menu.visible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import Quickshell
|
||||||
import QtQuick // for Text
|
import QtQuick // for Text
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
@@ -9,6 +10,11 @@ Item {
|
|||||||
width: 30
|
width: 30
|
||||||
height: 30
|
height: 30
|
||||||
|
|
||||||
|
id: root
|
||||||
|
|
||||||
|
required property PanelWindow window
|
||||||
|
required property real popupOffset
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
radius: 5
|
radius: 5
|
||||||
width: 30; height: 30
|
width: 30; height: 30
|
||||||
@@ -16,13 +22,75 @@ Item {
|
|||||||
id: button
|
id: button
|
||||||
text: " "
|
text: " "
|
||||||
font.pointSize: 16
|
font.pointSize: 16
|
||||||
Process {
|
|
||||||
id: launcher
|
onClicked: {
|
||||||
running: false
|
menu.visible = true
|
||||||
command: ["rofi", "-show", "drun"]
|
grab.active = true
|
||||||
}
|
}
|
||||||
onClicked: launcher.running = true
|
|
||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PopupWindow {
|
||||||
|
|
||||||
|
id: menu
|
||||||
|
|
||||||
|
anchor.window: window
|
||||||
|
anchor.rect.x: popupOffset
|
||||||
|
anchor.rect.y: 50
|
||||||
|
implicitWidth: 150
|
||||||
|
implicitHeight: 250
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 5
|
||||||
|
|
||||||
|
implicitHeight: parent.height - 20
|
||||||
|
implicitWidth: parent.width
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Button {
|
||||||
|
Layout.topMargin: 5
|
||||||
|
x: (parent.width - width) / 2
|
||||||
|
implicitWidth: parent.width - 10
|
||||||
|
implicitHeight: parent.height / 5 - parent.spacing
|
||||||
|
|
||||||
|
text: 'shutdown'
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
x: (parent.width - width) / 2
|
||||||
|
implicitWidth: parent.width - 10
|
||||||
|
implicitHeight: parent.height / 5 - parent.spacing
|
||||||
|
text: 'reboot'
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
x: (parent.width - width) / 2
|
||||||
|
implicitWidth: parent.width - 10
|
||||||
|
implicitHeight: parent.height / 5 - parent.spacing
|
||||||
|
text: 'logout'
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
Layout.bottomMargin: 10
|
||||||
|
x: (parent.width - width) / 2
|
||||||
|
implicitWidth: parent.width - 10
|
||||||
|
implicitHeight: parent.height / 5 - parent.spacing
|
||||||
|
text: 'sleep'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
id: grab
|
||||||
|
windows: [ menu ]
|
||||||
|
onCleared: menu.visible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,14 @@ import Quickshell.Services.SystemTray
|
|||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: 10 + rep.count * (2 * lay.spacing + 20)
|
implicitWidth: 10 + rep.count * (2 * lay.spacing + 20)
|
||||||
height: 30
|
height: 30
|
||||||
visible: SystemTray.items.values.length != 0
|
visible: SystemTray.items.values.length != 0
|
||||||
|
|
||||||
|
id: root
|
||||||
|
required property var window
|
||||||
|
required property real popupOffset
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
radius: 5
|
radius: 5
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -23,7 +28,7 @@ Item {
|
|||||||
radius: 10
|
radius: 10
|
||||||
implicitWidth: 20
|
implicitWidth: 20
|
||||||
implicitHeight: 20
|
implicitHeight: 20
|
||||||
AbstractButton {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
@@ -38,7 +43,15 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: console.log('clicked!')
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
|
|
||||||
|
onClicked: (mouse) => {
|
||||||
|
if(mouse.button == Qt.LeftButton) {
|
||||||
|
SystemTray.items.values[index].activate()
|
||||||
|
} else if(mouse.button == Qt.RightButton) {
|
||||||
|
SystemTray.items.values[index].display(root.window, popupOffset, 40)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import Quickshell // for PanelWindow
|
import Quickshell // for PanelWindow
|
||||||
import QtQuick // for Text
|
import QtQuick // for Text
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Services.Pipewire
|
import Quickshell.Services.Pipewire
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
@@ -18,5 +20,78 @@ ClippingWrapperRectangle {
|
|||||||
objects: [ Pipewire.defaultAudioSink ]
|
objects: [ Pipewire.defaultAudioSink ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
menu.visible = true
|
||||||
|
grab.active = true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
required property var window
|
||||||
|
required property real popupOffset
|
||||||
|
id: root
|
||||||
|
|
||||||
|
PopupWindow {
|
||||||
|
|
||||||
|
id: menu
|
||||||
|
|
||||||
|
anchor.window: window
|
||||||
|
anchor.rect.x: popupOffset
|
||||||
|
anchor.rect.y: 50
|
||||||
|
implicitWidth: 250
|
||||||
|
implicitHeight: 150
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 5
|
||||||
|
|
||||||
|
implicitHeight: parent.height - 20
|
||||||
|
implicitWidth: parent.width
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
ColumnLayout {
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Text {
|
||||||
|
text: 'Output Devices'
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
text: 'Input Devices'
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
/*Repeater {
|
||||||
|
id: in
|
||||||
|
|
||||||
|
model: {
|
||||||
|
set = []
|
||||||
|
Pipewire.nodes.values.forEach(n => { !n.isSink && !n.isStream ? set.push(n) : return })
|
||||||
|
return set
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
text: in.model[index].nickname
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
id: grab
|
||||||
|
windows: [ menu ]
|
||||||
|
onCleared: menu.visible = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import Quickshell
|
||||||
import QtQuick // for Text
|
import QtQuick // for Text
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
@@ -16,13 +17,56 @@ Item {
|
|||||||
id: button
|
id: button
|
||||||
text: " "
|
text: " "
|
||||||
font.pointSize: 16
|
font.pointSize: 16
|
||||||
Process {
|
|
||||||
id: launcher
|
onClicked: {
|
||||||
running: false
|
menu.visible = true
|
||||||
command: ["rofi", "-show", "drun"]
|
grab.active = true
|
||||||
}
|
}
|
||||||
onClicked: launcher.running = true
|
|
||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property var window: null
|
||||||
|
id: root
|
||||||
|
|
||||||
|
PopupWindow {
|
||||||
|
|
||||||
|
id: menu
|
||||||
|
|
||||||
|
anchor.window: window
|
||||||
|
anchor.rect.x: root.parent.x + root.parent.width - width
|
||||||
|
anchor.rect.y: 50
|
||||||
|
implicitWidth: 250
|
||||||
|
implicitHeight: 150
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 5
|
||||||
|
|
||||||
|
implicitHeight: parent.height - 20
|
||||||
|
implicitWidth: parent.width
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Button {
|
||||||
|
Layout.topMargin: 5
|
||||||
|
x: (parent.width - width) / 2
|
||||||
|
implicitWidth: parent.width - 10
|
||||||
|
implicitHeight: parent.height / 5 - parent.spacing
|
||||||
|
|
||||||
|
text: 'shutdown'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
id: grab
|
||||||
|
windows: [ menu ]
|
||||||
|
onCleared: menu.visible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ import Quickshell.Hyprland
|
|||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: 10 + rep.count * (2 * lay.spacing + 25)
|
implicitWidth: 10 + rep.count * (2 * lay.spacing + 25)
|
||||||
height: 30
|
implicitHeight: 30
|
||||||
|
|
||||||
|
Component.onCompleted: Hyprland.refreshWorkspaces()
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
radius: 5
|
radius: 5
|
||||||
@@ -16,24 +18,24 @@ Item {
|
|||||||
Repeater {
|
Repeater {
|
||||||
id: rep
|
id: rep
|
||||||
|
|
||||||
property var test: {
|
property var ws: {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
Hyprland.workspaces.values.forEach((w) => { if(w.id > 0) arr.push(w) })
|
Hyprland.workspaces.values.forEach((w) => { if(w.id > 0) arr.push(w) })
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
model: this.test
|
model: ws
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
radius: 10
|
radius: 10
|
||||||
implicitWidth: 25
|
implicitWidth: 25
|
||||||
Button {
|
Button {
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: Hyprland.focusedWorkspace.id == rep.test[index].id ? "#ffff00ff" : "#ff251555"
|
color: Hyprland.focusedWorkspace.id == rep.model[index].id ? "#ffff00ff" : "#ff7744dd"
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
text: rep.test[index].id
|
text: rep.model[index].id
|
||||||
onClicked: rep.test[index].activate()
|
onClicked: rep.model[index].activate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,77 +2,13 @@
|
|||||||
//@ pragma Env QSG_RENDER_LOOP=threaded
|
//@ pragma Env QSG_RENDER_LOOP=threaded
|
||||||
//@ pragma Env QT_QUICK_FLICKABLE_WHEEL_DECELERATION=10000
|
//@ pragma Env QT_QUICK_FLICKABLE_WHEEL_DECELERATION=10000
|
||||||
|
|
||||||
import Quickshell // for PanelWindow
|
//@ pragma UseQApplication
|
||||||
import QtQuick // for Text
|
|
||||||
import QtQuick.Controls
|
import Quickshell // for ShellRoot
|
||||||
import QtQuick.Layouts
|
|
||||||
import Quickshell.Io
|
|
||||||
import Quickshell.Widgets
|
|
||||||
import Quickshell.Wayland
|
|
||||||
import qs.modules
|
import qs.modules
|
||||||
|
|
||||||
ShellRoot {
|
ShellRoot {
|
||||||
PanelWindow {
|
Bar {
|
||||||
anchors {
|
id: bar
|
||||||
top: true
|
|
||||||
//left: true
|
|
||||||
//right: true
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exclusionMode: ExclusionMode.Ignore
|
|
||||||
WlrLayershell.layer: WlrLayer.Background
|
|
||||||
|
|
||||||
color: "#a0706050"
|
|
||||||
|
|
||||||
|
|
||||||
implicitHeight: 40
|
|
||||||
implicitWidth: 1900
|
|
||||||
|
|
||||||
Flow {
|
|
||||||
x: 0
|
|
||||||
padding: 5
|
|
||||||
spacing: 10
|
|
||||||
|
|
||||||
Launcher { id: l }
|
|
||||||
|
|
||||||
Workspaces { id: ws }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
x: (parent.width - cl.width) / 2 + parent.x - cl.x
|
|
||||||
y: parent.y + (parent.height - height) / 2
|
|
||||||
spacing: 10
|
|
||||||
|
|
||||||
Volume { id: v }
|
|
||||||
|
|
||||||
Battery { id: bat }
|
|
||||||
|
|
||||||
Clock { id: cl }
|
|
||||||
|
|
||||||
Wifi { id: wifi }
|
|
||||||
|
|
||||||
Bluetooth { id: bt }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Flow {
|
|
||||||
x: parent.width + parent.x - width
|
|
||||||
padding: 5
|
|
||||||
spacing: 10
|
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
|
|
||||||
Media { id: media }
|
|
||||||
|
|
||||||
Tray { id: tray }
|
|
||||||
|
|
||||||
Notifications { id: notif }
|
|
||||||
|
|
||||||
Power { id: power }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,6 @@
|
|||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
|
|
||||||
graphics.enable = true;
|
|
||||||
|
|
||||||
nvidia = {
|
nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
open = false;
|
open = false;
|
||||||
@@ -42,11 +40,11 @@
|
|||||||
|
|
||||||
services = {
|
services = {
|
||||||
xserver = {
|
xserver = {
|
||||||
#enable = true;
|
enable = false;
|
||||||
videoDrivers = ["nvidia"];
|
videoDrivers = ["nvidia"];
|
||||||
};
|
};
|
||||||
displayManager = {
|
displayManager = {
|
||||||
enable = true;
|
enable = false;
|
||||||
defaultSession = "hyprland";
|
defaultSession = "hyprland";
|
||||||
autoLogin = {
|
autoLogin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -54,6 +52,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
pulseaudio.enable = false;
|
pulseaudio.enable = false;
|
||||||
|
|
||||||
|
hardware.openrgb = {
|
||||||
|
enable = true;
|
||||||
|
motherboard = "amd";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.extraConfig = "DefaultLimitNOFILE=2048";
|
systemd.extraConfig = "DefaultLimitNOFILE=2048";
|
||||||
@@ -118,7 +121,7 @@
|
|||||||
sysconfig = {
|
sysconfig = {
|
||||||
remoteBuildHost = true;
|
remoteBuildHost = true;
|
||||||
host = "homebox";
|
host = "homebox";
|
||||||
graphical = true;
|
graphical = false;
|
||||||
users = {
|
users = {
|
||||||
nathan = {
|
nathan = {
|
||||||
extraGroups = [ "wheel" "networkmanager" ];
|
extraGroups = [ "wheel" "networkmanager" ];
|
||||||
@@ -133,22 +136,23 @@
|
|||||||
{
|
{
|
||||||
homeconfig = {
|
homeconfig = {
|
||||||
minimal = false;
|
minimal = false;
|
||||||
hyprland.enable = true;
|
hyprland.enable = false;
|
||||||
hyprlock.enable = true;
|
hyprlock.enable = false;
|
||||||
wal.enable = true;
|
wal.enable = true;
|
||||||
mpd.enable = true;
|
mpd.enable = true;
|
||||||
hyprpanel.enable = true;
|
hyprpanel.enable = false;
|
||||||
calcurse.enable = true;
|
calcurse.enable = true;
|
||||||
rofi.enable = true;
|
rofi.enable = false;
|
||||||
firefox.enable = true;
|
firefox.enable = false;
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
nh.enable = true;
|
nh.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.hypridle.enable = lib.mkForce false;
|
services.hypridle.enable = lib.mkForce false;
|
||||||
|
|
||||||
home.packages = [
|
home.packages = with pkgs; [
|
||||||
pkgs.wayvnc
|
wayvnc
|
||||||
|
openrgb
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -165,8 +169,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
hyprland.enable = true;
|
hyprland.enable = false;
|
||||||
hyprpanel.enable = true;
|
hyprpanel.enable = false;
|
||||||
steam.enable = false;
|
steam.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -192,7 +196,7 @@
|
|||||||
rustdesk.enable = false; #broken
|
rustdesk.enable = false; #broken
|
||||||
#pihole.enable = false; #broken
|
#pihole.enable = false; #broken
|
||||||
code-server.enable = false;
|
code-server.enable = false;
|
||||||
novnc.enable = true;
|
novnc.enable = false;
|
||||||
minecraft.enable = true;
|
minecraft.enable = true;
|
||||||
|
|
||||||
sandbox.enable = false;
|
sandbox.enable = false;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
certResolver = "cloudflare";
|
certResolver = "cloudflare";
|
||||||
domains = {
|
domains = {
|
||||||
main = "esotericbytes.com";
|
main = "esotericbytes.com";
|
||||||
sans = [ "*.esotericbytes.com" "esotericbytes.com" ];
|
sans = [ "*.esotericbytes.com" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
routers = {
|
routers = {
|
||||||
homepageSecure = {
|
homepageSecure = {
|
||||||
entryPoints = [ "websecure" ];
|
entryPoints = [ "websecure" ];
|
||||||
rule = "Host(`esotericbytes.com`) || Host(`www.esotericbytes.com`) || (Host(`homebox.vpn`) && PathPrefix(`/esotericbytes`))";
|
rule = "Host(`esotericbytes.com`) || Host(`www.esotericbytes.com`)";
|
||||||
service = "homepage";
|
service = "homepage";
|
||||||
tls.certResolver = "cloudflare";
|
tls.certResolver = "cloudflare";
|
||||||
};
|
};
|
||||||
@@ -156,13 +156,13 @@
|
|||||||
"nextcloud_redirectregex"
|
"nextcloud_redirectregex"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
traefik = {
|
/*traefik = {
|
||||||
entryPoints = [ "websecure" ];
|
entryPoints = [ "websecure" ];
|
||||||
rule = "Host(`192.168.100.11`) || Host(`homebox.vpn`)";
|
rule = "Host(`192.168.100.11`) || Host(`homebox.vpn`)";
|
||||||
service = "api@internal";
|
service = "api@internal";
|
||||||
tls.certResolver = "cloudflare";
|
tls.certResolver = "cloudflare";
|
||||||
#middlewares = [ "authentik" ];
|
#middlewares = [ "authentik" ];
|
||||||
};
|
};*/
|
||||||
/*ntfy = {
|
/*ntfy = {
|
||||||
entryPoints = [ "websecure" ];
|
entryPoints = [ "websecure" ];
|
||||||
rule = "Host(`ntfy.esotericbytes.com`)";
|
rule = "Host(`ntfy.esotericbytes.com`)";
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
homeconfig = {
|
homeconfig = {
|
||||||
host = config.sysconfig.host;
|
host = config.sysconfig.host;
|
||||||
name = x;
|
name = x;
|
||||||
graphical = config.sysconfig.graphical;
|
graphical = lib.mkDefault config.sysconfig.graphical;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
] ++ (if inputs ? ${x} then [ (inputs.${x} /*{ config = config.home-manager.users.${x}; inherit lib pkgs inputs; }*/) ] else [])
|
] ++ (if inputs ? ${x} then [ (inputs.${x} /*{ config = config.home-manager.users.${x}; inherit lib pkgs inputs; }*/) ] else [])
|
||||||
|
|||||||
Reference in New Issue
Block a user