Skip to content

Commit 27048d0

Browse files
committed
fix
1 parent 4f0d440 commit 27048d0

3 files changed

Lines changed: 22 additions & 30 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
[home]: https://user-images.githubusercontent.com/72335827/234695319-de351b0b-bdde-4461-8434-6c8effb7679d.png
1010
[about]: https://user-images.githubusercontent.com/72335827/234695358-a488d48a-ea89-45b8-8034-dd6476c43a2b.png
1111

12+
## Requirements
13+
14+
### X11
15+
16+
You need to install xclip
17+
18+
### Wayland
19+
20+
You need to install wl-copy
21+
1222
## Cool libraries used
1323

1424
- [egui-notify](https://github.com/ItsEthra/egui-notify)

src/cli.rs

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use clap::{Parser, Subcommand};
22

3-
/// Ascella GUI using no subcommand opens the gui?
3+
/// Ascella GUI using no subcommand opens the gui
44
#[derive(Parser)]
55
#[command(author, version, about, long_about = None)]
66
#[command(propagate_version = true)]
@@ -11,28 +11,10 @@ pub struct AscellaCli {
1111

1212
#[derive(Subcommand)]
1313
pub enum Commands {
14+
/// SCreenshot a area
1415
Area { delay: Option<u64> },
16+
/// Screenshot a window
1517
Window { delay: Option<u64> },
18+
/// Screenshot a screen
1619
Screen { delay: Option<u64> },
1720
}
18-
19-
// macro_rules! subcommands {
20-
// ( $( ($name:ident, $s:tt, $desc:tt) ),* ) => {
21-
// $(
22-
// #[derive(FromArgs, PartialEq, Debug)]
23-
// #[doc = $desc]
24-
// #[argh(subcommand, name = $s)]
25-
// pub struct $name {
26-
// /// how many ms to delay screenshotting
27-
// #[argh(option)]
28-
// pub delay: Option<i32>,
29-
// }
30-
// )*
31-
// };
32-
// }
33-
34-
// subcommands![
35-
// (AreaCommand, "area", "Screenshot a area"),
36-
// (WindowCommand, "window", "Screenshot a window"),
37-
// (ScreenCommand, "screen", "Sreenshot a screen")
38-
// ];

src/screenshots.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ impl ScreenshotType {
4141
file.clone(),
4242
match self {
4343
Self::Flameshot => format!("flameshot gui -c -p {}", file),
44-
Self::Spectacle => format!("spectacle -ar {}", file),
45-
Self::Scrot => format!("scrot -s {}", file),
46-
Self::Screencapture => format!("screencapture -R0,0,500,500 {}", file),
44+
Self::Spectacle => format!("spectacle -rbno {}", file),
45+
Self::Scrot => format!("scrot --select {}", file),
46+
Self::Screencapture => format!("screencapture -S {}", file),
4747
Self::Custom { area, .. } => area.replace("{file}", &file),
4848
},
4949
)
@@ -55,9 +55,9 @@ impl ScreenshotType {
5555
file.clone(),
5656
match self {
5757
Self::Flameshot => format!("flameshot gui -p {}", file),
58-
Self::Spectacle => format!("spectacle -b -p {}", file),
58+
Self::Spectacle => format!("spectacle -fbno {}", file),
5959
Self::Scrot => format!("scrot {}", file),
60-
Self::Screencapture => format!("screencapture -m {}", file),
60+
Self::Screencapture => format!("screencapture -S {}", file),
6161
Self::Custom { screen, .. } => screen.replace("{file}", &file),
6262
},
6363
)
@@ -69,10 +69,10 @@ impl ScreenshotType {
6969
file.clone(),
7070
match self {
7171
Self::Flameshot => format!("flameshot gui -p {} -w", file),
72-
Self::Spectacle => format!("spectacle -b -p {} -w", file),
73-
Self::Scrot => format!("scrot -u {}", file),
72+
Self::Spectacle => format!("spectacle -abno {}", file),
73+
Self::Scrot => format!("scrot --border --focused {}", file),
7474
Self::Screencapture => {
75-
format!("screencapture -mw {}", file)
75+
format!("screencapture -w {}", file)
7676
}
7777
Self::Custom { window, .. } => window.replace("{file}", &file),
7878
},

0 commit comments

Comments
 (0)