mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
Merge remote changes 703697e1
This commit is contained in:
@@ -34,6 +34,9 @@ general {
|
||||
|
||||
snap {
|
||||
enabled = true
|
||||
window_gap = 4
|
||||
monitor_gap = 5
|
||||
respect_gaps = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +49,7 @@ dwindle {
|
||||
|
||||
decoration {
|
||||
rounding = 18
|
||||
|
||||
|
||||
blur {
|
||||
enabled = true
|
||||
xray = true
|
||||
@@ -55,7 +58,7 @@ decoration {
|
||||
size = 14
|
||||
passes = 3
|
||||
brightness = 1
|
||||
noise = 0.01
|
||||
noise = 0.04
|
||||
contrast = 1
|
||||
popups = true
|
||||
popups_ignorealpha = 0.6
|
||||
|
||||
@@ -29,6 +29,12 @@ MouseArea {
|
||||
}
|
||||
event.accepted = true;
|
||||
}
|
||||
onEntered: {
|
||||
tooltip.content = item.tooltipTitle.length > 0 ? item.tooltipTitle
|
||||
: (item.title.length > 0 ? item.title : item.id);
|
||||
if (item.tooltipDescription.length > 0) tooltip.content += " • " + item.tooltipDescription;
|
||||
if (Config.options.bar.tray.showItemId) tooltip.content += "\n[" + item.id + "]";
|
||||
}
|
||||
|
||||
QsMenuAnchor {
|
||||
id: menu
|
||||
@@ -71,11 +77,7 @@ MouseArea {
|
||||
}
|
||||
|
||||
StyledToolTip {
|
||||
content: {
|
||||
let c = root.item.id
|
||||
if (root.item.tooltipDescription.length > 0) c += " • " + root.item.tooltipDescription
|
||||
return c;
|
||||
}
|
||||
id: tooltip
|
||||
extraVisibleCondition: root.containsMouse
|
||||
alternativeVisibleCondition: extraVisibleCondition
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import Qt5Compat.GraphicalEffects
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property bool vertical: false
|
||||
property bool borderless: Config.options.bar.borderless
|
||||
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(root.QsWindow.window?.screen)
|
||||
readonly property Toplevel activeWindow: ToplevelManager.activeToplevel
|
||||
@@ -22,6 +23,7 @@ Item {
|
||||
property list<bool> workspaceOccupied: []
|
||||
property int widgetPadding: 4
|
||||
property int workspaceButtonWidth: 26
|
||||
property real activeWorkspaceMargin: 2
|
||||
property real workspaceIconSize: workspaceButtonWidth * 0.69
|
||||
property real workspaceIconSizeShrinked: workspaceButtonWidth * 0.55
|
||||
property real workspaceIconOpacityShrinked: 1
|
||||
@@ -77,8 +79,8 @@ Item {
|
||||
updateWorkspaceOccupied();
|
||||
}
|
||||
|
||||
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2
|
||||
implicitHeight: Appearance.sizes.barHeight
|
||||
implicitWidth: root.vertical ? Appearance.sizes.verticalBarWidth : backgroundLayout.implicitWidth
|
||||
implicitHeight: root.vertical ? backgroundLayout.implicitHeight : Appearance.sizes.barHeight
|
||||
|
||||
// Scroll to switch workspaces
|
||||
WheelHandler {
|
||||
@@ -102,31 +104,36 @@ Item {
|
||||
}
|
||||
|
||||
// Workspaces - background
|
||||
RowLayout {
|
||||
id: rowLayout
|
||||
GridLayout {
|
||||
id: backgroundLayout
|
||||
z: 1
|
||||
|
||||
spacing: 0
|
||||
anchors.fill: parent
|
||||
implicitHeight: Appearance.sizes.barHeight
|
||||
implicitHeight: root.vertical ? root.workspaceButtonWidth : Appearance.sizes.barHeight
|
||||
implicitWidth: root.vertical ? Appearance.sizes.verticalBarWidth : root.workspaceButtonWidth
|
||||
|
||||
rowSpacing: 0
|
||||
columnSpacing: 0
|
||||
columns: root.vertical ? 1 : -1
|
||||
|
||||
Repeater {
|
||||
model: Config.options.bar.workspaces.shown
|
||||
|
||||
Rectangle {
|
||||
z: 1
|
||||
Layout.alignment: root.vertical ? Qt.AlignHCenter : Qt.AlignVCenter
|
||||
|
||||
implicitWidth: workspaceButtonWidth
|
||||
implicitHeight: workspaceButtonWidth
|
||||
radius: (width / 2)
|
||||
property var previousOccupied: (workspaceOccupied[index-1] && !(!activeWindow?.activated && monitor?.activeWorkspace?.id === index))
|
||||
property var rightOccupied: (workspaceOccupied[index+1] && !(!activeWindow?.activated && monitor?.activeWorkspace?.id === index+2))
|
||||
property var radiusLeft: previousOccupied ? 0 : (width / 2)
|
||||
property var radiusRight: rightOccupied ? 0 : (width / 2)
|
||||
property var radiusPrev: previousOccupied ? 0 : (width / 2)
|
||||
property var radiusNext: rightOccupied ? 0 : (width / 2)
|
||||
|
||||
topLeftRadius: radiusLeft
|
||||
bottomLeftRadius: radiusLeft
|
||||
topRightRadius: radiusRight
|
||||
bottomRightRadius: radiusRight
|
||||
topLeftRadius: radiusPrev
|
||||
bottomLeftRadius: root.vertical ? radiusNext : radiusPrev
|
||||
topRightRadius: root.vertical ? radiusPrev : radiusNext
|
||||
bottomRightRadius: radiusNext
|
||||
|
||||
color: ColorUtils.transparentize(Appearance.m3colors.m3secondaryContainer, 0.4)
|
||||
opacity: (workspaceOccupied[index] && !(!activeWindow?.activated && monitor?.activeWorkspace?.id === index+1)) ? 1 : 0
|
||||
@@ -134,11 +141,11 @@ Item {
|
||||
Behavior on opacity {
|
||||
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
||||
}
|
||||
Behavior on radiusLeft {
|
||||
Behavior on radiusPrev {
|
||||
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
Behavior on radiusRight {
|
||||
Behavior on radiusNext {
|
||||
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
@@ -152,27 +159,34 @@ Item {
|
||||
Rectangle {
|
||||
z: 2
|
||||
// Make active ws indicator, which has a brighter color, smaller to look like it is of the same size as ws occupied highlight
|
||||
property real activeWorkspaceMargin: 2
|
||||
implicitHeight: workspaceButtonWidth - activeWorkspaceMargin * 2
|
||||
radius: Appearance.rounding.full
|
||||
color: Appearance.colors.colPrimary
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
anchors {
|
||||
verticalCenter: vertical ? undefined : parent.verticalCenter
|
||||
horizontalCenter: vertical ? parent.horizontalCenter : undefined
|
||||
}
|
||||
|
||||
// idx1 is the "leading" indicator position, idx2 is the "following" one
|
||||
// The former animates faster than the latter, see the NumberAnimations below
|
||||
property real idx1: workspaceIndexInGroup
|
||||
property real idx2: workspaceIndexInGroup
|
||||
x: Math.min(idx1, idx2) * workspaceButtonWidth + activeWorkspaceMargin
|
||||
implicitWidth: Math.abs(idx1 - idx2) * workspaceButtonWidth + workspaceButtonWidth - activeWorkspaceMargin * 2
|
||||
property real indicatorPosition: Math.min(idx1, idx2) * workspaceButtonWidth + root.activeWorkspaceMargin
|
||||
property real indicatorLength: Math.abs(idx1 - idx2) * workspaceButtonWidth + workspaceButtonWidth - root.activeWorkspaceMargin * 2
|
||||
property real indicatorThickness: workspaceButtonWidth - root.activeWorkspaceMargin * 2
|
||||
|
||||
Behavior on activeWorkspaceMargin {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
Behavior on idx1 { // Leading anim
|
||||
x: root.vertical ? null : indicatorPosition
|
||||
implicitWidth: root.vertical ? indicatorThickness : indicatorLength
|
||||
y: root.vertical ? indicatorPosition : null
|
||||
implicitHeight: root.vertical ? indicatorLength : indicatorThickness
|
||||
|
||||
Behavior on idx1 {
|
||||
NumberAnimation {
|
||||
duration: 100
|
||||
easing.type: Easing.OutSine
|
||||
}
|
||||
}
|
||||
Behavior on idx2 { // Following anim
|
||||
Behavior on idx2 {
|
||||
NumberAnimation {
|
||||
duration: 300
|
||||
easing.type: Easing.OutSine
|
||||
@@ -181,13 +195,17 @@ Item {
|
||||
}
|
||||
|
||||
// Workspaces - numbers
|
||||
RowLayout {
|
||||
GridLayout {
|
||||
id: rowLayoutNumbers
|
||||
z: 3
|
||||
|
||||
spacing: 0
|
||||
columns: vertical ? 1 : -1
|
||||
columnSpacing: 0
|
||||
rowSpacing: 0
|
||||
|
||||
anchors.fill: parent
|
||||
implicitHeight: Appearance.sizes.barHeight
|
||||
implicitHeight: vertical ? Appearance.sizes.barWidth : Appearance.sizes.barHeight
|
||||
implicitWidth: vertical ? Appearance.sizes.verticalBarWidth : Appearance.sizes.verticalBarWidth
|
||||
|
||||
Repeater {
|
||||
model: Config.options.bar.workspaces.shown
|
||||
@@ -195,10 +213,12 @@ Item {
|
||||
Button {
|
||||
id: button
|
||||
property int workspaceValue: workspaceGroup * Config.options.bar.workspaces.shown + index + 1
|
||||
Layout.fillHeight: true
|
||||
Layout.fillHeight: !root.vertical
|
||||
Layout.fillWidth: root.vertical
|
||||
onPressed: Hyprland.dispatch(`workspace ${workspaceValue}`)
|
||||
width: workspaceButtonWidth
|
||||
|
||||
width: vertical ? undefined : workspaceButtonWidth
|
||||
height: vertical ? workspaceButtonWidth : undefined
|
||||
|
||||
background: Item {
|
||||
id: workspaceButtonBackground
|
||||
implicitWidth: workspaceButtonWidth
|
||||
|
||||
@@ -91,7 +91,11 @@ Singleton {
|
||||
property bool enableAppsAndShell: true
|
||||
property bool enableQtApps: true
|
||||
property bool enableTerminal: true
|
||||
property bool forceTerminalDarkMode: false
|
||||
property JsonObject terminalGenerationProps: JsonObject {
|
||||
property real harmony: 0.8
|
||||
property real harmonizeThreshold: 100
|
||||
property real termFgBoost: 0.35
|
||||
}
|
||||
}
|
||||
property JsonObject palette: JsonObject {
|
||||
property string type: "auto" // Allowed: auto, scheme-content, scheme-expressive, scheme-fidelity, scheme-fruit-salad, scheme-monochrome, scheme-neutral, scheme-rainbow, scheme-tonal-spot
|
||||
@@ -168,6 +172,7 @@ Singleton {
|
||||
}
|
||||
property JsonObject tray: JsonObject {
|
||||
property bool monochromeIcons: true
|
||||
property bool showItemId: false
|
||||
property bool invertPinnedItems: false // Makes the below a whitelist for the tray and blacklist for the pinned area
|
||||
property list<string> pinnedItems: [ "Fcitx" ]
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ Singleton {
|
||||
Quickshell.execDetached(["mkdir", "-p", `${favicons}`])
|
||||
Quickshell.execDetached(["bash", "-c", `rm -rf '${coverArt}'; mkdir -p '${coverArt}'`])
|
||||
Quickshell.execDetached(["bash", "-c", `rm -rf '${booruPreviews}'; mkdir -p '${booruPreviews}'`])
|
||||
Quickshell.execDetached(["bash", "-c", `mkdir -p '${booruDownloads}' && mkdir -p '${booruDownloadsNsfw}'`])
|
||||
Quickshell.execDetached(["bash", "-c", `rm -rf '${latexOutput}'; mkdir -p '${latexOutput}'`])
|
||||
Quickshell.execDetached(["bash", "-c", `rm -rf '${cliphistDecode}'; mkdir -p '${cliphistDecode}'`])
|
||||
Quickshell.execDetached(["mkdir", "-p", `${aiChats}`])
|
||||
|
||||
@@ -16,6 +16,7 @@ RowLayout {
|
||||
Layout.rightMargin: 8
|
||||
|
||||
RowLayout {
|
||||
spacing: 10
|
||||
OptionalMaterialSymbol {
|
||||
icon: root.icon
|
||||
}
|
||||
|
||||
@@ -15,6 +15,10 @@ Scope {
|
||||
property bool unlockInProgress: false
|
||||
property bool showFailure: false
|
||||
|
||||
function resetClearTimer() {
|
||||
passwordClearTimer.restart();
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: passwordClearTimer
|
||||
interval: 10000
|
||||
|
||||
@@ -14,17 +14,26 @@ MouseArea {
|
||||
property bool active: false
|
||||
property bool showInputField: active || context.currentText.length > 0
|
||||
|
||||
// Force focus on entry
|
||||
function forceFieldFocus() {
|
||||
passwordBox.forceActiveFocus();
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: context
|
||||
function onShouldReFocus() {
|
||||
forceFieldFocus();
|
||||
}
|
||||
}
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onPressed: mouse => {
|
||||
forceFieldFocus();
|
||||
}
|
||||
onPositionChanged: mouse => {
|
||||
forceFieldFocus();
|
||||
}
|
||||
|
||||
// Toolbar appearing animation
|
||||
property real toolbarScale: 0.9
|
||||
property real toolbarOpacity: 0
|
||||
Behavior on toolbarScale {
|
||||
@@ -38,30 +47,22 @@ MouseArea {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
// Init
|
||||
Component.onCompleted: {
|
||||
forceFieldFocus();
|
||||
toolbarScale = 1;
|
||||
toolbarOpacity = 1;
|
||||
}
|
||||
|
||||
Keys.onPressed: event => { // Esc to clear
|
||||
if (event.key === Qt.Key_Escape) {
|
||||
// Key presses
|
||||
Keys.onPressed: event => {
|
||||
root.context.resetClearTimer();
|
||||
if (event.key === Qt.Key_Escape) { // Esc to clear
|
||||
root.context.currentText = "";
|
||||
}
|
||||
forceFieldFocus();
|
||||
}
|
||||
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onPressed: mouse => {
|
||||
forceFieldFocus();
|
||||
}
|
||||
onPositionChanged: mouse => {
|
||||
forceFieldFocus();
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
// RippleButton {
|
||||
// anchors {
|
||||
// top: parent.top
|
||||
@@ -77,7 +78,7 @@ MouseArea {
|
||||
// }
|
||||
// }
|
||||
|
||||
// Controls
|
||||
// Main toolbar: password box
|
||||
Toolbar {
|
||||
id: mainIsland
|
||||
anchors {
|
||||
@@ -114,6 +115,10 @@ MouseArea {
|
||||
passwordBox.text = root.context.currentText;
|
||||
}
|
||||
}
|
||||
|
||||
Keys.onPressed: event => {
|
||||
root.context.resetClearTimer();
|
||||
}
|
||||
}
|
||||
|
||||
ToolbarButton {
|
||||
@@ -136,6 +141,7 @@ MouseArea {
|
||||
}
|
||||
}
|
||||
|
||||
// Left toolbar
|
||||
Toolbar {
|
||||
id: leftIsland
|
||||
anchors {
|
||||
@@ -207,6 +213,7 @@ MouseArea {
|
||||
}
|
||||
}
|
||||
|
||||
// Right toolbar
|
||||
Toolbar {
|
||||
id: rightIsland
|
||||
anchors {
|
||||
|
||||
@@ -11,48 +11,70 @@ ContentPage {
|
||||
icon: "colors"
|
||||
title: Translation.tr("Color generation")
|
||||
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: Translation.tr("Shell & utilities")
|
||||
checked: Config.options.appearance.wallpaperTheming.enableAppsAndShell
|
||||
onCheckedChanged: {
|
||||
Config.options.appearance.wallpaperTheming.enableAppsAndShell = checked;
|
||||
}
|
||||
}
|
||||
ConfigSwitch {
|
||||
text: Translation.tr("Qt apps")
|
||||
checked: Config.options.appearance.wallpaperTheming.enableQtApps
|
||||
onCheckedChanged: {
|
||||
Config.options.appearance.wallpaperTheming.enableQtApps = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Shell & utilities theming must also be enabled")
|
||||
}
|
||||
}
|
||||
ConfigSwitch {
|
||||
text: Translation.tr("Terminal")
|
||||
checked: Config.options.appearance.wallpaperTheming.enableTerminal
|
||||
onCheckedChanged: {
|
||||
Config.options.appearance.wallpaperTheming.enableTerminal = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Shell & utilities theming must also be enabled")
|
||||
}
|
||||
ConfigSwitch {
|
||||
buttonIcon: "hardware"
|
||||
text: Translation.tr("Shell & utilities")
|
||||
checked: Config.options.appearance.wallpaperTheming.enableAppsAndShell
|
||||
onCheckedChanged: {
|
||||
Config.options.appearance.wallpaperTheming.enableAppsAndShell = checked;
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: Translation.tr("Force dark mode in terminal")
|
||||
checked: Config.options.appearance.wallpaperTheming.forceTerminalDarkMode
|
||||
onCheckedChanged: {
|
||||
Config.options.appearance.wallpaperTheming.forceTerminalDarkMode = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Ignored if terminal theming is not enabled")
|
||||
}
|
||||
ConfigSwitch {
|
||||
buttonIcon: "tv_options_input_settings"
|
||||
text: Translation.tr("Qt apps")
|
||||
checked: Config.options.appearance.wallpaperTheming.enableQtApps
|
||||
onCheckedChanged: {
|
||||
Config.options.appearance.wallpaperTheming.enableQtApps = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Shell & utilities theming must also be enabled")
|
||||
}
|
||||
}
|
||||
ConfigSwitch {
|
||||
buttonIcon: "terminal"
|
||||
text: Translation.tr("Terminal")
|
||||
checked: Config.options.appearance.wallpaperTheming.enableTerminal
|
||||
onCheckedChanged: {
|
||||
Config.options.appearance.wallpaperTheming.enableTerminal = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Shell & utilities theming must also be enabled")
|
||||
}
|
||||
}
|
||||
|
||||
ConfigSpinBox {
|
||||
icon: "invert_colors"
|
||||
text: Translation.tr("Terminal: Harmony (%)")
|
||||
value: Config.options.appearance.wallpaperTheming.terminalGenerationProps.harmony * 100
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 10
|
||||
onValueChanged: {
|
||||
Config.options.appearance.wallpaperTheming.terminalGenerationProps.harmony = value / 100;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
icon: "gradient"
|
||||
text: Translation.tr("Terminal: Harmonize threshold")
|
||||
value: Config.options.appearance.wallpaperTheming.terminalGenerationProps.harmonizeThreshold
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 10
|
||||
onValueChanged: {
|
||||
Config.options.appearance.wallpaperTheming.terminalGenerationProps.harmonizeThreshold = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
icon: "format_color_text"
|
||||
text: Translation.tr("Terminal: Foreground boost (%)")
|
||||
value: Config.options.appearance.wallpaperTheming.terminalGenerationProps.termFgBoost * 100
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 10
|
||||
onValueChanged: {
|
||||
Config.options.appearance.wallpaperTheming.terminalGenerationProps.termFgBoost = value / 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import QtQuick.Layouts
|
||||
import qs
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.common.functions
|
||||
import qs.modules.common.widgets
|
||||
|
||||
ContentPage {
|
||||
forceWidth: true
|
||||
|
||||
ContentSection {
|
||||
icon: "volume_up"
|
||||
title: Translation.tr("Audio")
|
||||
|
||||
ConfigSwitch {
|
||||
text: Translation.tr("Earbang protection")
|
||||
checked: Config.options.audio.protection.enable
|
||||
onCheckedChanged: {
|
||||
Config.options.audio.protection.enable = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Prevents abrupt increments and restricts volume limit")
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
// uniform: true
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Max allowed increase")
|
||||
value: Config.options.audio.protection.maxAllowedIncrease
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 2
|
||||
onValueChanged: {
|
||||
Config.options.audio.protection.maxAllowedIncrease = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Volume limit")
|
||||
value: Config.options.audio.protection.maxAllowed
|
||||
from: 0
|
||||
to: 154 // pavucontrol allows up to 153%
|
||||
stepSize: 2
|
||||
onValueChanged: {
|
||||
Config.options.audio.protection.maxAllowed = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "battery_android_full"
|
||||
title: Translation.tr("Battery")
|
||||
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Low warning")
|
||||
value: Config.options.battery.low
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.low = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Critical warning")
|
||||
value: Config.options.battery.critical
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.critical = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: Translation.tr("Automatic suspend")
|
||||
checked: Config.options.battery.automaticSuspend
|
||||
onCheckedChanged: {
|
||||
Config.options.battery.automaticSuspend = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Automatically suspends the system when battery is low")
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Suspend at")
|
||||
value: Config.options.battery.suspend
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.suspend = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "language"
|
||||
title: Translation.tr("Language")
|
||||
|
||||
ContentSubsection {
|
||||
title: Translation.tr("Interface Language")
|
||||
tooltip: Translation.tr("Select the language for the user interface.\n\"Auto\" will use your system's locale.")
|
||||
|
||||
ConfigSelectionArray {
|
||||
id: languageSelector
|
||||
currentValue: Config.options.language.ui
|
||||
onSelected: newValue => {
|
||||
Config.options.language.ui = newValue;
|
||||
}
|
||||
options: [
|
||||
{
|
||||
displayName: Translation.tr("Auto (System)"),
|
||||
value: "auto"
|
||||
},
|
||||
...Translation.availableLanguages.map(lang => {
|
||||
return {
|
||||
displayName: lang.replace('_', '-'),
|
||||
value: lang
|
||||
};
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "rule"
|
||||
title: Translation.tr("Policies")
|
||||
|
||||
ConfigRow {
|
||||
ColumnLayout {
|
||||
// Weeb policy
|
||||
ContentSubsectionLabel {
|
||||
text: Translation.tr("Weeb")
|
||||
}
|
||||
ConfigSelectionArray {
|
||||
currentValue: Config.options.policies.weeb
|
||||
onSelected: newValue => {
|
||||
Config.options.policies.weeb = newValue;
|
||||
}
|
||||
options: [
|
||||
{
|
||||
displayName: Translation.tr("No"),
|
||||
icon: "close",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Yes"),
|
||||
icon: "check",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Closet"),
|
||||
icon: "ev_shadow",
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
// AI policy
|
||||
ContentSubsectionLabel {
|
||||
text: Translation.tr("AI")
|
||||
}
|
||||
ConfigSelectionArray {
|
||||
currentValue: Config.options.policies.ai
|
||||
onSelected: newValue => {
|
||||
Config.options.policies.ai = newValue;
|
||||
}
|
||||
options: [
|
||||
{
|
||||
displayName: Translation.tr("No"),
|
||||
icon: "close",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Yes"),
|
||||
icon: "check",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Local only"),
|
||||
icon: "sync_saved_locally",
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "nest_clock_farsight_analog"
|
||||
title: Translation.tr("Time")
|
||||
|
||||
ContentSubsection {
|
||||
title: Translation.tr("Format")
|
||||
tooltip: ""
|
||||
|
||||
ConfigSelectionArray {
|
||||
currentValue: Config.options.time.format
|
||||
onSelected: newValue => {
|
||||
if (newValue === "hh:mm") {
|
||||
Quickshell.execDetached(["bash", "-c", `sed -i 's/\\TIME12\\b/TIME/' '${FileUtils.trimFileProtocol(Directories.config)}/hypr/hyprlock.conf'`]);
|
||||
} else {
|
||||
Quickshell.execDetached(["bash", "-c", `sed -i 's/\\TIME\\b/TIME12/' '${FileUtils.trimFileProtocol(Directories.config)}/hypr/hyprlock.conf'`]);
|
||||
}
|
||||
|
||||
Config.options.time.format = newValue;
|
||||
|
||||
}
|
||||
options: [
|
||||
{
|
||||
displayName: Translation.tr("24h"),
|
||||
value: "hh:mm"
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("12h am/pm"),
|
||||
value: "h:mm ap"
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("12h AM/PM"),
|
||||
value: "h:mm AP"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,66 +7,6 @@ import qs.modules.common.widgets
|
||||
|
||||
ContentPage {
|
||||
forceWidth: true
|
||||
ContentSection {
|
||||
icon: "rule"
|
||||
title: Translation.tr("Policies")
|
||||
|
||||
ConfigRow {
|
||||
ColumnLayout {
|
||||
// Weeb policy
|
||||
ContentSubsectionLabel {
|
||||
text: Translation.tr("Weeb")
|
||||
}
|
||||
ConfigSelectionArray {
|
||||
currentValue: Config.options.policies.weeb
|
||||
onSelected: newValue => {
|
||||
Config.options.policies.weeb = newValue;
|
||||
}
|
||||
options: [
|
||||
{
|
||||
displayName: Translation.tr("No"),
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Yes"),
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Closet"),
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
// AI policy
|
||||
ContentSubsectionLabel {
|
||||
text: Translation.tr("AI")
|
||||
}
|
||||
ConfigSelectionArray {
|
||||
currentValue: Config.options.policies.ai
|
||||
onSelected: newValue => {
|
||||
Config.options.policies.ai = newValue;
|
||||
}
|
||||
options: [
|
||||
{
|
||||
displayName: Translation.tr("No"),
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Yes"),
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Local only"),
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "wallpaper"
|
||||
@@ -121,58 +61,6 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "battery_android_full"
|
||||
title: Translation.tr("Battery")
|
||||
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Low warning")
|
||||
value: Config.options.battery.low
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.low = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Critical warning")
|
||||
value: Config.options.battery.critical
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.critical = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: Translation.tr("Automatic suspend")
|
||||
checked: Config.options.battery.automaticSuspend
|
||||
onCheckedChanged: {
|
||||
Config.options.battery.automaticSuspend = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Automatically suspends the system when battery is low")
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Suspend at")
|
||||
value: Config.options.battery.suspend
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.suspend = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "call_to_action"
|
||||
title: Translation.tr("Dock")
|
||||
@@ -281,10 +169,6 @@ ContentPage {
|
||||
onCheckedChanged: {
|
||||
Config.options.sidebar.cornerOpen.visualize = checked;
|
||||
}
|
||||
|
||||
StyledToolTip {
|
||||
content: "When this is off you'll have to click"
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
ConfigSpinBox {
|
||||
@@ -389,33 +273,4 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "language"
|
||||
title: Translation.tr("Language")
|
||||
|
||||
ContentSubsection {
|
||||
title: Translation.tr("Interface Language")
|
||||
tooltip: Translation.tr("Select the language for the user interface.\n\"Auto\" will use your system's locale.")
|
||||
|
||||
ConfigSelectionArray {
|
||||
id: languageSelector
|
||||
currentValue: Config.options.language.ui
|
||||
onSelected: newValue => {
|
||||
Config.options.language.ui = newValue;
|
||||
}
|
||||
options: [
|
||||
{
|
||||
displayName: Translation.tr("Auto (System)"),
|
||||
value: "auto"
|
||||
},
|
||||
...Translation.availableLanguages.map(lang => {
|
||||
return {
|
||||
displayName: lang.replace('_', '-'),
|
||||
value: lang
|
||||
};
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ ContentPage {
|
||||
ColumnLayout {
|
||||
RippleButtonWithIcon {
|
||||
id: rndWallBtn
|
||||
visible: Config.options.policies.weeb === 1
|
||||
Layout.fillWidth: true
|
||||
buttonRadius: Appearance.rounding.small
|
||||
materialIcon: "wallpaper"
|
||||
|
||||
@@ -10,45 +10,6 @@ import Quickshell
|
||||
ContentPage {
|
||||
forceWidth: true
|
||||
|
||||
ContentSection {
|
||||
icon: "volume_up"
|
||||
title: Translation.tr("Audio")
|
||||
|
||||
ConfigSwitch {
|
||||
text: Translation.tr("Earbang protection")
|
||||
checked: Config.options.audio.protection.enable
|
||||
onCheckedChanged: {
|
||||
Config.options.audio.protection.enable = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Prevents abrupt increments and restricts volume limit")
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
// uniform: true
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Max allowed increase")
|
||||
value: Config.options.audio.protection.maxAllowedIncrease
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 2
|
||||
onValueChanged: {
|
||||
Config.options.audio.protection.maxAllowedIncrease = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Volume limit")
|
||||
value: Config.options.audio.protection.maxAllowed
|
||||
from: 0
|
||||
to: 154 // pavucontrol allows up to 153%
|
||||
stepSize: 2
|
||||
onValueChanged: {
|
||||
Config.options.audio.protection.maxAllowed = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "neurology"
|
||||
title: Translation.tr("AI")
|
||||
@@ -66,58 +27,6 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "battery_android_full"
|
||||
title: Translation.tr("Battery")
|
||||
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Low warning")
|
||||
value: Config.options.battery.low
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.low = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Critical warning")
|
||||
value: Config.options.battery.critical
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.critical = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: Translation.tr("Automatic suspend")
|
||||
checked: Config.options.battery.automaticSuspend
|
||||
onCheckedChanged: {
|
||||
Config.options.battery.automaticSuspend = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: Translation.tr("Automatically suspends the system when battery is low")
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: Translation.tr("Suspend at")
|
||||
value: Config.options.battery.suspend
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.suspend = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "cell_tower"
|
||||
title: Translation.tr("Networking")
|
||||
@@ -241,42 +150,4 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "nest_clock_farsight_analog"
|
||||
title: Translation.tr("Time")
|
||||
|
||||
ContentSubsection {
|
||||
title: Translation.tr("Format")
|
||||
tooltip: ""
|
||||
|
||||
ConfigSelectionArray {
|
||||
currentValue: Config.options.time.format
|
||||
onSelected: newValue => {
|
||||
if (newValue === "hh:mm") {
|
||||
Quickshell.execDetached(["bash", "-c", `sed -i 's/\\TIME12\\b/TIME/' '${FileUtils.trimFileProtocol(Directories.config)}/hypr/hyprlock.conf'`]);
|
||||
} else {
|
||||
Quickshell.execDetached(["bash", "-c", `sed -i 's/\\TIME\\b/TIME12/' '${FileUtils.trimFileProtocol(Directories.config)}/hypr/hyprlock.conf'`]);
|
||||
}
|
||||
|
||||
Config.options.time.format = newValue;
|
||||
|
||||
}
|
||||
options: [
|
||||
{
|
||||
displayName: Translation.tr("24h"),
|
||||
value: "hh:mm"
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("12h am/pm"),
|
||||
value: "h:mm ap"
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("12h AM/PM"),
|
||||
value: "h:mm AP"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,15 @@ Item {
|
||||
property var suggestionQuery: ""
|
||||
property var suggestionList: []
|
||||
|
||||
Connections {
|
||||
target: Config
|
||||
function onReadyChanged() {
|
||||
if (Config.options.policies.weeb !== 0) {
|
||||
Quickshell.execDetached(["bash", "-c", `mkdir -p '${root.downloadPath}' && mkdir -p '${root.nsfwPath}'`])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Booru
|
||||
function onTagSuggestion(query, suggestions) {
|
||||
|
||||
@@ -110,8 +110,9 @@ Item { // Bar content region
|
||||
vertical: true
|
||||
padding: 6
|
||||
|
||||
Workspaces {
|
||||
Bar.Workspaces {
|
||||
id: workspacesWidget
|
||||
vertical: true
|
||||
MouseArea {
|
||||
// Right-click to toggle overview
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -1,308 +0,0 @@
|
||||
import qs
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.common.widgets
|
||||
import qs.modules.common.functions
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Widgets
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property bool borderless: Config.options.bar.borderless
|
||||
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(root.QsWindow.window?.screen)
|
||||
readonly property Toplevel activeWindow: ToplevelManager.activeToplevel
|
||||
|
||||
readonly property int workspaceGroup: Math.floor((monitor?.activeWorkspace?.id - 1) / Config.options.bar.workspaces.shown)
|
||||
property list<bool> workspaceOccupied: []
|
||||
property real workspaceButtonWidth: 26
|
||||
property real activeWorkspaceMargin: 2
|
||||
property real workspaceIconSize: workspaceButtonWidth * 0.69
|
||||
property real workspaceIconSizeShrinked: workspaceButtonWidth * 0.55
|
||||
property real workspaceIconOpacityShrinked: 1
|
||||
property real workspaceIconMarginShrinked: -4
|
||||
property int workspaceIndexInGroup: (monitor?.activeWorkspace?.id - 1) % Config.options.bar.workspaces.shown
|
||||
|
||||
implicitHeight: columnLayout.implicitHeight + columnLayout.spacing * 2
|
||||
implicitWidth: Appearance.sizes.verticalBarWidth
|
||||
|
||||
property bool showNumbers: false
|
||||
Timer {
|
||||
id: showNumbersTimer
|
||||
interval: (Config?.options.bar.autoHide.showWhenPressingSuper.delay ?? 100)
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
root.showNumbers = true
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: GlobalStates
|
||||
function onSuperDownChanged() {
|
||||
if (!Config?.options.bar.autoHide.showWhenPressingSuper.enable) return;
|
||||
if (GlobalStates.superDown) showNumbersTimer.restart();
|
||||
else {
|
||||
showNumbersTimer.stop();
|
||||
root.showNumbers = false;
|
||||
}
|
||||
}
|
||||
function onSuperReleaseMightTriggerChanged() {
|
||||
showNumbersTimer.stop()
|
||||
}
|
||||
}
|
||||
|
||||
// Function to update workspaceOccupied
|
||||
function updateWorkspaceOccupied() {
|
||||
workspaceOccupied = Array.from({ length: Config.options.bar.workspaces.shown }, (_, i) => {
|
||||
return Hyprland.workspaces.values.some(ws => ws.id === workspaceGroup * Config.options.bar.workspaces.shown + i + 1);
|
||||
})
|
||||
}
|
||||
|
||||
// Occupied workspace updates
|
||||
Component.onCompleted: updateWorkspaceOccupied()
|
||||
Connections {
|
||||
target: Hyprland.workspaces
|
||||
function onValuesChanged() {
|
||||
updateWorkspaceOccupied();
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: Hyprland
|
||||
function onFocusedWorkspaceChanged() {
|
||||
updateWorkspaceOccupied();
|
||||
}
|
||||
}
|
||||
onWorkspaceGroupChanged: {
|
||||
updateWorkspaceOccupied();
|
||||
}
|
||||
|
||||
// Scroll to switch workspaces
|
||||
WheelHandler {
|
||||
onWheel: (event) => {
|
||||
if (event.angleDelta.y < 0)
|
||||
Hyprland.dispatch(`workspace r+1`);
|
||||
else if (event.angleDelta.y > 0)
|
||||
Hyprland.dispatch(`workspace r-1`);
|
||||
}
|
||||
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.BackButton
|
||||
onPressed: (event) => {
|
||||
if (event.button === Qt.BackButton) {
|
||||
Hyprland.dispatch(`togglespecialworkspace`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Workspaces - background
|
||||
ColumnLayout {
|
||||
id: columnLayout
|
||||
z: 1
|
||||
|
||||
spacing: 0
|
||||
anchors.fill: parent
|
||||
implicitWidth: Appearance.sizes.verticalBarWidth
|
||||
|
||||
Repeater {
|
||||
model: Config.options.bar.workspaces.shown
|
||||
|
||||
Rectangle {
|
||||
z: 1
|
||||
implicitWidth: workspaceButtonWidth
|
||||
implicitHeight: workspaceButtonWidth
|
||||
radius: (width / 2)
|
||||
property var previousOccupied: (workspaceOccupied[index-1] && !(!activeWindow?.activated && monitor?.activeWorkspace?.id === index))
|
||||
property var nextOccupied: (workspaceOccupied[index+1] && !(!activeWindow?.activated && monitor?.activeWorkspace?.id === index+2))
|
||||
property var radiusTop: previousOccupied ? 0 : (width / 2)
|
||||
property var radiusBottom: nextOccupied ? 0 : (width / 2)
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
topLeftRadius: radiusTop
|
||||
topRightRadius: radiusTop
|
||||
bottomLeftRadius: radiusBottom
|
||||
bottomRightRadius: radiusBottom
|
||||
|
||||
color: ColorUtils.transparentize(Appearance.m3colors.m3secondaryContainer, 0.4)
|
||||
opacity: (workspaceOccupied[index] && !(!activeWindow?.activated && monitor?.activeWorkspace?.id === index+1)) ? 1 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
||||
}
|
||||
Behavior on radiusTop {
|
||||
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
||||
}
|
||||
Behavior on radiusBottom {
|
||||
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Active workspace
|
||||
Rectangle {
|
||||
z: 2
|
||||
// Make active ws indicator, which has a brighter color, smaller to look like it is of the same size as ws occupied highlight
|
||||
implicitWidth: workspaceButtonWidth - root.activeWorkspaceMargin * 2
|
||||
radius: Appearance.rounding.full
|
||||
color: Appearance.colors.colPrimary
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
property real idx1: workspaceIndexInGroup
|
||||
property real idx2: workspaceIndexInGroup
|
||||
y: Math.min(idx1, idx2) * workspaceButtonWidth + root.activeWorkspaceMargin
|
||||
implicitHeight: Math.abs(idx1 - idx2) * workspaceButtonWidth + workspaceButtonWidth - root.activeWorkspaceMargin * 2
|
||||
|
||||
Behavior on idx1 { // Leading anim
|
||||
NumberAnimation {
|
||||
duration: 100
|
||||
easing.type: Easing.OutSine
|
||||
}
|
||||
}
|
||||
Behavior on idx2 { // Following anim
|
||||
NumberAnimation {
|
||||
duration: 300
|
||||
easing.type: Easing.OutSine
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Workspaces - numbers
|
||||
ColumnLayout {
|
||||
id: columnLayoutNumbers
|
||||
z: 3
|
||||
|
||||
spacing: 0
|
||||
anchors.fill: parent
|
||||
implicitWidth: Appearance.sizes.verticalBarWidth
|
||||
|
||||
Repeater {
|
||||
model: Config.options.bar.workspaces.shown
|
||||
|
||||
Button {
|
||||
id: button
|
||||
property int workspaceValue: workspaceGroup * Config.options.bar.workspaces.shown + index + 1
|
||||
Layout.fillWidth: true
|
||||
onPressed: Hyprland.dispatch(`workspace ${workspaceValue}`)
|
||||
height: workspaceButtonWidth
|
||||
|
||||
background: Item {
|
||||
id: workspaceButtonBackground
|
||||
implicitWidth: workspaceButtonWidth
|
||||
implicitHeight: workspaceButtonWidth
|
||||
property var biggestWindow: HyprlandData.biggestWindowForWorkspace(button.workspaceValue)
|
||||
property var mainAppIconSource: Quickshell.iconPath(AppSearch.guessIcon(biggestWindow?.class), "image-missing")
|
||||
|
||||
StyledText { // Workspace number text
|
||||
opacity: root.showNumbers
|
||||
|| ((Config.options?.bar.workspaces.alwaysShowNumbers && (!Config.options?.bar.workspaces.showAppIcons || !workspaceButtonBackground.biggestWindow || root.showNumbers))
|
||||
|| (root.showNumbers && !Config.options?.bar.workspaces.showAppIcons)
|
||||
) ? 1 : 0
|
||||
z: 3
|
||||
|
||||
anchors.centerIn: parent
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pixelSize: Appearance.font.pixelSize.small - ((text.length - 1) * (text !== "10") * 2)
|
||||
text: `${button.workspaceValue}`
|
||||
elide: Text.ElideRight
|
||||
color: (monitor?.activeWorkspace?.id == button.workspaceValue) ?
|
||||
Appearance.m3colors.m3onPrimary :
|
||||
(workspaceOccupied[index] ? Appearance.m3colors.m3onSecondaryContainer :
|
||||
Appearance.colors.colOnLayer1Inactive)
|
||||
|
||||
Behavior on opacity {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
}
|
||||
Rectangle { // Dot instead of ws number
|
||||
id: wsDot
|
||||
opacity: (Config.options?.bar.workspaces.alwaysShowNumbers
|
||||
|| root.showNumbers
|
||||
|| (Config.options?.bar.workspaces.showAppIcons && workspaceButtonBackground.biggestWindow)
|
||||
) ? 0 : 1
|
||||
visible: opacity > 0
|
||||
anchors.centerIn: parent
|
||||
width: workspaceButtonWidth * 0.18
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: (monitor?.activeWorkspace?.id == button.workspaceValue) ?
|
||||
Appearance.m3colors.m3onPrimary :
|
||||
(workspaceOccupied[index] ? Appearance.m3colors.m3onSecondaryContainer :
|
||||
Appearance.colors.colOnLayer1Inactive)
|
||||
|
||||
Behavior on opacity {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
}
|
||||
Item { // Main app icon
|
||||
anchors.centerIn: parent
|
||||
width: workspaceButtonWidth
|
||||
height: workspaceButtonWidth
|
||||
opacity: !Config.options?.bar.workspaces.showAppIcons ? 0 :
|
||||
(workspaceButtonBackground.biggestWindow && !root.showNumbers && Config.options?.bar.workspaces.showAppIcons) ?
|
||||
1 : workspaceButtonBackground.biggestWindow ? workspaceIconOpacityShrinked : 0
|
||||
visible: opacity > 0
|
||||
IconImage {
|
||||
id: mainAppIcon
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.bottomMargin: (!root.showNumbers && Config.options?.bar.workspaces.showAppIcons) ?
|
||||
(workspaceButtonWidth - workspaceIconSize) / 2 : workspaceIconMarginShrinked
|
||||
anchors.rightMargin: (!root.showNumbers && Config.options?.bar.workspaces.showAppIcons) ?
|
||||
(workspaceButtonWidth - workspaceIconSize) / 2 : workspaceIconMarginShrinked
|
||||
|
||||
source: workspaceButtonBackground.mainAppIconSource
|
||||
implicitSize: (!root.showNumbers && Config.options?.bar.workspaces.showAppIcons) ? workspaceIconSize : workspaceIconSizeShrinked
|
||||
|
||||
Behavior on opacity {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
Behavior on anchors.bottomMargin {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
Behavior on anchors.rightMargin {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
Behavior on implicitSize {
|
||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: Config.options.bar.workspaces.monochromeIcons
|
||||
anchors.fill: mainAppIcon
|
||||
sourceComponent: Item {
|
||||
Desaturate {
|
||||
id: desaturatedIcon
|
||||
visible: false // There's already color overlay
|
||||
anchors.fill: parent
|
||||
source: mainAppIcon
|
||||
desaturation: 0.8
|
||||
}
|
||||
ColorOverlay {
|
||||
anchors.fill: desaturatedIcon
|
||||
source: desaturatedIcon
|
||||
color: ColorUtils.transparentize(wsDot.color, 0.9)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -284,6 +284,16 @@ switch() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set harmony and related properties
|
||||
if [ -f "$SHELL_CONFIG_FILE" ]; then
|
||||
harmony=$(jq -r '.appearance.wallpaperTheming.terminalGenerationProps.harmony' "$SHELL_CONFIG_FILE")
|
||||
harmonize_threshold=$(jq -r '.appearance.wallpaperTheming.terminalGenerationProps.harmonizeThreshold' "$SHELL_CONFIG_FILE")
|
||||
term_fg_boost=$(jq -r '.appearance.wallpaperTheming.terminalGenerationProps.termFgBoost' "$SHELL_CONFIG_FILE")
|
||||
[[ "$harmony" != "null" && -n "$harmony" ]] && generate_colors_material_args+=(--harmony "$harmony")
|
||||
[[ "$harmonize_threshold" != "null" && -n "$harmonize_threshold" ]] && generate_colors_material_args+=(--harmonize_threshold "$harmonize_threshold")
|
||||
[[ "$term_fg_boost" != "null" && -n "$term_fg_boost" ]] && generate_colors_material_args+=(--term_fg_boost "$term_fg_boost")
|
||||
fi
|
||||
|
||||
matugen "${matugen_args[@]}"
|
||||
source "$(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate"
|
||||
python3 "$SCRIPT_DIR/generate_colors_material.py" "${generate_colors_material_args[@]}" \
|
||||
|
||||
@@ -255,7 +255,7 @@ Singleton {
|
||||
// - key_get_description: Description of pricing and how to get an API key
|
||||
// - api_format: The API format of the model. Can be "openai" or "gemini". Default is "openai".
|
||||
// - extraParams: Extra parameters to be passed to the model. This is a JSON object.
|
||||
property var models: {
|
||||
property var models: Config.options.policies.ai === 2 ? {} : {
|
||||
"gemini-2.0-flash": aiModelComponent.createObject(this, {
|
||||
"name": "Gemini 2.0 Flash",
|
||||
"icon": "google-gemini-symbolic",
|
||||
|
||||
@@ -28,6 +28,12 @@ ApplicationWindow {
|
||||
icon: "instant_mix",
|
||||
component: "modules/settings/QuickConfig.qml"
|
||||
},
|
||||
{
|
||||
name: Translation.tr("General"),
|
||||
icon: "browse",
|
||||
iconRotation: 180,
|
||||
component: "modules/settings/GeneralConfig.qml"
|
||||
},
|
||||
{
|
||||
name: Translation.tr("Bar"),
|
||||
icon: "toast",
|
||||
@@ -36,7 +42,7 @@ ApplicationWindow {
|
||||
},
|
||||
{
|
||||
name: Translation.tr("Interface"),
|
||||
icon: "cards",
|
||||
icon: "bottom_app_bar",
|
||||
component: "modules/settings/InterfaceConfig.qml"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -236,6 +236,7 @@ ApplicationWindow {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
RippleButtonWithIcon {
|
||||
id: rndWallBtn
|
||||
visible: Config.options.policies.weeb === 1
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
buttonRadius: Appearance.rounding.small
|
||||
materialIcon: "wallpaper"
|
||||
@@ -309,14 +310,17 @@ ApplicationWindow {
|
||||
options: [
|
||||
{
|
||||
displayName: Translation.tr("No"),
|
||||
icon: "close",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Yes"),
|
||||
icon: "check",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Closet"),
|
||||
icon: "ev_shadow",
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
@@ -334,14 +338,17 @@ ApplicationWindow {
|
||||
options: [
|
||||
{
|
||||
displayName: Translation.tr("No"),
|
||||
icon: "close",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Yes"),
|
||||
icon: "check",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
displayName: Translation.tr("Local only"),
|
||||
icon: "sync_saved_locally",
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
- **Transparent installation**: Every command is shown before it's run
|
||||
</details>
|
||||
<details>
|
||||
<summary>Installation (illogical-impulse<sup>Quickshell</sup>)</summary>
|
||||
<summary>Installation (illogical-impulse Quickshell)</summary>
|
||||
|
||||
- See the [Wiki](https://end-4.github.io/dots-hyprland-wiki/en/ii-qs/01setup/)
|
||||
- **Default keybinds**: Should be somewhat familiar to Windows or GNOME users.
|
||||
- See the [Wiki](https://end-4.github.io/dots-hyprland-wiki/en/ii-qs/01setup/) <sub>(both install script and manual installation available)</sub>
|
||||
- **Default keybinds**: Should be somewhat familiar to Windows or GNOME users. Important ones:
|
||||
- `Super`+`/` = keybind list
|
||||
- `Super`+`Enter` = terminal
|
||||
- If for whatever reason the keybind list widget does not work, here's an image:
|
||||
@@ -44,12 +44,11 @@
|
||||
|
||||
| Software | Purpose |
|
||||
| ------------- | ------------- |
|
||||
| [Hyprland](https://github.com/hyprwm/hyprland) | The compositor (for noobs, you can just call it a window manager) |
|
||||
| [Quickshell](https://quickshell.outfoxxed.me/) | A QtQuick-based widget system, responsible for the status bar, sidebars, etc. |
|
||||
| [Hyprland](https://github.com/hyprwm/hyprland) | The compositor (manages and renders windows) |
|
||||
| [Quickshell](https://quickshell.outfoxxed.me/) | A QtQuick-based widget system, used for the status bar, sidebars, etc. |
|
||||
|
||||
|
||||
|
||||
- For a more comprehensive list of dependencies, see [scriptdata/dependencies.conf](https://github.com/end-4/dots-hyprland/blob/main/scriptdata/dependencies.conf)
|
||||
- THERE IS NO WAYBAR
|
||||
- For the full list of dependencies, see the [arch-packages folder](https://github.com/end-4/dots-hyprland/tree/main/arch-packages)
|
||||
</details>
|
||||
|
||||
<details>
|
||||
@@ -58,9 +57,6 @@
|
||||
|
||||
</details>
|
||||
|
||||
_Note: **THERE IS NO FUCKING WAYBAR**_
|
||||
|
||||
|
||||
<div align="center">
|
||||
<h2>• screenshots •</h2>
|
||||
<h3></h3>
|
||||
@@ -86,9 +82,9 @@ Widget system: Quickshell | Support: Yes
|
||||
|
||||
| AI, settings app | Some widgets |
|
||||
|:---|:---------------|
|
||||
|  |  |
|
||||
| <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/22aa335a-0a23-4789-8ce9-c601b9f95858" /> | <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/50009d7f-e456-4200-bc41-49b29abbafe3" /> |
|
||||
| Window management | Weeb power |
|
||||
|  |  |
|
||||
| <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/e77a7c96-1905-4126-a2a0-434f818825a2" /> | <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/c8544e99-8881-477f-b83a-d6e35c0184a1" /> |
|
||||
|
||||
### illogical-impulse<sup>AGS</sup> <sub>(Deprecated)</sub>
|
||||
|
||||
@@ -102,7 +98,7 @@ Widget system: AGS | Support: No
|
||||
|
||||
### Very old stuff
|
||||
|
||||
- Source code not likely to work but still available in the [`archive`](https://github.com/end-4/dots-hyprland/tree/archive) branch. Extremely spaghetti.
|
||||
- Not likely to work, but the source is still available in the [`archive`](https://github.com/end-4/dots-hyprland/tree/archive) branch. Extremely spaghetti.
|
||||
- Click image for a presentation video
|
||||
|
||||
#### m3ww
|
||||
@@ -142,28 +138,23 @@ Widget system: AGS | Support: No
|
||||
<h3></h3>
|
||||
</div>
|
||||
|
||||
- [@clsty](https://github.com/clsty) for making my work accessible by taking care of the install script and many other things
|
||||
- [@clsty](https://github.com/clsty) for making the dotfiles accessible by taking care of the install script and many other things
|
||||
- [@midn8hustlr](https://github.com/midn8hustlr) for greatly improving the color generation system
|
||||
- [@outfoxxed](https://github.com/outfoxxed/) for being extremely supportive in my Quickshell journey
|
||||
- Quickshell: [Soramane](https://github.com/caelestia-dots/shell/), [FridayFaerie](https://github.com/FridayFaerie/quickshell), [nydragon](https://github.com/nydragon/nysh)
|
||||
- AGS: [Aylur's config](https://github.com/Aylur/dotfiles/tree/ags-pre-ts), [kotontrion's config](https://github.com/kotontrion/dotfiles)
|
||||
- EWW: [fufexan's config](https://github.com/fufexan/dotfiles) (he thanks more people there btw)
|
||||
- AI bots for providing useful examples
|
||||
|
||||
<sup><sup><sup><sup><sup>[@tokyobot](https://github.com/tokyob0t) for saying hi</sup></sup></sup></sup></sup>
|
||||
- AGS: [Aylur](https://github.com/Aylur/dotfiles/tree/ags-pre-ts), [kotontrion](https://github.com/kotontrion/dotfiles)
|
||||
- EWW: [fufexan](https://github.com/fufexan/dotfiles)
|
||||
|
||||
<div align="center">
|
||||
<h2>• stonks •</h2>
|
||||
<h3></h3>
|
||||
</div>
|
||||
|
||||
- Funny useful number: https://github.com/sponsors/end-4
|
||||
- Funny useless number:
|
||||
- If you would like to give me some milk😳 (i dont drink coffee): https://github.com/sponsors/end-4
|
||||
- Virtual tentacle cat website points chart
|
||||
|
||||
[](https://starchart.cc/end-4/dots-hyprland)
|
||||
|
||||
- *Jokes aside i do appreciate both*
|
||||
|
||||
|
||||
<div align="center">
|
||||
<h2>• inspirations/copying •</h2>
|
||||
@@ -171,4 +162,4 @@ Widget system: AGS | Support: No
|
||||
</div>
|
||||
|
||||
- Inspiration: osu!lazer, Windows 11, Material Design 3, AvdanOS (concept)
|
||||
- Copying: The license allows you to. Personally I have absolutely no problem with others redistributing/recreating my work. There's no "stealing" (unless you do weird stuff and violate the license). (this note is here because some people actually asked)
|
||||
- Copying: The license allows you to. Personally I have absolutely no problem with others redistributing/recreating my work. There's no "stealing" (unless you do weird stuff and violate the license). <sub>(this note is here because some people actually asked)</sub>
|
||||
|
||||
Reference in New Issue
Block a user