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
|
||||
}
|
||||
|
||||
/*ActiveWindow {
|
||||
id: aw
|
||||
Layout.margins: 5
|
||||
|
||||
Layout.maximumWidth: Math.min(implicitWidth, center.x - (parent.x + x + Layout.margins))
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
@@ -104,6 +111,7 @@ PanelWindow {
|
||||
Bluetooth {
|
||||
id: bt
|
||||
window: bar
|
||||
popupOffset: center.x + center.width
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
@@ -150,6 +158,7 @@ PanelWindow {
|
||||
Power {
|
||||
id: power
|
||||
window: bar
|
||||
popupOffset: bar.width
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import QtQuick.Layouts
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Bluetooth
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
|
||||
@@ -23,7 +24,8 @@ ClippingWrapperRectangle {
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
|
||||
property var window: null
|
||||
required property PanelWindow window
|
||||
required property real popupOffset
|
||||
id: root
|
||||
|
||||
PopupWindow {
|
||||
@@ -31,7 +33,7 @@ ClippingWrapperRectangle {
|
||||
id: menu
|
||||
|
||||
anchor.window: window
|
||||
anchor.rect.x: root.parent.x + root.parent.width - width
|
||||
anchor.rect.x: popupOffset - width
|
||||
anchor.rect.y: 50
|
||||
implicitWidth: 250
|
||||
implicitHeight: 150
|
||||
@@ -49,14 +51,84 @@ ClippingWrapperRectangle {
|
||||
|
||||
spacing: 0
|
||||
|
||||
Button {
|
||||
Layout.topMargin: 5
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
text: 'shutdown'
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
property var window: null
|
||||
required property PanelWindow window
|
||||
required property real popupOffset
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
@@ -35,7 +36,7 @@ Item {
|
||||
id: menu
|
||||
|
||||
anchor.window: window
|
||||
anchor.rect.x: root.parent.x + root.parent.width - width
|
||||
anchor.rect.x: popupOffset
|
||||
anchor.rect.y: 50
|
||||
implicitWidth: 150
|
||||
implicitHeight: 250
|
||||
|
||||
@@ -49,20 +49,43 @@ ClippingWrapperRectangle {
|
||||
|
||||
implicitHeight: parent.height - 20
|
||||
implicitWidth: parent.width
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
spacing: 0
|
||||
ScrollView {
|
||||
ColumnLayout {
|
||||
|
||||
Button {
|
||||
Layout.topMargin: 5
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
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
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
text: 'shutdown'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
HyprlandFocusGrab {
|
||||
|
||||
@@ -8,6 +8,8 @@ Item {
|
||||
implicitWidth: 10 + rep.count * (2 * lay.spacing + 25)
|
||||
implicitHeight: 30
|
||||
|
||||
Component.onCompleted: Hyprland.refreshWorkspaces()
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
anchors.fill: parent
|
||||
@@ -16,24 +18,24 @@ Item {
|
||||
Repeater {
|
||||
id: rep
|
||||
|
||||
property var test: {
|
||||
property var ws: {
|
||||
let arr = [];
|
||||
Hyprland.workspaces.values.forEach((w) => { if(w.id > 0) arr.push(w) })
|
||||
return arr;
|
||||
}
|
||||
|
||||
model: this.test
|
||||
model: ws
|
||||
ClippingWrapperRectangle {
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
radius: 10
|
||||
implicitWidth: 25
|
||||
Button {
|
||||
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
|
||||
}
|
||||
text: rep.test[index].id
|
||||
onClicked: rep.test[index].activate()
|
||||
text: rep.model[index].id
|
||||
onClicked: rep.model[index].activate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
#enable = true;
|
||||
enable = false;
|
||||
videoDrivers = ["nvidia"];
|
||||
};
|
||||
displayManager = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
defaultSession = "hyprland";
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
@@ -133,14 +133,14 @@
|
||||
{
|
||||
homeconfig = {
|
||||
minimal = false;
|
||||
hyprland.enable = true;
|
||||
hyprlock.enable = true;
|
||||
hyprland.enable = false;
|
||||
hyprlock.enable = false;
|
||||
wal.enable = true;
|
||||
mpd.enable = true;
|
||||
hyprpanel.enable = true;
|
||||
hyprpanel.enable = false;
|
||||
calcurse.enable = true;
|
||||
rofi.enable = true;
|
||||
firefox.enable = true;
|
||||
rofi.enable = false;
|
||||
firefox.enable = false;
|
||||
git.enable = true;
|
||||
nh.enable = true;
|
||||
};
|
||||
@@ -165,8 +165,8 @@
|
||||
};
|
||||
|
||||
programs = {
|
||||
hyprland.enable = true;
|
||||
hyprpanel.enable = true;
|
||||
hyprland.enable = false;
|
||||
hyprpanel.enable = false;
|
||||
steam.enable = false;
|
||||
};
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
rustdesk.enable = false; #broken
|
||||
#pihole.enable = false; #broken
|
||||
code-server.enable = false;
|
||||
novnc.enable = true;
|
||||
novnc.enable = false;
|
||||
minecraft.enable = true;
|
||||
|
||||
sandbox.enable = false;
|
||||
|
||||
Reference in New Issue
Block a user