Added setting for workspace names
This commit is contained in:
parent
7a849806fb
commit
c917d7dccb
3 changed files with 25 additions and 0 deletions
|
|
@ -122,6 +122,7 @@ Singleton {
|
||||||
property bool showActiveWindowIcon: true
|
property bool showActiveWindowIcon: true
|
||||||
property bool alwaysShowBatteryPercentage: false
|
property bool alwaysShowBatteryPercentage: false
|
||||||
property real backgroundOpacity: 1.0
|
property real backgroundOpacity: 1.0
|
||||||
|
property bool showWorkspaceNames: false
|
||||||
property list<string> monitors: []
|
property list<string> monitors: []
|
||||||
|
|
||||||
// Widget configuration for modular bar system
|
// Widget configuration for modular bar system
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,21 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: workspacePill
|
id: workspacePill
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
active: Settings.data.bar.showWorkspaceNames
|
||||||
|
sourceComponent: Component {
|
||||||
|
Text {
|
||||||
|
text: model.name.substring(0,2)
|
||||||
|
font.pointSize: Style.fontSizeXS * scaling
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
radius: {
|
radius: {
|
||||||
if (model.isFocused)
|
if (model.isFocused)
|
||||||
return Math.round(12 * scaling)
|
return Math.round(12 * scaling)
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,15 @@ ColumnLayout {
|
||||||
Settings.data.bar.alwaysShowBatteryPercentage = checked
|
Settings.data.bar.alwaysShowBatteryPercentage = checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NToggle {
|
||||||
|
label: "Show Workspace Names"
|
||||||
|
description: "Show the workspace names on the workspace indicators"
|
||||||
|
checked: Settings.data.bar.showWorkspaceNames
|
||||||
|
onToggled: checked => {
|
||||||
|
Settings.data.bar.showWorkspaceNames = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue