Skip to content

Commit

Permalink
build: use whiskers (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
uncenter authored Jul 13, 2024
1 parent 478b8f8 commit 06d235b
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 9 deletions.
201 changes: 201 additions & 0 deletions flow-launcher.tera
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
---
whiskers:
version: "2.3.0"
matrix:
- flavor
filename: "themes/Catppuccin {{ flavor.identifier | capitalize }}.xaml"
---
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
</ResourceDictionary.MergedDictionaries>
<Thickness x:Key="ResultMargin">0 0 0 8</Thickness>
<Style
x:Key="ItemGlyph"
BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#{{ text.hex }}" />
</Style>
<Style
x:Key="QueryBoxStyle"
BasedOn="{StaticResource BaseQueryBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="FontSize" Value="24" />
<Setter Property="Foreground" Value="#{{ text.hex }}" />
<Setter Property="CaretBrush" Value="#{{ mauve.hex }}" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Height" Value="42" />
<Setter Property="Padding" Value="0,0,0,0" />
</Style>
<Style
x:Key="QuerySuggestionBoxStyle"
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="#{{ mantle.hex }}" />
<Setter Property="Foreground" Value="#{{ surface1.hex }}" />
<Setter Property="FontSize" Value="26" />
<Setter Property="Height" Value="42" />
<Setter Property="Padding" Value="0,0,0,0" />
</Style>
<Style
x:Key="WindowBorderStyle"
BasedOn="{StaticResource BaseWindowBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="2" />
<Setter Property="BorderBrush" Value="#{{ if(cond=flavor.dark, t=surface0.hex, f=surface1.hex) }}" />
<Setter Property="CornerRadius" Value="12" />
<Setter Property="Background" Value="#{{ mantle.hex }}" />
</Style>
<Style
x:Key="WindowStyle"
BasedOn="{StaticResource BaseWindowStyle}"
TargetType="{x:Type Window}">
<Setter Property="Width" Value="576" />
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
</Style>

<Style
x:Key="PendingLineStyle"
BasedOn="{StaticResource BasePendingLineStyle}"
TargetType="{x:Type Line}">
<Setter Property="Stroke" Value="#{{ green.hex }}" />
</Style>

<!-- Item Style -->
<Style
x:Key="ItemTitleStyle"
BasedOn="{StaticResource BaseItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#{{ if(cond=flavor.dark, t=subtext0.hex, f=text.hex) }}" />
</Style>
<Style
x:Key="ItemSubTitleStyle"
BasedOn="{StaticResource BaseItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#{{ if(cond=flavor.dark, t=overlay0.hex, f=text.hex) }}" />
<Setter Property="FontSize" Value="13" />
</Style>
<Style
x:Key="ItemNumberStyle"
BasedOn="{StaticResource BaseItemNumberStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#{{ surface1.hex }}" />
</Style>
<Style
x:Key="ItemTitleSelectedStyle"
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#{{ text.hex }}" />
</Style>
<Style
x:Key="ItemSubTitleSelectedStyle"
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Cursor" Value="Arrow" />
<Setter Property="Foreground" Value="#{{ blue.hex }}" />
</Style>
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#{{ if(cond=flavor.dark, t=base.hex, f=surface0.hex) }}</SolidColorBrush>
<CornerRadius x:Key="ItemRadius">8</CornerRadius>
<Thickness x:Key="ItemMargin">10 0 10 0</Thickness>
<Style
x:Key="ItemImageSelectedStyle"
BasedOn="{StaticResource BaseItemImageSelectedStyle}"
TargetType="{x:Type Image}">
<Setter Property="Cursor" Value="Arrow" />
</Style>
<Style x:Key="HighlightStyle">
<Setter Property="Inline.Foreground" Value="#{{ mauve.hex }}" />
<Setter Property="Inline.FontWeight" Value="Bold" />
</Style>
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="#{{ overlay0.hex }}" />
</Style>
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="13" />
<Setter Property="Foreground" Value="#{{ blue.hex }}" />
</Style>
<!-- button style in the middle of the scrollbar -->
<Style
x:Key="ThumbStyle"
BasedOn="{StaticResource BaseThumbStyle}"
TargetType="{x:Type Thumb}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Width" Value="2" />
<Setter Property="Focusable" Value="false" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border
Background="#{{ surface0.hex }}"
BorderBrush="Transparent"
BorderThickness="0"
CornerRadius="2"
DockPanel.Dock="Right" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
x:Key="ScrollBarStyle"
BasedOn="{StaticResource BaseScrollBarStyle}"
TargetType="{x:Type ScrollBar}" />
<Style
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#{{ if(cond=flavor.dark, t=base.hex, f=surface0.hex) }}" />
<Setter Property="Height" Value="2" />
<Setter Property="Margin" Value="10,0,10,8" />
</Style>
<Style
x:Key="SearchIconStyle"
BasedOn="{StaticResource BaseSearchIconStyle}"
TargetType="{x:Type Path}">
<Setter Property="Fill" Value="#{{ if(cond=flavor.dark, t=surface1.hex, f=text.hex) }}" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
</Style>
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#{{ if(cond=flavor.dark, t=blue.hex, f=text.hex) }}" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#{{ if(cond=flavor.dark, t=blue.hex, f=text.hex) }}" />
</Style>
<Style
x:Key="PreviewBorderStyle"
BasedOn="{StaticResource BasePreviewBorderStyle}"
TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="#{{ base.hex }}" />
</Style>
<Style
x:Key="PreviewItemTitleStyle"
BasedOn="{StaticResource BasePreviewItemTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#{{ blue.hex }}" />
</Style>
<Style
x:Key="PreviewItemSubTitleStyle"
BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#{{ surface1.hex }}" />
</Style>
<Style
x:Key="PreviewGlyph"
BasedOn="{StaticResource BasePreviewGlyph}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#{{ blue.hex }}" />
</Style>
</ResourceDictionary>
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_default:
@just --list

build:
whiskers flow-launcher.tera
2 changes: 1 addition & 1 deletion themes/Catppuccin Frappe.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#303446 " />
<Setter Property="Fill" Value="#303446" />
<Setter Property="Height" Value="2" />
<Setter Property="Margin" Value="10,0,10,8" />
</Style>
Expand Down
8 changes: 4 additions & 4 deletions themes/Catppuccin Latte.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#ccd0da " />
<Setter Property="Fill" Value="#ccd0da" />
<Setter Property="Height" Value="2" />
<Setter Property="Margin" Value="10,0,10,8" />
</Style>
Expand All @@ -158,14 +158,14 @@
<Style
x:Key="ClockBox"
BasedOn="{StaticResource BaseClockBox}"
TargetType="{x:Type TextBlock}">
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#4c4f69" />
</Style>
<Style
x:Key="DateBox"
BasedOn="{StaticResource BaseDateBox}"
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#4c4f69 " />
<Setter Property="Foreground" Value="#4c4f69" />
</Style>
<Style
x:Key="PreviewBorderStyle"
Expand All @@ -191,4 +191,4 @@
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#1e66f5" />
</Style>
</ResourceDictionary>
</ResourceDictionary>
4 changes: 2 additions & 2 deletions themes/Catppuccin Macchiato.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#24273a " />
<Setter Property="Fill" Value="#24273a" />
<Setter Property="Height" Value="2" />
<Setter Property="Margin" Value="10,0,10,8" />
</Style>
Expand Down Expand Up @@ -191,4 +191,4 @@
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#8aadf4" />
</Style>
</ResourceDictionary>
</ResourceDictionary>
4 changes: 2 additions & 2 deletions themes/Catppuccin Mocha.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
x:Key="SeparatorStyle"
BasedOn="{StaticResource BaseSeparatorStyle}"
TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="#1e1e2e " />
<Setter Property="Fill" Value="#1e1e2e" />
<Setter Property="Height" Value="2" />
<Setter Property="Margin" Value="10,0,10,8" />
</Style>
Expand Down Expand Up @@ -191,4 +191,4 @@
TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="#89b4fa" />
</Style>
</ResourceDictionary>
</ResourceDictionary>

0 comments on commit 06d235b

Please sign in to comment.