mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-21 18:52:49 +00:00
Add option to not center the time
Setting this will make https://github.com/scorpion-26/gBar/issues/4 less likely.
This commit is contained in:
parent
a623018ee2
commit
dce92a63f8
4 changed files with 8 additions and 1 deletions
|
@ -27,3 +27,7 @@ BatteryFolder: /sys/class/power_supply/BAT1
|
|||
|
||||
# The default symbol for the workspaces
|
||||
DefaultWorkspaceSymbol:
|
||||
|
||||
# Forces the time to be centered.
|
||||
# This can cause issues, if there is not enough space on screen (e.g. when opening the text)
|
||||
CenterTime: true
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "System.h"
|
||||
#include "Common.h"
|
||||
#include "Config.h"
|
||||
|
||||
namespace Bar
|
||||
{
|
||||
|
@ -409,7 +410,7 @@ namespace Bar
|
|||
monitorID = monitor;
|
||||
|
||||
auto mainWidget = Widget::Create<Box>();
|
||||
mainWidget->SetSpacing({0, true});
|
||||
mainWidget->SetSpacing({0, Config::Get().centerTime});
|
||||
mainWidget->SetClass("bar");
|
||||
{
|
||||
#ifdef HAS_HYPRLAND
|
||||
|
|
|
@ -123,6 +123,7 @@ void Config::Load()
|
|||
AddConfigVar("LockCommand", config.lockCommand, lineView, foundProperty);
|
||||
AddConfigVar("ExitCommand", config.exitCommand, lineView, foundProperty);
|
||||
AddConfigVar("BatteryFolder", config.batteryFolder, lineView, foundProperty);
|
||||
AddConfigVar("CenterTime", config.centerTime, lineView, foundProperty);
|
||||
AddConfigVar("DefaultWorkspaceSymbol", config.defaultWorkspaceSymbol, lineView, foundProperty);
|
||||
for (int i = 1; i < 10; i++)
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@ public:
|
|||
std::vector<std::string> workspaceSymbols = std::vector<std::string>(9, "");
|
||||
std::string defaultWorkspaceSymbol = "";
|
||||
|
||||
bool centerTime = true;
|
||||
|
||||
static void Load();
|
||||
static const Config& Get();
|
||||
|
|
Loading…
Reference in a new issue