mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Post refactoring fixes 2/?
This commit is contained in:
@@ -5,6 +5,7 @@ import qs.Commons
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
|
||||
Row {
|
||||
id: layout
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -27,7 +28,7 @@ Row {
|
||||
|
||||
// Update text when window changes
|
||||
Connections {
|
||||
target: typeof Niri !== "undefined" ? Niri : null
|
||||
target: typeof NiriService !== "undefined" ? NiriService : null
|
||||
function onFocusedWindowIndexChanged() {
|
||||
// Check if window actually changed
|
||||
if (NiriService.focusedWindowIndex !== lastWindowIndex) {
|
||||
@@ -92,13 +93,13 @@ Row {
|
||||
|
||||
function getDisplayText() {
|
||||
// Check if Niri service is available
|
||||
if (typeof Niri === "undefined") {
|
||||
if (typeof NiriService === "undefined") {
|
||||
return ""
|
||||
}
|
||||
|
||||
// Get the focused window data
|
||||
const focusedWindow = NiriService.focusedWindowIndex >= 0
|
||||
&& NiriService.focusedWindowIndex < NiriService.windows.length ? NiriService.windows[NiriService.focusedWindowIndex] : null
|
||||
const focusedWindow = NiriService.focusedWindowIndex >= 0 && NiriService.focusedWindowIndex
|
||||
< NiriService.windows.length ? NiriService.windows[NiriService.focusedWindowIndex] : null
|
||||
|
||||
if (!focusedWindow) {
|
||||
return ""
|
||||
|
||||
@@ -294,8 +294,8 @@ NLoader {
|
||||
}
|
||||
|
||||
NText {
|
||||
visible: NetworkService.connectStatusSsid === modelData.ssid && NetworkService.connectStatus === "error"
|
||||
&& network.connectError.length > 0
|
||||
visible: NetworkService.connectStatusSsid === modelData.ssid
|
||||
&& NetworkService.connectStatus === "error" && network.connectError.length > 0
|
||||
text: NetworkService.connectError
|
||||
color: Colors.mError
|
||||
font.pointSize: Style.fontSizeSmall * scaling
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
import QtQuick
|
||||
import Quickshell.Io
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
IpcHandler {
|
||||
target: "settings"
|
||||
|
||||
function toggle() {
|
||||
settingsPanel.isLoaded = !settingsPanel.isLoaded
|
||||
}
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "notifications"
|
||||
|
||||
function toggleHistory() {
|
||||
notificationHistoryPanel.isLoaded = !notificationHistoryPanel.isLoaded
|
||||
}
|
||||
|
||||
function toggleDoNotDisturb() {// TODO
|
||||
}
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "idleInhibitor"
|
||||
|
||||
function toggle() {// TODO
|
||||
}
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "appLauncher"
|
||||
|
||||
function toggle() {
|
||||
appLauncherPanel.isLoaded = !appLauncherPanel.isLoaded
|
||||
}
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "lockScreen"
|
||||
|
||||
function toggle() {
|
||||
lockScreen.locked = !lockScreen.locked
|
||||
}
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "brightness"
|
||||
|
||||
function increase() {
|
||||
BrightnessService.increaseBrightness()
|
||||
}
|
||||
|
||||
function decrease() {
|
||||
BrightnessService.decreaseBrightness()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,15 +58,6 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Show Taskbar"
|
||||
description: "Display a taskbar showing currently open windows"
|
||||
value: Settings.data.bar.showTaskbar
|
||||
onToggled: function (newValue) {
|
||||
Settings.data.bar.showTaskbar = newValue
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Show Media"
|
||||
description: "Display media controls and information"
|
||||
|
||||
@@ -107,7 +107,8 @@ Item {
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: {
|
||||
return Math.ceil(WallpapersService.wallpaperList.length / wallpaperGridView.columns) * wallpaperGridView.cellHeight
|
||||
return Math.ceil(
|
||||
WallpapersService.wallpaperList.length / wallpaperGridView.columns) * wallpaperGridView.cellHeight
|
||||
}
|
||||
|
||||
GridView {
|
||||
|
||||
@@ -27,7 +27,8 @@ NBox {
|
||||
RowLayout {
|
||||
spacing: Style.marginSmall * scaling
|
||||
NText {
|
||||
text: weatherReady ? LocationService.weatherSymbolFromCode(LocationService.data.weather.current_weather.weathercode) : ""
|
||||
text: weatherReady ? LocationService.weatherSymbolFromCode(
|
||||
LocationService.data.weather.current_weather.weathercode) : ""
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pointSize: Style.fontSizeXXL * 1.5 * scaling
|
||||
color: Colors.mPrimary
|
||||
|
||||
Reference in New Issue
Block a user