bar: component loader

This commit is contained in:
end-4
2026-02-03 18:17:02 +01:00
parent 28e580c2b1
commit 58184f5be8
9 changed files with 228 additions and 39 deletions
@@ -50,7 +50,7 @@ Singleton {
interval: root.readWriteDelay
repeat: false
onTriggered: {
configFileView.reload()
configFileView.reload();
}
}
@@ -59,7 +59,7 @@ Singleton {
interval: root.readWriteDelay
repeat: false
onTriggered: {
configFileView.writeAdapter()
configFileView.writeAdapter();
}
}
@@ -92,12 +92,16 @@ Singleton {
property string tool: "functions" // search, functions, or none
property list<var> extraModels: [
{
"api_format": "openai", // Most of the time you want "openai". Use "gemini" for Google's models
"api_format": "openai" // Most of the time you want "openai". Use "gemini" for Google's models
,
"description": "This is a custom model. Edit the config to add more! | Anyway, this is DeepSeek R1 Distill LLaMA 70B",
"endpoint": "https://openrouter.ai/api/v1/chat/completions",
"homepage": "https://openrouter.ai/deepseek/deepseek-r1-distill-llama-70b:free", // Not mandatory
"icon": "spark-symbolic", // Not mandatory
"key_get_link": "https://openrouter.ai/settings/keys", // Not mandatory
"homepage": "https://openrouter.ai/deepseek/deepseek-r1-distill-llama-70b:free" // Not mandatory
,
"icon": "spark-symbolic" // Not mandatory
,
"key_get_link": "https://openrouter.ai/settings/keys" // Not mandatory
,
"key_id": "openrouter",
"model": "deepseek/deepseek-r1-distill-llama-70b:free",
"name": "Custom: DS R1 Dstl. LLaMA 70B",
@@ -240,9 +244,15 @@ Singleton {
property bool floatStyleShadow: true // Show shadow behind bar when cornerStyle == 1 (Float)
property bool borderless: false // true for no grouping of items
property string topLeftIcon: "spark" // Options: "distro" or any icon name in ~/.config/quickshell/ii/assets/icons
property list<string> screenList: [] // List of names, like "eDP-1", find out with 'hyprctl monitors' command
property bool showBackground: true
property bool verbose: true
property bool vertical: false
property JsonObject indicators: JsonObject {
property JsonObject notifications: JsonObject {
property bool showUnreadCount: false
}
}
property JsonObject resources: JsonObject {
property bool alwaysShowSwap: true
property bool alwaysShowCpu: true
@@ -250,7 +260,9 @@ Singleton {
property int swapWarningThreshold: 85
property int cpuWarningThreshold: 90
}
property list<string> screenList: [] // List of names, like "eDP-1", find out with 'hyprctl monitors' command
property JsonObject tooltips: JsonObject {
property bool clickToShow: false
}
property JsonObject utilButtons: JsonObject {
property bool showScreenSnip: true
property bool showColorPicker: false
@@ -260,6 +272,13 @@ Singleton {
property bool showPerformanceProfileToggle: false
property bool showScreenRecord: false
}
property JsonObject weather: JsonObject {
property bool enable: false
property bool enableGPS: true // gps based location
property string city: "" // When 'enableGPS' is false
property bool useUSCS: false // Instead of metric (SI) units
property int fetchInterval: 10 // minutes
}
property JsonObject workspaces: JsonObject {
property bool monochromeIcons: true
property int shown: 10
@@ -269,21 +288,6 @@ Singleton {
property list<string> numberMap: ["1", "2"] // Characters to show instead of numbers on workspace indicator
property bool useNerdFont: false
}
property JsonObject weather: JsonObject {
property bool enable: false
property bool enableGPS: true // gps based location
property string city: "" // When 'enableGPS' is false
property bool useUSCS: false // Instead of metric (SI) units
property int fetchInterval: 10 // minutes
}
property JsonObject indicators: JsonObject {
property JsonObject notifications: JsonObject {
property bool showUnreadCount: false
}
}
property JsonObject tooltips: JsonObject {
property bool clickToShow: false
}
}
property JsonObject battery: JsonObject {
@@ -343,7 +347,8 @@ Singleton {
property int mouseScrollFactor: 120
property int touchpadScrollFactor: 450
}
property JsonObject deadPixelWorkaround: JsonObject { // Hyprland leaves out 1 pixel on the right for interactions
property JsonObject deadPixelWorkaround: JsonObject {
// Hyprland leaves out 1 pixel on the right for interactions
property bool enable: false
}
}
@@ -358,7 +363,7 @@ Singleton {
}
property JsonObject launcher: JsonObject {
property list<string> pinnedApps: [ "org.kde.dolphin", "kitty", "cmake-gui"]
property list<string> pinnedApps: ["org.kde.dolphin", "kitty", "cmake-gui"]
}
property JsonObject light: JsonObject {
@@ -463,7 +468,7 @@ Singleton {
property bool monochromeIcons: true
property bool showItemId: false
property bool invertPinnedItems: true // Makes the below a whitelist for the tray and blacklist for the pinned area
property list<var> pinnedItems: [ "Fcitx" ]
property list<var> pinnedItems: ["Fcitx"]
property bool filterPassive: true
}
@@ -527,12 +532,30 @@ Singleton {
property JsonObject android: JsonObject {
property int columns: 5
property list<var> toggles: [
{ "size": 2, "type": "network" },
{ "size": 2, "type": "bluetooth" },
{ "size": 1, "type": "idleInhibitor" },
{ "size": 1, "type": "mic" },
{ "size": 2, "type": "audio" },
{ "size": 2, "type": "nightLight" }
{
"size": 2,
"type": "network"
},
{
"size": 2,
"type": "bluetooth"
},
{
"size": 1,
"type": "idleInhibitor"
},
{
"size": 1,
"type": "mic"
},
{
"size": 2,
"type": "audio"
},
{
"size": 2,
"type": "nightLight"
}
]
}
}
@@ -546,7 +569,7 @@ Singleton {
}
property JsonObject screenRecord: JsonObject {
property string savePath: Directories.videos.replace("file://","") // strip "file://"
property string savePath: Directories.videos.replace("file://", "") // strip "file://"
}
property JsonObject screenSnip: JsonObject {
@@ -579,11 +602,11 @@ Singleton {
property int adviseUpdateThreshold: 75 // packages
property int stronglyAdviseUpdateThreshold: 200 // packages
}
property JsonObject wallpaperSelector: JsonObject {
property bool useSystemFileDialog: false
}
property JsonObject windows: JsonObject {
property bool showTitlebar: true // Client-side decoration for shell apps
property bool centerTitle: true
@@ -59,6 +59,7 @@ Singleton {
// Cleanup on init
Component.onCompleted: {
Quickshell.execDetached(["mkdir", "-p", `${shellConfig}`])
Quickshell.execDetached(["mkdir", "-p", `${userComponents}`])
Quickshell.execDetached(["mkdir", "-p", `${favicons}`])
Quickshell.execDetached(["bash", "-c", `rm -rf '${coverArt}'; mkdir -p '${coverArt}'`])
Quickshell.execDetached(["bash", "-c", `rm -rf '${booruPreviews}'; mkdir -p '${booruPreviews}'`])
@@ -7,5 +7,6 @@ JsonObject {
property list<var> leftWidgets: []
property list<var> centerWidgets: []
property list<var> rightWidgets: []
property bool m3ExpressiveGrouping: true
}
}
@@ -0,0 +1,21 @@
import QtQuick
import qs.modules.common as C
// This is to enable future fancy styles for rectangles. Some ideas:
// - normal rounded rect
// - osk.sh
// - 3d
// i hope i actually get to this and not shrimply forget
Rectangle {
enum ContentLayer { Background, Pane, Group, Subgroup, Control }
property var contentLayer: StyledRectangle.ContentLayer.Pane // To appropriately add effects like shadows/3d-ization
color: switch(contentLayer) {
case StyledRectangle.ContentLayer.Background: C.Appearance.colors.colLayer0;
case StyledRectangle.ContentLayer.Pane: C.Appearance.colors.colLayer1;
case StyledRectangle.ContentLayer.Group: C.Appearance.colors.colLayer2;
case StyledRectangle.ContentLayer.Subgroup: C.Appearance.colors.colLayer3;
case StyledRectangle.ContentLayer.Control: C.Appearance.colors.colLayer4;
default: C.Appearance.colors.colLayer1;
}
}
@@ -0,0 +1,17 @@
import QtQuick
import qs.modules.common as C
FallbackLoader {
id: root
required property string componentName
property string context // Path for the builtin component
readonly property string componentNameWithExt: componentName.endsWith(".qml") ? componentName : `${componentName}.qml`
source: `${C.Directories.userComponents}/${componentNameWithExt}`
fallbacks: [
...(context ? [ `${context}/${componentNameWithExt}` ] : []),
componentNameWithExt
]
}