diff --git a/.gitignore b/.gitignore index c49d344..f4c5c0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ text.py +dotfiles +buildScripts \ No newline at end of file diff --git a/Bar.qml b/Bar.qml index 5f1eac9..c539d01 100644 --- a/Bar.qml +++ b/Bar.qml @@ -9,65 +9,76 @@ import Qt5Compat.GraphicalEffects Scope { id:root - Variants { - model: Quickshell.screens - - PanelWindow { - color: Solid.color.colorBG - id: topBar - required property var modelData - screen: modelData - - anchors { - top: true - left: true - right: true - } - - implicitHeight: 30 - - Row { - id:leftBlock - - anchors.left: parent.left - anchors.leftMargin: Solid.spacing.paddingMonitorEdge - y:parent.height/5 - - spacing:15 - - - WorkSpacesViz {} - Text { - color:Solid.color.colorA - text:Hyprland.activeToplevel ? Hyprland.activeToplevel.title : "what, notings open :(" - } - + PanelWindow { + color: Solid.color.surface + id: topBar + screen: Quickshell.screens[2] + + anchors { + top: true + left: true + right: true + } + + implicitHeight: 30 + + Row { + id:leftBlock + + anchors.left: parent.left + anchors.leftMargin: Solid.spacing.paddingMonitorEdge + y:parent.height/5 + + spacing:15 + + + WorkSpacesViz {} + Rectangle { + width:windowviz.width+10 + height:windowviz.height + color:Solid.color.primary + radius:windowviz.height + Text { + id:windowviz + x:5 + color:Solid.color.on_primary + text:Hyprland.activeToplevel ? Hyprland.activeToplevel.title : "what, notings open :(" } - ClockWidget { - anchors.centerIn:parent - - timeFormat: mouseHere.containsMouse ? "~ d MMMM yyyy hh:mm:ss AP t ~" : "~ hh:mm:ss AP ~" - MouseArea { - id: mouseHere - anchors.fill: parent - anchors.margins: -15 + } - hoverEnabled: true - } + } + Rectangle { + anchors.centerIn:parent + width:bob.width+10 + height:bob.height + radius:bob.height + + color:Solid.color.primary + ClockWidget { + anchors.centerIn:parent + id:bob + timeFormat: mouseHere.containsMouse ? "~ d MMMM yyyy hh:mm:ss AP t ~" : "~ hh:mm:ss AP ~" + MouseArea { + id: mouseHere + anchors.fill: parent + anchors.margins: -15 + + hoverEnabled: true } + } + } - Row{ - id:rightBlock + Row{ + id:rightBlock - anchors.right: parent.right - anchors.rightMargin: Solid.spacing.paddingMonitorEdge + anchors.right: parent.right + anchors.rightMargin: Solid.spacing.paddingMonitorEdge - spacing:15 + spacing:15 - MprisThingy {id: smile} - } + MprisThingy {id: smile} + } - }//panel - }//variants -}//scope + } +} diff --git a/BottomBar.qml b/BottomBar.qml index 325d6b3..5d9424d 100644 --- a/BottomBar.qml +++ b/BottomBar.qml @@ -2,6 +2,8 @@ import Quickshell import Quickshell.Io import QtQuick + + Scope { // no more time object diff --git a/ClockWidget.qml b/ClockWidget.qml index ad6f832..ee04156 100644 --- a/ClockWidget.qml +++ b/ClockWidget.qml @@ -8,7 +8,7 @@ Text { - color: Solid.color.colorA + color: Solid.color.on_primary text: Qt.formatDateTime(clock.date, timeFormat) SystemClock { diff --git a/ListOfThangs.qml b/ListOfThangs.qml new file mode 100644 index 0000000..5e19c95 --- /dev/null +++ b/ListOfThangs.qml @@ -0,0 +1,12 @@ +import QtQuick +import Qt.labs.folderlistmodel + +FolderListModel { + folder:Qt.resolvedUrl("images/wallpapers/") +} +// ListElement { +// name: "sunset02.jpg" +// photo: "images/wallpapers/sunset02.jpg" +// } + +// unset03.jpg windows-10.jpg \ No newline at end of file diff --git a/MprisThingy.qml b/MprisThingy.qml index fec0b79..3c943c0 100644 --- a/MprisThingy.qml +++ b/MprisThingy.qml @@ -5,11 +5,19 @@ import Quickshell.Services.Mpris import Quickshell.Widgets import QtQuick.Shapes + +Rectangle{ + height:root.height + width:root.width + 20 + radius:height + color:Solid.color.primary + ClippingRectangle { + x:10 id: root - implicitHeight: textHere.implicitHeight+squigglePath.confAmplitude*2+10 + implicitHeight: textHere.implicitHeight+squigglePath.confAmplitude*2+2 implicitWidth: 300 - color: '#00000000' + color: "transparent" @@ -25,22 +33,18 @@ ClippingRectangle { var out = {} var MprisVars = Mpris.players.values for (const e of MprisVars) { - console.log("ts bro " + e.identity) } for (const player of desiredPlayers) { - console.log("looking for " + player) const found = MprisVars.find(p => p.identity == player) - console.log(found ? "found "+player : "failed :(" ) const safeFound = found || mprisPlaceholderVars //makes the rest of the code not shit itself out[player] = safeFound } - console.log(" ") return out } - property var activePlayer: playerDict["Chrome"] + property var activePlayer: playerDict[desiredPlayers[1]] property var playing: activePlayer.playbackState == MprisPlaybackState.Playing @@ -68,7 +72,7 @@ ClippingRectangle { id:progressBall width:squigglePath.confAmplitude*1.5 height:squigglePath.confAmplitude*1.5 - color:Solid.color.colorA + color:Solid.color.on_primary radius:width/2 anchors.horizontalCenter:squiggleClip.right anchors.verticalCenter:squiggleClip.verticalCenter @@ -87,11 +91,11 @@ ClippingRectangle { ShapePath { id:squigglePath - strokeColor:Solid.color.colorA + strokeColor:Solid.color.on_primary fillColor:"transparent" strokeWidth:2 - property real amplitude: 5 + property real amplitude: confAmplitude property real confAmplitude: 5 property real wavelength: confAmplitude*4 property real phase: 0 @@ -101,7 +105,7 @@ ClippingRectangle { } Instantiator { active: true - model:Math.floor(squiggleRoot.barLength/squigglePath.wavelength*2)+2 // jesus ts ugly + model:Math.floor(squiggleRoot.barLength/squigglePath.wavelength*2)+3 // jesus ts ugly onObjectAdded: (index,object) => squigglePath.pathElements.push(object) @@ -163,9 +167,9 @@ ClippingRectangle { Text { id: textHere - color: Solid.color.colorA + color: Solid.color.on_primary text: root.activePlayer.trackTitle - + antialiasing: true onWidthChanged: { //even tho is 0 miliseconds, incase like idk i press skip rly quick, we make it not do shi too much widthDelayTimer.stop() @@ -176,9 +180,8 @@ ClippingRectangle { interval:0 running:false repeat:false - onTriggered: {console.log(textHere.width) + onTriggered: { if (textHere.width > root.implicitWidth) { - console.log("owo so big *blushes*") bigTextAnim.start() } else { bigTextAnim.stop() @@ -210,3 +213,4 @@ ClippingRectangle { } } +} \ No newline at end of file diff --git a/README.md b/README.md index 054ef95..e71df5c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ Arch - Linux 6.17.9.arch1-1 ~ hyprland 0.52.2-2 ~ quickshell 0.2.1-3 . this check the todo file to see waht needs doing, or checkout Quickshell-plans to see my visson for the future - +AI disclosure: +so ai, none of the code is writen by an llm, i dont need an llm to write code as bad as me. research however is aided by Gemini, basicly ill ask it sometyhing then ill look at qml/quickshell docs for what gemini ws yaapping abt so usualy most of what i do isnt cooked as said earlier this is my first time using both git and github so there's going to be many roadblocks in the form of my own incompetence so please please please be patient diff --git a/SolidColors.qml b/SolidColors.qml index efab2a4..d5f0353 100644 --- a/SolidColors.qml +++ b/SolidColors.qml @@ -1,33 +1,21 @@ -// generated using wallust. +// generated using matugen. // dont edit as this will be overwriten pragma Singleton import QtQuick Item { - property color colorA: '#FEFFFF' - property color colorSelected: '#B4AA7C' - property color colorTextInacive: '#FF741E' - property color colorTextDimm: '#7497B5' - property color colorBG: '#3B456E' - property color color0: '#FEFFFF' - property color color1: '#B4AA7C' - property color color2: '#FF741E' - property color color3: '#7497B5' - property color color4: '#B35561' - property color color5: '#6B5B37' - property color color6: '#454B64' - property color color7: '#514C38' - property color color8: '#7E7757' - property color color9: '#B4AA7C' - property color color10: '#FF741E' - property color color11: '#7497B5' - property color color12: '#B35561' - property color color13: '#6B5B37' - property color color14: '#454B64' - property color color15: '#D1CCB5' - property color background: '#3B456E' - property color foreground: '#F0F0F4' - property color cursor: '#5E5437' + //personalised matugen results + property color surface: "#141318" + property color on_surface: "#e6e1e9" + property color outline: "#938f99" + property color outline_variant: "#48454e" + property color primary_container: "#4a3e76" + property color on_primary_container: "#e7deff" + property color primary: "#ccbeff" + property color on_primary: "#33275e" + property color background: "#141318" + property color on_background: "#e6e1e9" } +//33275e diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..a6346d9 --- /dev/null +++ b/TODO.md @@ -0,0 +1,56 @@ +heres the todo file, as its just me on the project **working** just shows what im currently messing with however in the future it will show who's working on what + +heres the key: +- **working**: what im working on +- **waiting**: indicates an incomplete dependencie +- **todo**: can be done, im just not working on it rn +- **done**: stuff that has been completed + + +### todo: + +- [ ] spruce up workspace viz - working + - [x] figure out how to detect if objects are touching - working + +- [ ] make a gui wallapaper switcher - currently commented out in shell.qml - working + +- [ ] make mprisviz better with a way to switch sources - working + +### Working + + +- [ ] make github project better for contributors - todo + +- [ ] make the project build itself using just a few commands not just puting files inside .conf - todo + + - [ ] add .conf backing up to the build - waiting + + - [ ] upload to aur - waiting + +- [ ] start hardware temp/usage viz, figure out how to get the data and then display it - todo + +- [ ] steal someone elses code for a systemTray - todo + +- [ ] start on a dock like bottom bar - todo + +- [ ] make the shell interact with open rgb or the one that corsair or logitech uses - todo + +- [ ] an app launcher, figure out how to read from the .desktop files - todo + + +### finished: + + +- [x] learn Instantiator and use it to make a fancy ass squiggle for the MprisThingy - done + +- [x] take the squiggle out of shell.qml and into MprisThingy.qml and tidy up both files - done + +- [x] make theme/colour managent better by having it read form some config file and spruse up the names + +- [x] cause its kinda cooked - done - moved to using matugen and it writes to SolidColors.qml + + + + + + diff --git a/WorkSpacesViz.qml b/WorkSpacesViz.qml index 49d9f53..5972258 100644 --- a/WorkSpacesViz.qml +++ b/WorkSpacesViz.qml @@ -3,25 +3,85 @@ import Quickshell import QtQuick import Quickshell.Hyprland +Rectangle{ + id:root + width:workspaceRow.width+10 + height:workspaceRow.height + radius:workspaceRow.height + color:Solid.color.primary + function checktouching( itemA ,itemB ) { + const antiMargin = 5 ; -Row{ - spacing: Solid.spacing.paddingSubWidgetSpacing - Repeater{ - model: Hyprland.workspaces - Text { - id: textnumber - required property var modelData - text: modelData.name - color:mouseHeres.containsMouse ? Solid.color.colorSelected : modelData.focused ? Solid.color.colorA : modelData.active ? Solid.color.colorTextInacive : Solid.color.colorTextDimm - MouseArea { - id: mouseHeres - anchors.fill: parent - anchors.margins: -2 - hoverEnabled: true - onClicked: Hyprland.dispatch("workspace "+modelData.id) + itemA.x; itemA.y; + itemB.x; itemB.y; + var rectA = itemA.mapToItem(null, 0, 0, itemA.width, itemA.height) + var rectB = itemB.mapToItem(null, 0, 0, itemB.width, itemB.height) + + return ( + rectA.x+rectA.width-antiMargin > rectB.x && + rectA.x < rectB.x+rectB.width-antiMargin && + rectA.y < rectB.y+rectB.height-antiMargin && + rectA.y+rectA.height-antiMargin > rectB.y + ) + } + property bool mouseInRow: countInRow>0 + property var countInRow: false + + property var textUnderMouseX: 0 + property var activeTextX: 25 + + + + + + Row{ + z:2 + x:5 + spacing:5 + id:workspaceRow + //spacing: Solid.spacing.paddingSubWidgetSpacing + Repeater{ + + model: Hyprland.workspaces + Text { + + id: textnumber + required property var modelData + property bool imFocused: modelData.focused + property bool active:modelData.active + text: modelData.name + //color:mouseHeres.containsMouse ? Solid.color.on_primary_container : modelData.focused ? Solid.color.on_primary_container : modelData.active ? Solid.color.on_primary : Solid.color.on_primary + color:checktouching(textnumber,rectUnderMouse) ? Solid.color.on_primary_container:Solid.color.on_primary + MouseArea { + id: mouseInText + anchors.fill: parent + anchors.margins:0-(workspaceRow.spacing/2+1) + hoverEnabled: true + onClicked: parent.modelData.activate() + onEntered: { + root.textUnderMouseX = parent.x + root.countInRow ++ + } + onExited: { + root.countInRow -- + } + } + onImFocusedChanged:if (imFocused) {activeTextX=x} } } } -} + Rectangle { + id: rectUnderMouse + color:Solid.color.primary_container + z:1 + width:height; height:workspaceRow.height + radius:width + x:root.mouseInRow ? root.textUnderMouseX : root.activeTextX + + Behavior on x {SpringAnimation {spring:4; damping:0.5}} + + + } +} diff --git a/images/wallpapers/SBfbgOG.png b/images/wallpapers/SBfbgOG.png new file mode 100644 index 0000000..2089e00 Binary files /dev/null and b/images/wallpapers/SBfbgOG.png differ diff --git a/images/wallpapers/aishot-1341.jpg b/images/wallpapers/aishot-1341.jpg new file mode 100644 index 0000000..3ebee29 Binary files /dev/null and b/images/wallpapers/aishot-1341.jpg differ diff --git a/images/wallpapers/arch-win10-glass.png b/images/wallpapers/arch-win10-glass.png new file mode 100644 index 0000000..4ad37a6 Binary files /dev/null and b/images/wallpapers/arch-win10-glass.png differ diff --git a/images/wallpapers/space_ring_2-wallpaper-2880x1620.jpg b/images/wallpapers/space_ring_2-wallpaper-2880x1620.jpg new file mode 100644 index 0000000..511bf7d Binary files /dev/null and b/images/wallpapers/space_ring_2-wallpaper-2880x1620.jpg differ diff --git a/images/wallpapers/sunset01.jpg b/images/wallpapers/sunset01.jpg new file mode 100644 index 0000000..a521a2f Binary files /dev/null and b/images/wallpapers/sunset01.jpg differ diff --git a/images/wallpapers/sunset02.jpg b/images/wallpapers/sunset02.jpg new file mode 100644 index 0000000..36c3cb8 Binary files /dev/null and b/images/wallpapers/sunset02.jpg differ diff --git a/images/wallpapers/sunset03.jpg b/images/wallpapers/sunset03.jpg new file mode 100644 index 0000000..8c21f70 Binary files /dev/null and b/images/wallpapers/sunset03.jpg differ diff --git a/images/wallpapers/windows-10.jpg b/images/wallpapers/windows-10.jpg new file mode 100644 index 0000000..9de624b Binary files /dev/null and b/images/wallpapers/windows-10.jpg differ diff --git a/shell.qml b/shell.qml index 8aa5041..df0aa2b 100644 --- a/shell.qml +++ b/shell.qml @@ -6,5 +6,154 @@ import Quickshell.Widgets Scope { Bar {} +// FloatingWindow { +// id:dasWindow +// +// color: '#00000000' +// function checktouching( itemA ,itemB ) { +// // Access properties to register them as dependencies for the binding system +// itemA.x; itemA.y; +// itemB.x; itemB.y; +// +// var rectA = itemA.mapToItem(null, 0, 0, itemA.width, itemA.height) +// var rectB = itemB.mapToItem(null, 0, 0, itemB.width, itemB.height) +// +// return ( +// rectA.x+rectA.width > rectB.x && +// rectA.x < rectB.x+rectB.width && +// rectA.y < rectB.y+rectB.height && +// rectA.y+rectA.height> rectB.y +// ) +// } +// +// property var touching: checktouching(p,b) +// +// +// Rectangle { +// id:p +// +// width:height; height:20 +// color:dasWindow.touching ? "green" : Solid.color.primary +// +// +// +// +// NumberAnimation { +// id:moveRight +// target: p +// property: "y" +// to: 100 +// running:true +// duration: 4000 +// easing.type: Easing.InOutQuad +// onFinished: moveLeft.running=true +// } +// NumberAnimation { +// id:moveLeft +// target: p +// property: "y" +// to: 0 +// duration: 5963 +// easing.type: Easing.InOutQuad +// onFinished: moveRight.running=true +// } +// +// +// } +// Rectangle { +// id:b +// +// width:height; height:20 +// y:height/2 +// color:dasWindow.touching ? "green" : Solid.color.primary +// +// NumberAnimation { +// id:moveRightb +// target: b +// property: "y" +// to: 100 +// running:true +// duration: 1500 +// easing.type: Easing.InOutQuad +// onFinished: moveLeftb.running=true +// } +// NumberAnimation { +// id:moveLeftb +// target: b +// property: "y" +// to: 0 +// duration: 1500 +// easing.type: Easing.InOutQuad +// onFinished: moveRightb.running=true +// } +// +// +// } +// +// +// } + FloatingWindow{ + color:"transparent" + Component { + id: thangsDelegate + Item { + id:itemWrapper + width:view.cellWidth;height:view.cellHeight + Image{ + id:thumbs; + anchors.centerIn:parent + source: filePath; sourceSize.height: itemWrapper.height + width:itemWrapper.width-5;height:itemWrapper.height-5 + fillMode: Image.PreserveAspectFit + } + + Text {color:"white";text: fileName ; anchors.horizontalCenter: thumbs.horizontalCenter ; anchors.bottom:thumbs.bottom} + + } + } + Component { + id:highlight + Rectangle{ + id:ts + + property bool topOnScreen: y-view.contentY > 0 + property bool bottomOnScreen: y+height-view.contentY < view.height + + width:view.cellWidth; height:view.cellHeight + + color:"darkblue"; radius:7 + x: view.currentItem.x + y: view.currentItem.y + z:2 + Behavior on x {SpringAnimation {spring:3; damping:0.2}} + Behavior on y {SpringAnimation {spring:3; damping:0.2}} + + Text{text:Math.round(parent.y)+ " "+ view.contentY + " " + view.height ; anchors.centerIn:parent; color:"white"} + + onTopOnScreenChanged: { + if (!topOnScreen) { + view.contentY = y + }} + onBottomOnScreenChanged: console.log("bottom visible " + bottomOnScreen) + } + + } + + GridView{ + x:10 + id:view + anchors.centerIn:parent + width:parent.width - parent.width % cellWidth + height:parent.height + cellWidth: 300; cellHeight:200 + + model: ListOfThangs{} + delegate: thangsDelegate + highlight: highlight + highlightFollowsCurrentItem: false + focus:true + } + } + //BottomBar {} } diff --git a/todo b/todo deleted file mode 100644 index af8feb2..0000000 --- a/todo +++ /dev/null @@ -1,22 +0,0 @@ -doing: what im working on -waiting: is waiting for another item to be finished -todo: can be done, im just not working on it rn -done: what need me to explain this? - - - -learn Instantiator and use it to make a fancy ass squiggle for the MprisThingy - doing - -take the squiggle out of shell.qml and into MprisThingy.qml and tidy up both files - waiting - -make theme/colour managent better by having it read form some config file and spruse up the names cause its kinda cooked - todo - -start hardware temp/usage viz, figure out how to get the data and then display it - todo - -steal someone elses code for a systemTray - todo - -start on a dock like bottom bar - todo - -make the shell interact with open rgb or the one that corsair or logitech uses - todo - -an app launcher, figure out how to read from the .desktop files - todo \ No newline at end of file