### Configure persway-tokio Daemon with Sway Source: https://lib.rs/crates/persway-tokio Example of starting the persway-tokio daemon in Sway with specific configurations for opacity and layout, alongside the wallpaper setting command. ```bash exec persway daemon \ -w \ -e '[tiling] opacity 1' \ -f '[tiling] opacity 0.95; opacity 1' \ -l 'mark --add _prev' \ --default-layout spiral & ``` -------------------------------- ### Install Persway from Source using Cargo Source: https://lib.rs/crates/persway-tokio Install the latest version of persway-tokio from GitHub or crates.io. Use the 'wallpaper' feature for per-monitor wallpaper support. ```bash cargo install --git https://github.com/saylesss88/persway cargo install persway-tokio cargo install persway-tokio --features wallpaper ``` -------------------------------- ### Install persway-tokio with Wallpaper Support Source: https://lib.rs/crates/persway-tokio Install the persway-tokio crate with the 'wallpaper' feature enabled to include wallpaper functionality. ```bash cargo install persway-tokio --features wallpaper ``` -------------------------------- ### Start Persway Daemon with Master Stack Layout Source: https://lib.rs/crates/persway-tokio Configure Sway to automatically start the Persway daemon with specific settings for window opacity and the master stack layout. ```bash exec persway daemon \ -w \ -e '[tiling] opacity 1' \ -f '[tiling] opacity 0.95; opacity 1' \ -l 'mark --add _prev' \ --default-layout stack_main ``` -------------------------------- ### Start Persway Daemon with Spiral Layout Source: https://lib.rs/crates/persway-tokio Configure Sway to automatically start the Persway daemon with specific settings for window opacity and the spiral layout. ```bash exec persway daemon \ -w \ -e '[tiling] opacity 1' \ -f '[tiling] opacity 0.95; opacity 1' \ -l 'mark --add _prev' \ --default-layout spiral ``` -------------------------------- ### Persway CLI Main Command Usage Source: https://lib.rs/crates/persway-tokio The main command for interacting with Persway. Use it to start the daemon, manage window focus, swap windows, rotate stack elements, change layouts, or get help. ```bash Usage: persway [OPTIONS] Commands: daemon Starts the persway daemon stack-focus-next Focuses the next stacked window (stack_main) stack-focus-prev Focuses the previous stacked window (stack_main) stack-swap-main Swaps the current stacked window with the main window stack-main-rotate-next Pops top of stack into main, pushes old main to bottom change-layout Changes the layout of the focused workspace help Print help Options: -s, --socket-path Path to control socket. Defaults to XDG_RUNTIME_DIR -h, --help Print help -V, --version Print version ``` -------------------------------- ### Set Wallpaper on Sway Startup Source: https://lib.rs/crates/persway-tokio Configure Sway to set a wallpaper on startup by adding a command to your Sway configuration file. This command applies the same wallpaper to all monitors. ```bash exec_always sleep 1 && persway set-wallpaper --path ~/Pictures/wallpapers2/Bonsai-Plant.png ``` -------------------------------- ### Persway Daemon Options Source: https://lib.rs/crates/persway-tokio Configure the Persway daemon with options for default layout, workspace renaming, and commands to execute on window focus or leave events. ```bash Usage: persway daemon [OPTIONS] Options: -d, --default-layout Default layout (manual, spiral, stack_main) [default: manual] -w, --workspace-renaming Enable automatic workspace renaming (e.g. based on app name) -f, --on-window-focus Sway command to run when window gains focus. Example: '[tiling] opacity 0.8; opacity 1' -l, --on-window-focus-leave Sway command to run when window loses focus. Example: 'mark --add _prev' -e, --on-exit Sway command to run when persway exits (cleanup). Example: '[tiling] opacity 1' ``` -------------------------------- ### Bind Key to Cycle Wallpapers Source: https://lib.rs/crates/persway-tokio Create a keybinding in Sway to execute a script that randomly selects and sets a wallpaper from a specified directory. ```bash bindsym Mod4+w exec persway set-wallpaper --path $(find ~/wallpapers -type f | shuf -n1) ``` -------------------------------- ### Set Wallpaper for All Outputs Source: https://lib.rs/crates/persway-tokio Apply the same wallpaper across all connected monitors by omitting the '--output' flag. ```bash persway set-wallpaper --path /path/to/image.png ``` -------------------------------- ### Declarative NixOS Sway Configuration for Persway Source: https://lib.rs/crates/persway-tokio Set up the Persway daemon declaratively within your NixOS sway configuration, enabling automatic window management features. ```nix # sway.nix startup = [ { command = "exec persway daemon -w -e '[tiling] opacity 1' -f '[tiling] opacity 0.95; opacity 1' -l 'mark --add _prev' --default-layout spiral"; } ]; ``` -------------------------------- ### Sway Key Bindings for Persway Layout and Focus Control Source: https://lib.rs/crates/persway-tokio Add these key bindings to your ~/.config/sway/config to control Persway layouts and window focus. These are optional and useful for integrating Persway into Sway key-chords. ```bash # Layout Rotation & Focus bindsym Mod4+Control+space exec persway stack-main-rotate-next bindsym Mod4+Shift+Tab exec persway stack-focus-prev bindsym Mod4+Tab exec persway stack-focus-next bindsym Mod4+space exec persway stack-swap-main # Switching Layouts bindsym Mod4+c exec persway change-layout stack-main --size 70 --stack-layout tiled bindsym Mod4+v exec persway change-layout manual bindsym Mod4+x exec persway change-layout stack-main --size 70 bindsym Mod4+z exec persway change-layout spiral ``` -------------------------------- ### Persway Stack Main Layout Options Source: https://lib.rs/crates/persway-tokio Options for the 'stack-main' layout, controlling the size of the main area and the layout style of the stacked windows. ```bash Usage: persway change-layout stack-main [OPTIONS] Options: -s, --size Size of the main area [default: 70] -l, --stack-layout Layout of the stack: tabbed, tiled, stacked [default: stacked] ``` -------------------------------- ### Nix Flake Configuration for Persway Source: https://lib.rs/crates/persway-tokio Integrate Persway into your Nix environment using a flake. Add the flake to your inputs and include it in your system packages. ```nix inputs.persway.url = "github:saylesss88/persway"; environment.systemPackages = [ inputs.persway.packages.${pkgs.stdenv.hostPlatform.system}.default ]; ``` -------------------------------- ### Set Wallpaper for Another Output Source: https://lib.rs/crates/persway-tokio Configure a different wallpaper for a separate monitor by specifying its output name. ```bash persway set-wallpaper --path /path/to/image.jpg --output HDMI-A-1 ``` -------------------------------- ### Enable Wallpaper Feature Source: https://lib.rs/crates/persway-tokio/features To enable the 'wallpaper' feature, add the 'features' key with '"wallpaper"' to the persway-tokio dependency in your Cargo.toml file. This feature enables the randpaper_lib. ```toml [dependencies] persway-tokio = { version = "0.9.0", features = ["wallpaper"] } ``` -------------------------------- ### Persway Change Layout Commands Source: https://lib.rs/crates/persway-tokio Subcommands for the 'change-layout' command, specifying the desired tiling strategy for the focused workspace. ```bash Usage: persway change-layout Commands: spiral Spiral autotiling (Golden Ratio / Fibonacci style) stack-main Master-Stack layout manual Standard Sway manual tiling ``` -------------------------------- ### Set Wallpaper for a Specific Output Source: https://lib.rs/crates/persway-tokio Use the 'set-wallpaper' command to set a specific image for a designated Wayland output. ```bash persway set-wallpaper --path /path/to/image.jpg --output eDP-1 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.