mirror of
https://github.com/elkowar/eww.git
synced 2024-10-03 22:48:31 +03:00
Merge 0ebd6eaf0f
into 6db0f95c57
This commit is contained in:
commit
3491a9ede9
73
.github/workflows/build.yml
vendored
73
.github/workflows/build.yml
vendored
@ -1,45 +1,36 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTFLAGS: "-Dwarnings"
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install libgtk-3-dev libgtk-layer-shell-dev libdbusmenu-gtk3-dev
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy,rustfmt
|
||||
|
||||
- name: Load rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Setup problem matchers
|
||||
uses: r7kamura/rust-problem-matchers@v1
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt -- --check
|
||||
- name: Check with default features
|
||||
run: cargo check
|
||||
|
||||
- name: Run tests
|
||||
run: cargo test
|
||||
|
||||
- name: Check x11 only
|
||||
run: cargo check --no-default-features --features=x11
|
||||
- name: Check wayland only
|
||||
run: cargo check --no-default-features --features=wayland
|
||||
- name: Check no-backend
|
||||
run: cargo check --no-default-features
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install libgtk-3-dev libgtk-layer-shell-dev libdbusmenu-gtk3-dev
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy,rustfmt
|
||||
- name: Load rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
- name: Setup problem matchers
|
||||
uses: r7kamura/rust-problem-matchers@v1
|
||||
- name: Check formatting
|
||||
run: cargo fmt -- --check
|
||||
- name: Run tests
|
||||
run: cargo test
|
||||
- name: Check with default features
|
||||
run: cargo clippy
|
||||
- name: Check x11 only
|
||||
run: cargo clippy --no-default-features --features=x11
|
||||
- name: Check wayland only
|
||||
run: cargo clippy --no-default-features --features=wayland
|
||||
- name: Check no-backend
|
||||
run: cargo clippy --no-default-features
|
||||
|
68
.github/workflows/gh-pages.yml
vendored
68
.github/workflows/gh-pages.yml
vendored
@ -1,38 +1,36 @@
|
||||
name: Build and deploy Github pages
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "gen-docs.ts"
|
||||
- "crates/eww/src/widgets/widget_definitions.rs"
|
||||
- "crates/eww/src/config/inbuilt.rs"
|
||||
- ".github/workflows/**"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "gen-docs.ts"
|
||||
- "crates/eww/src/widgets/widget_definitions.rs"
|
||||
- "crates/eww/src/config/inbuilt.rs"
|
||||
- ".github/workflows/**"
|
||||
jobs:
|
||||
build:
|
||||
name: Build mdBook
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout
|
||||
- uses: actions/checkout@master
|
||||
|
||||
# Build widget documentation
|
||||
- name: Use deno to build widget documentation
|
||||
uses: denoland/setup-deno@main
|
||||
with:
|
||||
deno-version: "v1.x"
|
||||
- run: deno run --allow-read --allow-write gen-docs.ts ./crates/eww/src/widgets/widget_definitions.rs ./crates/eww/src/config/inbuilt.rs
|
||||
|
||||
# Build & deploy
|
||||
- name: build mdBook page
|
||||
uses: peaceiris/actions-mdbook@v1
|
||||
with:
|
||||
mdbook-version: '0.4.8'
|
||||
- run: mdbook build docs
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./docs/book/
|
||||
build:
|
||||
name: Build mdBook
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'elkowar/eww'
|
||||
steps:
|
||||
# Checkout
|
||||
- uses: actions/checkout@master
|
||||
# Build widget documentation
|
||||
- name: Use deno to build widget documentation
|
||||
uses: denoland/setup-deno@main
|
||||
with:
|
||||
deno-version: "v1.x"
|
||||
- run: deno run --allow-read --allow-write gen-docs.ts ./crates/eww/src/widgets/widget_definitions.rs ./crates/eww/src/config/inbuilt.rs
|
||||
# Build & deploy
|
||||
- name: build mdBook page
|
||||
uses: peaceiris/actions-mdbook@v1
|
||||
with:
|
||||
mdbook-version: '0.4.8'
|
||||
- run: mdbook build docs
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./docs/book/
|
||||
|
@ -12,15 +12,20 @@ use yuck::config::{
|
||||
use crate::window_arguments::WindowArguments;
|
||||
|
||||
/// This stores all the information required to create a window and is created
|
||||
/// via combining information from the [`WindowDefinition`] and the [`WindowInitiator`]
|
||||
/// via combining information from the [`WindowDefinition`] and the [`WindowInitiator`].
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct WindowInitiator {
|
||||
// it would be more efficient to make everything work when not using x11 or wayland instead of simply disabling the warning.
|
||||
// however, this is probably not worth the effort since i don't think anyonre is seriously building eww without backend support for either x11 or wayland
|
||||
#[cfg_attr(not(any(feature = "wayland", feature = "x11")), allow(dead_code))]
|
||||
pub backend_options: BackendWindowOptions,
|
||||
pub geometry: Option<WindowGeometry>,
|
||||
pub local_variables: HashMap<VarName, DynVal>,
|
||||
pub monitor: Option<MonitorIdentifier>,
|
||||
pub name: String,
|
||||
#[cfg_attr(not(any(feature = "wayland", feature = "x11")), allow(dead_code))]
|
||||
pub resizable: bool,
|
||||
#[cfg_attr(not(any(feature = "wayland", feature = "x11")), allow(dead_code))]
|
||||
pub stacking: WindowStacking,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user