qs: streamline IPC function names
This commit is contained in:
@@ -13,8 +13,6 @@ binds {
|
|||||||
Mod+C { spawn "code"; }
|
Mod+C { spawn "code"; }
|
||||||
Mod+E { spawn "dolphin" "--new-window"; }
|
Mod+E { spawn "dolphin" "--new-window"; }
|
||||||
Mod+W { spawn-sh "zen || zen-browser"; }
|
Mod+W { spawn-sh "zen || zen-browser"; }
|
||||||
Mod+X { spawn "qs" "ipc" "call" "notes" "openRecent"; }
|
|
||||||
Mod+Shift+X { spawn "qs" "ipc" "call" "notes" "createNote"; }
|
|
||||||
Mod+B { spawn-sh "pkill -x -n btop || wezterm -e btop"; }
|
Mod+B { spawn-sh "pkill -x -n btop || wezterm -e btop"; }
|
||||||
Mod+Shift+T { spawn "wezterm"; }
|
Mod+Shift+T { spawn "wezterm"; }
|
||||||
Mod+Shift+Return { spawn "wezterm"; }
|
Mod+Shift+Return { spawn "wezterm"; }
|
||||||
@@ -29,9 +27,11 @@ binds {
|
|||||||
Mod+N { spawn "qs" "ipc" "call" "bars" "toggleRight"; }
|
Mod+N { spawn "qs" "ipc" "call" "bars" "toggleRight"; }
|
||||||
Mod+Shift+L { spawn "qs" "ipc" "call" "bars" "toggleLyrics"; }
|
Mod+Shift+L { spawn "qs" "ipc" "call" "bars" "toggleLyrics"; }
|
||||||
Mod+Shift+K { spawn-sh "quickshell-kill || quickshell"; }
|
Mod+Shift+K { spawn-sh "quickshell-kill || quickshell"; }
|
||||||
Mod+I { spawn "qs" "ipc" "call" "idleInhibitor" "toggleInhibitor"; }
|
Mod+I { spawn "qs" "ipc" "call" "idleInhibitor" "toggle"; }
|
||||||
Mod+Alt+R { spawn "qs" "ipc" "call" "recording" "startOrStopRecording"; }
|
Mod+Alt+R { spawn "qs" "ipc" "call" "recording" "startOrStop"; }
|
||||||
Mod+Shift+E { spawn "qs" "ipc" "call" "sunset" "toggleSunset"; }
|
Mod+Shift+E { spawn "qs" "ipc" "call" "sunset" "toggle"; }
|
||||||
|
Mod+X { spawn "qs" "ipc" "call" "notes" "openRecent"; }
|
||||||
|
Mod+Shift+X { spawn "qs" "ipc" "call" "notes" "create"; }
|
||||||
|
|
||||||
// Rofi
|
// Rofi
|
||||||
Mod+D { spawn-sh "pkill -x rofi || rofi -show run"; }
|
Mod+D { spawn-sh "pkill -x rofi || rofi -show run"; }
|
||||||
@@ -40,9 +40,9 @@ binds {
|
|||||||
// Actions
|
// Actions
|
||||||
Mod+V { spawn-sh "fzfclip-wrap"; }
|
Mod+V { spawn-sh "fzfclip-wrap"; }
|
||||||
Mod+Period { spawn-sh "pkill -x rofi || rofi-emoji"; }
|
Mod+Period { spawn-sh "pkill -x rofi || rofi-emoji"; }
|
||||||
Print { spawn "niri" "msg" "action" "screenshot-screen"; }
|
Print { screenshot-screen; }
|
||||||
Mod+Shift+S { spawn "niri" "msg" "action" "screenshot"; }
|
Mod+Shift+S { screenshot; }
|
||||||
Mod+Ctrl+Shift+S { spawn "niri" "msg" "action" "screenshot-window"; }
|
Mod+Ctrl+Shift+S { screenshot-window; }
|
||||||
Mod+Shift+C { spawn "hyprpicker" "-a"; }
|
Mod+Shift+C { spawn "hyprpicker" "-a"; }
|
||||||
|
|
||||||
// Session
|
// Session
|
||||||
@@ -59,8 +59,8 @@ binds {
|
|||||||
XF86AudioPrev allow-when-locked=true { spawn "qs" "ipc" "call" "media" "previous"; }
|
XF86AudioPrev allow-when-locked=true { spawn "qs" "ipc" "call" "media" "previous"; }
|
||||||
|
|
||||||
// Brightness
|
// Brightness
|
||||||
XF86MonBrightnessUp allow-when-locked=true { spawn "qs" "ipc" "call" "brightness" "brightnessUp"; }
|
XF86MonBrightnessUp allow-when-locked=true { spawn "qs" "ipc" "call" "brightness" "up"; }
|
||||||
XF86MonBrightnessDown allow-when-locked=true { spawn "qs" "ipc" "call" "brightness" "brightnessDown"; }
|
XF86MonBrightnessDown allow-when-locked=true { spawn "qs" "ipc" "call" "brightness" "down"; }
|
||||||
|
|
||||||
// Window management
|
// Window management
|
||||||
Mod+Tab repeat=false { toggle-overview; }
|
Mod+Tab repeat=false { toggle-overview; }
|
||||||
|
|||||||
@@ -270,9 +270,14 @@ Variants {
|
|||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
spacing: Style.marginS
|
spacing: Style.marginS
|
||||||
|
|
||||||
TrayExpander {
|
Loader {
|
||||||
screen: modelData
|
active: NukeKded6.done
|
||||||
baseSize: rightLayout.height - Style.marginXS * 2
|
|
||||||
|
sourceComponent: TrayExpander {
|
||||||
|
screen: modelData
|
||||||
|
baseSize: rightLayout.height - Style.marginXS * 2
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UIconButton {
|
UIconButton {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import qs.Services
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function startOrStopRecording() {
|
function startOrStop() {
|
||||||
RecordService.startOrStop();
|
RecordService.startOrStop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,11 +22,11 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function previewWallpaper(path: string) {
|
function preview(path: string) {
|
||||||
BackgroundService.previewWallpaper(path);
|
BackgroundService.previewWallpaper(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setWallpaper(path: string) {
|
function set(path: string) {
|
||||||
BackgroundService.setWallpaper(path);
|
BackgroundService.setWallpaper(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,15 +66,15 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function setColor(name: string, value: color) {
|
function set(name: string, value: color) {
|
||||||
Colors.setColor(name, value);
|
Colors.setColor(name, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function unsetColor(name: string) {
|
function unset(name: string) {
|
||||||
Colors.unsetColor(name);
|
Colors.unsetColor(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getColor(name: string) : string {
|
function get(name: string) : string {
|
||||||
const hex = String(Colors[name]);
|
const hex = String(Colors[name]);
|
||||||
if (hex.startsWith("#") && hex.length === 9)
|
if (hex.startsWith("#") && hex.length === 9)
|
||||||
return "#" + hex.substring(3);
|
return "#" + hex.substring(3);
|
||||||
@@ -102,7 +102,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function toggleInhibitor() {
|
function toggle() {
|
||||||
Caffeine.manualToggle();
|
Caffeine.manualToggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function toggleSunset() {
|
function toggle() {
|
||||||
SunsetService.toggleSunset();
|
SunsetService.toggleSunset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,11 +118,11 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
function brightnessUp() {
|
function up() {
|
||||||
BrightnessService.getMonitorForScreen(Niri.focusedScreen).increaseBrightness();
|
BrightnessService.getMonitorForScreen(Niri.focusedScreen).increaseBrightness();
|
||||||
}
|
}
|
||||||
|
|
||||||
function brightnessDown() {
|
function down() {
|
||||||
BrightnessService.getMonitorForScreen(Niri.focusedScreen).decreaseBrightness();
|
BrightnessService.getMonitorForScreen(Niri.focusedScreen).decreaseBrightness();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ Item {
|
|||||||
NotesService.openRecent();
|
NotesService.openRecent();
|
||||||
}
|
}
|
||||||
|
|
||||||
function createNote() {
|
function create() {
|
||||||
NotesService.createNote();
|
NotesService.createNote();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Singleton {
|
|||||||
id: process
|
id: process
|
||||||
|
|
||||||
running: true
|
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) => {
|
onExited: (code, status) => {
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
}
|
}
|
||||||
. "$HOME/.local/snippets/apply-color-helper"
|
. "$HOME/.local/snippets/apply-color-helper"
|
||||||
|
|
||||||
qs ipc call colors setColor mPrimary "$colorHex"
|
qs ipc call colors set mPrimary "$colorHex"
|
||||||
|
|
||||||
|
|
||||||
log_success "quickshell"
|
log_success "quickshell"
|
||||||
|
|||||||
@@ -12,18 +12,15 @@ ShellRoot {
|
|||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
ImageCacheService.init();
|
ImageCacheService.init();
|
||||||
|
SunsetService;
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: loader
|
id: loader
|
||||||
|
|
||||||
active: Init.loaded && NukeKded6.done && ImageCacheService.initialized && ShellState.isLoaded
|
active: Init.loaded && ImageCacheService.initialized && ShellState.isLoaded
|
||||||
|
|
||||||
sourceComponent: Item {
|
sourceComponent: Item {
|
||||||
Component.onCompleted: {
|
|
||||||
SunsetService;
|
|
||||||
}
|
|
||||||
|
|
||||||
IPCService {
|
IPCService {
|
||||||
id: ipcService
|
id: ipcService
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,17 +16,17 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"onSelected": "qs ipc call background setWallpaper '{{ path }}'; change-colortheme -c '{{ colorHex }}'",
|
"onSelected": "qs ipc call background set '{{ path }}'; touch '{{ path }}'; change-colortheme -c '{{ colorHex }}'",
|
||||||
"onPreview": "qs ipc call background previewWallpaper '{{ path }}'; touch '{{ path }}'; change-colortheme -c '{{ colorHex }}' quickshell niri",
|
"onPreview": "qs ipc call background preview '{{ path }}'; change-colortheme -c '{{ colorHex }}' quickshell niri",
|
||||||
"quitOnSelected": true,
|
"quitOnSelected": true,
|
||||||
"saveState": [
|
"saveState": [
|
||||||
{
|
{
|
||||||
"key": "flavor",
|
"key": "flavor",
|
||||||
"fallback": "#89b4fa",
|
"fallback": "#89b4fa",
|
||||||
"command": "qs ipc call colors getColor mPrimary"
|
"command": "qs ipc call colors get mPrimary"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"onRestore": "qs ipc call background previewWallpaper ''; change-colortheme -c '{{ flavor }}' quickshell niri"
|
"onRestore": "qs ipc call background preview ''; change-colortheme -c '{{ flavor }}' quickshell niri"
|
||||||
},
|
},
|
||||||
"cache": {
|
"cache": {
|
||||||
"maxImageEntries": 300
|
"maxImageEntries": 300
|
||||||
|
|||||||
Reference in New Issue
Block a user