1.9.0
User defined themes
This release adds initial support for user defined themes 🎨.
Themes are simple YAML files which can be added to the Posting theme directory. You can find the default location of this directory by running posting locate themes
.
![image](https://private-user-images.githubusercontent.com/5740731/351902962-4ec00a44-3128-492c-aa98-ca4c739627ba.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzYzNTgsIm5iZiI6MTczODk3NjA1OCwicGF0aCI6Ii81NzQwNzMxLzM1MTkwMjk2Mi00ZWMwMGE0NC0zMTI4LTQ5MmMtYWE5OC1jYTRjNzM5NjI3YmEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMDA1NDE4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzQ5MjA3ZjgwNjI2MWM5MzE2ZjY1Yjg0ODQzYzFjOWQ3NWZlZmU1ZGFkMjNmN2EzZDc4YjIzZmVlNTg4OTA1NCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.JC-e-r2jawrKWPIYkgkbWr94Bl_-Y3xcpyVVnhfjpgw)
Here's the theme file for the theme above:
name: aurora
primary: '#4a90e2'
secondary: '#50e3c2'
accent: '#b8e986'
background: '#1c2331'
surface: '#2c3e50'
error: '#e74c3c'
warning: '#f39c12'
success: '#2ecc71'
panel: '#34495e'
dark: true
author: Darren Burns
description: An example theme.
homepage: https://github.com/darrenburns/posting
Copy this file into your themes directory and you'll be able to set aurora
as your theme using the config file (theme: aurora
), environment variable (POSTING_THEME=aurora
), or the command palette.
Share your themes!
Share your creations with the community at #60!
X Resources themes
There's also new support for themes loaded via X Resources.
New configuration options
There are a bunch of new configuration options for showing/hiding parts of the UI and enabling/disabling features.
Notably, themes will no longer automatically be previewed when you highlight them in the command palette by default. This can be re-enabled by setting command_palette.theme_preview
to false in the config file, or POSTING_COMMAND_PALETTE__THEME_PREVIEW=0
as an environment variable.
See the README for the full list of options.
Fixes
There are a few fixes, including an important one for handling Unicode. .posting.yaml
files are now always read and written as UTF-8.
Testing
I've added a snapshot testing which covers all sorts of user interactions. These now run in CI, and should help maintain stability going forward.
![image](https://private-user-images.githubusercontent.com/5740731/351906518-a767c103-ad62-4d3d-ba63-827a1e8b1b17.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzYzNTgsIm5iZiI6MTczODk3NjA1OCwicGF0aCI6Ii81NzQwNzMxLzM1MTkwNjUxOC1hNzY3YzEwMy1hZDYyLTRkM2QtYmE2My04MjdhMWU4YjFiMTcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMDA1NDE4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGQxNjQ5OWY2YjA1MjVmYzViMzQ5NjE4NWU3M2IxYzk4Y2NjZTFiYTQ3OTU2YjAzYTE5OTY4OWNiNTc0YTAzZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.cFYhJowLp-Wrsy2hF4endl49_L87NY6L4qTVIoSN2TI)
What's Changed
- Format request body that contains unicode as multi-line in .save_to_disk() (fix #48) by @devdanzin in #49
- Tests, continuous integration, new config, other improvements by @darrenburns in #53
- Theme system by @darrenburns in #57
- Add Xresources-based theme by @SqrtMinusOne in #35
New Contributors
- @devdanzin made their first contribution in #49
- @SqrtMinusOne made their first contribution in #35
Full Changelog: 1.8.0...1.9.0