[plasmashell] [Bug 478489] Plasma 6 Panel - Ability to set lengthMode through API Scripting

2024-02-26 Thread Frank
https://bugs.kde.org/show_bug.cgi?id=478489

--- Comment #8 from Frank  ---
Tested and working.

Thank you so much! This saves our Theming so it can be automatically applied
correctly.

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 478489] Plasma 6 Panel - Ability to set lengthMode through API Scripting

2023-12-15 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=478489

fanzhuyi...@gmail.com changed:

   What|Removed |Added

  Latest Commit||https://invent.kde.org/plas
   ||ma/plasma-workspace/-/commi
   ||t/bc6140284f661e1c7006f0be7
   ||3f0e1b826e3dcf0
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #7 from fanzhuyi...@gmail.com ---
Git commit bc6140284f661e1c7006f0be73f0e1b826e3dcf0 by Yifan Zhu.
Committed on 16/12/2023 at 01:54.
Pushed by fanzhuyifan into branch 'master'.

Implement panel lengthMode scripting api

M  +39   -0shell/scripting/panel.cpp
M  +4-0shell/scripting/panel.h
M  +1-0shell/scripting/scriptengine_v1.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/bc6140284f661e1c7006f0be73f0e1b826e3dcf0

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 478489] Plasma 6 Panel - Ability to set lengthMode through API Scripting

2023-12-14 Thread Frank
https://bugs.kde.org/show_bug.cgi?id=478489

--- Comment #6 from Frank  ---
(In reply to fanzhuyifan from comment #5)
> Sorry I meant `writeConfig`, not `setConfig`.

Tried it part of my tests with same result, therefore plz read below:

> Also for support please use the KDE forums or the matrix channels. The 
> bugzilla is only for reporting bugs.

That's true, sorry about that.
This is the correct Forum? https://discuss.kde.org/

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 478489] Plasma 6 Panel - Ability to set lengthMode through API Scripting

2023-12-14 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=478489

--- Comment #5 from fanzhuyi...@gmail.com ---
(In reply to fanzhuyifan from comment #3)
> As a work around, just do `panel.setConfig("panelLengthMode", 1)` for
> setting fit.
(In reply to Frank from comment #4)
> (In reply to fanzhuyifan from comment #3)
> > As a work around, just do `panel.setConfig("panelLengthMode", 1)` for
> > setting fit.
> 
> Thanks for the suggestion.
> I'm missing something. Here's one of the 5 or 6 versions I tried following
> re-reading this documentation
> https://develop.kde.org/docs/plasma/scripting/api/#applets-containments-and-
> widgets
> 
> var plasma = getApiVersion(1)
> 
> -
> // Create bottom panel (Dock) //
> 
> const dock = new Panel
> 
> // Basic Dock Geometry
> dock.alignment = "center"
> dock.height = Math.round(gridUnit * 2.8);
> dock.hiding = "windowscover"
> dock.location = "bottom"
> //dock.maximumLenth = 1000
> //dock.minimumLength = 250
> 
> // Icons-Only Task Manager
> var tasks = dock.addWidget("org.kde.plasma.icontasks")
> tasks.currentConfigGroup = ["General"]
> tasks.writeConfig("fill", false)
> tasks.writeConfig("iconSpacing", 2)
> tasks.writeConfig("launchers",
> "applications:garuda-welcome.desktop,applications:org.kde.konsole.desktop,
> preferred://browser,preferred://filemanager,applications:org.kde.plasma-
> systemmonitor.desktop,applications:snapper-tools.desktop,applications:
> systemsettings.desktop,applications:octopi.desktop")
> tasks.writeConfig("maxStripes", 1)
> tasks.writeConfig("showOnlyCurrentDesktop", false)
> tasks.writeConfig("showOnlyCurrentScreen", false)
> 
> const panel = ConfigFile('plasmashellrc')
> panel.group = 'PlasmaViews'
> panel.setConfig("panelLenghtMode", 1)
> 
> // End of Dock creation //
> -
> 
> Nothing is written in plasmashellrc.
> However if I use instead panel.writeEntry("panelLenghtMode", 1), I do get
> the following section written in plasmashellrc:
> 
> [PlasmaViews]
> panelLenghtMode=1
> 
> It's alone in its own section, not associated to a Panel.

Sorry I meant `writeConfig`, not `setConfig`. Also for support please use the
KDE forums or the matrix channels. The bugzilla is only for reporting bugs.

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 478489] Plasma 6 Panel - Ability to set lengthMode through API Scripting

2023-12-14 Thread Frank
https://bugs.kde.org/show_bug.cgi?id=478489

--- Comment #4 from Frank  ---
(In reply to fanzhuyifan from comment #3)
> As a work around, just do `panel.setConfig("panelLengthMode", 1)` for
> setting fit.

Thanks for the suggestion.
I'm missing something. Here's one of the 5 or 6 versions I tried following
re-reading this documentation
https://develop.kde.org/docs/plasma/scripting/api/#applets-containments-and-widgets

var plasma = getApiVersion(1)

-
// Create bottom panel (Dock) //

const dock = new Panel

// Basic Dock Geometry
dock.alignment = "center"
dock.height = Math.round(gridUnit * 2.8);
dock.hiding = "windowscover"
dock.location = "bottom"
//dock.maximumLenth = 1000
//dock.minimumLength = 250

// Icons-Only Task Manager
var tasks = dock.addWidget("org.kde.plasma.icontasks")
tasks.currentConfigGroup = ["General"]
tasks.writeConfig("fill", false)
tasks.writeConfig("iconSpacing", 2)
tasks.writeConfig("launchers",
"applications:garuda-welcome.desktop,applications:org.kde.konsole.desktop,preferred://browser,preferred://filemanager,applications:org.kde.plasma-systemmonitor.desktop,applications:snapper-tools.desktop,applications:systemsettings.desktop,applications:octopi.desktop")
tasks.writeConfig("maxStripes", 1)
tasks.writeConfig("showOnlyCurrentDesktop", false)
tasks.writeConfig("showOnlyCurrentScreen", false)

const panel = ConfigFile('plasmashellrc')
panel.group = 'PlasmaViews'
panel.setConfig("panelLenghtMode", 1)

// End of Dock creation //
-

Nothing is written in plasmashellrc.
However if I use instead panel.writeEntry("panelLenghtMode", 1), I do get the
following section written in plasmashellrc:

[PlasmaViews]
panelLenghtMode=1

It's alone in its own section, not associated to a Panel.

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 478489] Plasma 6 Panel - Ability to set lengthMode through API Scripting

2023-12-14 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=478489

--- Comment #3 from fanzhuyi...@gmail.com ---
As a work around, just do `panel.setConfig("panelLengthMode", 1)` for setting
fit.

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 478489] Plasma 6 Panel - Ability to set lengthMode through API Scripting

2023-12-14 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=478489

Nate Graham  changed:

   What|Removed |Added

 CC||n...@kde.org,
   ||niccolo.venera...@gmail.com
Summary|Plasma 6 Panel - Unable to  |Plasma 6 Panel - Ability to
   |set lengthMode through API  |set lengthMode through API
   |Scripting   |Scripting
  Component|general |Panel
   Target Milestone|--- |1.0
Product|plasma-integration  |plasmashell
   Severity|normal  |wishlist

-- 
You are receiving this mail because:
You are watching all bug changes.