quickshell: auto expand some monitorItem on value changes (just being too lazy to write a popup : )
This commit is contained in:
18
README.md
18
README.md
@@ -36,29 +36,33 @@ Based on an old version of [end-4/dots-hyprland](https://github.com/end-4/dots-h
|
|||||||
|
|
||||||
## Niri
|
## Niri
|
||||||
|
|
||||||
Ported from Hyprland, and shares some of the desktop components such as hyprlock & hypridle & mako, but uses quickshell as bar and desktop-widgets instead of the combination of waybar and eww.
|
Ported from Hyprland, and shares some of the desktop components such as hyprlock & hypridle, but uses quickshell as bar / desktop widgets / notification daemon / ...
|
||||||
|
|
||||||
## Quickshell
|
## Quickshell
|
||||||
|
|
||||||
Not based on, but heavily depends on modules from [noctalia-shell](https://github.com/noctalia-dev/noctalia-shell). This setup is currently only adapted for Niri.
|
Not based on, but heavily depends on many modules from [noctalia-shell](https://github.com/noctalia-dev/noctalia-shell). A thousand thanks to their great work.
|
||||||
|
|
||||||
|
This setup is currently only adapted for Niri.
|
||||||
|
|
||||||
## Eww
|
## Eww
|
||||||
|
|
||||||
- `main`, main dashboard, modified from [syndrizzle/hotfiles](https://github.com/syndrizzle/hotfiles/tree/bspwm) without notification center.
|
- `main`, main dashboard, modified from [syndrizzle/hotfiles](https://github.com/syndrizzle/hotfiles/tree/bspwm) but without notification center.
|
||||||
- `lyrics`, scrolling lyrics player, depends on [a small program](https://github.com/Uyanide/spotify-lyrics) from myself <small>(which also happens to be my frist Golang program :D)</small>.
|
- `lyrics`, scrolling lyrics player, depends on [a small utility](https://github.com/Uyanide/spotify-lyrics) from myself <small>(which also happens to be my frist Golang program :D)</small>.
|
||||||
- `lyrics-single`, similar to `lyrics`, but only with a single line and can be easily embeded into the status bar.
|
- `lyrics-single`, similar to `lyrics`, but only with a single line and can be easily embeded into the status bar.
|
||||||
|
|
||||||
## Swww
|
## Swww
|
||||||
|
|
||||||
In Niri, the wallpaper will be automatically blurred when there are windows in focus. And the backdrop also has a blurred wallpaper applied to it. These are implemented in [wallpaper-daemon](https://github.com/Uyanide/dotfiles/blob/main/.scripts/wallpaper-daemon).
|
The wallpaper will be automatically blurred when there are windows in focus. And the backdrop (overview) also has a blurred version of the wallpaper applied to its background. These are implemented in [wallpaper-daemon](https://github.com/Uyanide/dotfiles/blob/main/.scripts/wallpaper-daemon).
|
||||||
|
|
||||||
|
This feature is only enabled in Niri. Swww also manages the wallpaper of the Hyprland setup, yet only in the regular way.
|
||||||
|
|
||||||
## Rofi
|
## Rofi
|
||||||
|
|
||||||
Based on [codeopshq/dotfiles](https://github.com/codeopshq/dotfiles), also serves as cliphist browser and emojis picker.
|
Based on [codeopshq/dotfiles](https://github.com/codeopshq/dotfiles), also serves as clipboard history browser and emoji picker.
|
||||||
|
|
||||||
## Grub theme
|
## Grub theme
|
||||||
|
|
||||||
Based on [vinceliuice/Elegant-grub2-themes](https://github.com/vinceliuice/Elegant-grub2-themes) with the [illustration from 紺屋鴉江](https://www.pixiv.net/artworks/119683453).
|
Based on [vinceliuice/Elegant-grub2-themes](https://github.com/vinceliuice/Elegant-grub2-themes) with [illustration from 紺屋鴉江](https://www.pixiv.net/artworks/119683453).
|
||||||
|
|
||||||
## MPV
|
## MPV
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"location": "Munich",
|
"location": "Munich",
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"doNotDisturb": false,
|
"doNotDisturb": false,
|
||||||
"lastSeenTs": 1760397059000
|
"lastSeenTs": 1760464428000
|
||||||
},
|
},
|
||||||
"primaryColor": "#89b4fa",
|
"primaryColor": "#89b4fa",
|
||||||
"showLyricsBar": false
|
"showLyricsBar": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ MonitorItem {
|
|||||||
}
|
}
|
||||||
maxValue: 100
|
maxValue: 100
|
||||||
textSuffix: "%"
|
textSuffix: "%"
|
||||||
|
expandOnValueChange: true
|
||||||
onWheelUp: {
|
onWheelUp: {
|
||||||
const monitor = getMonitor();
|
const monitor = getMonitor();
|
||||||
if (monitor)
|
if (monitor)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ MonitorItem {
|
|||||||
value: Math.round(AudioService.volume * 100)
|
value: Math.round(AudioService.volume * 100)
|
||||||
maxValue: 100
|
maxValue: 100
|
||||||
textSuffix: "%"
|
textSuffix: "%"
|
||||||
|
expandOnValueChange: true
|
||||||
onWheelUp: {
|
onWheelUp: {
|
||||||
AudioService.increaseVolume();
|
AudioService.increaseVolume();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ Item {
|
|||||||
property color fillColor: Colors.primary
|
property color fillColor: Colors.primary
|
||||||
property string textSuffix: ""
|
property string textSuffix: ""
|
||||||
property bool pointerCursor: true
|
property bool pointerCursor: true
|
||||||
property alias hovered: mouseArea.containsMouse
|
property bool expandOnValueChange: false
|
||||||
|
property real hideTimeOut: 2000 // ms
|
||||||
|
property bool forceExpand: false
|
||||||
|
property bool _expand: forceExpand || mouseArea.containsMouse
|
||||||
property bool disableHover: false
|
property bool disableHover: false
|
||||||
property bool critical: false
|
property bool critical: false
|
||||||
property color criticalColor: Colors.red
|
property color criticalColor: Colors.red
|
||||||
@@ -27,7 +30,34 @@ Item {
|
|||||||
signal rightClicked()
|
signal rightClicked()
|
||||||
|
|
||||||
implicitHeight: parent.height - 5
|
implicitHeight: parent.height - 5
|
||||||
implicitWidth: parent.height + (hovered ? textDisplay.width : 0)
|
implicitWidth: parent.height + (_expand ? textDisplay.width : 0)
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
id: connectionLoader
|
||||||
|
|
||||||
|
active: expandOnValueChange
|
||||||
|
|
||||||
|
sourceComponent: Connections {
|
||||||
|
function onValueChanged() {
|
||||||
|
root.forceExpand = true;
|
||||||
|
hideTimer.restart();
|
||||||
|
}
|
||||||
|
|
||||||
|
target: root
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: hideTimer
|
||||||
|
|
||||||
|
interval: parent.hideTimeOut
|
||||||
|
running: false
|
||||||
|
repeat: false
|
||||||
|
onTriggered: {
|
||||||
|
root.forceExpand = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
@@ -114,7 +144,7 @@ Item {
|
|||||||
id: textDisplay
|
id: textDisplay
|
||||||
|
|
||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
implicitWidth: root.hovered ? textLabel.implicitWidth + 10 : 0
|
implicitWidth: root._expand ? textLabel.implicitWidth + 10 : 0
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
@@ -127,7 +157,7 @@ Item {
|
|||||||
font.pointSize: Fonts.small
|
font.pointSize: Fonts.small
|
||||||
font.family: Fonts.primary
|
font.family: Fonts.primary
|
||||||
color: root.realColor
|
color: root.realColor
|
||||||
opacity: root.hovered ? 1 : 0
|
opacity: root._expand ? 1 : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on implicitWidth {
|
Behavior on implicitWidth {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Singleton {
|
|||||||
id: process
|
id: process
|
||||||
|
|
||||||
running: true
|
running: true
|
||||||
command: ["sh", "-c", "kquitapp6 kded6"]
|
command: ["kquitapp6", "kded6"]
|
||||||
onExited: (code, status) => {
|
onExited: (code, status) => {
|
||||||
if (code !== 0)
|
if (code !== 0)
|
||||||
Logger.warn("NukeKded6", `Failed to kill kded6: ${code}`);
|
Logger.warn("NukeKded6", `Failed to kill kded6: ${code}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user