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
|
# prompt
|
||||||
function get_hostname
|
function get_hostname
|
||||||
if test (uname) = Linux || test (uname) = Darwin
|
if test (uname) = Linux || test (uname) = Darwin
|
||||||
|
@ -61,8 +63,9 @@ end
|
||||||
function _last_cmd_duration
|
function _last_cmd_duration
|
||||||
set_color -b normal green
|
set_color -b normal green
|
||||||
set -q CMD_DURATION && printf " %dms" $CMD_DURATION
|
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)
|
printf "\e]777;notify;%s;%s\e\\" "WezTerm: Command Finished" (history --max 1)
|
||||||
|
set this_shell_should_notify 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -115,6 +118,10 @@ function _prompt_prefix
|
||||||
printf "# "
|
printf "# "
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function preexec --on-event fish_preexec
|
||||||
|
set this_shell_should_notify 1
|
||||||
|
end
|
||||||
|
|
||||||
function fish_prompt
|
function fish_prompt
|
||||||
set last_cmd_status $status
|
set last_cmd_status $status
|
||||||
_prompt_marker
|
_prompt_marker
|
||||||
|
|
|
@ -522,7 +522,6 @@
|
||||||
nodePackages.yaml-language-server
|
nodePackages.yaml-language-server
|
||||||
xh
|
xh
|
||||||
curl
|
curl
|
||||||
google-chrome
|
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.gpgSmartcards.enable = true;
|
hardware.gpgSmartcards.enable = true;
|
||||||
|
@ -588,10 +587,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.chromium = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.btop = {
|
programs.btop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.btop.override {
|
package = pkgs.btop.override {
|
||||||
|
@ -701,6 +696,8 @@
|
||||||
};
|
};
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
|
firefox
|
||||||
|
google-chrome
|
||||||
libnotify
|
libnotify
|
||||||
slides
|
slides
|
||||||
slack
|
slack
|
||||||
|
|
Loading…
Reference in a new issue