Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,11 @@ wallbash set /path/to/file.img # Set wallpaper (auto start daemon)
wallbash stop # Stop the daemon
wallbash status # Show daemon status

┌─────────────────────────────────────────┐
│ ┌─────────────────────────────────────┐ │
│ │ (1) (2) (3) │ │
│ │ │ │
│ │ (4) (5) (6) │ │
│ │ │ │
│ │ (7) (8) (9) │ │
│ └─────────────────────────────────────┘ │
└─────────────────────────────────────────┘

# options for "set"
wallbash set [option] <value>
-m, --mode <mode> # Scaling mode (cover, fit, original)
-a, --anchor <1-9> # Anchor point (1=top-left ... 9=bottom-right)
-w, --wall <path> # Wallpaper file /path/to/file.img
-w, --wall <file> # Wallpaper file /path/to/file.img
```

The Rust binary compiles to a single executable, `wallbash`. It acts as both a client and a daemon:
Expand Down
15 changes: 3 additions & 12 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,17 @@ const LOG_FILE: &str = "/tmp/wallbash.log";
// --------------------------------------------------------------------- / funtions

fn print_usage() {
eprintln!(r"[Usage]
eprintln!(r"::Usage
wallbash start | Start the wallpaper daemon
wallbash set /path/to/file.img | Set wallpaper (auto start daemon)
wallbash stop | Stop the daemon
wallbash status | Show daemon status

┌─────────────────────────────────────────┐
│ ┌─────────────────────────────────────┐ │
│ │ (1) (2) (3) │ │
│ │ │ │
│ │ (4) (5) (6) │ │
│ │ │ │
│ │ (7) (8) (9) │ │
│ └─────────────────────────────────────┘ │
└─────────────────────────────────────────┘

::Options
wallbash set [option] <value>
-m, --mode <mode> | Scaling mode (cover, fit, original)
-a, --anchor <1-9> | Anchor point (1=top-left ... 9=bottom-right)
-w, --wall <path> | Wallpaper file /path/to/file.img");
-w, --wall <file> | Wallpaper file /path/to/file.img");
}

fn send_command(cmd: &str) -> Result<(), Box<dyn std::error::Error>> {
Expand Down
Loading
Loading