qs: streamline IPC function names

This commit is contained in:
2026-03-08 14:43:09 +01:00
parent 0d13a02e29
commit 12529a4c3c
7 changed files with 37 additions and 35 deletions
@@ -270,9 +270,14 @@ Variants {
Layout.fillHeight: true
spacing: Style.marginS
TrayExpander {
screen: modelData
baseSize: rightLayout.height - Style.marginXS * 2
Loader {
active: NukeKded6.done
sourceComponent: TrayExpander {
screen: modelData
baseSize: rightLayout.height - Style.marginXS * 2
}
}
UIconButton {
@@ -6,7 +6,7 @@ import qs.Services
Item {
IpcHandler {
function startOrStopRecording() {
function startOrStop() {
RecordService.startOrStop();
}
@@ -22,11 +22,11 @@ Item {
}
IpcHandler {
function previewWallpaper(path: string) {
function preview(path: string) {
BackgroundService.previewWallpaper(path);
}
function setWallpaper(path: string) {
function set(path: string) {
BackgroundService.setWallpaper(path);
}
@@ -66,15 +66,15 @@ Item {
}
IpcHandler {
function setColor(name: string, value: color) {
function set(name: string, value: color) {
Colors.setColor(name, value);
}
function unsetColor(name: string) {
function unset(name: string) {
Colors.unsetColor(name);
}
function getColor(name: string) : string {
function get(name: string) : string {
const hex = String(Colors[name]);
if (hex.startsWith("#") && hex.length === 9)
return "#" + hex.substring(3);
@@ -102,7 +102,7 @@ Item {
}
IpcHandler {
function toggleInhibitor() {
function toggle() {
Caffeine.manualToggle();
}
@@ -110,7 +110,7 @@ Item {
}
IpcHandler {
function toggleSunset() {
function toggle() {
SunsetService.toggleSunset();
}
@@ -118,11 +118,11 @@ Item {
}
IpcHandler {
function brightnessUp() {
function up() {
BrightnessService.getMonitorForScreen(Niri.focusedScreen).increaseBrightness();
}
function brightnessDown() {
function down() {
BrightnessService.getMonitorForScreen(Niri.focusedScreen).decreaseBrightness();
}
@@ -134,7 +134,7 @@ Item {
NotesService.openRecent();
}
function createNote() {
function create() {
NotesService.createNote();
}
@@ -10,7 +10,7 @@ Singleton {
id: process
running: true
command: ["sh", "-c", "pgrep -x kded6 && { { type kquitapp6 && kquitapp6 kded6 || killall -9 kded6; }; sleep 0.5; } >/dev/null 2>&1"]
command: ["sh", "-c", "pgrep -x kded6 && { { type kquitapp6 && kquitapp6 kded6 || pkill -9 -x kded6; }; sleep 0.5; }"]
onExited: (code, status) => {
done = true;
}
@@ -6,7 +6,7 @@
}
. "$HOME/.local/snippets/apply-color-helper"
qs ipc call colors setColor mPrimary "$colorHex"
qs ipc call colors set mPrimary "$colorHex"
log_success "quickshell"
@@ -12,18 +12,15 @@ ShellRoot {
Component.onCompleted: {
ImageCacheService.init();
SunsetService;
}
Loader {
id: loader
active: Init.loaded && NukeKded6.done && ImageCacheService.initialized && ShellState.isLoaded
active: Init.loaded && ImageCacheService.initialized && ShellState.isLoaded
sourceComponent: Item {
Component.onCompleted: {
SunsetService;
}
IPCService {
id: ipcService
}