fixed a lot of quickshell problems

This commit is contained in:
Tomas Rivera
2026-03-10 18:38:32 +01:00
parent b9e3f35abe
commit 25dc8507b8
16 changed files with 145 additions and 32 deletions
+3 -3
View File
@@ -17,12 +17,12 @@
../../modules/home-manager/hyprland.nix
../../modules/home-manager/wlogout.nix # logout utility
../../modules/home-manager/rofi.nix # launcher and keybindings helper
../../modules/home-manager/swaync.nix # notification daemon
#notifications are now manager with quickshell../../modules/home-manager/swaync.nix # notification daemon
../../modules/home-manager/neovim.nix # dont use nixvim. broken
#../../modules/home-manager/neovim2.nix # ./neovim2.nix uses vim plug instead of the nix repository as with ./neovim.nix see the begining of neovim2 for an explanation
../../modules/home-manager/rclone.nix
../../modules/home-manager/waybar.nix
../../modules/home-manager/quickshell.nix # used for widgets. Maybe it will replace waybar
#../../modules/home-manager/waybar.nix
../../modules/home-manager/quickshell.nix # used for widgets, waybar and notifications
#../../modules/home-manager/oh-my-posh.nix # zsh customizer
../../modules/home-manager/oh-my-zsh.nix # another zsh customizer
../../modules/home-manager/hypridle.nix
+1 -1
View File
@@ -144,7 +144,7 @@ in {
"Ctrl+$mod, 4, exec, kitty -e 'custom-launch'"
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T "
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'"
"Ctrl+Alt, 1, exec, swaync-client -t" # pos 4 1 notification center
#"Ctrl+Alt, 1, exec, swaync-client -t" # pos 4 1 notification center
"Ctrl+$mod, 3, exec, pavucontrol" # pos 1 2 audiocontrol
"Ctrl+$mod, 5, exec, gnome-characters" # pos 2 2 special chars
"Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 3 2 colorpicker
+1
View File
@@ -29,6 +29,7 @@
librewolf = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles";
manix = "custom-manix";
man = "custom-man";
mplayer = "mplayer -volume 5";
};
};
}
+2 -2
View File
@@ -7,7 +7,7 @@ import Quickshell.Io
Singleton {
id: root
readonly property var getThemeProc: Process {
/*readonly property var getThemeProc: Process {
running: true
command: ["gsettings", "get", "org.gnome.desktop.interface", "color-scheme"]
stdout: SplitParser {
@@ -31,5 +31,5 @@ Singleton {
gtk4ThemeProc.running = true;
gtk3ThemeProc.command = ["gsettings", "set", "org.gnome.desktop.interface", "gtk-theme", `"Adwaita${root.isDarkTheme ? "-dark" : ""}"`];
gtk3ThemeProc.running = true;
}
}*/
}
+2 -2
View File
@@ -91,7 +91,7 @@ PanelWindow {
spacing: 12
Launcher {}
//Launcher {}
Workspaces {
bar: root
@@ -154,7 +154,7 @@ PanelWindow {
bar: root
}
Theme {}
//Theme {}
Power {
id: power
+36 -1
View File
@@ -1,4 +1,4 @@
import QtQuick
/*import QtQuick
BarButton {
id: root
@@ -17,4 +17,39 @@ BarButton {
}
}
}
}*/
import QtQuick
BarButton {
id: root
// NEW property: stores the intended image path
property string iconSource: ""
// optional: alias for external access
property alias mirror: img.mirror
implicitWidth: 24
implicitHeight: 24
Image {
id: img
anchors.fill: parent
smooth: false
// Use the property, fallback if empty
//source: root.iconSource ? root.iconSource : "../assets/noaudio.png"
Component.onCompleted: {
source: typeof root.iconSource === "string" && root.iconSource.length > 0
? root.iconSource
: "../assets/noaudio.png"
}
onSourceChanged: {
console.log("ClickableIcon: iconSource =", root.iconSource, " -> Image.source =", img.source);
}
scale: root.containsMouse ? 0.9 : 1
Behavior on scale {
NumberAnimation { duration: 70 }
}
}
}
+1 -1
View File
@@ -13,7 +13,7 @@ Text {
Process {
id: dateProc
command: ["date", "+%H%M"]
command: ["date", "+%H:%M"]
running: true
stdout: SplitParser {
onRead: data => timetxt.text = data
+2 -1
View File
@@ -30,7 +30,8 @@ MouseArea {
Image {
anchors.fill: parent
source: `../assets/${root.node.audio.muted ? "noaudio" : "audio"}.png`
//source: `../assets/${root.node.audio.muted ? "noaudio" : "audio"}.png`
source: root.node ? `../assets/${root.node.audio.muted ? "noaudio" : "audio"}.png` : "../assets/noaudio.png"
smooth: false
scale: popupLoader.active ? 0.9 : 1
+1 -1
View File
@@ -10,7 +10,7 @@ MouseArea {
required property var bar
property int wsBaseIndex: 1
property int wsCount: 7
property int wsCount: 9
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(bar.screen)
property int currentIndex: 0
property int existsCount: 0
+6 -3
View File
@@ -52,7 +52,8 @@ MouseArea {
acceptedButtons: Qt.LeftButton
implicitWidth: 20
implicitHeight: 20
image: "../../assets/fastforward.png"
//image: "../../assets/fastforward.png"
iconSource:"../../assets/fastforward.png"
mirror: true
hoverEnabled: true
enabled: MprisController.canGoPrevious
@@ -71,7 +72,8 @@ MouseArea {
implicitHeight: 26
Layout.leftMargin: -4
Layout.rightMargin: -4
image: `../../assets/${MprisController.isPlaying ? "pause" : "play"}.png`
//image: `../../assets/${MprisController.isPlaying ? "pause" : "play"}.png`
iconSource:`../../assets/${MprisController.isPlaying ? "pause" : "play"}.png`
hoverEnabled: true
enabled: MprisController.canTogglePlaying
onClicked: MprisController.togglePlaying()
@@ -81,7 +83,8 @@ MouseArea {
acceptedButtons: Qt.LeftButton
implicitWidth: 20
implicitHeight: 20
image: "../../assets/fastforward.png"
//image: "../../assets/fastforward.png"
iconSource:"../../assets/fastforward.png"
hoverEnabled: true
enabled: MprisController.canGoNext
onClicked: MprisController.next()
+20 -5
View File
@@ -355,7 +355,8 @@ PopupWindow {
implicitWidth: 24
implicitHeight: 24
enabled: MprisController.loopSupported
image: {
//image: {
/*iconSource {
switch (MprisController.loopState) {
case MprisLoopState.None:
return "../../assets/repeat-off.png";
@@ -364,7 +365,17 @@ PopupWindow {
case MprisLoopState.Track:
return "../../assets/repeat-once.png";
}
}*/
function getLoopIcon() {
switch (MprisController.loopState) {
case MprisLoopState.None: return "../../assets/repeat-off.png";
case MprisLoopState.Playlist: return "../../assets/repeat.png";
case MprisLoopState.Track: return "../../assets/repeat-once.png";
}
return "../../assets/repeat-off.png"; // fallback
}
iconSource: getLoopIcon()
onClicked: {
let target = MprisLoopState.None;
switch (MprisController.loopState) {
@@ -388,7 +399,8 @@ PopupWindow {
implicitWidth: 32
implicitHeight: 32
enabled: MprisController.canGoPrevious
image: "../../assets/fastforward.png"
//image: "../../assets/fastforward.png"
iconSource: "../../assets/fastforward.png"
mirror: true
onClicked: MprisController.previous()
}
@@ -397,7 +409,8 @@ PopupWindow {
implicitWidth: 42
implicitHeight: 42
enabled: MprisController.canTogglePlaying
image: `../../assets/${MprisController.isPlaying ? "pause" : "play"}.png`
//image: `../../assets/${MprisController.isPlaying ? "pause" : "play"}.png`
iconSource: `../../assets/${MprisController.isPlaying ? "pause" : "play"}.png`
onClicked: MprisController.togglePlaying()
}
@@ -407,7 +420,8 @@ PopupWindow {
implicitWidth: 32
implicitHeight: 32
enabled: MprisController.canGoNext
image: "../../assets/fastforward.png"
//image: "../../assets/fastforward.png"
iconSource: "../../assets/fastforward.png"
onClicked: MprisController.next()
}
@@ -417,7 +431,8 @@ PopupWindow {
implicitWidth: 24
implicitHeight: 24
enabled: MprisController.shuffleSupported
image: `../../assets/${MprisController.hasShuffle ? "shuffle" : "noshuffle"}.png`
//image: `../../assets/${MprisController.hasShuffle ? "shuffle" : "noshuffle"}.png`
iconSource: `../../assets/${MprisController.hasShuffle ? "shuffle" : "noshuffle"}.png`
onClicked: MprisController.setShuffle(!MprisController.hasShuffle)
}
}
+18 -1
View File
@@ -45,7 +45,7 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
Text {
/*Text { // we sanitize in case there is some null notification
Layout.maximumWidth: bannerRect.width
text: root.notif.summary + (root.notif.body ? "\n=======" : "")
font.family: "BigBlueTermPlusNerdFont"
@@ -63,6 +63,23 @@ Item {
font.pointSize: 14
font.bold: false
color: "#9292B6"
}*/
Text {
text: root.notif ? root.notif.summary + (root.notif.body ? "\n" : "") : ""
font.family: "BigBlueTermPlusNerdFont"
wrapMode: Text.Wrap
font.pointSize: 18
font.bold: true
color: "#9292B6"
}
Text {
text: root.notif ? root.notif.body : ""
font.family: "BigBlueTermPlusNerdFont"
wrapMode: Text.Wrap
font.pointSize: 14
font.bold: false
color: "#9292B6"
}
}
}
+4 -2
View File
@@ -117,7 +117,8 @@ Item {
visible: false
Process {
id: screamCmd
command: ["play", "--no-show-progress", "assets/wilhelm-scream.ogg"]
command: ["mplayer", "../assets/wilhelm-scream.ogg"]
//command: ["play", "--no-show-progress", "assets/wilhelm-scream.ogg"]
}
onVisibleChanged: () => {
if (visible) {
@@ -177,7 +178,8 @@ Item {
Process {
id: playSoundCmd
command: ["play", "--no-show-progress", "assets/trumpet.wav"]
command: ["mplayer", "../assets/trumpet.wav"]
//command: ["play", "--no-show-progress", "assets/trumpet.wav"]
}
Component.onCompleted: playSoundCmd.startDetached()
}
+7
View File
@@ -27,10 +27,15 @@ PanelWindow {
actionsSupported: true
onNotification: notif => {
notif.tracked = true;
//root.notifs = [...root.notifs, notif]; // sometimes sent as null
if (notif) {
notif.tracked = true;
root.notifs = [...root.notifs, notif];
}
}
}
visible: stack.children.length != 0
mask: Region {
@@ -79,6 +84,7 @@ PanelWindow {
notif: modelData
onDismissed: () => {
if (notif) { //handles sometimes WARN scene: @notifs/Overlay.qml[82:-1]: TypeError: Cannot read property 'dismiss' of null
modelData.dismiss();
// Remove from list
const index = root.notifs.indexOf(notif);
@@ -88,3 +94,4 @@ PanelWindow {
}
}
}
}
+5 -5
View File
@@ -2,12 +2,12 @@ import Quickshell
import QtQuick
import "bar" as Bar
import "notifs" as Notifs
import "launcher" as Launcher
//import "launcher" as Launcher
import "screenshot" as Screenshot
import "lock" as Lock
//import "lock" as Lock
ShellRoot {
Bg {}
//Bg {}
Bar.Bar {
id: bar
@@ -18,8 +18,8 @@ ShellRoot {
}
Component.onCompleted: () => {
Launcher.Controller.init();
//Launcher.Controller.init();
Screenshot.Controller.init();
Lock.Controller.init();
//Lock.Controller.init();
}
}
+32
View File
@@ -20,3 +20,35 @@ maybe configure a bit ripgrep? majuscules
things to do?
deadnix and aljandra to clean up the repo
with quickshell:
see all thoses waarnings and errors
set keybinds. for screenshot
fix screenshot (copy, write, etc.)
fix battery icon
fix player control icons
remove unnecessary stuff
maybe modify some of the images (like the notification body)
do a full bar (no ugly empty space at top)
add brightness slider
maybe change sound icon by volume level
maybe incorpore the fast fourier transform code
add some modules to see system stats
maybe write some notification center
battery dashboard https://www.reddit.com/r/hyprland/comments/1rkiajd/a_beautiful_battery_system_dashboard_on_hyprland/
some meteo center with dates, etc
show name of the app
make the connection tray prettier? Maybe with a full rewrite
maybe some kind of overview?
see what people did with quickshell and take inspiration