Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

feat(domain,bar): add binding for bar font family and size

Lars Berger596bf3997e6f
diff --git a/GlazeWM.Bar/BarViewModel.cs b/GlazeWM.Bar/BarViewModel.cs
index 9e2da7db..a9b36337 100644
--- a/GlazeWM.Bar/BarViewModel.cs
+++ b/GlazeWM.Bar/BarViewModel.cs
@@ -13,6 +13,8 @@ namespace GlazeWM.Bar
public event PropertyChangedEventHandler PropertyChanged;
public ObservableCollection<Workspace> Workspaces { get; set; } = new ObservableCollection<Workspace>();
public string Background { get; set; }
+ public string FontFamily { get; set; }
+ public string FontSize { get; set; }
private readonly Dispatcher _dispatcher;
private readonly Monitor _monitor;
private readonly BarConfig _barConfig;
@@ -27,6 +29,8 @@ namespace GlazeWM.Bar
public void InitializeState()
{
Background = _barConfig.Background;
+ FontFamily = _barConfig.FontFamily;
+ FontSize = _barConfig.FontSize;
SetWorkspaces();
}
diff --git a/GlazeWM.Bar/MainWindow.xaml b/GlazeWM.Bar/MainWindow.xaml
index f755f553..617d1f9d 100644
--- a/GlazeWM.Bar/MainWindow.xaml
+++ b/GlazeWM.Bar/MainWindow.xaml
@@ -13,6 +13,8 @@
ShowInTaskbar="False"
Width="800"
Height="50"
+ FontFamily="{Binding FontFamily}"
+ FontSize="{Binding FontSize}"
Topmost="True">
<DockPanel Margin="10">
<ItemsControl ItemsSource="{Binding Workspaces}">
diff --git a/GlazeWM.Domain/UserConfigs/BarConfig.cs b/GlazeWM.Domain/UserConfigs/BarConfig.cs
index f5c1a367..6d906acf 100644
--- a/GlazeWM.Domain/UserConfigs/BarConfig.cs
+++ b/GlazeWM.Domain/UserConfigs/BarConfig.cs
@@ -4,5 +4,7 @@ namespace GlazeWM.Domain.UserConfigs
{
public int Height { get; set; } = 50;
public string Background { get; set; } = "#101010";
+ public string FontFamily { get; set; } = "Segoe UI";
+ public string FontSize { get; set; } = "12";
}
}