When having long running jobs in background terminals it would be awesome to have a notification when the job finishes. I already enabled the urgent notification (visual bell) and acoustic bell in the xfce4-terminal settings but somehow my window doesn't flash or ring when a job finishes..?!
Hi Simon, In order for the visual bell to work, there should be a command issued - `echo -e '\a'`. If you run `sleep 5 && echo -e '\a'` in the terminal and switch to another window, the terminal window should start blinking in 5 seconds. You can use the same technique for long running jobs. xfce4-terminal has another feature that might help: tab activity indicator. If your job prints something once it's done, the tab it was running in will change its label color so you'll know something's happened.
Ahh thx with '\a' it is indeed working, but it would be nice if one could enable this automatically when a job finishes without having to add '\a' manually, probably with a checkbox in context menu. This is probably a Feature request then, rather than a bug. The terminal could see if there is a command prompt or if all child processes finished and then automatically notify.
There are two fundamentally different approaches to notification. One is automatic based on activity (or lack thereof), and is implemented in xfce4-terminal. The other approach is notifications on certain events, such as when a command completes. The problem with this is making it automatic. The terminal emulator cannot do it because it doesn't "understand" what's happening inside, e.g. doesn't know what's a "shell prompt" and hence doesn't know when a process launched from the shell completes. And bash cannot be configured to automatically emit certain escape sequences at such events, we failed to convince bash's maintainer to add this feature. I'm not aware of the state of other shells. See the gnome-terminal counterpart issue at https://bugzilla.gnome.org/show_bug.cgi?id=711059 for a detailed analysis of the problem.
Thanks for the clarification, I found a workaround by putting \a into the command line prompt using my .zshrc/.bashrc: export PS1=$'\a'"$PS1" The problem with that is that of course that the user has to manually add this and also that it beeps for every executed command which gets annoying pretty fast it would be great to have the acoustic notification only enabled for specific tabs via a checkbox in right-click context menu..
Here more specific patches for the prompts: .bashrc: if [[ "$TERM" =~ "xterm*" ]]; then export PS1=$'\001'$'\a'$'\002'"$PS1" fi .zshrc if [[ "$TERM" =~ "xterm*" ]]; then export PS1=%{$'\a'%}"$PS1" fi Still xterm* is not really specific for xfce4-terminal, is there some better way to recognize xfce4-terminal from inside the shell? I also thought over this acoustiv bell, it would already help if the acoustic bell was just enabled if the notifying tab doesn't have focus!
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/xfce4-terminal/-/issues/39. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev