Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9a455347d | ||
|
|
5b23111eb3 | ||
|
|
c77020dc69 | ||
|
|
4d2c99df65 | ||
|
|
230537699d | ||
|
|
776d25df0f | ||
|
|
dcd583f1fa |
@@ -20,8 +20,6 @@ $HOME/Pictures/Wallpapers/
|
|||||||
- [ImageMagick (resizing & blurring)](https://github.com/ImageMagick/ImageMagick)
|
- [ImageMagick (resizing & blurring)](https://github.com/ImageMagick/ImageMagick)
|
||||||
|
|
||||||
## Other Software:
|
## Other Software:
|
||||||
### Logout:
|
|
||||||
- [wlogout](https://github.com/ArtsyMacaw/wlogout)
|
|
||||||
- [nmcli (Recommended for Wifi)](https://github.com/ushiboy/nmcli)
|
- [nmcli (Recommended for Wifi)](https://github.com/ushiboy/nmcli)
|
||||||
|
|
||||||
## TO Enable Sub Programs:
|
## TO Enable Sub Programs:
|
||||||
@@ -30,6 +28,8 @@ Add the Lines to your ```~/.config/hypr/hyprland.conf``` keep in mind that you m
|
|||||||
```bind = $mainMod SHIFT, W, global, quickshell:Wallpaper```
|
```bind = $mainMod SHIFT, W, global, quickshell:Wallpaper```
|
||||||
### JLearner
|
### JLearner
|
||||||
```bind = $mainMod SHIFT, J, global, quickshell:JLearner```
|
```bind = $mainMod SHIFT, J, global, quickshell:JLearner```
|
||||||
|
### WLogout
|
||||||
|
```bind = $mainMod SHIFT, L, global, quickshell:WLogout```
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,6 @@ Volume (Mic+Speaker)
|
|||||||
Akku (connected devices mice...)
|
Akku (connected devices mice...)
|
||||||
Background/Wallpaper
|
Background/Wallpaper
|
||||||
Notes
|
Notes
|
||||||
Network (NMCli)
|
Network (NMCli)
|
||||||
|
reload-popup
|
||||||
|
WIN+Tab (shows Graphically all monitors and workspaces with Icon for app)
|
||||||
+5
-1
@@ -1,8 +1,12 @@
|
|||||||
pragma Singleton
|
pragma Singleton
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
|
import Quickshell.Hyprland
|
||||||
import "./path"
|
import "./path"
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
|
// Not really usable since it is not updating when changed
|
||||||
|
property var focusedMonitor: Hyprland.focusedMonitor
|
||||||
|
|
||||||
readonly property string configDir: ConfigPath.path
|
readonly property string configDir: ConfigPath.path
|
||||||
readonly property string wallpaperDir: WallpaperPath.wallpaperDir
|
readonly property string wallpaperDir: WallpaperPath.wallpaperDir
|
||||||
|
|
||||||
|
|||||||
+10
-3
@@ -2,6 +2,7 @@ import QtQuick
|
|||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import "./widgets"
|
import "./widgets"
|
||||||
|
import "./states/Idle"
|
||||||
import "../../config"
|
import "../../config"
|
||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
@@ -25,6 +26,10 @@ PanelWindow {
|
|||||||
right: 0
|
right: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
IdleState.panelWindow = panel
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle { // Bar
|
Rectangle { // Bar
|
||||||
id: bar
|
id: bar
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -68,10 +73,12 @@ PanelWindow {
|
|||||||
|
|
||||||
// TODO: Add bluetooth, network, audio, power, maybe HW monitor
|
// TODO: Add bluetooth, network, audio, power, maybe HW monitor
|
||||||
Tray{}
|
Tray{}
|
||||||
|
// AudioSource{}
|
||||||
|
AudioSink{}
|
||||||
Battery{}
|
Battery{}
|
||||||
Network {}
|
Network{}
|
||||||
IdleButton { panelWindow: panel }
|
IdleButton {}
|
||||||
PowerButton {}
|
PowerButton{}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
pragma Singleton
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Services.Pipewire
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
PwObjectTracker {
|
||||||
|
objects: [ Pipewire.defaultAudioSink ]
|
||||||
|
}
|
||||||
|
|
||||||
|
property var audioSink: Pipewire.defaultAudioSink
|
||||||
|
|
||||||
|
property bool exists: audioSink != null
|
||||||
|
property bool mute: audioSink?.audio?.muted ?? false
|
||||||
|
property real volume: Math.round((audioSink?.audio?.volume ?? 0) * 1000) / 10
|
||||||
|
|
||||||
|
property bool volumeChanged: false
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: audioSink?.audio
|
||||||
|
|
||||||
|
function onVolumeChanged() {
|
||||||
|
root.volumeChanged = true;
|
||||||
|
hideTimer.restart();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: hideTimer
|
||||||
|
interval: 2000
|
||||||
|
onTriggered: root.volumeChanged = false
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
pragma Singleton
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Services.Pipewire
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
PwObjectTracker {
|
||||||
|
objects: [ Pipewire.defaultAudioSource ]
|
||||||
|
}
|
||||||
|
|
||||||
|
property var audioSource: Pipewire.defaultAudioSource
|
||||||
|
|
||||||
|
property bool exists: audioSource != null
|
||||||
|
property bool mute: audioSource?.audio?.muted ?? false
|
||||||
|
property real volume: Math.round((audioSource?.audio?.volume ?? 0) * 1000) / 10
|
||||||
|
|
||||||
|
property bool volumeChanged: false
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: audioSource?.audio
|
||||||
|
|
||||||
|
function onVolumeChanged() {
|
||||||
|
root.volumeChanged = true;
|
||||||
|
hideTimer.restart();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: hideTimer
|
||||||
|
interval: 2000
|
||||||
|
onTriggered: root.volumeChanged = false
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
singleton Sink DefaultSinkState.qml
|
||||||
|
singleton Source DefaultSourceState.qml
|
||||||
@@ -2,11 +2,28 @@ pragma Singleton
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
|
import Quickshell.Wayland
|
||||||
import "../../../../config"
|
import "../../../../config"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
// true = inhibit idle (prevent hypridle/lock/dpms), false = allow idle
|
// true = inhibit idle (prevent hypridle/lock/dpms), false = allow idle
|
||||||
property bool idle: false
|
property bool idle: false
|
||||||
|
property bool isIdle: idleMonitor.isIdle
|
||||||
|
|
||||||
|
property PanelWindow panelWindow: null
|
||||||
|
|
||||||
|
IdleInhibitor {
|
||||||
|
id: idleInhibitor
|
||||||
|
window: panelWindow
|
||||||
|
enabled: IdleState.idle
|
||||||
|
}
|
||||||
|
|
||||||
|
IdleMonitor {
|
||||||
|
id: idleMonitor
|
||||||
|
enabled: true
|
||||||
|
timeout: 30
|
||||||
|
respectInhibitors: true
|
||||||
|
}
|
||||||
|
|
||||||
// may need this in hypridle.conf
|
// may need this in hypridle.conf
|
||||||
// general {
|
// general {
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
import QtQuick
|
||||||
|
import "../../../config"
|
||||||
|
import "../states/Audio"
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: audioButton
|
||||||
|
|
||||||
|
width: Math.max(audioRow.width + Config.spacing_fun(height)*3.5, height)
|
||||||
|
height: bar.height
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
enabled: Sink.exists
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: audioButton.containsMouse ? Colors.tertiary : Qt.alpha(Colors.tertiaryContainer, 0.25)
|
||||||
|
radius: Config.radius_fun(audioButton.height)
|
||||||
|
border.width: Config.border_width
|
||||||
|
border.color: audioButton.containsMouse ? Colors.tertiaryContainer_fg
|
||||||
|
: Colors.secondaryContainer_fg
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: audioRow
|
||||||
|
width: audioSourceText.width + audioSinkText.width + audioPercentageText.width + Config.spacing_fun(height)*2
|
||||||
|
height: parent.height
|
||||||
|
spacing: Config.spacing_fun(height)/2
|
||||||
|
anchors.centerIn: parent
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: audioSourceText
|
||||||
|
text: (Source.mute ? "" :
|
||||||
|
"")
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
font.pixelSize: Config.iconSize(bar.height)
|
||||||
|
font.family: Config.font
|
||||||
|
color: audioButton.containsMouse ? Colors.tertiary_fg : Colors.primary
|
||||||
|
rightPadding: Config.spacing_fun(height)*1.5
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: audioSinkText
|
||||||
|
text: (Sink.mute ? "" :
|
||||||
|
Sink.volume > 60 ? "" :
|
||||||
|
Sink.volume > 30 ? "" :
|
||||||
|
"")
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
font.pixelSize: Config.iconSize(bar.height)
|
||||||
|
font.family: Config.font
|
||||||
|
color: audioButton.containsMouse ? Colors.tertiary_fg : Colors.primary
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: audioPercentageText
|
||||||
|
text: Sink.volume + "%"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
font.pixelSize: Config.iconSize(bar.height)
|
||||||
|
font.family: Config.font
|
||||||
|
color: audioButton.containsMouse ? Colors.tertiary_fg : Colors.primary
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
import QtQuick
|
||||||
|
import "../../../config"
|
||||||
|
import "../states/Audio"
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: audioButton
|
||||||
|
|
||||||
|
width: Math.max(audioText.width + Config.spacing_fun(height)*2, height)
|
||||||
|
height: bar.height
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
enabled: Sink.exists
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: audioButton.containsMouse ? Colors.tertiary : Qt.alpha(Colors.tertiaryContainer, 0.25)
|
||||||
|
radius: Config.radius_fun(audioButton.height)
|
||||||
|
border.width: Config.border_width
|
||||||
|
border.color: audioButton.containsMouse ? Colors.tertiaryContainer_fg
|
||||||
|
: Colors.secondaryContainer_fg
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: audioText
|
||||||
|
text: (Source.mute ? "" :
|
||||||
|
"")
|
||||||
|
anchors.centerIn: parent
|
||||||
|
font.pixelSize: Config.iconSize(bar.height)
|
||||||
|
font.family: Config.font
|
||||||
|
color: audioButton.containsMouse ? Colors.tertiary_fg : Colors.primary
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Wayland
|
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import "../../../config"
|
import "../../../config"
|
||||||
import "../states/Idle"
|
import "../states/Idle"
|
||||||
@@ -13,21 +12,6 @@ MouseArea {
|
|||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
||||||
required property PanelWindow panelWindow
|
|
||||||
|
|
||||||
IdleInhibitor {
|
|
||||||
id: idleInhibitor
|
|
||||||
window: panelWindow
|
|
||||||
enabled: IdleState.idle
|
|
||||||
}
|
|
||||||
|
|
||||||
IdleMonitor {
|
|
||||||
id: idleMonitor
|
|
||||||
enabled: true
|
|
||||||
timeout: 30
|
|
||||||
respectInhibitors: true
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
IdleState.idle = !IdleState.idle
|
IdleState.idle = !IdleState.idle
|
||||||
console.log("[IdleButton] Toggling idle: " + (IdleState.idle ? "enabled" : "disabled"))
|
console.log("[IdleButton] Toggling idle: " + (IdleState.idle ? "enabled" : "disabled"))
|
||||||
@@ -35,7 +19,7 @@ MouseArea {
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: idleButton.containsMouse ? Colors.tertiary : idleMonitor.isIdle ? Qt.alpha(Colors.secondary, 0.25) : Qt.alpha(Colors.tertiaryContainer, 0.25)
|
color: idleButton.containsMouse ? Colors.tertiary : IdleState.isIdle ? Qt.alpha(Colors.secondary, 0.25) : Qt.alpha(Colors.tertiaryContainer, 0.25)
|
||||||
radius: Config.radius_fun(idleButton.height)
|
radius: Config.radius_fun(idleButton.height)
|
||||||
border.width: Config.border_width
|
border.width: Config.border_width
|
||||||
border.color: (
|
border.color: (
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Widgets
|
||||||
|
import '../bar/states/Audio'
|
||||||
|
import "../../config"
|
||||||
|
|
||||||
|
LazyLoader {
|
||||||
|
active: Sink.volumeChanged
|
||||||
|
|
||||||
|
|
||||||
|
PanelWindow {
|
||||||
|
// Since the panel's screen is unset, it will be picked by the compositor
|
||||||
|
// when the window is created. Most compositors pick the current active monitor.
|
||||||
|
|
||||||
|
anchors.bottom: true
|
||||||
|
margins.bottom: screen.height / 5
|
||||||
|
exclusiveZone: 0
|
||||||
|
|
||||||
|
implicitWidth: Config.focusedMonitor.width/5
|
||||||
|
implicitHeight: Config.focusedMonitor.height/40
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
// An empty click mask prevents the window from blocking mouse events.
|
||||||
|
mask: Region {}
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
radius: height / 2
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
anchors {
|
||||||
|
fill: parent
|
||||||
|
leftMargin: 10
|
||||||
|
rightMargin: 15
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.alignment: Qt.AlignLeft
|
||||||
|
rightPadding: (text == "" || text == "" ? font.pixelSize/4 : text == "" ? font.pixelSize/6 : 0)
|
||||||
|
leftPadding: (text == "" || text == "" ? -font.pixelSize/15 : 0)
|
||||||
|
|
||||||
|
text: (
|
||||||
|
Sink.mute ? "" :
|
||||||
|
Sink.volume > 60 ? "" :
|
||||||
|
Sink.volume > 30 ? "" :
|
||||||
|
Sink.volume > 0 ? "" :
|
||||||
|
"")
|
||||||
|
font.pixelSize: 30
|
||||||
|
|
||||||
|
color: Colors.primary
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
// Stretches to fill all left-over space
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
implicitHeight: 10
|
||||||
|
radius: 20
|
||||||
|
color: "#50ffffff"
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
top: parent.top
|
||||||
|
bottom: parent.bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
implicitWidth: parent.width * (Sink.volume/100/1.5 ?? 0)
|
||||||
|
radius: parent.radius
|
||||||
|
|
||||||
|
color: Sink.volume/100 > 1 ? Colors.tertiary : Colors.primary
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
|
||||||
|
text: Sink.volume + "%"
|
||||||
|
font.pixelSize: 30
|
||||||
|
|
||||||
|
color: Colors.primary
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Widgets
|
||||||
|
import '../bar/states/Audio'
|
||||||
|
import "../../config"
|
||||||
|
|
||||||
|
LazyLoader {
|
||||||
|
active: Source.volumeChanged
|
||||||
|
|
||||||
|
|
||||||
|
PanelWindow {
|
||||||
|
// Since the panel's screen is unset, it will be picked by the compositor
|
||||||
|
// when the window is created. Most compositors pick the current active monitor.
|
||||||
|
|
||||||
|
anchors.bottom: true
|
||||||
|
margins.bottom: screen.height / 5 - implicitHeight
|
||||||
|
exclusiveZone: 0
|
||||||
|
|
||||||
|
implicitWidth: Config.focusedMonitor.width/5
|
||||||
|
implicitHeight: Config.focusedMonitor.height/40
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
// An empty click mask prevents the window from blocking mouse events.
|
||||||
|
mask: Region {}
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
radius: height / 2
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
anchors {
|
||||||
|
fill: parent
|
||||||
|
leftMargin: 10
|
||||||
|
rightMargin: 15
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
|
||||||
|
text: Source.mute ? "" : ""
|
||||||
|
font.pixelSize: 30
|
||||||
|
|
||||||
|
color: Colors.primary
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
// Stretches to fill all left-over space
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
implicitHeight: 10
|
||||||
|
radius: 20
|
||||||
|
color: "#50ffffff"
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
top: parent.top
|
||||||
|
bottom: parent.bottom
|
||||||
|
}
|
||||||
|
implicitWidth: parent.width * (Source.volume/100 ?? 0)
|
||||||
|
radius: parent.radius
|
||||||
|
|
||||||
|
color: Colors.primary
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
|
||||||
|
text: Source.volume + "%"
|
||||||
|
font.pixelSize: 30
|
||||||
|
|
||||||
|
color: Colors.primary
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ import "./modules/wp"
|
|||||||
import "./modules/wlogout"
|
import "./modules/wlogout"
|
||||||
import "./modules/jl"
|
import "./modules/jl"
|
||||||
import "./modules/background"
|
import "./modules/background"
|
||||||
|
import "./modules/volumeOSD"
|
||||||
|
|
||||||
ShellRoot {
|
ShellRoot {
|
||||||
id: root
|
id: root
|
||||||
@@ -26,6 +27,10 @@ ShellRoot {
|
|||||||
id : wlLoader
|
id : wlLoader
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//VolumeChangeOSD
|
||||||
|
SourceOSD {}
|
||||||
|
SinkOSD {}
|
||||||
|
|
||||||
// Background {}
|
// Background {}
|
||||||
|
|
||||||
function openWlogout() {
|
function openWlogout() {
|
||||||
|
|||||||
Reference in New Issue
Block a user