show biggest app icon on workspaces, faster keybinds

This commit is contained in:
end-4
2025-04-26 23:50:46 +02:00
parent f52ba7ad2b
commit 5e8f4048da
14 changed files with 225 additions and 83 deletions
@@ -26,64 +26,64 @@ Singleton {
m3colors: QtObject {
property bool darkmode: false
property bool transparent: false
property color m3primary_paletteKeyColor: "#8A7175"
property color m3secondary_paletteKeyColor: "#847376"
property color m3tertiary_paletteKeyColor: "#8F6E74"
property color m3neutral_paletteKeyColor: "#7B7676"
property color m3neutral_variant_paletteKeyColor: "#7B7676"
property color m3background: "#FFF8F7"
property color m3onBackground: "#1E1B1B"
property color m3surface: "#FFF8F7"
property color m3surfaceDim: "#E0D8D8"
property color m3surfaceBright: "#FFF8F7"
property color m3surfaceContainerLowest: "#FFFFFF"
property color m3surfaceContainerLow: "#FAF2F2"
property color m3surfaceContainer: "#F4ECEC"
property color m3surfaceContainerHigh: "#EEE6E6"
property color m3surfaceContainerHighest: "#E8E1E1"
property color m3onSurface: "#1E1B1B"
property color m3surfaceVariant: "#E8E1E1"
property color m3onSurfaceVariant: "#4A4646"
property color m3inverseSurface: "#332F30"
property color m3inverseOnSurface: "#F7EFEF"
property color m3outline: "#797373"
property color m3outlineVariant: "#CCC5C5"
property color m3primary_paletteKeyColor: "#91689E"
property color m3secondary_paletteKeyColor: "#837186"
property color m3tertiary_paletteKeyColor: "#9D6A67"
property color m3neutral_paletteKeyColor: "#7C757B"
property color m3neutral_variant_paletteKeyColor: "#7D747D"
property color m3background: "#161217"
property color m3onBackground: "#EAE0E7"
property color m3surface: "#161217"
property color m3surfaceDim: "#161217"
property color m3surfaceBright: "#3D373D"
property color m3surfaceContainerLowest: "#110D12"
property color m3surfaceContainerLow: "#1F1A1F"
property color m3surfaceContainer: "#231E23"
property color m3surfaceContainerHigh: "#2D282E"
property color m3surfaceContainerHighest: "#383339"
property color m3onSurface: "#EAE0E7"
property color m3surfaceVariant: "#4C444D"
property color m3onSurfaceVariant: "#CFC3CD"
property color m3inverseSurface: "#EAE0E7"
property color m3inverseOnSurface: "#342F34"
property color m3outline: "#988E97"
property color m3outlineVariant: "#4C444D"
property color m3shadow: "#000000"
property color m3scrim: "#000000"
property color m3surfaceTint: "#70585D"
property color m3primary: "#70585D"
property color m3onPrimary: "#FFFFFF"
property color m3primaryContainer: "#FADBE0"
property color m3onPrimaryContainer: "#564145"
property color m3inversePrimary: "#DDBFC4"
property color m3secondary: "#6A5A5D"
property color m3onSecondary: "#FFFFFF"
property color m3secondaryContainer: "#F3DDE0"
property color m3onSecondaryContainer: "#524346"
property color m3tertiary: "#8D6C72"
property color m3onTertiary: "#FFFFFF"
property color m3tertiaryContainer: "#8D6C72"
property color m3onTertiaryContainer: "#FFFFFF"
property color m3error: "#BA1A1A"
property color m3onError: "#FFFFFF"
property color m3errorContainer: "#FFDAD6"
property color m3onErrorContainer: "#93000A"
property color m3primaryFixed: "#FADBE0"
property color m3primaryFixedDim: "#DDBFC4"
property color m3onPrimaryFixed: "#28171A"
property color m3onPrimaryFixedVariant: "#564145"
property color m3secondaryFixed: "#F3DDE0"
property color m3secondaryFixedDim: "#D6C2C4"
property color m3onSecondaryFixed: "#24191B"
property color m3onSecondaryFixedVariant: "#524346"
property color m3tertiaryFixed: "#FFD9DF"
property color m3tertiaryFixedDim: "#E4BDC3"
property color m3onTertiaryFixed: "#2B151A"
property color m3onTertiaryFixedVariant: "#5B3F45"
property color m3success: "#4F6354"
property color m3onSuccess: "#FFFFFF"
property color m3successContainer: "#D1E8D5"
property color m3onSuccessContainer: "#0C1F13"
property color m3surfaceTint: "#E5B6F2"
property color m3primary: "#E5B6F2"
property color m3onPrimary: "#452152"
property color m3primaryContainer: "#5D386A"
property color m3onPrimaryContainer: "#F9D8FF"
property color m3inversePrimary: "#775084"
property color m3secondary: "#D5C0D7"
property color m3onSecondary: "#392C3D"
property color m3secondaryContainer: "#534457"
property color m3onSecondaryContainer: "#F2DCF3"
property color m3tertiary: "#F5B7B3"
property color m3onTertiary: "#4C2523"
property color m3tertiaryContainer: "#BA837F"
property color m3onTertiaryContainer: "#000000"
property color m3error: "#FFB4AB"
property color m3onError: "#690005"
property color m3errorContainer: "#93000A"
property color m3onErrorContainer: "#FFDAD6"
property color m3primaryFixed: "#F9D8FF"
property color m3primaryFixedDim: "#E5B6F2"
property color m3onPrimaryFixed: "#2E0A3C"
property color m3onPrimaryFixedVariant: "#5D386A"
property color m3secondaryFixed: "#F2DCF3"
property color m3secondaryFixedDim: "#D5C0D7"
property color m3onSecondaryFixed: "#241727"
property color m3onSecondaryFixedVariant: "#514254"
property color m3tertiaryFixed: "#FFDAD7"
property color m3tertiaryFixedDim: "#F5B7B3"
property color m3onTertiaryFixed: "#331110"
property color m3onTertiaryFixedVariant: "#663B39"
property color m3success: "#B5CCBA"
property color m3onSuccess: "#213528"
property color m3successContainer: "#374B3E"
property color m3onSuccessContainer: "#D1E9D6"
property color term0: "#EDE4E4"
property color term1: "#B52755"
property color term2: "#A97363"
@@ -18,12 +18,16 @@ Singleton {
}
property QtObject bar: QtObject {
property int workspacesShown: 10
property int batteryLowThreshold: 20
property QtObject resources: QtObject {
property bool alwaysShowSwap: true
property bool alwaysShowCpu: false
}
property QtObject workspaces: QtObject {
property int shown: 10
property bool alwaysShowNumbers: false
property int showNumberDelay: 150 // milliseconds
}
}
property QtObject osd: QtObject {
@@ -0,0 +1,71 @@
const substitutions = {
"code-url-handler": "visual-studio-code",
"Code": "visual-studio-code",
"GitHub Desktop": "github-desktop",
"Minecraft* 1.20.1": "minecraft",
"gnome-tweaks": "org.gnome.tweaks",
"pavucontrol-qt": "pavucontrol",
"wps": "wps-office2019-kprometheus",
"wpsoffice": "wps-office2019-kprometheus",
"footclient": "foot",
"": "image-missing"
}
const regexSubstitutions = [
{
"regex": "/^steam_app_(\\d+)$/",
"replace": "steam_icon_$1"
}
]
function iconExists(iconName) {
return false; // TODO: Make this work without Gtk
}
function substitute(str) {
// Normal substitutions
if (substitutions[str])
return substitutions[str];
// Regex substitutions
for (let i = 0; i < regexSubstitutions.length; i++) {
const substitution = regexSubstitutions[i];
const replacedName = str.replace(
substitution.regex,
substitution.replace,
);
if (replacedName != str) return replacedName;
}
// Guess: convert to kebab case
if (!iconExists(str)) str = str.toLowerCase().replace(/\s+/g, "-");
// Original string
return str;
}
function noKnowledgeIconGuess(str) {
if (!str) return "image-missing";
// Normal substitutions
if (substitutions[str])
return substitutions[str];
// Regex substitutions
for (let i = 0; i < regexSubstitutions.length; i++) {
const substitution = regexSubstitutions[i];
const replacedName = str.replace(
substitution.regex,
substitution.replace,
);
if (replacedName != str) return replacedName;
}
// Guess: convert to kebab case if it's not reverse domain name notation
if (!str.includes('.')) {
str = str.toLowerCase().replace(/\s+/g, "-");
}
// Original string
return str;
}
@@ -25,7 +25,7 @@ Item {
Process {
id: closeSidebarProcess
command: ["bash", "-c", `qs ipc call sidebarRight close`]
command: ["qs", "ipc", "call", "sidebarRight", "close"]
}
Process {