Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Indicator/Indicator.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

// TODO: Change namespace
public class Monitor.Indicator : Wingpanel.Indicator {
private Widgets.DisplayWidget ? display_widget = null;
Expand Down
5 changes: 5 additions & 0 deletions src/Indicator/Services/DBusClient.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

[DBus (name = "io.elementary.monitor")]
public interface Monitor.DBusClientInterface : Object {
public abstract void quit_monitor () throws Error;
Expand Down
5 changes: 5 additions & 0 deletions src/Indicator/Widgets/DisplayWidget.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.Widgets.DisplayWidget : Gtk.Grid {
public IndicatorWidget cpu_widget = new IndicatorWidget ("cpu-symbolic");
public IndicatorWidget cpu_frequency_widget = new IndicatorWidget ("cpu-symbolic");
Expand Down
5 changes: 5 additions & 0 deletions src/Indicator/Widgets/IndicatorWidget.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.IndicatorWidget : Gtk.Box {

public string icon_name { get; construct; }
Expand Down
5 changes: 5 additions & 0 deletions src/Indicator/Widgets/PopoverWidget.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.Widgets.PopoverWidget : Gtk.Grid {
/* Button to hide the indicator */
private Gtk.ModelButton show_monitor_button;
Expand Down
5 changes: 5 additions & 0 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.MainWindow : Hdy.ApplicationWindow {
// application reference
private Shortcuts shortcuts;
Expand Down
5 changes: 5 additions & 0 deletions src/Managers/AppManager.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

namespace Monitor {
public struct App {
public string name;
Expand Down
5 changes: 5 additions & 0 deletions src/Managers/Process.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.Process : GLib.Object {
// The size of each RSS page, in bytes
// private static long PAGESIZE = Posix.sysconf (Posix._SC_PAGESIZE);
Expand Down
5 changes: 5 additions & 0 deletions src/Managers/ProcessManager.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

namespace Monitor {
public class ProcessManager {
private static GLib.Once<ProcessManager> instance;
Expand Down
5 changes: 5 additions & 0 deletions src/Managers/ProcessStructs.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

// For more info look at: http://man7.org/linux/man-pages/man5/proc.5.html

public struct Monitor.ProcessIO {
Expand Down
5 changes: 5 additions & 0 deletions src/Managers/ProcessUtils.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.ProcessUtils {
// checks if it is run by shell
public static bool is_shell (string chunk) {
Expand Down
4 changes: 4 additions & 0 deletions src/Models/OpenFilesTreeViewModel.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.OpenFilesTreeViewModel : Gtk.TreeStore {
private Gee.Map<string, Gtk.TreeIter ? > open_files_paths = new Gee.HashMap<string, Gtk.TreeIter ? > ();
Expand Down
5 changes: 5 additions & 0 deletions src/Models/TreeViewModel.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public enum Monitor.Column {
ICON,
NAME,
Expand Down
5 changes: 5 additions & 0 deletions src/Monitor.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

namespace Monitor {
public class MonitorApp : Gtk.Application {
public static Settings settings;
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/CPU.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.CPU : Object {
private float last_used;
private float last_total;
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/CPUCache.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

// This struct holds paths to cpu cache data
// Learn more: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-system-cpu
[Compact]
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Cgroup/Cgroup.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.Cgroup : GLib.Object {
/**
* This class only parses necessary values from cgroup files.
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Cgroup/CgroupStructs.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

// Read more: https://docs.docker.com/config/containers/runmetrics/

public struct Monitor.CgroupMemoryStat {
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Core.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.Core : GLib.Object {
private float last_total;
private float last_used;
Expand Down
19 changes: 3 additions & 16 deletions src/Resources/Drive.vala
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
/*
* Copyright (c) 2020 Dirli <[email protected]>
* Copyright (c) 2021 stsdc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2020 Dirli <[email protected]>
* 2021 stsdc
* SPDX-License-Identifier: GPL-3.0-or-later
*/

public struct Monitor.DriveSmart {
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/GPU/GPUAmd.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.GPUAmd : IGPU, Object {
public SessionManager ? session_manager { get; protected set; }

Expand Down
5 changes: 5 additions & 0 deletions src/Resources/GPU/GPUNvidia.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.GPUNvidia : IGPU, Object {
public SessionManager ? session_manager { get; protected set; }

Expand Down
5 changes: 5 additions & 0 deletions src/Resources/GPU/IGPU.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public interface Monitor.IGPU : Object {
public abstract SessionManager ? session_manager { get; public set; }

Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/HwmonFan.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

// This struct holds paths to temperature data
// Learn more: https://www.kernel.org/doc/html/v5.11/gpu/amdgpu.html#hwmon-interfaces

Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/HwmonFrequency.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

// This struct holds paths to temperature data
// Learn more: https://www.kernel.org/doc/html/v5.11/gpu/amdgpu.html#hwmon-interfaces

Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/HwmonPWM.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

// This struct holds paths to temperature data
// Learn more: https://www.kernel.org/doc/html/v5.11/gpu/amdgpu.html#hwmon-interfaces

Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/HwmonPathsParser.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

class Monitor.HwmonPathParser : Object {
private const string HWMON_PATH = "/sys/class/hwmon";

Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/HwmonPathsParserCPU.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.HwmonPathsParserCPU : Object, IHwmonPathsParserInterface {

public string name { get; protected set; }
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/HwmonPathsParserGPU.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.HwmonPathsParserGPU: Object, IHwmonPathsParserInterface {

public string name { get; protected set; }
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/HwmonPathsParserIwlwifi.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.HwmonPathsParserIwlwifi : Object, IHwmonPathsParserInterface {

public string name { get; protected set; }
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/HwmonPathsParserNVMe.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public class Monitor.HwmonPathsParserNVMe : Object, IHwmonPathsParserInterface {

public string name { get; protected set; }
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/HwmonPower.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

// This struct holds paths to temperature data
// Learn more: https://www.kernel.org/doc/html/v5.11/gpu/amdgpu.html#hwmon-interfaces

Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/HwmonTemperature.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

// This class holds paths to temperature data
// returns contents of the file as a string
// Learn more: https://www.kernel.org/doc/html/v5.11/gpu/amdgpu.html#hwmon-interfaces
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/HwmonVoltage.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

// This struct holds paths to temperature data
// Learn more: https://www.kernel.org/doc/html/v5.11/gpu/amdgpu.html#hwmon-interfaces

Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Hwmon/IHwmonPathsParserInterface.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public interface Monitor.IHwmonPathsParserInterface : Object {

public abstract string name { get; protected set; }
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Memory.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

namespace Monitor {
public class Memory : Object {
public double total = 0;
Expand Down
22 changes: 4 additions & 18 deletions src/Resources/Network.vala
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
/*-
* Copyright (c) 2020 Tudor Plugaru, @stsdc
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
/*
* Copyright 2020 Tudor Plugaru,
* @stsdc
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Authored by: Tudor Plugaru <[email protected]>
*/


public class Monitor.Network : GLib.Object {
public int bytes_in;
private int bytes_in_old;
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/Resources.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

[DBus (name = "org.gnome.SessionManager")]
public interface SessionManager : Object {
[DBus (name = "Renderer")]
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/ResourcesSerialized.vala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2025 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-3.0-or-later
*/

public struct ResourcesSerialized {
public int cpu_percentage;
public double cpu_frequency;
Expand Down
Loading