From 0b76ed2134f1f2a626709c7800955832c5841da8 Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Mon, 12 Aug 2024 18:11:10 +0200 Subject: [PATCH] fish: minor updates --- config/fish/config.fish | 14 ++++++++++++++ config/fish/functions/eza-aliases.fish | 4 ++-- config/fish/functions/lsblk.fish | 3 ++- config/fish/functions/lsblkp.fish | 5 +++++ 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 config/fish/functions/lsblkp.fish diff --git a/config/fish/config.fish b/config/fish/config.fish index 64dc20b9..61b04f52 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -12,3 +12,17 @@ if test "$DISPLAY" = "" -a "$WAYLAND_DISPLAY" = "" -a "$XDG_VTNR" = 1 tbsm end +# support jumping between prompts with foot terminal +function mark_prompt_start --on-event fish_prompt + echo -en "\e]133;A\e\\" +end + +# enable pipe-command-output with foot terminal +function foot_cmd_start --on-event fish_preexec + echo -en "\e]133;C\e\\" +end + +function foot_cmd_end --on-event fish_postexec + echo -en "\e]133;D\e\\" +end + diff --git a/config/fish/functions/eza-aliases.fish b/config/fish/functions/eza-aliases.fish index bd8f2a22..5731f7c5 100644 --- a/config/fish/functions/eza-aliases.fish +++ b/config/fish/functions/eza-aliases.fish @@ -12,9 +12,9 @@ end function ls --wraps='eza' --description='alias eza' switch $(tty) case /dev/tty** - EZA_GRID_ROWS=13 eza -w 220 --group --group-directories-first --icons $argv + EZA_GRID_ROWS=13 eza -w 155 --group-directories-first --icons $argv case /dev/pts/** - EZA_GRID_ROWS=26 eza -w 55 --group --group-directories-first --icons $argv + EZA_GRID_ROWS=26 eza -w 155 --group-directories-first --icons $argv end end diff --git a/config/fish/functions/lsblk.fish b/config/fish/functions/lsblk.fish index 15448349..fcdbbdac 100644 --- a/config/fish/functions/lsblk.fish +++ b/config/fish/functions/lsblk.fish @@ -1,4 +1,5 @@ -function lsblk --description 'alias lsblk=lsblk -o name,size,partuuid,fstype,mountpoints,label' +function lsblk --description 'alias lsblk=lsblk -o name,size,uuid,fstype,mountpoints,label' command lsblk -o name,size,partuuid,fstype,mountpoints,label $argv end + diff --git a/config/fish/functions/lsblkp.fish b/config/fish/functions/lsblkp.fish new file mode 100644 index 00000000..ade599fb --- /dev/null +++ b/config/fish/functions/lsblkp.fish @@ -0,0 +1,5 @@ +function lsblkp --description 'alias lsblkp=lsblk -o name,size,partuuid,fstype,mountpoints,label' + command lsblk -o name,size,partuuid,fstype,mountpoints,label $argv + +end + -- 2.51.2