scripts: deleted 2 & added config-load & edited some

This commit is contained in:
2025-10-19 22:37:07 +02:00
parent 75e6c1155c
commit a443546b2f
13 changed files with 97 additions and 35 deletions

View File

@@ -120,9 +120,6 @@ layer-rule {
// Switch configs
spawn-sh-at-startup "config-switch niri"
// Idle
spawn-sh-at-startup "hypridle"
// Wallpaper
spawn-at-startup "wallpaper-daemon"
@@ -149,9 +146,10 @@ spawn-at-startup "sunshine"
// spawn-at-startup "spotify"
// spawn-at-startup "thunderbird"
// Idle
spawn-at-startup "hypridle"
// Quickshell must start after hypridle,
// otherwise Firefox cannot block idle when playing media
// QuickShell
spawn-at-startup "quickshell"
/************************Envs************************/
@@ -439,5 +437,5 @@ binds {
Mod+M allow-inhibiting=false { quit; }
Mod+Shift+P { power-off-monitors; }
Mod+Shift+P { spawn-sh "(hyprlock &) && niri msg action power-off-monitors"; }
}

View File

@@ -9,8 +9,8 @@ Singleton {
// Nerd fonts icons
readonly property string distro: "󰣇"
readonly property string tray: ""
readonly property string idleInhibitorActivated: ""
readonly property string idleInhibitorDeactivated: ""
readonly property string idleInhibitorActivated: "󰅶"
readonly property string idleInhibitorDeactivated: "󰾪"
readonly property string powerMenu: "󰐥"
readonly property string volumeHigh: ""
readonly property string volumeMedium: ""

View File

@@ -18,6 +18,7 @@ Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
spacing: 0
SymbolButton {
symbol: Icons.tray

View File

@@ -281,7 +281,7 @@ Singleton {
Quickshell.execDetached(["ddcutil", "-b", busNum, "setvcp", "10", rounded])
} else {
monitor.ignoreNextChange = true
Quickshell.execDetached(["set-brightness", rounded + "%"])
Quickshell.execDetached(["sh", "-c", "brightnessctl -d $BRIGHTNESSCTL_DEVICE set "+ rounded + "%"])
}
if (isDdc) {

View File

@@ -26,7 +26,7 @@ Singleton {
Logger.log("LyricsService", "Starting lyrics syncing");
// fill lyrics with empty lines
lyrics = Array(linesCount).fill(" ");
listenProcess.exec(["sh", "-c", `sl-wrap listen -l ${linesCount} -a ${linesAhead} -f ${offsetFile}`]);
listenProcess.exec(["sh", "-c", `pkill -x spotify-lyrics -u $USER; spotify-lyrics listen -l ${linesCount} -a ${linesAhead} -f ${offsetFile}`]);
}
}
@@ -35,14 +35,13 @@ Singleton {
Logger.log("LyricsService", "Reference count:", referenceCount);
if (referenceCount <= 0) {
Logger.log("LyricsService", "Stopping lyrics syncing");
// Execute again to stop
// kinda ugly but works, but meanwhile:
// kinda ugly but works, meanwhile:
// listenProcess.signal(9)
// listenProcess.signal(15)
// listenProcess.running = false
// counts on exec() to terminate previous exec()
// counting on exec() to terminate previous exec()
// all don't work
listenProcess.exec(["sh", "-c", `sl-wrap trackid`]);
listenProcess.exec(["sh", "-c", `pkill -x spotify-lyrics -u $USER`]);
}
}

View File

@@ -136,8 +136,8 @@
"format-alt-click": "click-right",
//"format-icons": ["", ""],
"format-icons": [""],
"on-scroll-down": "brightnessctl --class=backlight set -5%",
"on-scroll-up": "brightnessctl --class=backlight set +5%",
"on-scroll-down": "brightnessctl -d $BRIGHTNESSCTL_DEVICE set -5%",
"on-scroll-up": "brightnessctl -d $BRIGHTNESSCTL_DEVICE set +5%",
"max-length": 6,
"min-length": 6
},