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/hyprland.nix
../../modules/home-manager/wlogout.nix # logout utility ../../modules/home-manager/wlogout.nix # logout utility
../../modules/home-manager/rofi.nix # launcher and keybindings helper ../../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/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/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/rclone.nix
../../modules/home-manager/waybar.nix #../../modules/home-manager/waybar.nix
../../modules/home-manager/quickshell.nix # used for widgets. Maybe it will replace waybar ../../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-posh.nix # zsh customizer
../../modules/home-manager/oh-my-zsh.nix # another zsh customizer ../../modules/home-manager/oh-my-zsh.nix # another zsh customizer
../../modules/home-manager/hypridle.nix ../../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, 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=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+$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, 3, exec, pavucontrol" # pos 1 2 audiocontrol
"Ctrl+$mod, 5, exec, gnome-characters" # pos 2 2 special chars "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 "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"; librewolf = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles";
manix = "custom-manix"; manix = "custom-manix";
man = "custom-man"; man = "custom-man";
mplayer = "mplayer -volume 5";
}; };
}; };
} }
+2 -2
View File
@@ -7,7 +7,7 @@ import Quickshell.Io
Singleton { Singleton {
id: root id: root
readonly property var getThemeProc: Process { /*readonly property var getThemeProc: Process {
running: true running: true
command: ["gsettings", "get", "org.gnome.desktop.interface", "color-scheme"] command: ["gsettings", "get", "org.gnome.desktop.interface", "color-scheme"]
stdout: SplitParser { stdout: SplitParser {
@@ -31,5 +31,5 @@ Singleton {
gtk4ThemeProc.running = true; gtk4ThemeProc.running = true;
gtk3ThemeProc.command = ["gsettings", "set", "org.gnome.desktop.interface", "gtk-theme", `"Adwaita${root.isDarkTheme ? "-dark" : ""}"`]; gtk3ThemeProc.command = ["gsettings", "set", "org.gnome.desktop.interface", "gtk-theme", `"Adwaita${root.isDarkTheme ? "-dark" : ""}"`];
gtk3ThemeProc.running = true; gtk3ThemeProc.running = true;
} }*/
} }
+2 -2
View File
@@ -91,7 +91,7 @@ PanelWindow {
spacing: 12 spacing: 12
Launcher {} //Launcher {}
Workspaces { Workspaces {
bar: root bar: root
@@ -154,7 +154,7 @@ PanelWindow {
bar: root bar: root
} }
Theme {} //Theme {}
Power { Power {
id: power id: power
+36 -1
View File
@@ -1,4 +1,4 @@
import QtQuick /*import QtQuick
BarButton { BarButton {
id: root 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 { Process {
id: dateProc id: dateProc
command: ["date", "+%H%M"] command: ["date", "+%H:%M"]
running: true running: true
stdout: SplitParser { stdout: SplitParser {
onRead: data => timetxt.text = data onRead: data => timetxt.text = data
+2 -1
View File
@@ -30,7 +30,8 @@ MouseArea {
Image { Image {
anchors.fill: parent 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 smooth: false
scale: popupLoader.active ? 0.9 : 1 scale: popupLoader.active ? 0.9 : 1
+1 -1
View File
@@ -10,7 +10,7 @@ MouseArea {
required property var bar required property var bar
property int wsBaseIndex: 1 property int wsBaseIndex: 1
property int wsCount: 7 property int wsCount: 9
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(bar.screen) readonly property HyprlandMonitor monitor: Hyprland.monitorFor(bar.screen)
property int currentIndex: 0 property int currentIndex: 0
property int existsCount: 0 property int existsCount: 0
+6 -3
View File
@@ -52,7 +52,8 @@ MouseArea {
acceptedButtons: Qt.LeftButton acceptedButtons: Qt.LeftButton
implicitWidth: 20 implicitWidth: 20
implicitHeight: 20 implicitHeight: 20
image: "../../assets/fastforward.png" //image: "../../assets/fastforward.png"
iconSource:"../../assets/fastforward.png"
mirror: true mirror: true
hoverEnabled: true hoverEnabled: true
enabled: MprisController.canGoPrevious enabled: MprisController.canGoPrevious
@@ -71,7 +72,8 @@ MouseArea {
implicitHeight: 26 implicitHeight: 26
Layout.leftMargin: -4 Layout.leftMargin: -4
Layout.rightMargin: -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 hoverEnabled: true
enabled: MprisController.canTogglePlaying enabled: MprisController.canTogglePlaying
onClicked: MprisController.togglePlaying() onClicked: MprisController.togglePlaying()
@@ -81,7 +83,8 @@ MouseArea {
acceptedButtons: Qt.LeftButton acceptedButtons: Qt.LeftButton
implicitWidth: 20 implicitWidth: 20
implicitHeight: 20 implicitHeight: 20
image: "../../assets/fastforward.png" //image: "../../assets/fastforward.png"
iconSource:"../../assets/fastforward.png"
hoverEnabled: true hoverEnabled: true
enabled: MprisController.canGoNext enabled: MprisController.canGoNext
onClicked: MprisController.next() onClicked: MprisController.next()
+20 -5
View File
@@ -355,7 +355,8 @@ PopupWindow {
implicitWidth: 24 implicitWidth: 24
implicitHeight: 24 implicitHeight: 24
enabled: MprisController.loopSupported enabled: MprisController.loopSupported
image: { //image: {
/*iconSource {
switch (MprisController.loopState) { switch (MprisController.loopState) {
case MprisLoopState.None: case MprisLoopState.None:
return "../../assets/repeat-off.png"; return "../../assets/repeat-off.png";
@@ -364,7 +365,17 @@ PopupWindow {
case MprisLoopState.Track: case MprisLoopState.Track:
return "../../assets/repeat-once.png"; 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: { onClicked: {
let target = MprisLoopState.None; let target = MprisLoopState.None;
switch (MprisController.loopState) { switch (MprisController.loopState) {
@@ -388,7 +399,8 @@ PopupWindow {
implicitWidth: 32 implicitWidth: 32
implicitHeight: 32 implicitHeight: 32
enabled: MprisController.canGoPrevious enabled: MprisController.canGoPrevious
image: "../../assets/fastforward.png" //image: "../../assets/fastforward.png"
iconSource: "../../assets/fastforward.png"
mirror: true mirror: true
onClicked: MprisController.previous() onClicked: MprisController.previous()
} }
@@ -397,7 +409,8 @@ PopupWindow {
implicitWidth: 42 implicitWidth: 42
implicitHeight: 42 implicitHeight: 42
enabled: MprisController.canTogglePlaying 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() onClicked: MprisController.togglePlaying()
} }
@@ -407,7 +420,8 @@ PopupWindow {
implicitWidth: 32 implicitWidth: 32
implicitHeight: 32 implicitHeight: 32
enabled: MprisController.canGoNext enabled: MprisController.canGoNext
image: "../../assets/fastforward.png" //image: "../../assets/fastforward.png"
iconSource: "../../assets/fastforward.png"
onClicked: MprisController.next() onClicked: MprisController.next()
} }
@@ -417,7 +431,8 @@ PopupWindow {
implicitWidth: 24 implicitWidth: 24
implicitHeight: 24 implicitHeight: 24
enabled: MprisController.shuffleSupported 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) onClicked: MprisController.setShuffle(!MprisController.hasShuffle)
} }
} }
+19 -2
View File
@@ -45,7 +45,7 @@ Item {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
Text { /*Text { // we sanitize in case there is some null notification
Layout.maximumWidth: bannerRect.width Layout.maximumWidth: bannerRect.width
text: root.notif.summary + (root.notif.body ? "\n=======" : "") text: root.notif.summary + (root.notif.body ? "\n=======" : "")
font.family: "BigBlueTermPlusNerdFont" font.family: "BigBlueTermPlusNerdFont"
@@ -63,7 +63,24 @@ Item {
font.pointSize: 14 font.pointSize: 14
font.bold: false font.bold: false
color: "#9292B6" 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 visible: false
Process { Process {
id: screamCmd 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: () => { onVisibleChanged: () => {
if (visible) { if (visible) {
@@ -177,7 +178,8 @@ Item {
Process { Process {
id: playSoundCmd 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() Component.onCompleted: playSoundCmd.startDetached()
} }
+10 -3
View File
@@ -28,10 +28,15 @@ PanelWindow {
onNotification: notif => { onNotification: notif => {
notif.tracked = true; notif.tracked = true;
root.notifs = [...root.notifs, notif]; //root.notifs = [...root.notifs, notif]; // sometimes sent as null
} if (notif) {
notif.tracked = true;
root.notifs = [...root.notifs, notif];
}
}
} }
visible: stack.children.length != 0 visible: stack.children.length != 0
mask: Region { mask: Region {
item: stack item: stack
@@ -79,11 +84,13 @@ PanelWindow {
notif: modelData notif: modelData
onDismissed: () => { onDismissed: () => {
if (notif) { //handles sometimes WARN scene: @notifs/Overlay.qml[82:-1]: TypeError: Cannot read property 'dismiss' of null
modelData.dismiss(); modelData.dismiss();
// Remove from list // Remove from list
const index = root.notifs.indexOf(notif); const index = root.notifs.indexOf(notif);
if (index > -1) if (index > -1)
root.notifs.splice(index, 1); root.notifs.splice(index, 1);
}
} }
} }
} }
+5 -5
View File
@@ -2,12 +2,12 @@ import Quickshell
import QtQuick import QtQuick
import "bar" as Bar import "bar" as Bar
import "notifs" as Notifs import "notifs" as Notifs
import "launcher" as Launcher //import "launcher" as Launcher
import "screenshot" as Screenshot import "screenshot" as Screenshot
import "lock" as Lock //import "lock" as Lock
ShellRoot { ShellRoot {
Bg {} //Bg {}
Bar.Bar { Bar.Bar {
id: bar id: bar
@@ -18,8 +18,8 @@ ShellRoot {
} }
Component.onCompleted: () => { Component.onCompleted: () => {
Launcher.Controller.init(); //Launcher.Controller.init();
Screenshot.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? things to do?
deadnix and aljandra to clean up the repo 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