mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-24 20:22:10 +00:00
Add config for modifying sensor size
This wasn't possible with css, as I hardcoded 24 for the size For ping: https://github.com/scorpion-26/gBar/issues/64
This commit is contained in:
parent
9c0dcb7385
commit
1279d3e2fb
4 changed files with 12 additions and 3 deletions
|
@ -153,6 +153,12 @@ DrmAmdCard: card0
|
||||||
# Use tooltips instead of sliders for the sensors
|
# Use tooltips instead of sliders for the sensors
|
||||||
SensorTooltips: false
|
SensorTooltips: false
|
||||||
|
|
||||||
|
# The size of the of the circular sensors
|
||||||
|
SensorSize: 24
|
||||||
|
|
||||||
|
# The size of the network icon
|
||||||
|
NetworkIconSize: 24
|
||||||
|
|
||||||
# Enables tray icons
|
# Enables tray icons
|
||||||
EnableSNI: true
|
EnableSNI: true
|
||||||
|
|
||||||
|
|
|
@ -463,7 +463,7 @@ namespace Bar
|
||||||
}
|
}
|
||||||
sensor->SetStyle({angle});
|
sensor->SetStyle({angle});
|
||||||
sensor->AddTimer<Sensor>(std::move(callback), DynCtx::updateTime);
|
sensor->AddTimer<Sensor>(std::move(callback), DynCtx::updateTime);
|
||||||
Utils::SetTransform(*sensor, {24, true, Alignment::Fill});
|
Utils::SetTransform(*sensor, {(int)Config::Get().sensorSize, true, Alignment::Fill});
|
||||||
|
|
||||||
switch (side)
|
switch (side)
|
||||||
{
|
{
|
||||||
|
@ -751,7 +751,7 @@ namespace Bar
|
||||||
sensor->SetLimitDown({(double)Config::Get().minDownloadBytes, (double)Config::Get().maxDownloadBytes});
|
sensor->SetLimitDown({(double)Config::Get().minDownloadBytes, (double)Config::Get().maxDownloadBytes});
|
||||||
sensor->SetAngle(Utils::GetAngle());
|
sensor->SetAngle(Utils::GetAngle());
|
||||||
sensor->AddTimer<NetworkSensor>(DynCtx::UpdateNetwork, DynCtx::updateTime);
|
sensor->AddTimer<NetworkSensor>(DynCtx::UpdateNetwork, DynCtx::updateTime);
|
||||||
Utils::SetTransform(*sensor, {24, true, Alignment::Fill});
|
Utils::SetTransform(*sensor, {(int)Config::Get().networkIconSize, true, Alignment::Fill});
|
||||||
|
|
||||||
switch (side)
|
switch (side)
|
||||||
{
|
{
|
||||||
|
|
|
@ -244,7 +244,6 @@ void Config::Load()
|
||||||
AddConfigVar("CheckPackagesCommand", config.checkPackagesCommand, lineView, foundProperty);
|
AddConfigVar("CheckPackagesCommand", config.checkPackagesCommand, lineView, foundProperty);
|
||||||
AddConfigVar("DiskPartition", config.diskPartition, lineView, foundProperty);
|
AddConfigVar("DiskPartition", config.diskPartition, lineView, foundProperty);
|
||||||
|
|
||||||
|
|
||||||
AddConfigVar("ShutdownIcon", config.shutdownIcon, lineView, foundProperty);
|
AddConfigVar("ShutdownIcon", config.shutdownIcon, lineView, foundProperty);
|
||||||
AddConfigVar("RebootIcon", config.rebootIcon, lineView, foundProperty);
|
AddConfigVar("RebootIcon", config.rebootIcon, lineView, foundProperty);
|
||||||
AddConfigVar("SleepIcon", config.sleepIcon, lineView, foundProperty);
|
AddConfigVar("SleepIcon", config.sleepIcon, lineView, foundProperty);
|
||||||
|
@ -285,6 +284,8 @@ void Config::Load()
|
||||||
AddConfigVar("TimeSpace", config.timeSpace, lineView, foundProperty);
|
AddConfigVar("TimeSpace", config.timeSpace, lineView, foundProperty);
|
||||||
AddConfigVar("NumWorkspaces", config.numWorkspaces, lineView, foundProperty);
|
AddConfigVar("NumWorkspaces", config.numWorkspaces, lineView, foundProperty);
|
||||||
AddConfigVar("AudioScrollSpeed", config.audioScrollSpeed, lineView, foundProperty);
|
AddConfigVar("AudioScrollSpeed", config.audioScrollSpeed, lineView, foundProperty);
|
||||||
|
AddConfigVar("SensorSize", config.sensorSize, lineView, foundProperty);
|
||||||
|
AddConfigVar("NetworkIconSize", config.networkIconSize, lineView, foundProperty);
|
||||||
|
|
||||||
AddConfigVar("AudioMinVolume", config.audioMinVolume, lineView, foundProperty);
|
AddConfigVar("AudioMinVolume", config.audioMinVolume, lineView, foundProperty);
|
||||||
AddConfigVar("AudioMaxVolume", config.audioMaxVolume, lineView, foundProperty);
|
AddConfigVar("AudioMaxVolume", config.audioMaxVolume, lineView, foundProperty);
|
||||||
|
|
|
@ -76,6 +76,8 @@ public:
|
||||||
uint32_t checkUpdateInterval = 5 * 60; // Interval to run the "checkPackagesCommand". In seconds
|
uint32_t checkUpdateInterval = 5 * 60; // Interval to run the "checkPackagesCommand". In seconds
|
||||||
uint32_t timeSpace = 300; // How much time should be reserved for the time widget.
|
uint32_t timeSpace = 300; // How much time should be reserved for the time widget.
|
||||||
uint32_t numWorkspaces = 9; // How many workspaces to display
|
uint32_t numWorkspaces = 9; // How many workspaces to display
|
||||||
|
uint32_t sensorSize = 24; // The size of the circular sensors
|
||||||
|
uint32_t networkIconSize = 24; // The size of the two network arrows
|
||||||
|
|
||||||
char location = 'T'; // The Location of the bar. Can be L,R,T,B
|
char location = 'T'; // The Location of the bar. Can be L,R,T,B
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue