Update KDE settings

This commit is contained in:
exu 2024-12-07 21:44:46 +01:00
parent 18a945d28f
commit 636635c798
33 changed files with 209 additions and 57 deletions

View File

@ -1,4 +1,4 @@
# erstellt von KDE-Plasma, Mon Dec 2 16:41:22 2024
# erstellt von KDE-Plasma, Sat Dec 7 13:33:16 2024
#
include "/usr/share/themes/Breeze/gtk-2.0/gtkrc"

View File

@ -1,4 +1,4 @@
# erstellt von KDE-Plasma, Mon Dec 2 16:41:22 2024
# erstellt von KDE-Plasma, Sat Dec 7 13:33:16 2024
#
gtk-alternative-button-order = 1

View File

@ -26,8 +26,8 @@ dataSourceCommonSettings\activeState=true
dataSourceCommonSettings\activeState=true
[UserFeedback]
ApplicationStartCount=203
ApplicationTime=137353
ApplicationStartCount=212
ApplicationTime=153932
LastSubmission=@DateTime(\0\0\0\x10\0\0\0\0\0\0%\x8b\xe6\x4\x30KD\0)
StatisticsCollectionMode=DetailedUsageStatistics
SurveyInterval=0

View File

@ -26,8 +26,8 @@ dataSourceCommonSettings\activeState=true
dataSourceCommonSettings\activeState=true
[UserFeedback]
ApplicationStartCount=117
ApplicationTime=1569593
ApplicationStartCount=121
ApplicationTime=1619538
LastEncouragement=@DateTime(\0\0\0\x10\0\0\0\0\0\0%\x8b\x81\x2\xbb\xe0\x11\0)
LastSubmission=@DateTime(\0\0\0\x10\0\0\0\0\0\0%\x8b\xe5\x2\x86\xd2/\0)
LastSubmission=@DateTime(\0\0\0\x10\0\0\0\0\0\0%\x8b\xec\x2\xe8\x97~\0)
StatisticsCollectionMode=DetailedUsageStatistics

View File

@ -4,4 +4,4 @@ ConfirmEmptyTrash=true
ConfirmTrash=false
[Executable scripts]
behaviourOnLaunch=alwaysAsk
behaviourOnLaunch=execute

View File

@ -622,7 +622,7 @@ immutability=1
plugin=org.kde.plasma.brightness
[Containments][56][Applets][72][Configuration]
PreloadWeight=7
PreloadWeight=0
[Containments][56][Applets][72][Configuration][ConfigDialog]
DialogHeight=540
@ -727,7 +727,7 @@ immutability=1
plugin=org.kde.plasma.bluetooth
[Containments][9][Applets][24][Configuration]
PreloadWeight=11
PreloadWeight=3
[Containments][9][Applets][25]
immutability=1
@ -744,14 +744,18 @@ immutability=1
plugin=org.kde.plasma.brightness
[Containments][9][Applets][26][Configuration]
PreloadWeight=20
PreloadWeight=23
[Containments][9][Applets][26][Configuration][ConfigDialog]
DialogHeight=540
DialogWidth=720
[Containments][9][Applets][27]
immutability=1
plugin=org.kde.plasma.battery
[Containments][9][Applets][27][Configuration]
PreloadWeight=0
PreloadWeight=5
[Containments][9][Applets][28]
immutability=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -70,6 +70,7 @@ class KWinConfig {
this.tileLayoutInitialAngle = KWIN.readConfig("tileLayoutInitialRotationAngle", "0");
this.columnsLayoutInitialAngle = KWIN.readConfig("columnsLayoutInitialRotationAngle", "0");
this.columnsBalanced = KWIN.readConfig("columnsBalanced", false);
this.columnsLayerConf = commaSeparate(KWIN.readConfig("columnsLayerConf", ""));
this.monocleMaximize = KWIN.readConfig("monocleMaximize", true);
this.monocleMinimizeRest = KWIN.readConfig("monocleMinimizeRest", false);
this.stairReverse = KWIN.readConfig("stairReverse", false);
@ -105,6 +106,8 @@ class KWinConfig {
this.ignoreVDesktop = commaSeparate(KWIN.readConfig("ignoreVDesktop", ""));
this.ignoreTitle = commaSeparate(KWIN.readConfig("ignoreTitle", ""));
this.screenDefaultLayout = commaSeparate(KWIN.readConfig("screenDefaultLayout", ""));
this.tilingClass = commaSeparate(KWIN.readConfig("tilingClass", ""));
this.tileNothing = KWIN.readConfig("tileNothing", false);
if (this.preventMinimize && this.monocleMinimizeRest) {
debug(() => "preventMinimize is disabled because of monocleMinimizeRest.");
this.preventMinimize = false;
@ -566,7 +569,8 @@ class KWinWindow {
KWINCONFIG.ignoreClass.indexOf(resourceClass) >= 0 ||
KWINCONFIG.ignoreClass.indexOf(resourceName) >= 0 ||
matchWords(this.window.caption, KWINCONFIG.ignoreTitle) >= 0 ||
KWINCONFIG.ignoreRole.indexOf(windowRole) >= 0);
KWINCONFIG.ignoreRole.indexOf(windowRole) >= 0 ||
(KWINCONFIG.tileNothing && KWINCONFIG.tilingClass.indexOf(resourceClass) < 0));
}
get shouldFloat() {
const resourceClass = String(this.window.resourceClass);
@ -1425,6 +1429,9 @@ class EngineContext {
set currentWindow(window) {
this.drvctx.currentWindow = window;
}
get currentSurfaceId() {
return this.drvctx.currentSurface.id;
}
constructor(drvctx, engine) {
this.drvctx = drvctx;
this.engine = engine;
@ -1455,30 +1462,49 @@ class LayoutStoreEntry {
get currentLayout() {
return this.loadLayout(this.currentID);
}
constructor(output_name, desktop_name) {
constructor(outputName, desktopName, activity) {
let layouts = CONFIG.layoutOrder.map((layout) => layout.toLowerCase());
let layouts_str = layouts.map((layout, i) => i + "." + layout + " ");
print(`Krohnkite: Screen(output):${output_name}, Desktop(name):${desktop_name}, layouts: ${layouts_str}`);
print(`Krohnkite: Screen(output):${outputName}, Desktop(name):${desktopName}, Activity: ${activity}, layouts: ${layouts_str}`);
this.currentIndex = 0;
this.currentID = CONFIG.layoutOrder[0];
CONFIG.screenDefaultLayout.some((entry) => {
let cfg = entry.split(":");
let cfg_output = cfg[0];
let cfg_desktop = cfg.length == 2 ? undefined : cfg[1];
let cfg_screen_id_str = cfg.length == 2 ? cfg[1] : cfg[2];
let cfg_screen_id = parseInt(cfg_screen_id_str);
if (isNaN(cfg_screen_id)) {
cfg_screen_id = layouts.indexOf(cfg_screen_id_str.toLowerCase());
cfg_screen_id =
cfg_screen_id >= 0
? cfg_screen_id
: layouts.indexOf(cfg_screen_id_str.toLowerCase() + "layout");
const cfgLength = cfg.length;
if (cfgLength < 2 && cfgLength > 4)
return false;
let cfgOutput = cfg[0];
let cfgActivity = "";
let cfgVDesktop = "";
let cfgLayout = undefined;
if (cfgLength === 2) {
cfgLayout = cfg[1];
}
if ((output_name === cfg_output || cfg_output === "") &&
(desktop_name === cfg_desktop || cfg_desktop === undefined) &&
cfg_screen_id >= 0 &&
cfg_screen_id < CONFIG.layoutOrder.length) {
this.currentIndex = cfg_screen_id;
else if (cfgLength === 3) {
cfgVDesktop = cfg[1];
cfgLayout = cfg[2];
}
else if (cfgLength === 4) {
cfgActivity = cfg[1];
cfgVDesktop = cfg[2];
cfgLayout = cfg[3];
}
if (cfgLayout === undefined)
return false;
let cfgLayoutId = parseInt(cfgLayout);
if (isNaN(cfgLayoutId)) {
cfgLayoutId = layouts.indexOf(cfgLayout.toLowerCase());
cfgLayoutId =
cfgLayoutId >= 0
? cfgLayoutId
: layouts.indexOf(cfgLayout.toLowerCase() + "layout");
}
if ((outputName === cfgOutput || cfgOutput === "") &&
(desktopName === cfgVDesktop || cfgVDesktop === "") &&
(activity === cfgActivity || cfgActivity === "") &&
cfgLayoutId >= 0 &&
cfgLayoutId < CONFIG.layoutOrder.length) {
this.currentIndex = cfgLayoutId;
this.currentID = CONFIG.layoutOrder[this.currentIndex];
return true;
}
@ -1543,17 +1569,14 @@ class LayoutStore {
}
getEntry(key) {
if (!this.store[key]) {
let i1 = key.indexOf("@");
let i2 = key.indexOf("#");
let key_without_activity = key.slice(0, i1 + 1) + key.slice(i2);
if (i1 > 0 && i2 > 0 && i2 - i1 > 1 && this.store[key_without_activity]) {
let [output_name, activity, desktop_name] = surfaceIdParse(key);
let key_without_activity = output_name + "@#" + desktop_name;
if (this.store[key_without_activity]) {
this.store[key] = this.store[key_without_activity];
delete this.store[key_without_activity];
}
else {
let output_name = key.slice(0, key.indexOf("@"));
let desktop_name = i2 !== -1 ? key.slice(i2 + 1) : undefined;
this.store[key] = new LayoutStoreEntry(output_name, desktop_name);
this.store[key] = new LayoutStoreEntry(output_name, desktop_name, activity);
}
}
return this.store[key];
@ -2036,6 +2059,7 @@ class ColumnsLayout {
this.parts = [new ColumnLayout()];
this._columns = [];
this.direction = new windRose(CONFIG.columnsLayoutInitialAngle);
this.columnsConfiguration = null;
}
adjust(area, tiles, basis, delta) {
let columnId = this.getColumnId(basis);
@ -2071,6 +2095,8 @@ class ColumnsLayout {
}
}
apply(ctx, tileables, area) {
if (this.columnsConfiguration === null)
this.columnsConfiguration = this.getDefaultConfig(ctx);
this.arrangeTileables(ctx, tileables);
if (this.columns.length === 0)
return;
@ -2202,6 +2228,30 @@ class ColumnsLayout {
}
tileableIds.add(tileable.id);
});
if (this.columnsConfiguration !== null &&
tileableIds.size > 0 &&
newWindows.length > 0 &&
this.columnsConfiguration.length > this.columns.length) {
let new_columns_length = this.columnsConfiguration.length - this.columns.length >
newWindows.length
? newWindows.length
: this.columnsConfiguration.length - this.columns.length;
for (let i = 0; i < new_columns_length; i++) {
let winId = newWindows.shift();
if (winId === undefined)
continue;
let column = this.insertColumn(false);
column.windowIds.add(winId);
}
this.applyColumnsPosition();
if (this.columnsConfiguration[0] !== 0) {
let sumWeights = this.columnsConfiguration.reduce((a, b) => a + b, 0);
for (let i = 0; i < this.columns.length; i++) {
this.columns[i].weight =
(this.columnsConfiguration[i] / sumWeights) * this.columns.length;
}
}
}
if (CONFIG.columnsBalanced) {
for (var [_, id] of newWindows.entries()) {
let minSizeColumn = this.parts.reduce((prev, curr) => {
@ -2442,6 +2492,43 @@ class ColumnsLayout {
this.parts.splice(onTop ? 0 : this.parts.length, 0, column);
return column;
}
getDefaultConfig(ctx) {
let returnValue = [];
let [outputName, activityId, vDesktopName] = surfaceIdParse(ctx.currentSurfaceId);
for (let conf of CONFIG.columnsLayerConf) {
if (!conf || typeof conf !== "string")
continue;
let conf_arr = conf.split(":").map((part) => part.trim());
if (conf_arr.length < 5) {
warning(`Columns conf: ${conf} has less then 5 elements`);
continue;
}
if ((outputName === conf_arr[0] || conf_arr[0] === "") &&
(activityId === conf_arr[1] || conf_arr[1] === "") &&
(vDesktopName === conf_arr[2] || conf_arr[2] === "")) {
for (let i = 3; i < conf_arr.length; i++) {
let columnWeight = parseFloat(conf_arr[i]);
if (isNaN(columnWeight)) {
warning(`Columns conf:${conf_arr}: ${conf_arr[i]} is not a number.`);
returnValue = [];
break;
}
if (columnWeight === 0) {
warning(`Columns conf:${conf_arr}: weight cannot be zero`);
returnValue = [];
break;
}
returnValue.push(columnWeight);
}
if (returnValue.length > 1 &&
returnValue.every((el) => el === returnValue[0])) {
returnValue.fill(0);
}
return returnValue;
}
}
return returnValue;
}
}
ColumnsLayout.id = "Columns";
class FloatingLayout {
@ -3260,6 +3347,9 @@ function debugObj(f) {
console.log("[" + timestamp + "]", name + ": " + buf.join(" "));
}
}
function warning(s) {
print(`Krohnkite warn: ${s}`);
}
function clip(value, min, max) {
if (value < min)
return min;
@ -3308,6 +3398,14 @@ function overlap(min1, max1, min2, max2) {
const dx = max(0, min(max1, max2) - max(min1, min2));
return dx > 0;
}
function surfaceIdParse(id) {
let i1 = id.indexOf("@");
let i2 = id.indexOf("#");
let outputName = i1 !== -1 ? id.slice(0, i1) : id;
let activity = i1 !== -1 && i2 !== -1 ? id.slice(i1 + 1, i2) : "";
let desktopName = i2 !== -1 ? id.slice(i2 + 1) : "";
return [outputName, activity, desktopName];
}
function toQRect(rect) {
return Qt.rect(rect.x, rect.y, rect.width, rect.height);
}

View File

@ -75,6 +75,11 @@
<default>false</default>
</entry>
<entry name="columnsLayerConf" type="String">
<label>Columns layout default configuration.</label>
<default></default>
</entry>
<entry name="enableStackedLayout" type="Bool">
<label>Enable/disable Stacked layout</label>
<default>false</default>
@ -124,6 +129,16 @@
<default></default>
</entry>
<entry name="tileNothing" type="Bool">
<label>Don't tile any windows by default</label>
<default>false</default>
</entry>
<entry name="tilingClass" type="String">
<label>Tile windows with certain classes(comma-separated list)</label>
<default></default>
</entry>
<entry name="floatingClass" type="String">
<label>Float windows with certain classes(comma-separated list)</label>
<default></default>

View File

@ -257,21 +257,8 @@
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="tileLabel12">
@ -310,9 +297,22 @@
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<item>
<widget class="QCheckBox" name="kcfg_columnsBalanced">
<property name="toolTip">
<string>Creating a new window in the shortest column</string>
@ -322,6 +322,24 @@
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="hLayout_columnsConf">
<item>
<widget class="QLabel" name="lbl_columsLayerConf">
<property name="text">
<string>Config</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="kcfg_columnsLayerConf">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Comma-separated list OutputName:VirtualDesktopName:ActivityName:ColumnWeight:ColumnWeight:... OutputName value you will see if run KSystemLog and type krohnkite in filter string. The data will right under Krohenkite start string.If all weights are equal they will not be taken into account &lt;/p&gt;&lt;p&gt; Example: Any monitors 3 columns without weights:&lt;/p&gt;&lt;p&gt; :::1:1:1&lt;/p&gt;&lt;p&gt;Example with desktop name and activity id 3 columns the third one is twice as big as the first two:&lt;/p&gt;&lt;p&gt; HDMI-A-1:Desktop 1:99e10d31-e8f3-44aa-bbed-2a543f13fa54:1:1:2&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
@ -656,7 +674,7 @@
</font>
</property>
<property name="text">
<string>DWM style</string>
<string>DWM st&amp;yle</string>
</property>
<attribute name="buttonGroup">
<string notr="true">directionalKeyButtonGroup</string>
@ -803,7 +821,7 @@
<string>Position of the New Window</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item alignment="Qt::AlignmentFlag::Qt::AlignmentFlag::AlignVCenter">
<item alignment="Qt::AlignmentFlag::AlignVCenter">
<widget class="QComboBox" name="kcfg_newWindowPosition">
<property name="minimumSize">
<size>
@ -997,6 +1015,23 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="kcfg_tileNothing">
<property name="text">
<string>Always, except by class</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="kcfg_tilingClass">
<property name="toolTip">
<string>Comma-separated list of window classes. Matching windows will become tiled automatically.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@ -2,7 +2,7 @@
"KPackageStructure": "KWin/Script",
"KPlugin": {
"Name": "Krohnkite",
"Description": "A dynamic tiling script for KWin (f1ef1cf)",
"Description": "A dynamic tiling script for KWin (78c5bb4)",
"Icon": "dialog-tile-clones",
"Authors": [
@ -12,7 +12,7 @@
}
],
"Id": "krohnkite",
"Version": "0.9.8.3",
"Version": "0.9.8.4",
"License": "MIT",
"Website": "https://github.com/anametologin/krohnkite#readme"
},