Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo function #124

Open
Evgheni-E opened this issue May 10, 2021 · 7 comments
Open

Undo function #124

Evgheni-E opened this issue May 10, 2021 · 7 comments

Comments

@Evgheni-E
Copy link

Hi! Would it be possible to add an undo button? Especially when I accidentally clicked complete, I would really appreciate such a function to bring the task backe where it was.

Thanks in advance! <3

@IgnacioHeredia
Copy link

Along with a CTRL+Z shortcut 😉

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

This is an automated response. We acknowledge your report, and we appreciate your engagement. However, as there has been no recent activity in this thread, it has been marked as stale. If you have any further feedback or if the matter is still relevant, please do not hesitate to respond. Otherwise, this thread will be automatically closed in 15 days from now.

@IgnacioHeredia
Copy link

Still think this is relevant.

@ransome1 ransome1 moved this to Critical path to 2.0 in sleek 2.x Sep 24, 2023
@ransome1 ransome1 moved this from Critical path to 2.0 to Backlog in sleek 2.x Sep 26, 2023
Repository owner deleted a comment from github-actions bot Dec 3, 2023
@ransome1
Copy link
Owner

ransome1 commented Dec 7, 2023

Since sleek is not incorporating a database I think the only really viable option here is to let sleek create one or more backups of the todo file, every time something changes. So that Ctrl + Z will restore the contents of the last backed up file.

But since the issue doesn't really provide a lot of detail on what is expected, it would be just me guessing, if this solution would be of value.

This would of course only restore contents of the file, not changes of settings or anything like that.

@IgnacioHeredia
Copy link

I think a single backup would be fine. So anytime you have the current state and the previous state. In this way, if you mark by error something as completed you can undo that change. Personally I have never experienced the need to perform more than a single undo.

Anyway @ransome1 , at the end of the day, it's up to you to decide. If this adds to much complexity to the codebase, maybe it's not worth the effort to add it. Just thought it could be a nice small feature to have.

@bughunter2
Copy link

Tip for users finding this: for now, as a workaround, you could create a simple launcher shell script that creates a backup and then opens Sleek, so you can always manually revert changes or view the older todo file in a text editor. You can add this script as a launcher to your desktop environment's panel (taskbar).

Remember to chmod +x the script, and adjust the sleek= and todofile= variables to your liking.

Example:

#!/bin/sh
scriptname="$(basename "$0")"

sleek="$HOME/Programs/sleek-2.0.6.AppImage"
todofile="$HOME/Documents/todo.txt"

main() {
    if ! cp -a "$todofile" "$todofile.bak"; then
        message="$scriptname: failed to create a todo backup"
        echo "ERROR: $message" >&2
        zenity --error --text "$message"
    else
        exec nohup "$sleek" >/dev/null 2>&1 &
    fi
}

main "$@"

Copy link

This is an automated response. We acknowledge your report, and we appreciate your engagement. However, as there has been no recent activity in this thread, it has been marked as stale. If you have any further feedback or if the matter is still relevant, please do not hesitate to respond. Otherwise, this thread will be automatically closed in 15 days from now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

4 participants