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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,10 @@ actions-on-enter = ["save-to-clipboard"]
# [possible values: save-to-clipboard, save-to-file, save-to-file-as, copy-filepath-to-clipboard, exit]
actions-on-escape = ["exit"]
# Action to perform when the Enter key is pressed [possible values: see `satty --help`]
# Deprecated: use actions-on-enter instead
# Deprecated since 0.19.0: use actions-on-enter instead
action-on-enter = "save-to-clipboard"
# Right click to copy
# Deprecated: use actions-on-right-click instead
# Deprecated since 0.19.0: use actions-on-right-click instead
right-click-copy = false
# request no window decoration. Please note that the compositor has the final say in this. At this point. requires xdg-decoration-unstable-v1.
no-window-decoration = true
Expand Down Expand Up @@ -513,9 +513,9 @@ Options:
--notification-thumbnail <NOTIFICATION_THUMBNAIL>
Experimental feature (0.22.0): use preview thumbnail in notifications where available [possible values: screenshot, app-icon]
--right-click-copy
Right click to copy. Preferably use the `action_on_right_click` option instead
Right click to copy, deprecated since 0.19.0 Preferably use the `action_on_right_click` option instead
--action-on-enter <ACTION_ON_ENTER>
Action to perform when pressing Enter. Preferably use the `actions_on_enter` option instead [possible values: save-to-clipboard, save-to-file, save-to-file-as, copy-filepath-to-clipboard, exit]
Action to perform when pressing Enter, deprecated since 0.19.0 Preferably use the `actions_on_enter` option instead [possible values: save-to-clipboard, save-to-file, save-to-file-as, copy-filepath-to-clipboard, exit]
-h, --help
Print help
-V, --version
Expand Down
4 changes: 2 additions & 2 deletions cli/src/command_line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ pub struct CommandLine {
pub notification_thumbnail: Option<NotificationThumbnail>,

// --- deprecated options ---
/// Right click to copy.
/// Right click to copy, deprecated since 0.19.0
/// Preferably use the `action_on_right_click` option instead.
#[arg(long)]
pub right_click_copy: bool,
/// Action to perform when pressing Enter.
/// Action to perform when pressing Enter, deprecated since 0.19.0
/// Preferably use the `actions_on_enter` option instead.
#[arg(long, value_delimiter = ',')]
pub action_on_enter: Option<Action>,
Expand Down
4 changes: 2 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ actions-on-enter = ["save-to-clipboard"]
# [possible values: save-to-clipboard, save-to-file, save-to-file-as, copy-filepath-to-clipboard, exit]
actions-on-escape = ["exit"]
# Action to perform when the Enter key is pressed [possible values: see `satty --help`]
# Deprecated: use actions-on-enter instead
# Deprecated since 0.19.0: use actions-on-enter instead
action-on-enter = "save-to-clipboard"
# Right click to copy
# Deprecated: use actions-on-right-click instead
# Deprecated since 0.19.0: use actions-on-right-click instead
right-click-copy = false
# request no window decoration. Please note that the compositor has the final say in this. At this point. requires xdg-decoration-unstable-v1.
no-window-decoration = true
Expand Down
12 changes: 12 additions & 0 deletions src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,16 @@ impl Configuration {
.actions_on_right_click
.contains(&Action::SaveToClipboard)
{
log_config_error(
"Deprecated config option: right-click-copy, use actions-on-right-click instead",
);
self.actions_on_right_click
.insert(0, Action::SaveToClipboard);
}
if let Some(v) = general.action_on_enter {
log_config_error(
"Deprecated config option: action-on-enter, use action-on-enter instead",
);
self.actions_on_enter.insert(0, v);
}
// ---
Expand Down Expand Up @@ -537,10 +543,16 @@ impl Configuration {
.actions_on_right_click
.contains(&Action::SaveToClipboard)
{
log_config_error(
"Deprecated command line option: right-click-copy, use actions-on-right-click instead",
);
self.actions_on_right_click
.insert(0, Action::SaveToClipboard);
}
if let Some(v) = command_line.action_on_enter {
log_config_error(
"Deprecated command line option: action-on-enter, use actions-on-enter instead",
);
self.actions_on_enter.insert(0, v.into());
}
// ---
Expand Down
Loading