no desktop for server
This commit is contained in:
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -50,6 +50,13 @@ PanelWindow {
|
|||||||
Layout.margins: 5
|
Layout.margins: 5
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*ActiveWindow {
|
||||||
|
id: aw
|
||||||
|
Layout.margins: 5
|
||||||
|
|
||||||
|
Layout.maximumWidth: Math.min(implicitWidth, center.x - (parent.x + x + Layout.margins))
|
||||||
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
@@ -104,6 +111,7 @@ PanelWindow {
|
|||||||
Bluetooth {
|
Bluetooth {
|
||||||
id: bt
|
id: bt
|
||||||
window: bar
|
window: bar
|
||||||
|
popupOffset: center.x + center.width
|
||||||
Layout.margins: 5
|
Layout.margins: 5
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,6 +158,7 @@ PanelWindow {
|
|||||||
Power {
|
Power {
|
||||||
id: power
|
id: power
|
||||||
window: bar
|
window: bar
|
||||||
|
popupOffset: bar.width
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
Layout.margins: 5
|
Layout.margins: 5
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import QtQuick.Layouts
|
|||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
|
import Quickshell.Bluetooth
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
|
|
||||||
@@ -23,7 +24,8 @@ ClippingWrapperRectangle {
|
|||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
}
|
}
|
||||||
|
|
||||||
property var window: null
|
required property PanelWindow window
|
||||||
|
required property real popupOffset
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
PopupWindow {
|
PopupWindow {
|
||||||
@@ -31,7 +33,7 @@ ClippingWrapperRectangle {
|
|||||||
id: menu
|
id: menu
|
||||||
|
|
||||||
anchor.window: window
|
anchor.window: window
|
||||||
anchor.rect.x: root.parent.x + root.parent.width - width
|
anchor.rect.x: popupOffset - width
|
||||||
anchor.rect.y: 50
|
anchor.rect.y: 50
|
||||||
implicitWidth: 250
|
implicitWidth: 250
|
||||||
implicitHeight: 150
|
implicitHeight: 150
|
||||||
@@ -49,14 +51,84 @@ ClippingWrapperRectangle {
|
|||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Button {
|
ClippingWrapperRectangle {
|
||||||
Layout.topMargin: 5
|
radius: 5
|
||||||
x: (parent.width - width) / 2
|
implicitWidth: parent.width - 2 * Layout.margins
|
||||||
implicitWidth: parent.width - 10
|
implicitHeight: 30
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
|
Layout.margins: 5
|
||||||
|
color: "#ff3333aa"
|
||||||
|
|
||||||
text: 'shutdown'
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ Item {
|
|||||||
|
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property var window: null
|
required property PanelWindow window
|
||||||
|
required property real popupOffset
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
radius: 5
|
radius: 5
|
||||||
@@ -35,7 +36,7 @@ Item {
|
|||||||
id: menu
|
id: menu
|
||||||
|
|
||||||
anchor.window: window
|
anchor.window: window
|
||||||
anchor.rect.x: root.parent.x + root.parent.width - width
|
anchor.rect.x: popupOffset
|
||||||
anchor.rect.y: 50
|
anchor.rect.y: 50
|
||||||
implicitWidth: 150
|
implicitWidth: 150
|
||||||
implicitHeight: 250
|
implicitHeight: 250
|
||||||
|
|||||||
@@ -50,19 +50,42 @@ ClippingWrapperRectangle {
|
|||||||
implicitHeight: parent.height - 20
|
implicitHeight: parent.height - 20
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Button {
|
Text {
|
||||||
Layout.topMargin: 5
|
text: 'Output Devices'
|
||||||
x: (parent.width - width) / 2
|
}
|
||||||
implicitWidth: parent.width - 10
|
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
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
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
text: 'shutdown'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HyprlandFocusGrab {
|
HyprlandFocusGrab {
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ Item {
|
|||||||
implicitWidth: 10 + rep.count * (2 * lay.spacing + 25)
|
implicitWidth: 10 + rep.count * (2 * lay.spacing + 25)
|
||||||
implicitHeight: 30
|
implicitHeight: 30
|
||||||
|
|
||||||
|
Component.onCompleted: Hyprland.refreshWorkspaces()
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
radius: 5
|
radius: 5
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -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" : "#ff7744dd"
|
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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,11 +42,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;
|
||||||
@@ -133,14 +133,14 @@
|
|||||||
{
|
{
|
||||||
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;
|
||||||
};
|
};
|
||||||
@@ -165,8 +165,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
hyprland.enable = true;
|
hyprland.enable = false;
|
||||||
hyprpanel.enable = true;
|
hyprpanel.enable = false;
|
||||||
steam.enable = false;
|
steam.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -192,7 +192,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;
|
||||||
|
|||||||
Reference in New Issue
Block a user