Fix terminal resizing causing command-complete notifications
Some checks failed
/ check (push) Failing after 2m5s
Some checks failed
/ check (push) Failing after 2m5s
This commit is contained in:
parent
51d99e7e9f
commit
35c527c421
2 changed files with 10 additions and 6 deletions
|
@ -1,3 +1,5 @@
|
|||
set this_shell_should_notify 1
|
||||
|
||||
# prompt
|
||||
function get_hostname
|
||||
if test (uname) = Linux || test (uname) = Darwin
|
||||
|
@ -61,8 +63,9 @@ end
|
|||
function _last_cmd_duration
|
||||
set_color -b normal green
|
||||
set -q CMD_DURATION && printf " %dms" $CMD_DURATION
|
||||
if test $CMD_DURATION -gt 5000
|
||||
if test $CMD_DURATION -gt 5000 && test $this_shell_should_notify = 1
|
||||
printf "\e]777;notify;%s;%s\e\\" "WezTerm: Command Finished" (history --max 1)
|
||||
set this_shell_should_notify 0
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -115,6 +118,10 @@ function _prompt_prefix
|
|||
printf "# "
|
||||
end
|
||||
|
||||
function preexec --on-event fish_preexec
|
||||
set this_shell_should_notify 1
|
||||
end
|
||||
|
||||
function fish_prompt
|
||||
set last_cmd_status $status
|
||||
_prompt_marker
|
||||
|
|
|
@ -522,7 +522,6 @@
|
|||
nodePackages.yaml-language-server
|
||||
xh
|
||||
curl
|
||||
google-chrome
|
||||
];
|
||||
|
||||
hardware.gpgSmartcards.enable = true;
|
||||
|
@ -588,10 +587,6 @@
|
|||
enable = true;
|
||||
};
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
package = pkgs.btop.override {
|
||||
|
@ -701,6 +696,8 @@
|
|||
};
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
firefox
|
||||
google-chrome
|
||||
libnotify
|
||||
slides
|
||||
slack
|
||||
|
|
Loading…
Reference in a new issue