diff --git a/.gitignore b/.gitignore index 3545259..dc709e6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ compile_commands.json testpython pkg/ *.tar.* +uv.lock +.qtcreator/ +dist/ diff --git a/.qtcreator/project.json b/.qtcreator/project.json deleted file mode 100644 index 6bdef87..0000000 --- a/.qtcreator/project.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://download.qt.io/official_releases/qtcreator/latest/installer_source/jsonschemas/project.json", - "files.exclude": [ - ".qtcreator/project.json.user" - ] -} diff --git a/.qtcreator/project.json.user b/.qtcreator/project.json.user deleted file mode 100644 index 2b37cc7..0000000 --- a/.qtcreator/project.json.user +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - EnvironmentId - {ec8acdf5-a16b-4fc5-819b-8b986eb013bb} - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - true - true - true - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - UTF-8 - false - 4 - false - 0 - 80 - true - true - 1 - 0 - false - true - false - 2 - true - true - 0 - 8 - true - false - 1 - true - true - true - *.md, *.MD, Makefile - false - true - true - - - - ProjectExplorer.Project.PluginSettings - - - true - false - true - true - true - true - - false - - - 0 - true - - true - true - Builtin.DefaultTidyAndClazy - 10 - true - - - - true - - 0 - - - - ProjectExplorer.Project.Target.0 - - Desktop - true - Desktop - Desktop - {6f820de3-bb35-4a43-a7c9-dfd1617a8619} - 0 - 0 - 0 - - /home/zach/GitProjects/z-bar-qt/build - - 0 - Build - Build - ProjectExplorer.BuildSteps.Build - - - 0 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - false - - Default - WorkspaceProject.BuildConfiguration - 0 - 0 - - - 0 - Deploy - Deploy - ProjectExplorer.BuildSteps.Deploy - - 1 - - false - ProjectExplorer.DefaultDeployConfiguration - - 1 - - true - true - 0 - true - - 2 - - false - -e cpu-cycles --call-graph dwarf,4096 -F 250 - - ProjectExplorer.CustomExecutableRunConfiguration - - false - - true - true - %{RunConfig:Executable:Path} - - 1 - - 1 - - - 0 - Deploy - Deploy - ProjectExplorer.BuildSteps.Deploy - - 1 - - false - ProjectExplorer.DefaultDeployConfiguration - - 1 - - true - true - 0 - true - - 2 - - false - -e cpu-cycles --call-graph dwarf,4096 -F 250 - - ProjectExplorer.CustomExecutableRunConfiguration - - false - - true - true - %{RunConfig:Executable:Path} - - 1 - - - - ProjectExplorer.Project.TargetCount - 1 - - - Version - 22 - - diff --git a/Bar.qml b/Bar.qml index 558882a..eea1f43 100644 --- a/Bar.qml +++ b/Bar.qml @@ -27,7 +27,7 @@ Variants { WlrLayershell.namespace: "ZShell-Bar" WlrLayershell.exclusionMode: ExclusionMode.Ignore - WlrLayershell.keyboardFocus: visibilities.launcher || visibilities.osd || visibilities.sidebar || visibilities.dashboard ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None + WlrLayershell.keyboardFocus: visibilities.launcher || visibilities.sidebar || visibilities.dashboard ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None contentItem.focus: true @@ -92,7 +92,7 @@ Variants { HyprlandFocusGrab { id: focusGrab - active: visibilities.launcher || visibilities.sidebar || visibilities.dashboard || visibilities.osd || ( panels.popouts.hasCurrent && panels.popouts.currentName.startsWith( "traymenu" )) + active: visibilities.launcher || visibilities.sidebar || visibilities.dashboard || ( panels.popouts.hasCurrent && panels.popouts.currentName.startsWith( "traymenu" )) windows: [bar] onCleared: { visibilities.launcher = false; diff --git a/Daemons/Audio.qml b/Daemons/Audio.qml index c610eae..51b6095 100644 --- a/Daemons/Audio.qml +++ b/Daemons/Audio.qml @@ -1,6 +1,8 @@ pragma Singleton import qs.Config +import ZShell.Services +import ZShell import Quickshell import Quickshell.Services.Pipewire import QtQuick @@ -17,15 +19,20 @@ Singleton { acc.sinks.push(node); else if (node.audio) acc.sources.push(node); + } else if (node.isStream && node.audio) { + // Application streams (output streams) + acc.streams.push(node); } return acc; }, { sources: [], - sinks: [] + sinks: [], + streams: [] }) readonly property list sinks: nodes.sinks readonly property list sources: nodes.sources + readonly property list streams: nodes.streams readonly property PwNode sink: Pipewire.defaultAudioSink readonly property PwNode source: Pipewire.defaultAudioSource @@ -39,31 +46,31 @@ Singleton { function setVolume(newVolume: real): void { if (sink?.ready && sink?.audio) { sink.audio.muted = false; - sink.audio.volume = Math.max(0, Math.min(100, newVolume)); + sink.audio.volume = Math.max(0, Math.min(Config.services.maxVolume, newVolume)); } } function incrementVolume(amount: real): void { - setVolume(volume + (amount || 5)); + setVolume(volume + (amount || Config.services.audioIncrement)); } function decrementVolume(amount: real): void { - setVolume(volume - (amount || 5)); + setVolume(volume - (amount || Config.services.audioIncrement)); } function setSourceVolume(newVolume: real): void { if (source?.ready && source?.audio) { source.audio.muted = false; - source.audio.volume = Math.max(0, Math.min(100, newVolume)); + source.audio.volume = Math.max(0, Math.min(Config.services.maxVolume, newVolume)); } } function incrementSourceVolume(amount: real): void { - setSourceVolume(sourceVolume + (amount || 5)); + setSourceVolume(sourceVolume + (amount || Config.services.audioIncrement)); } function decrementSourceVolume(amount: real): void { - setSourceVolume(sourceVolume - (amount || 5)); + setSourceVolume(sourceVolume - (amount || Config.services.audioIncrement)); } function setAudioSink(newSink: PwNode): void { @@ -74,12 +81,33 @@ Singleton { Pipewire.preferredDefaultAudioSource = newSource; } - function setAppAudioVolume(appStream: PwNode, newVolume: real): void { - if ( appStream?.ready && appStream?.audio ) { - appStream.audio.muted = false; - appStream.audio.volume = Math.max(0, Math.min(100, newVolume)); - } - } + function setStreamVolume(stream: PwNode, newVolume: real): void { + if (stream?.ready && stream?.audio) { + stream.audio.muted = false; + stream.audio.volume = Math.max(0, Math.min(Config.services.maxVolume, newVolume)); + } + } + + function setStreamMuted(stream: PwNode, muted: bool): void { + if (stream?.ready && stream?.audio) { + stream.audio.muted = muted; + } + } + + function getStreamVolume(stream: PwNode): real { + return stream?.audio?.volume ?? 0; + } + + function getStreamMuted(stream: PwNode): bool { + return !!stream?.audio?.muted; + } + + function getStreamName(stream: PwNode): string { + if (!stream) + return qsTr("Unknown"); + // Try application name first, then description, then name + return stream.applicationName || stream.description || stream.name || qsTr("Unknown Application"); + } onSinkChanged: { if (!sink?.ready) @@ -87,6 +115,9 @@ Singleton { const newSinkName = sink.description || sink.name || qsTr("Unknown Device"); + if (previousSinkName && previousSinkName !== newSinkName && Config.utilities.toasts.audioOutputChanged) + Toaster.toast(qsTr("Audio output changed"), qsTr("Now using: %1").arg(newSinkName), "volume_up"); + previousSinkName = newSinkName; } @@ -96,6 +127,9 @@ Singleton { const newSourceName = source.description || source.name || qsTr("Unknown Device"); + if (previousSourceName && previousSourceName !== newSourceName && Config.utilities.toasts.audioInputChanged) + Toaster.toast(qsTr("Audio input changed"), qsTr("Now using: %1").arg(newSourceName), "mic"); + previousSourceName = newSourceName; } @@ -105,112 +139,6 @@ Singleton { } PwObjectTracker { - objects: [...root.sinks, ...root.sources] + objects: [...root.sinks, ...root.sources, ...root.streams] } - - PwNodeLinkTracker { - id: sinkLinkTracker - node: root.sink - } - - PwObjectTracker { - objects: root.appStreams - } - - readonly property var appStreams: { - var defaultSink = root.sink; - var defaultSinkId = defaultSink.id; - var connectedStreamIds = {}; - var connectedStreams = []; - - if ( !sinkLinkTracker.linkGroups ) { - return []; - } - - var linkGroupsCount = 0; - if (sinkLinkTracker.linkGroups.length !== undefined) { - linkGroupsCount = sinkLinkTracker.linkGroups.length; - } else if (sinkLinkTracker.linkGroups.count !== undefined) { - linkGroupsCount = sinkLinkTracker.linkGroups.count; - } else { - return []; - } - - if ( linkGroupsCount === 0 ) { - return []; - } - - var intermediateNodeIds = {}; - var nodesToCheck = []; - - for (var i = 0; i < linkGroupsCount; i++) { - var linkGroup; - if (sinkLinkTracker.linkGroups.get) { - linkGroup = sinkLinkTracker.linkGroups.get(i); - } else { - linkGroup = sinkLinkTracker.linkGroups[i]; - } - - if (!linkGroup || !linkGroup.source) { - continue; - } - - var sourceNode = linkGroup.source; - - if (sourceNode.isStream && sourceNode.audio) { - if (!connectedStreamIds[sourceNode.id]) { - connectedStreamIds[sourceNode.id] = true; - connectedStreams.push(sourceNode); - } - } else { - intermediateNodeIds[sourceNode.id] = true; - nodesToCheck.push(sourceNode); - } - } - - if (nodesToCheck.length > 0 || connectedStreams.length === 0) { - try { - var allNodes = []; - if (Pipewire.nodes) { - if (Pipewire.nodes.count !== undefined) { - var nodeCount = Pipewire.nodes.count; - for (var n = 0; n < nodeCount; n++) { - var node; - if (Pipewire.nodes.get) { - node = Pipewire.nodes.get(n); - } else { - node = Pipewire.nodes[n]; - } - if (node) - allNodes.push(node); - } - } else if (Pipewire.nodes.values) { - allNodes = Pipewire.nodes.values; - } - } - - for (var j = 0; j < allNodes.length; j++) { - var node = allNodes[j]; - if (!node || !node.isStream || !node.audio) { - continue; - } - - var streamId = node.id; - if (connectedStreamIds[streamId]) { - continue; - } - - if (Object.keys(intermediateNodeIds).length > 0) { - connectedStreamIds[streamId] = true; - connectedStreams.push(node); - } else if (connectedStreams.length === 0) { - connectedStreamIds[streamId] = true; - connectedStreams.push(node); - } - } - } catch (e) - {} - } - return connectedStreams; - } } diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/Modules/AudioPopup.qml b/Modules/AudioPopup.qml index 4cb5d70..190ccb5 100644 --- a/Modules/AudioPopup.qml +++ b/Modules/AudioPopup.qml @@ -14,8 +14,11 @@ import qs.Helpers Item { id: root - implicitWidth: layout.implicitWidth + 10 * 2 - implicitHeight: layout.implicitHeight + 10 * 2 + implicitWidth: layout.implicitWidth + 5 * 2 + implicitHeight: layout.implicitHeight + 5 * 2 + + readonly property int topMargin: 0 + readonly property int rounding: 6 required property var wrapper @@ -128,117 +131,143 @@ Item { component VolumesTab: ColumnLayout { spacing: 12 - RowLayout { - Layout.topMargin: 10 - spacing: 15 - Rectangle { - Layout.preferredWidth: 40 - Layout.preferredHeight: 40 - Layout.alignment: Qt.AlignVCenter - color: DynamicColors.palette.m3primary - radius: 1000 - MaterialIcon { - anchors.centerIn: parent - color: DynamicColors.palette.m3onPrimary - text: "volume_up" - font.pointSize: 22 + CustomRect { + Layout.topMargin: root.topMargin + Layout.preferredHeight: 42 + Appearance.spacing.smaller * 2 + Layout.fillWidth: true + color: DynamicColors.tPalette.m3surfaceContainer + + radius: root.rounding + + RowLayout { + id: outputVolume + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: Appearance.spacing.smaller + spacing: 15 + CustomRect { + Layout.preferredWidth: 40 + Layout.preferredHeight: 40 + Layout.alignment: Qt.AlignVCenter + color: DynamicColors.palette.m3primary + radius: 1000 + MaterialIcon { + anchors.centerIn: parent + color: DynamicColors.palette.m3onPrimary + text: "speaker" + font.pointSize: 22 + } } - } - ColumnLayout { - Layout.fillWidth: true - RowLayout { + ColumnLayout { Layout.fillWidth: true - - CustomText { - text: "Output Volume" + RowLayout { Layout.fillWidth: true - Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft + + CustomText { + text: "Output Volume" + Layout.fillWidth: true + Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft + } + + CustomText { + text: qsTr("%1").arg(Audio.muted ? qsTr("Muted") : `${Math.round(Audio.volume * 100)}%`); + font.bold: true + Layout.alignment: Qt.AlignVCenter | Qt.AlignRight + } } - CustomText { - text: qsTr("%1").arg(Audio.muted ? qsTr("Muted") : `${Math.round(Audio.volume * 100)}%`); - font.bold: true - Layout.alignment: Qt.AlignVCenter | Qt.AlignRight - } - } + CustomMouseArea { + Layout.fillWidth: true + Layout.preferredHeight: 10 + Layout.bottomMargin: 5 - CustomMouseArea { - Layout.fillWidth: true - Layout.preferredHeight: 10 - Layout.bottomMargin: 5 + CustomSlider { + anchors.left: parent.left + anchors.right: parent.right + implicitHeight: 10 + value: Audio.volume + onMoved: Audio.setVolume(value) - CustomSlider { - anchors.left: parent.left - anchors.right: parent.right - implicitHeight: 10 - value: Audio.volume - onMoved: Audio.setVolume(value) - - Behavior on value { Anim {} } + Behavior on value { Anim {} } + } } } } } - RowLayout { - Layout.topMargin: 10 - spacing: 15 - Rectangle { - Layout.preferredWidth: 40 - Layout.preferredHeight: 40 - Layout.alignment: Qt.AlignVCenter - color: DynamicColors.palette.m3primary - radius: 1000 - MaterialIcon { - anchors.centerIn: parent - anchors.alignWhenCentered: false - color: DynamicColors.palette.m3onPrimary - text: "mic" - font.pointSize: 22 + CustomRect { + Layout.topMargin: root.topMargin + Layout.fillWidth: true + Layout.preferredHeight: 42 + Appearance.spacing.smaller * 2 + color: DynamicColors.tPalette.m3surfaceContainer + + radius: root.rounding + + RowLayout { + id: inputVolume + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: Appearance.spacing.smaller + spacing: 15 + Rectangle { + Layout.preferredWidth: 40 + Layout.preferredHeight: 40 + Layout.alignment: Qt.AlignVCenter + color: DynamicColors.palette.m3primary + radius: 1000 + MaterialIcon { + anchors.centerIn: parent + anchors.alignWhenCentered: false + color: DynamicColors.palette.m3onPrimary + text: "mic" + font.pointSize: 22 + } } - } - ColumnLayout { - Layout.fillWidth: true - RowLayout { + ColumnLayout { Layout.fillWidth: true - Layout.fillHeight: true - - CustomText { - text: "Input Volume" + RowLayout { Layout.fillWidth: true - Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft + Layout.fillHeight: true + + CustomText { + text: "Input Volume" + Layout.fillWidth: true + Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft + } + + CustomText { + text: qsTr("%1").arg(Audio.sourceMuted ? qsTr("Muted") : `${Math.round(Audio.sourceVolume * 100)}%`); + font.bold: true + Layout.alignment: Qt.AlignVCenter | Qt.AlignRight + } } - CustomText { - text: qsTr("%1").arg(Audio.sourceMuted ? qsTr("Muted") : `${Math.round(Audio.sourceVolume * 100)}%`); - font.bold: true - Layout.alignment: Qt.AlignVCenter | Qt.AlignRight - } - } - - CustomMouseArea { - Layout.fillWidth: true - Layout.bottomMargin: 5 - implicitHeight: 10 - - CustomSlider { - anchors.left: parent.left - anchors.right: parent.right + CustomMouseArea { + Layout.fillWidth: true + Layout.bottomMargin: 5 implicitHeight: 10 - value: Audio.sourceVolume - onMoved: Audio.setSourceVolume(value) - Behavior on value { Anim {} } + CustomSlider { + anchors.left: parent.left + anchors.right: parent.right + implicitHeight: 10 + value: Audio.sourceVolume + onMoved: Audio.setSourceVolume(value) + + Behavior on value { Anim {} } + } } } } } Rectangle { - Layout.topMargin: 10 + Layout.topMargin: root.topMargin Layout.fillWidth: true Layout.preferredHeight: 1 @@ -246,147 +275,47 @@ Item { } Repeater { - model: Audio.appStreams + model: Audio.streams.filter(s => s.isSink) - Item { + CustomRect { id: appBox - Layout.topMargin: 10 + Layout.topMargin: root.topMargin Layout.fillWidth: true - Layout.preferredHeight: 42 - visible: !isCaptureStream - required property PwNode modelData + Layout.preferredHeight: 42 + Appearance.spacing.smaller * 2 + color: DynamicColors.tPalette.m3surfaceContainer - function isValidMatch(searchTerm, entry) { - if (!entry) - return false; - var search = searchTerm.toLowerCase(); - var id = (entry.id || "").toLowerCase(); - var name = (entry.name || "").toLowerCase(); - var icon = (entry.icon || "").toLowerCase(); - // Match is valid if search term appears in entry or entry appears in search - return id.includes(search) || name.includes(search) || icon.includes(search) || search.includes(id.split('.').pop()) || search.includes(name.replace(/\s+/g, '')); - } + radius: root.rounding - readonly property string appName: { - if (!modelData) - return "Unknown App"; - var props = modelData.properties; - var desc = modelData.description || ""; - var name = modelData.name || ""; - var mediaName = props["media.name"] || ""; - - if ( mediaName !== "playStream" ) { - return mediaName; - } - - if (!props) { - if (desc) - return desc; - if (name) { - var nameParts = name.split(/[-_]/); - if (nameParts.length > 0 && nameParts[0]) - return nameParts[0].charAt(0).toUpperCase() + nameParts[0].slice(1); - return name; - } - return "Unknown App"; - } - - var binaryName = props["application.process.binary"] || ""; - - // Try binary name first (fixes Electron apps like vesktop) - if (binaryName) { - var binParts = binaryName.split("/"); - if (binParts.length > 0) { - var binName = binParts[binParts.length - 1].toLowerCase(); - var entry = ThemeIcons.findAppEntry(binName); - // Only use entry if it's actually related to binary name - if (entry && entry.name && isValidMatch(binName, entry)) - return entry.name; - } - } - - var computedAppName = props["application.name"] || ""; - var mediaName = props["media.name"] || ""; - var appId = props["application.id"] || ""; - - if (appId) { - var entry = ThemeIcons.findAppEntry(appId); - if (entry && entry.name && isValidMatch(appId, entry)) - return entry.name; - if (!computedAppName) { - var parts = appId.split("."); - if (parts.length > 0 && parts[0]) - computedAppName = parts[0].charAt(0).toUpperCase() + parts[0].slice(1); - } - } - - if (!computedAppName && binaryName) { - var binParts = binaryName.split("/"); - if (binParts.length > 0 && binParts[binParts.length - 1]) - computedAppName = binParts[binParts.length - 1].charAt(0).toUpperCase() + binParts[binParts.length - 1].slice(1); - } - - var result = computedAppName || mediaTitle || mediaName || binaryName || desc || name; - - if (!result || result === "" || result === "Unknown App") { - if (name) { - var nameParts = name.split(/[-_]/); - if (nameParts.length > 0 && nameParts[0]) - result = nameParts[0].charAt(0).toUpperCase() + nameParts[0].slice(1); - } - } - - return result || "Unknown App"; - } - - PwObjectTracker { - objects: appBox.modelData ? [appBox.modelData] : [] - } - - PwNodePeakMonitor { - id: peak - node: appBox.modelData - } - - readonly property bool isCaptureStream: { - if (!modelData || !modelData.properties) - return false; - const props = modelData.properties; - // Exclude capture streams - check for stream.capture.sink property - if (props["stream.capture.sink"] !== undefined) { - return true; - } - const mediaClass = props["media.class"] || ""; - // Exclude Stream/Input (capture) but allow Stream/Output (playback) - if (mediaClass.includes("Capture") || mediaClass === "Stream/Input" || mediaClass === "Stream/Input/Audio") { - return true; - } - const mediaRole = props["media.role"] || ""; - if (mediaRole === "Capture") { - return true; - } - return false; - } + required property var modelData + required property int index RowLayout { id: layoutVolume anchors.fill: parent + anchors.margins: Appearance.spacing.smaller spacing: 15 - IconImage { - id: icon - property string iconPath1: Quickshell.iconPath(DesktopEntries.byId(appBox.modelData.name).icon); - property string iconPath2: Quickshell.iconPath(DesktopEntries.byId(appBox.appName).icon); - source: iconPath1 !== "" ? iconPath1 : iconPath2 - Layout.alignment: Qt.AlignVCenter - implicitSize: 42 - StateLayer { - radius: 1000 - onClicked: { - appBox.modelData.audio.muted = !appBox.modelData.audio.muted; + CustomRect { + Layout.preferredWidth: 40 + Layout.preferredHeight: 40 + Layout.alignment: Qt.AlignVCenter + color: DynamicColors.palette.m3primary + radius: 1000 + MaterialIcon { + id: icon + anchors.centerIn: parent + text: "volume_up" + font.pointSize: 22 + color: DynamicColors.palette.m3onPrimary + + StateLayer { + radius: 1000 + onClicked: { + appBox.modelData.audio.muted = !appBox.modelData.audio.muted; + } } } } @@ -397,7 +326,7 @@ Item { TextMetrics { id: metrics - text: appBox.appName + text: Audio.getStreamName(appBox.modelData) elide: Text.ElideRight elideWidth: root.width - 50 } @@ -425,7 +354,6 @@ Item { Layout.fillWidth: true Layout.fillHeight: true Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft - Layout.bottomMargin: 5 implicitHeight: 10 CustomSlider { anchors.left: parent.left @@ -433,8 +361,7 @@ Item { implicitHeight: 10 value: appBox.modelData.audio.volume onMoved: { - Audio.setAppAudioVolume(appBox.modelData, value) - console.log(icon.iconPath1, icon.iconPath2) + Audio.setStreamVolume(appBox.modelData, value) } } } diff --git a/Modules/AudioWidget.qml b/Modules/AudioWidget.qml index b81384c..114d56e 100644 --- a/Modules/AudioWidget.qml +++ b/Modules/AudioWidget.qml @@ -2,6 +2,7 @@ import QtQuick import QtQuick.Layouts import Quickshell.Io import Quickshell.Services.Pipewire +import qs.Daemons import qs.Modules import qs.Config import qs.Components @@ -23,14 +24,6 @@ Item { } } - PwObjectTracker { - objects: [ Pipewire.defaultAudioSink ] - } - - PwObjectTracker { - objects: [ Pipewire.defaultAudioSource ] - } - Rectangle { anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left @@ -63,8 +56,8 @@ Item { MaterialIcon { Layout.alignment: Qt.AlignVCenter font.pixelSize: 18 - text: "volume_up" - color: Pipewire.defaultAudioSink?.audio.muted ? DynamicColors.palette.m3error : root.textColor + text: Audio.muted ? "volume_off" : "volume_up" + color: Audio.muted ? DynamicColors.palette.m3error : root.textColor } Rectangle { @@ -82,9 +75,9 @@ Item { bottom: parent.bottom } - implicitWidth: parent.width * ( Pipewire.defaultAudioSink?.audio.volume ?? 0 ) + implicitWidth: parent.width * ( Audio.volume ?? 0 ) radius: parent.radius - color: Pipewire.defaultAudioSink?.audio.muted ? DynamicColors.palette.m3error : root.barColor + color: Audio.muted ? DynamicColors.palette.m3error : root.barColor Behavior on color { CAnim {} } @@ -94,8 +87,8 @@ Item { MaterialIcon { Layout.alignment: Qt.AlignVCenter font.pixelSize: 18 - text: Pipewire.defaultAudioSource?.audio.muted ? "mic_off" : "mic" - color: ( Pipewire.defaultAudioSource?.audio.muted ?? false ) ? DynamicColors.palette.m3error : root.textColor + text: Audio.sourceMuted ? "mic_off" : "mic" + color: ( Audio.sourceMuted ?? false ) ? DynamicColors.palette.m3error : root.textColor } Rectangle { @@ -113,9 +106,9 @@ Item { bottom: parent.bottom } - implicitWidth: parent.width * ( Pipewire.defaultAudioSource?.audio.volume ?? 0 ) + implicitWidth: parent.width * ( Audio.sourceVolume ?? 0 ) radius: parent.radius - color: ( Pipewire.defaultAudioSource?.audio.muted ?? false ) ? DynamicColors.palette.m3error : root.barColor + color: ( Audio.sourceMuted ?? false ) ? DynamicColors.palette.m3error : root.barColor Behavior on color { CAnim {} diff --git a/Modules/Dashboard/Dash/Audio.qml b/Modules/Dashboard/Dash/Audio.qml deleted file mode 100644 index 31f07b5..0000000 --- a/Modules/Dashboard/Dash/Audio.qml +++ /dev/null @@ -1,144 +0,0 @@ -pragma Singleton - -import qs.Config -import ZShell.Services -import ZShell -import Quickshell -import Quickshell.Services.Pipewire -import QtQuick - -Singleton { - id: root - - property string previousSinkName: "" - property string previousSourceName: "" - - readonly property var nodes: Pipewire.nodes.values.reduce((acc, node) => { - if (!node.isStream) { - if (node.isSink) - acc.sinks.push(node); - else if (node.audio) - acc.sources.push(node); - } else if (node.isStream && node.audio) { - // Application streams (output streams) - acc.streams.push(node); - } - return acc; - }, { - sources: [], - sinks: [], - streams: [] - }) - - readonly property list sinks: nodes.sinks - readonly property list sources: nodes.sources - readonly property list streams: nodes.streams - - readonly property PwNode sink: Pipewire.defaultAudioSink - readonly property PwNode source: Pipewire.defaultAudioSource - - readonly property bool muted: !!sink?.audio?.muted - readonly property real volume: sink?.audio?.volume ?? 0 - - readonly property bool sourceMuted: !!source?.audio?.muted - readonly property real sourceVolume: source?.audio?.volume ?? 0 - - readonly property alias beatTracker: beatTracker - - function setVolume(newVolume: real): void { - if (sink?.ready && sink?.audio) { - sink.audio.muted = false; - sink.audio.volume = Math.max(0, Math.min(Config.services.maxVolume, newVolume)); - } - } - - function incrementVolume(amount: real): void { - setVolume(volume + (amount || Config.services.audioIncrement)); - } - - function decrementVolume(amount: real): void { - setVolume(volume - (amount || Config.services.audioIncrement)); - } - - function setSourceVolume(newVolume: real): void { - if (source?.ready && source?.audio) { - source.audio.muted = false; - source.audio.volume = Math.max(0, Math.min(Config.services.maxVolume, newVolume)); - } - } - - function incrementSourceVolume(amount: real): void { - setSourceVolume(sourceVolume + (amount || Config.services.audioIncrement)); - } - - function decrementSourceVolume(amount: real): void { - setSourceVolume(sourceVolume - (amount || Config.services.audioIncrement)); - } - - function setAudioSink(newSink: PwNode): void { - Pipewire.preferredDefaultAudioSink = newSink; - } - - function setAudioSource(newSource: PwNode): void { - Pipewire.preferredDefaultAudioSource = newSource; - } - - function setStreamVolume(stream: PwNode, newVolume: real): void { - if (stream?.ready && stream?.audio) { - stream.audio.muted = false; - stream.audio.volume = Math.max(0, Math.min(Config.services.maxVolume, newVolume)); - } - } - - function setStreamMuted(stream: PwNode, muted: bool): void { - if (stream?.ready && stream?.audio) { - stream.audio.muted = muted; - } - } - - function getStreamVolume(stream: PwNode): real { - return stream?.audio?.volume ?? 0; - } - - function getStreamMuted(stream: PwNode): bool { - return !!stream?.audio?.muted; - } - - function getStreamName(stream: PwNode): string { - if (!stream) - return qsTr("Unknown"); - // Try application name first, then description, then name - return stream.applicationName || stream.description || stream.name || qsTr("Unknown Application"); - } - - onSinkChanged: { - if (!sink?.ready) - return; - - const newSinkName = sink.description || sink.name || qsTr("Unknown Device"); - - previousSinkName = newSinkName; - } - - onSourceChanged: { - if (!source?.ready) - return; - - const newSourceName = source.description || source.name || qsTr("Unknown Device"); - - previousSourceName = newSourceName; - } - - Component.onCompleted: { - previousSinkName = sink?.description || sink?.name || qsTr("Unknown Device"); - previousSourceName = source?.description || source?.name || qsTr("Unknown Device"); - } - - PwObjectTracker { - objects: [...root.sinks, ...root.sources, ...root.streams] - } - - BeatTracker { - id: beatTracker - } -} diff --git a/Modules/Dashboard/Dash/Media.qml b/Modules/Dashboard/Dash/Media.qml index fb4faab..3928d71 100644 --- a/Modules/Dashboard/Dash/Media.qml +++ b/Modules/Dashboard/Dash/Media.qml @@ -1,6 +1,7 @@ import ZShell.Services import QtQuick import QtQuick.Shapes +import qs.Daemons import qs.Components import qs.Config import qs.Helpers diff --git a/Modules/Osd/Content.qml b/Modules/Osd/Content.qml index 7fc4e21..3991d55 100644 --- a/Modules/Osd/Content.qml +++ b/Modules/Osd/Content.qml @@ -5,7 +5,7 @@ import QtQuick.Layouts import qs.Components import qs.Helpers import qs.Config -import qs.Modules.Dashboard.Dash +import qs.Daemons import qs.Modules as Modules Item { diff --git a/Modules/Osd/Wrapper.qml b/Modules/Osd/Wrapper.qml index 53f361c..6943809 100644 --- a/Modules/Osd/Wrapper.qml +++ b/Modules/Osd/Wrapper.qml @@ -6,7 +6,7 @@ import qs.Components import qs.Helpers import qs.Config import qs.Modules as Modules -import qs.Modules.Dashboard.Dash +import qs.Daemons Item { id: root diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index 0f877bf..0000000 --- a/PKGBUILD +++ /dev/null @@ -1,29 +0,0 @@ -pkgname='zshell' -pkgver=0.1.0 -pkgrel=1 -pkgdesc='The cli for zshell' -arch=('any') -url='https://github.com/Zacharias-Brohn/z-bar-qt' -license=('GPL-3.0-only') -depends=('python' 'python-pillow' 'python-materialyoucolor' 'libnotify' 'swappy' 'dart-sass' - 'app2unit' 'wl-clipboard' 'dconf' 'cliphist' 'python-typer') -makedepends=('python-build' 'python-installer' 'python-hatch' 'python-hatch-vcs') -source=("$pkgname::git+$url.git#branch=cli-tool") -sha256sums=('SKIP') - -build() { - cd "${srcdir}/${pkgname}/cli" - python -m build --wheel --no-isolation - - cd .. - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/ - cmake --build build -} - -package() { - cd "${srcdir}/${pkgname}/cli" - python -m installer --destdir="$pkgdir" dist/*.whl - - cd .. - DESTDIR="$pkgdir" cmake --install build -} diff --git a/README.md b/README.md index 0825cfe..6766142 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@
+ # ZShell -A feature-rich desktop shell for Hyprland built with [Quickshell](https://quickshell.outfoxxed.me/) and Qt6/QML. Provides a modern, Material Design 3 inspired status bar, application launcher, notification center, wallpaper manager with dynamic color theming, and lock screen. +A feature-rich desktop shell for [Hyprland](https://hypr.land/) built with [Quickshell](https://quickshell.outfoxxed.me/) and Qt6/QML. Provides a modern, Material Design 3 inspired status bar, application launcher, notification center, wallpaper manager with dynamic color theming, and lock screen. ## Features @@ -22,9 +23,16 @@ A feature-rich desktop shell for Hyprland built with [Quickshell](https://quicks - [Hyprland](https://hyprland.org/) - Python 3 with `materialyoucolor` and `Pillow` (for dynamic color generation) - PipeWire (for audio) +- Aubio +- DDCUtil +- Mpris ## Installation +### Arch Linux + +For arch-based distros, there is a pkgbuild available at + ```bash cmake -B build -G Ninja ninja -C build @@ -95,38 +103,38 @@ Now you can add z-bar-qt as a nixpkgs in environment.systemPackages (or optional } ``` -You can now run ```zshell``` to run the bar. +You can now run `zshell` to run the bar. ## Configuration Configuration is stored in `~/.config/z-bar/config.json`. Options include: -| Option | Description | -| --------------------------------- | ----------------------------------------------------------- | -| `appCount` | Max apps shown in launcher | -| `wallpaperPath` | Directory containing wallpapers | -| `baseBgColor` / `baseBorderColor` | Fallback colors when dynamic colors disabled | -| `accentColor` | Custom accent color override | -| `useDynamicColors` | Enable Material Design 3 theming from wallpaper | -| `barConfig` | Enable/disable widgets and configure popouts | -| `transparency` | UI transparency levels | -| `baseFont` | System font | -| `animScale` | Animation speed multiplier | -| `gpuType` | GPU type for resource monitoring (`amd`, `nvidia`, `intel`) | +| Option | Description | +| :-------------------------------: | :---------------------------------------------------------: | +| `appCount` | Max apps shown in launcher | +| `wallpaperPath` | Directory containing wallpapers | +| `baseBgColor` / `baseBorderColor` | Fallback colors when dynamic colors disabled | +| `accentColor` | Custom accent color override | +| `useDynamicColors` | Enable Material Design 3 theming from wallpaper | +| `barConfig` | Enable/disable widgets and configure popouts | +| `transparency` | UI transparency levels | +| `baseFont` | System font | +| `animScale` | Animation speed multiplier | +| `gpuType` | GPU type for resource monitoring (`amd`, `nvidia`, `intel`) | ## Launcher Search Prefixes -| Prefix | Filter | -| ------ | ------------------- | -| `>i` | App ID | -| `>c` | Categories | -| `>d` | Description/comment | -| `>e` | Exec command | -| `>w` | WM class | -| `>g` | Generic name | -| `>k` | Keywords | -| `>t` | Terminal apps only | -| `> ` | Wallpaper picker | +| Prefix | Filter | +| ------------- | ------------------- | +| `>i` | App ID | +| `>c` | Categories | +| `>d` | Description/comment | +| `>e` | Exec command | +| `>w` | WM class | +| `>g` | Generic name | +| `>k` | Keywords | +| `>t` | Terminal apps only | +| `>wallpaper ` | Wallpaper picker | ## Project Structure @@ -143,6 +151,15 @@ Configuration is stored in `~/.config/z-bar/config.json`. Options include: └── scripts/ # Helper scripts (color generation, fuzzy search) ``` +## Inspiration and Acknowledgements + +This project was inspired by the following repositories and resources, which helped me learn both Quickshell and QML: + +- [Caelestia](https://github.com/caelestia-dots/shell) +- [end-4 dots-hyprland](https://github.com/end-4/dots-hyprland) + +Thank you to the maintainers and contributors of these projects for sharing their work. + ## License See repository for license information. diff --git a/cli/dist/zshell-0.1.0-py3-none-any.whl b/cli/dist/zshell-0.1.0-py3-none-any.whl deleted file mode 100644 index e410d02..0000000 Binary files a/cli/dist/zshell-0.1.0-py3-none-any.whl and /dev/null differ diff --git a/cli/uv.lock b/cli/uv.lock deleted file mode 100644 index 13c8d15..0000000 --- a/cli/uv.lock +++ /dev/null @@ -1,203 +0,0 @@ -version = 1 -revision = 3 -requires-python = ">=3.13" - -[[package]] -name = "annotated-doc" -version = "0.0.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/57/ba/046ceea27344560984e26a590f90bc7f4a75b06701f653222458922b558c/annotated_doc-0.0.4.tar.gz", hash = "sha256:fbcda96e87e9c92ad167c2e53839e57503ecfda18804ea28102353485033faa4", size = 7288, upload-time = "2025-11-10T22:07:42.062Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/1e/d3/26bf1008eb3d2daa8ef4cacc7f3bfdc11818d111f7e2d0201bc6e3b49d45/annotated_doc-0.0.4-py3-none-any.whl", hash = "sha256:571ac1dc6991c450b25a9c2d84a3705e2ae7a53467b5d111c24fa8baabbed320", size = 5303, upload-time = "2025-11-10T22:07:40.673Z" }, -] - -[[package]] -name = "click" -version = "8.3.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a", size = 295065, upload-time = "2025-11-15T20:45:42.706Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6", size = 108274, upload-time = "2025-11-15T20:45:41.139Z" }, -] - -[[package]] -name = "colorama" -version = "0.4.6" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, -] - -[[package]] -name = "markdown-it-py" -version = "4.0.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "mdurl" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz", hash = "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3", size = 73070, upload-time = "2025-08-11T12:57:52.854Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/94/54/e7d793b573f298e1c9013b8c4dade17d481164aa517d1d7148619c2cedbf/markdown_it_py-4.0.0-py3-none-any.whl", hash = "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147", size = 87321, upload-time = "2025-08-11T12:57:51.923Z" }, -] - -[[package]] -name = "materialyoucolor" -version = "3.0.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/08/c3/1ec0dc16dca1ab78f6e71b817b21ea022be8d80a059b878e17e894f68421/materialyoucolor-3.0.1.tar.gz", hash = "sha256:6f5cfdeb48197febc74fb6342bb118655e935b4ec724ddbb972450f80a8bc8d0", size = 262311, upload-time = "2026-02-17T09:03:48.555Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/94/ad/d259aa6f85812efb4030c9176f9988ef67843c78cb001d5a54079976efa4/materialyoucolor-3.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a173294df9039f665b091ef2d5cc0a9802818fe43dea3f13728f7eb30ce6417a", size = 197186, upload-time = "2026-02-17T09:22:08.62Z" }, - { url = "https://files.pythonhosted.org/packages/69/95/ff182488b701b2407b1117735e01a6b56160799227b70ec87b74c0156875/materialyoucolor-3.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cd8b8f7bdad0fba821f2f4ba40eba02489e1a89261ffffbfb6f85005eae77ece", size = 189849, upload-time = "2026-02-17T09:22:09.854Z" }, - { url = "https://files.pythonhosted.org/packages/c5/8c/c09aba566cd1361cbfca508f7a35103c5c40276c04c605f4adfb1c9df931/materialyoucolor-3.0.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:205588aa039d4084470881c8924fec964a2349da149d5b71470457db5ea799b1", size = 220114, upload-time = "2026-02-17T09:22:11.501Z" }, - { url = "https://files.pythonhosted.org/packages/d9/e7/82d25911de2be45af06d059eb801e764867559043aa239141893662c41ec/materialyoucolor-3.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b5c23de1978ee1dfb5dd24f6fc91380042b8e4a3dee38f2e0df2ab755ce4ae2a", size = 1252058, upload-time = "2026-02-17T09:22:13.341Z" }, - { url = "https://files.pythonhosted.org/packages/d9/49/e2f65e7f44749b0267192e085007492d29b19636b1bc46d829994819eba9/materialyoucolor-3.0.1-cp313-cp313-win32.whl", hash = "sha256:0f5a154f4af381b5e1a23baf0474b9f5a2ffed9ad8561216c74099184f671fb0", size = 152862, upload-time = "2026-02-17T09:22:15.118Z" }, - { url = "https://files.pythonhosted.org/packages/07/05/6ec727595bc86660090936f35a75f34cda1f5260290ea9cf187b10ee68b4/materialyoucolor-3.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:ff1a7e29bb1fb804ba29d1dd8a66ba83d9f3a95a6496b4c8813c62f8d8e504a3", size = 165892, upload-time = "2026-02-17T09:22:16.263Z" }, - { url = "https://files.pythonhosted.org/packages/a2/8c/ad16af7945a0f2999d97857a6d4dd327f410ed45d940ea62083c1c57ad9f/materialyoucolor-3.0.1-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:c7a059fac8d1a1d82056e405f5c2270247f1002bcc08d5dbef246be3ec2cf27f", size = 361611, upload-time = "2026-02-17T09:13:39.911Z" }, - { url = "https://files.pythonhosted.org/packages/94/36/09b90b0151f720e9945d23ba8b55c1f9461842ee01739e88b147798db41e/materialyoucolor-3.0.1-cp314-cp314-android_24_x86_64.whl", hash = "sha256:a80d8777fcba08d391388572b22c5a8931a0d953cbc577f6e0faa2ff95731039", size = 345165, upload-time = "2026-02-17T09:14:28.774Z" }, - { url = "https://files.pythonhosted.org/packages/39/60/0f09cdef387c69cc4504e357dcc8284922a9e1974b806888d5a28bc1f7a3/materialyoucolor-3.0.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:b1ba2fa44d4c9060bd59cc5156ad90dd857e4ea605a523871a917b9abbf47dd0", size = 197487, upload-time = "2026-02-17T09:22:17.437Z" }, - { url = "https://files.pythonhosted.org/packages/fe/ff/c6385c7ec55840dc50afcd9893275d7ce365a245545996af42e31699ab7f/materialyoucolor-3.0.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:f90fab40c645c8111bdcb80f5011f78228a4022ebef0ea58d4ef81be2fdf25bf", size = 190227, upload-time = "2026-02-17T09:22:18.584Z" }, - { url = "https://files.pythonhosted.org/packages/fc/ca/a3e00adca4d370968f2b80776eb042eb637dd862ee3e180f4cdf128b8929/materialyoucolor-3.0.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10e090568a76b774416ebef648e330e0f04ea96c8fc5dda15a9969165a8e7477", size = 220159, upload-time = "2026-02-17T09:22:19.668Z" }, - { url = "https://files.pythonhosted.org/packages/98/45/8041281513d6b3f28288670db598718e94bf2e48e853f85fa038d48f1057/materialyoucolor-3.0.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9a16acb49b16022b56212eb3e20bc7b13903ee07e80d7ecfbc7ee326afd5bae2", size = 1252069, upload-time = "2026-02-17T09:22:21.294Z" }, - { url = "https://files.pythonhosted.org/packages/34/2f/0a3fbd4d3a4d0629e043c64f17e0eaf9e269d955a89d5351e030d850e88c/materialyoucolor-3.0.1-cp314-cp314-win32.whl", hash = "sha256:f4fb78ab4f8da11616188c75bdf8c802cfc3382217b6c652f2364c19df07f2a8", size = 155654, upload-time = "2026-02-17T09:22:23.229Z" }, - { url = "https://files.pythonhosted.org/packages/e2/0e/a9ab61f89107c365cdf382c0d6c096e9c036b9d38cebd33b500978d30b23/materialyoucolor-3.0.1-cp314-cp314-win_amd64.whl", hash = "sha256:8807aac5260e00ae566534bf621939532d4bb562654240edc086adfe2774048a", size = 168827, upload-time = "2026-02-17T09:22:24.924Z" }, - { url = "https://files.pythonhosted.org/packages/8c/dc/3665bed2c5d407a906fa1f4027e136a6d7029f93a0dc15c61ce76343da61/materialyoucolor-3.0.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:0f73c7a625b3685442afe568729a1446560151394a4f6a6ccd3231b6c9072972", size = 199423, upload-time = "2026-02-17T09:22:26.134Z" }, - { url = "https://files.pythonhosted.org/packages/3f/3a/3a0100189eae5620e6668807445df7d96d6614c769752ff9efe61ce378ee/materialyoucolor-3.0.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c909ea4c0207bbf2737d3c860d050fcd31b0708f01637d6e2acc19380cf13ec0", size = 192082, upload-time = "2026-02-17T09:22:27.247Z" }, - { url = "https://files.pythonhosted.org/packages/9a/e6/0bb3e62155aeefffcc3b242fd61b63ca6f563687662943838333ac91434e/materialyoucolor-3.0.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:55dc5c703f2b51ab861455a26af938250fa9f9e04ca1cfb13616e0f10beae3ca", size = 220173, upload-time = "2026-02-17T09:22:28.421Z" }, - { url = "https://files.pythonhosted.org/packages/dc/ac/1d48cbf88b72cc3a646c9a82177173646d4523bf67cf643bf47fb30158cd/materialyoucolor-3.0.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6d392d0151ebe026e340dae5241cbfea104345d723a0dadb77b60747c57fc630", size = 1251365, upload-time = "2026-02-17T09:22:29.695Z" }, - { url = "https://files.pythonhosted.org/packages/e7/21/de897e0f93c19dca8beb9601c8f4c6f4e61e70e3b3602bd678cdb819e578/materialyoucolor-3.0.1-cp314-cp314t-win32.whl", hash = "sha256:2869c98d3c414dd52f81008fa6567f0325feced0b24454afb46a73329c8cdcd1", size = 157941, upload-time = "2026-02-17T09:22:31.529Z" }, - { url = "https://files.pythonhosted.org/packages/0d/99/309d992e28770f9bc713dd9aaa2983682388b66168699f27ae029ca7964b/materialyoucolor-3.0.1-cp314-cp314t-win_amd64.whl", hash = "sha256:ceda6878c0d129db360e1ce8cfb4e4cf85cd17d2172af0114f7b1261bf244bc5", size = 172349, upload-time = "2026-02-17T09:22:33.165Z" }, -] - -[[package]] -name = "mdurl" -version = "0.1.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729, upload-time = "2022-08-14T12:40:10.846Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" }, -] - -[[package]] -name = "pillow" -version = "12.1.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1f/42/5c74462b4fd957fcd7b13b04fb3205ff8349236ea74c7c375766d6c82288/pillow-12.1.1.tar.gz", hash = "sha256:9ad8fa5937ab05218e2b6a4cff30295ad35afd2f83ac592e68c0d871bb0fdbc4", size = 46980264, upload-time = "2026-02-11T04:23:07.146Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d5/11/6db24d4bd7685583caeae54b7009584e38da3c3d4488ed4cd25b439de486/pillow-12.1.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:d242e8ac078781f1de88bf823d70c1a9b3c7950a44cdf4b7c012e22ccbcd8e4e", size = 4062689, upload-time = "2026-02-11T04:21:06.804Z" }, - { url = "https://files.pythonhosted.org/packages/33/c0/ce6d3b1fe190f0021203e0d9b5b99e57843e345f15f9ef22fcd43842fd21/pillow-12.1.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:02f84dfad02693676692746df05b89cf25597560db2857363a208e393429f5e9", size = 4138535, upload-time = "2026-02-11T04:21:08.452Z" }, - { url = "https://files.pythonhosted.org/packages/a0/c6/d5eb6a4fb32a3f9c21a8c7613ec706534ea1cf9f4b3663e99f0d83f6fca8/pillow-12.1.1-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:e65498daf4b583091ccbb2556c7000abf0f3349fcd57ef7adc9a84a394ed29f6", size = 3601364, upload-time = "2026-02-11T04:21:10.194Z" }, - { url = "https://files.pythonhosted.org/packages/14/a1/16c4b823838ba4c9c52c0e6bbda903a3fe5a1bdbf1b8eb4fff7156f3e318/pillow-12.1.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6c6db3b84c87d48d0088943bf33440e0c42370b99b1c2a7989216f7b42eede60", size = 5262561, upload-time = "2026-02-11T04:21:11.742Z" }, - { url = "https://files.pythonhosted.org/packages/bb/ad/ad9dc98ff24f485008aa5cdedaf1a219876f6f6c42a4626c08bc4e80b120/pillow-12.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8b7e5304e34942bf62e15184219a7b5ad4ff7f3bb5cca4d984f37df1a0e1aee2", size = 4657460, upload-time = "2026-02-11T04:21:13.786Z" }, - { url = "https://files.pythonhosted.org/packages/9e/1b/f1a4ea9a895b5732152789326202a82464d5254759fbacae4deea3069334/pillow-12.1.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:18e5bddd742a44b7e6b1e773ab5db102bd7a94c32555ba656e76d319d19c3850", size = 6232698, upload-time = "2026-02-11T04:21:15.949Z" }, - { url = "https://files.pythonhosted.org/packages/95/f4/86f51b8745070daf21fd2e5b1fe0eb35d4db9ca26e6d58366562fb56a743/pillow-12.1.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc44ef1f3de4f45b50ccf9136999d71abb99dca7706bc75d222ed350b9fd2289", size = 8041706, upload-time = "2026-02-11T04:21:17.723Z" }, - { url = "https://files.pythonhosted.org/packages/29/9b/d6ecd956bb1266dd1045e995cce9b8d77759e740953a1c9aad9502a0461e/pillow-12.1.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5a8eb7ed8d4198bccbd07058416eeec51686b498e784eda166395a23eb99138e", size = 6346621, upload-time = "2026-02-11T04:21:19.547Z" }, - { url = "https://files.pythonhosted.org/packages/71/24/538bff45bde96535d7d998c6fed1a751c75ac7c53c37c90dc2601b243893/pillow-12.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:47b94983da0c642de92ced1702c5b6c292a84bd3a8e1d1702ff923f183594717", size = 7038069, upload-time = "2026-02-11T04:21:21.378Z" }, - { url = "https://files.pythonhosted.org/packages/94/0e/58cb1a6bc48f746bc4cb3adb8cabff73e2742c92b3bf7a220b7cf69b9177/pillow-12.1.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:518a48c2aab7ce596d3bf79d0e275661b846e86e4d0e7dec34712c30fe07f02a", size = 6460040, upload-time = "2026-02-11T04:21:23.148Z" }, - { url = "https://files.pythonhosted.org/packages/6c/57/9045cb3ff11eeb6c1adce3b2d60d7d299d7b273a2e6c8381a524abfdc474/pillow-12.1.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a550ae29b95c6dc13cf69e2c9dc5747f814c54eeb2e32d683e5e93af56caa029", size = 7164523, upload-time = "2026-02-11T04:21:25.01Z" }, - { url = "https://files.pythonhosted.org/packages/73/f2/9be9cb99f2175f0d4dbadd6616ce1bf068ee54a28277ea1bf1fbf729c250/pillow-12.1.1-cp313-cp313-win32.whl", hash = "sha256:a003d7422449f6d1e3a34e3dd4110c22148336918ddbfc6a32581cd54b2e0b2b", size = 6332552, upload-time = "2026-02-11T04:21:27.238Z" }, - { url = "https://files.pythonhosted.org/packages/3f/eb/b0834ad8b583d7d9d42b80becff092082a1c3c156bb582590fcc973f1c7c/pillow-12.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:344cf1e3dab3be4b1fa08e449323d98a2a3f819ad20f4b22e77a0ede31f0faa1", size = 7040108, upload-time = "2026-02-11T04:21:29.462Z" }, - { url = "https://files.pythonhosted.org/packages/d5/7d/fc09634e2aabdd0feabaff4a32f4a7d97789223e7c2042fd805ea4b4d2c2/pillow-12.1.1-cp313-cp313-win_arm64.whl", hash = "sha256:5c0dd1636633e7e6a0afe7bf6a51a14992b7f8e60de5789018ebbdfae55b040a", size = 2453712, upload-time = "2026-02-11T04:21:31.072Z" }, - { url = "https://files.pythonhosted.org/packages/19/2a/b9d62794fc8a0dd14c1943df68347badbd5511103e0d04c035ffe5cf2255/pillow-12.1.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0330d233c1a0ead844fc097a7d16c0abff4c12e856c0b325f231820fee1f39da", size = 5264880, upload-time = "2026-02-11T04:21:32.865Z" }, - { url = "https://files.pythonhosted.org/packages/26/9d/e03d857d1347fa5ed9247e123fcd2a97b6220e15e9cb73ca0a8d91702c6e/pillow-12.1.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5dae5f21afb91322f2ff791895ddd8889e5e947ff59f71b46041c8ce6db790bc", size = 4660616, upload-time = "2026-02-11T04:21:34.97Z" }, - { url = "https://files.pythonhosted.org/packages/f7/ec/8a6d22afd02570d30954e043f09c32772bfe143ba9285e2fdb11284952cd/pillow-12.1.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:2e0c664be47252947d870ac0d327fea7e63985a08794758aa8af5b6cb6ec0c9c", size = 6269008, upload-time = "2026-02-11T04:21:36.623Z" }, - { url = "https://files.pythonhosted.org/packages/3d/1d/6d875422c9f28a4a361f495a5f68d9de4a66941dc2c619103ca335fa6446/pillow-12.1.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:691ab2ac363b8217f7d31b3497108fb1f50faab2f75dfb03284ec2f217e87bf8", size = 8073226, upload-time = "2026-02-11T04:21:38.585Z" }, - { url = "https://files.pythonhosted.org/packages/a1/cd/134b0b6ee5eda6dc09e25e24b40fdafe11a520bc725c1d0bbaa5e00bf95b/pillow-12.1.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e9e8064fb1cc019296958595f6db671fba95209e3ceb0c4734c9baf97de04b20", size = 6380136, upload-time = "2026-02-11T04:21:40.562Z" }, - { url = "https://files.pythonhosted.org/packages/7a/a9/7628f013f18f001c1b98d8fffe3452f306a70dc6aba7d931019e0492f45e/pillow-12.1.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:472a8d7ded663e6162dafdf20015c486a7009483ca671cece7a9279b512fcb13", size = 7067129, upload-time = "2026-02-11T04:21:42.521Z" }, - { url = "https://files.pythonhosted.org/packages/1e/f8/66ab30a2193b277785601e82ee2d49f68ea575d9637e5e234faaa98efa4c/pillow-12.1.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:89b54027a766529136a06cfebeecb3a04900397a3590fd252160b888479517bf", size = 6491807, upload-time = "2026-02-11T04:21:44.22Z" }, - { url = "https://files.pythonhosted.org/packages/da/0b/a877a6627dc8318fdb84e357c5e1a758c0941ab1ddffdafd231983788579/pillow-12.1.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:86172b0831b82ce4f7877f280055892b31179e1576aa00d0df3bb1bbf8c3e524", size = 7190954, upload-time = "2026-02-11T04:21:46.114Z" }, - { url = "https://files.pythonhosted.org/packages/83/43/6f732ff85743cf746b1361b91665d9f5155e1483817f693f8d57ea93147f/pillow-12.1.1-cp313-cp313t-win32.whl", hash = "sha256:44ce27545b6efcf0fdbdceb31c9a5bdea9333e664cda58a7e674bb74608b3986", size = 6336441, upload-time = "2026-02-11T04:21:48.22Z" }, - { url = "https://files.pythonhosted.org/packages/3b/44/e865ef3986611bb75bfabdf94a590016ea327833f434558801122979cd0e/pillow-12.1.1-cp313-cp313t-win_amd64.whl", hash = "sha256:a285e3eb7a5a45a2ff504e31f4a8d1b12ef62e84e5411c6804a42197c1cf586c", size = 7045383, upload-time = "2026-02-11T04:21:50.015Z" }, - { url = "https://files.pythonhosted.org/packages/a8/c6/f4fb24268d0c6908b9f04143697ea18b0379490cb74ba9e8d41b898bd005/pillow-12.1.1-cp313-cp313t-win_arm64.whl", hash = "sha256:cc7d296b5ea4d29e6570dabeaed58d31c3fea35a633a69679fb03d7664f43fb3", size = 2456104, upload-time = "2026-02-11T04:21:51.633Z" }, - { url = "https://files.pythonhosted.org/packages/03/d0/bebb3ffbf31c5a8e97241476c4cf8b9828954693ce6744b4a2326af3e16b/pillow-12.1.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:417423db963cb4be8bac3fc1204fe61610f6abeed1580a7a2cbb2fbda20f12af", size = 4062652, upload-time = "2026-02-11T04:21:53.19Z" }, - { url = "https://files.pythonhosted.org/packages/2d/c0/0e16fb0addda4851445c28f8350d8c512f09de27bbb0d6d0bbf8b6709605/pillow-12.1.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:b957b71c6b2387610f556a7eb0828afbe40b4a98036fc0d2acfa5a44a0c2036f", size = 4138823, upload-time = "2026-02-11T04:22:03.088Z" }, - { url = "https://files.pythonhosted.org/packages/6b/fb/6170ec655d6f6bb6630a013dd7cf7bc218423d7b5fa9071bf63dc32175ae/pillow-12.1.1-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:097690ba1f2efdeb165a20469d59d8bb03c55fb6621eb2041a060ae8ea3e9642", size = 3601143, upload-time = "2026-02-11T04:22:04.909Z" }, - { url = "https://files.pythonhosted.org/packages/59/04/dc5c3f297510ba9a6837cbb318b87dd2b8f73eb41a43cc63767f65cb599c/pillow-12.1.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:2815a87ab27848db0321fb78c7f0b2c8649dee134b7f2b80c6a45c6831d75ccd", size = 5266254, upload-time = "2026-02-11T04:22:07.656Z" }, - { url = "https://files.pythonhosted.org/packages/05/30/5db1236b0d6313f03ebf97f5e17cda9ca060f524b2fcc875149a8360b21c/pillow-12.1.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:f7ed2c6543bad5a7d5530eb9e78c53132f93dfa44a28492db88b41cdab885202", size = 4657499, upload-time = "2026-02-11T04:22:09.613Z" }, - { url = "https://files.pythonhosted.org/packages/6f/18/008d2ca0eb612e81968e8be0bbae5051efba24d52debf930126d7eaacbba/pillow-12.1.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:652a2c9ccfb556235b2b501a3a7cf3742148cd22e04b5625c5fe057ea3e3191f", size = 6232137, upload-time = "2026-02-11T04:22:11.434Z" }, - { url = "https://files.pythonhosted.org/packages/70/f1/f14d5b8eeb4b2cd62b9f9f847eb6605f103df89ef619ac68f92f748614ea/pillow-12.1.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d6e4571eedf43af33d0fc233a382a76e849badbccdf1ac438841308652a08e1f", size = 8042721, upload-time = "2026-02-11T04:22:13.321Z" }, - { url = "https://files.pythonhosted.org/packages/5a/d6/17824509146e4babbdabf04d8171491fa9d776f7061ff6e727522df9bd03/pillow-12.1.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b574c51cf7d5d62e9be37ba446224b59a2da26dc4c1bb2ecbe936a4fb1a7cb7f", size = 6347798, upload-time = "2026-02-11T04:22:15.449Z" }, - { url = "https://files.pythonhosted.org/packages/d1/ee/c85a38a9ab92037a75615aba572c85ea51e605265036e00c5b67dfafbfe2/pillow-12.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a37691702ed687799de29a518d63d4682d9016932db66d4e90c345831b02fb4e", size = 7039315, upload-time = "2026-02-11T04:22:17.24Z" }, - { url = "https://files.pythonhosted.org/packages/ec/f3/bc8ccc6e08a148290d7523bde4d9a0d6c981db34631390dc6e6ec34cacf6/pillow-12.1.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f95c00d5d6700b2b890479664a06e754974848afaae5e21beb4d83c106923fd0", size = 6462360, upload-time = "2026-02-11T04:22:19.111Z" }, - { url = "https://files.pythonhosted.org/packages/f6/ab/69a42656adb1d0665ab051eec58a41f169ad295cf81ad45406963105408f/pillow-12.1.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:559b38da23606e68681337ad74622c4dbba02254fc9cb4488a305dd5975c7eeb", size = 7165438, upload-time = "2026-02-11T04:22:21.041Z" }, - { url = "https://files.pythonhosted.org/packages/02/46/81f7aa8941873f0f01d4b55cc543b0a3d03ec2ee30d617a0448bf6bd6dec/pillow-12.1.1-cp314-cp314-win32.whl", hash = "sha256:03edcc34d688572014ff223c125a3f77fb08091e4607e7745002fc214070b35f", size = 6431503, upload-time = "2026-02-11T04:22:22.833Z" }, - { url = "https://files.pythonhosted.org/packages/40/72/4c245f7d1044b67affc7f134a09ea619d4895333d35322b775b928180044/pillow-12.1.1-cp314-cp314-win_amd64.whl", hash = "sha256:50480dcd74fa63b8e78235957d302d98d98d82ccbfac4c7e12108ba9ecbdba15", size = 7176748, upload-time = "2026-02-11T04:22:24.64Z" }, - { url = "https://files.pythonhosted.org/packages/e4/ad/8a87bdbe038c5c698736e3348af5c2194ffb872ea52f11894c95f9305435/pillow-12.1.1-cp314-cp314-win_arm64.whl", hash = "sha256:5cb1785d97b0c3d1d1a16bc1d710c4a0049daefc4935f3a8f31f827f4d3d2e7f", size = 2544314, upload-time = "2026-02-11T04:22:26.685Z" }, - { url = "https://files.pythonhosted.org/packages/6c/9d/efd18493f9de13b87ede7c47e69184b9e859e4427225ea962e32e56a49bc/pillow-12.1.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:1f90cff8aa76835cba5769f0b3121a22bd4eb9e6884cfe338216e557a9a548b8", size = 5268612, upload-time = "2026-02-11T04:22:29.884Z" }, - { url = "https://files.pythonhosted.org/packages/f8/f1/4f42eb2b388eb2ffc660dcb7f7b556c1015c53ebd5f7f754965ef997585b/pillow-12.1.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1f1be78ce9466a7ee64bfda57bdba0f7cc499d9794d518b854816c41bf0aa4e9", size = 4660567, upload-time = "2026-02-11T04:22:31.799Z" }, - { url = "https://files.pythonhosted.org/packages/01/54/df6ef130fa43e4b82e32624a7b821a2be1c5653a5fdad8469687a7db4e00/pillow-12.1.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:42fc1f4677106188ad9a55562bbade416f8b55456f522430fadab3cef7cd4e60", size = 6269951, upload-time = "2026-02-11T04:22:33.921Z" }, - { url = "https://files.pythonhosted.org/packages/a9/48/618752d06cc44bb4aae8ce0cd4e6426871929ed7b46215638088270d9b34/pillow-12.1.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:98edb152429ab62a1818039744d8fbb3ccab98a7c29fc3d5fcef158f3f1f68b7", size = 8074769, upload-time = "2026-02-11T04:22:35.877Z" }, - { url = "https://files.pythonhosted.org/packages/c3/bd/f1d71eb39a72fa088d938655afba3e00b38018d052752f435838961127d8/pillow-12.1.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d470ab1178551dd17fdba0fef463359c41aaa613cdcd7ff8373f54be629f9f8f", size = 6381358, upload-time = "2026-02-11T04:22:37.698Z" }, - { url = "https://files.pythonhosted.org/packages/64/ef/c784e20b96674ed36a5af839305f55616f8b4f8aa8eeccf8531a6e312243/pillow-12.1.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6408a7b064595afcab0a49393a413732a35788f2a5092fdc6266952ed67de586", size = 7068558, upload-time = "2026-02-11T04:22:39.597Z" }, - { url = "https://files.pythonhosted.org/packages/73/cb/8059688b74422ae61278202c4e1ad992e8a2e7375227be0a21c6b87ca8d5/pillow-12.1.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5d8c41325b382c07799a3682c1c258469ea2ff97103c53717b7893862d0c98ce", size = 6493028, upload-time = "2026-02-11T04:22:42.73Z" }, - { url = "https://files.pythonhosted.org/packages/c6/da/e3c008ed7d2dd1f905b15949325934510b9d1931e5df999bb15972756818/pillow-12.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c7697918b5be27424e9ce568193efd13d925c4481dd364e43f5dff72d33e10f8", size = 7191940, upload-time = "2026-02-11T04:22:44.543Z" }, - { url = "https://files.pythonhosted.org/packages/01/4a/9202e8d11714c1fc5951f2e1ef362f2d7fbc595e1f6717971d5dd750e969/pillow-12.1.1-cp314-cp314t-win32.whl", hash = "sha256:d2912fd8114fc5545aa3a4b5576512f64c55a03f3ebcca4c10194d593d43ea36", size = 6438736, upload-time = "2026-02-11T04:22:46.347Z" }, - { url = "https://files.pythonhosted.org/packages/f3/ca/cbce2327eb9885476b3957b2e82eb12c866a8b16ad77392864ad601022ce/pillow-12.1.1-cp314-cp314t-win_amd64.whl", hash = "sha256:4ceb838d4bd9dab43e06c363cab2eebf63846d6a4aeaea283bbdfd8f1a8ed58b", size = 7182894, upload-time = "2026-02-11T04:22:48.114Z" }, - { url = "https://files.pythonhosted.org/packages/ec/d2/de599c95ba0a973b94410477f8bf0b6f0b5e67360eb89bcb1ad365258beb/pillow-12.1.1-cp314-cp314t-win_arm64.whl", hash = "sha256:7b03048319bfc6170e93bd60728a1af51d3dd7704935feb228c4d4faab35d334", size = 2546446, upload-time = "2026-02-11T04:22:50.342Z" }, -] - -[[package]] -name = "pygments" -version = "2.19.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, -] - -[[package]] -name = "rich" -version = "14.3.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "markdown-it-py" }, - { name = "pygments" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/74/99/a4cab2acbb884f80e558b0771e97e21e939c5dfb460f488d19df485e8298/rich-14.3.2.tar.gz", hash = "sha256:e712f11c1a562a11843306f5ed999475f09ac31ffb64281f73ab29ffdda8b3b8", size = 230143, upload-time = "2026-02-01T16:20:47.908Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ef/45/615f5babd880b4bd7d405cc0dc348234c5ffb6ed1ea33e152ede08b2072d/rich-14.3.2-py3-none-any.whl", hash = "sha256:08e67c3e90884651da3239ea668222d19bea7b589149d8014a21c633420dbb69", size = 309963, upload-time = "2026-02-01T16:20:46.078Z" }, -] - -[[package]] -name = "shellingham" -version = "1.5.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de", size = 10310, upload-time = "2023-10-24T04:13:40.426Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755, upload-time = "2023-10-24T04:13:38.866Z" }, -] - -[[package]] -name = "typer" -version = "0.24.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "annotated-doc" }, - { name = "click" }, - { name = "rich" }, - { name = "shellingham" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/5a/b6/3e681d3b6bb22647509bdbfdd18055d5adc0dce5c5585359fa46ff805fdc/typer-0.24.0.tar.gz", hash = "sha256:f9373dc4eff901350694f519f783c29b6d7a110fc0dcc11b1d7e353b85ca6504", size = 118380, upload-time = "2026-02-16T22:08:48.496Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/85/d0/4da85c2a45054bb661993c93524138ace4956cb075a7ae0c9d1deadc331b/typer-0.24.0-py3-none-any.whl", hash = "sha256:5fc435a9c8356f6160ed6e85a6301fdd6e3d8b2851da502050d1f92c5e9eddc8", size = 56441, upload-time = "2026-02-16T22:08:47.535Z" }, -] - -[[package]] -name = "zshell" -version = "0.1.0" -source = { editable = "." } -dependencies = [ - { name = "materialyoucolor" }, - { name = "pillow" }, - { name = "typer" }, -] - -[package.metadata] -requires-dist = [ - { name = "materialyoucolor" }, - { name = "pillow" }, - { name = "typer" }, -] diff --git a/scripts/LockScreenBg.py b/scripts/LockScreenBg.py deleted file mode 100644 index a35711b..0000000 --- a/scripts/LockScreenBg.py +++ /dev/null @@ -1,22 +0,0 @@ -from PIL import Image, ImageFilter -import argparse - -def gen_blurred_image(input_image, output_path, blur_amount): - img = Image.open(input_image) - size = img.size - img = img.resize((size[0] // 2, size[1] // 2), Image.NEAREST) - - img = img.filter(ImageFilter.GaussianBlur(blur_amount)) - # img = img.resize(size, Image.LANCZOS) - - img.save(output_path, "PNG") - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Generate a blurred lock screen background image.") - parser.add_argument("--input_image", type=str) - parser.add_argument("--output_path", type=str) - parser.add_argument("--blur_amount", type=int) - - args = parser.parse_args() - - gen_blurred_image(args.input_image, args.output_path, args.blur_amount) diff --git a/scripts/SchemeColorGen.py b/scripts/SchemeColorGen.py deleted file mode 100644 index 0faea61..0000000 --- a/scripts/SchemeColorGen.py +++ /dev/null @@ -1,123 +0,0 @@ -import json -import argparse -from pathlib import Path -from PIL import Image -from materialyoucolor.quantize import QuantizeCelebi -from materialyoucolor.score.score import Score -from materialyoucolor.dynamiccolor.material_dynamic_colors import MaterialDynamicColors -from materialyoucolor.hct.hct import Hct - - -parser = argparse.ArgumentParser( - description="Generate color scheme from wallpaper image" -) - -parser.add_argument( - "--path", - required=True, - help="Path to the wallpaper image" -) - -parser.add_argument( - "--output", - required=True, - help="Path to save the color scheme JSON file" -) - -parser.add_argument( - "--thumbnail", - required=True, - help="Path to save the thumbnail image" -) - -parser.add_argument( - "--scheme", - required=False, - type=str, - default="vibrant", -) - -args = parser.parse_args() - -if args.scheme == 'fruit-salad': - from materialyoucolor.scheme.scheme_fruit_salad import SchemeFruitSalad as Scheme -elif args.scheme == 'expressive': - from materialyoucolor.scheme.scheme_expressive import SchemeExpressive as Scheme -elif args.scheme == 'monochrome': - from materialyoucolor.scheme.scheme_monochrome import SchemeMonochrome as Scheme -elif args.scheme == 'rainbow': - from materialyoucolor.scheme.scheme_rainbow import SchemeRainbow as Scheme -elif args.scheme == 'tonal-spot': - from materialyoucolor.scheme.scheme_tonal_spot import SchemeTonalSpot as Scheme -elif args.scheme == 'neutral': - from materialyoucolor.scheme.scheme_neutral import SchemeNeutral as Scheme -elif args.scheme == 'fidelity': - from materialyoucolor.scheme.scheme_fidelity import SchemeFidelity as Scheme -elif args.scheme == 'content': - from materialyoucolor.scheme.scheme_content import SchemeContent as Scheme -elif args.scheme == 'vibrant': - from materialyoucolor.scheme.scheme_vibrant import SchemeVibrant as Scheme -else: - from materialyoucolor.scheme.scheme_tonal_spot import SchemeTonalSpot as Scheme - -def generate_thumbnail(image_path, thumbnail_path, size=(128, 128)): - thumbnail_file = Path(thumbnail_path) - - image = Image.open(image_path) - image = image.convert("RGB") - image.thumbnail(size, Image.NEAREST) - - thumbnail_file.parent.mkdir(parents=True, exist_ok=True) - image.save(thumbnail_path, "JPEG") - - -def generate_color_scheme(thumbnail_path, output_path): - image = Image.open(thumbnail_path) - pixel_len = image.width * image.height - image_data = image.getdata() - - quality = 1 - pixel_array = [image_data[_] for _ in range(0, pixel_len, quality)] - - result = QuantizeCelebi(pixel_array, 128) - score = Score.score(result)[0] - - scheme = Scheme( - Hct.from_int(score), - True, - 0.0 - ) - - color_dict = {} - for color in vars(MaterialDynamicColors).keys(): - color_name = getattr(MaterialDynamicColors, color) - if hasattr(color_name, "get_hct"): - color_int = color_name.get_hct(scheme).to_int() - color_dict[color] = int_to_hex(color_int) - - output_dict = { - "name": "dynamic", - "flavour": "default", - "mode": "dark", - "variant": "tonalspot", - "colors": color_dict - } - - output_file = Path(output_path) - output_file.parent.mkdir(parents=True, exist_ok=True) - - with open(output_file, "w") as f: - json.dump(output_dict, f, indent=4) - - -def int_to_hex(argb_int): - return "#{:06X}".format(argb_int & 0xFFFFFF) - - -try: - generate_thumbnail(args.path, str(args.thumbnail)) - generate_color_scheme(str(args.thumbnail), args.output) -except Exception as e: - print(f"Error: {e}") - with open(args.output, "w") as f: - f.write(f"Error: {e}") diff --git a/scripts/generate_calendar_cache.py b/scripts/generate_calendar_cache.py deleted file mode 100644 index 3514115..0000000 --- a/scripts/generate_calendar_cache.py +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python3 -""" -Calendar cache generator for z-bar-qt -Generates a JSON file containing date numbers for all 52 weeks of 3 years (last, current, next) -Structure: { "2024": { "week_0": [1,2,3,4,5,6,7], ... }, "2025": {...}, ... } -""" - -import json -import sys -from datetime import datetime, timedelta -from pathlib import Path - - -def get_week_start_day(): - """Returns the first day of the week (0=Sunday, 1=Monday, etc.) - hardcoded to Monday""" - return 1 # Monday - - -def get_weeks_for_year(year, week_start_day=1): - """ - Generate week data for a given year. - Returns a dict with 52 weeks, each containing 7 date numbers. - """ - weeks = {} - - # Find the first day of the year - jan_1 = datetime(year, 1, 1) - - # Find the first week's start date (adjust based on week_start_day) - first_date = jan_1 - timedelta(days=(jan_1.weekday() - week_start_day) % 7) - - # Generate 52 weeks - for week_num in range(52): - week_dates = [] - week_start = first_date + timedelta(weeks=week_num) - - for day_offset in range(7): - current_date = week_start + timedelta(days=day_offset) - week_dates.append(current_date.day) - - weeks[f"week_{week_num}"] = week_dates - - return weeks - - -def generate_calendar_cache(year=None): - """Generate cache for last year, current year, and next year""" - if year is None: - year = datetime.now().year - - cache = {} - for offset_year in [-1, 0, 1]: - target_year = year + offset_year - cache[str(target_year)] = get_weeks_for_year(target_year) - - return cache - - -def write_cache_file(cache_data): - """Write cache to the same location as Paths.cache in QML""" - import os - - # Use XDG_CACHE_HOME or ~/.cache, then add /zshell (matching Paths singleton) - xdg_cache_home = os.environ.get("XDG_CACHE_HOME") - if xdg_cache_home: - cache_dir = Path(xdg_cache_home) / "zshell" - else: - cache_dir = Path.home() / ".cache" / "zshell" - - cache_dir.mkdir(parents=True, exist_ok=True) - - cache_file = cache_dir / "calendar_cache.json" - - with open(cache_file, "w") as f: - json.dump(cache_data, f, indent=2) - - print(f"Calendar cache written to: {cache_file}") - return cache_file - - -def main(): - try: - # Generate cache for current year and ±1 year - cache = generate_calendar_cache() - - # Write to file - cache_file = write_cache_file(cache) - - print("Cache structure:") - print(" - Keys: year (e.g., '2024', '2025', '2026')") - print(" - Values: dict with 52 weeks") - print(" - Each week: array of 7 date numbers") - print(f"\nExample (first week of 2025):") - print(f" {cache['2025']['week_0']}") - - return 0 - except Exception as e: - print(f"Error generating calendar cache: {e}", file=sys.stderr) - return 1 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/scripts/hello b/scripts/hello deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/zshell.sh b/scripts/zshell.sh deleted file mode 100755 index 822302a..0000000 --- a/scripts/zshell.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -QML_ROOT=/home/zach/GitProjects/z-bar-qt/scripts/.. -LOCK=false - -main() { - local OPTARG OPTIND opt - while getopts "l" opt; do - case "$opt" in - l) LOCK=true ;; - *) fatal 'bad option' ;; - esac - done - - if [[ "$LOCK" = "true" ]]; then - hyprctl dispatch global zshell:lock - else - qs -n -d -p "$QML_ROOT/shell.qml" - fi -} - -main "$@" diff --git a/scripts/zshell.shr b/scripts/zshell.shr deleted file mode 100755 index 822302a..0000000 --- a/scripts/zshell.shr +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -QML_ROOT=/home/zach/GitProjects/z-bar-qt/scripts/.. -LOCK=false - -main() { - local OPTARG OPTIND opt - while getopts "l" opt; do - case "$opt" in - l) LOCK=true ;; - *) fatal 'bad option' ;; - esac - done - - if [[ "$LOCK" = "true" ]]; then - hyprctl dispatch global zshell:lock - else - qs -n -d -p "$QML_ROOT/shell.qml" - fi -} - -main "$@"