all repos

dotfiles @ 7bea68f

i use rach linux btw
4 files changed, 16 insertions(+), 1 deletions(-)
fish: add some helper functions
Author: Olexandr Smirnov olexsmir@gmail.com
Committed at: 2025-07-23 23:43:36 +0300
Parent: 668c451
A config/fish/functions/pkill.fish
···
                
                1
                +function pkill -d "Wrapper around pkill to use fuzzy finder when no argument given"

              
                
                2
                +  if test (count $argv) -eq 0

              
                
                3
                +    ps ax -o user=,pid=,%cpu=,%mem=,stat=,time=,command= | fzf | awk '{print $2}' | xargs kill

              
                
                4
                +  else

              
                
                5
                +    command pkill $argv

              
                
                6
                +  end

              
                
                7
                +end

              
A config/fish/functions/sortw.fish
···
                
                1
                +function sortw -d "Wrapper around sort to save file after sorting"

              
                
                2
                + if test (count $argv) -eq 0

              
                
                3
                +    echo "No file provided"

              
                
                4
                +    return 1

              
                
                5
                +  else

              
                
                6
                +    command sort $argv[1] -o $argv[1]

              
                
                7
                +  end

              
                
                8
                +end

              
M config/fish/functions/srtdock.fish
···
                1
                
                -function srtdock

              
                
                1
                +function srtdock -d "Start docker daemon"

              
                2
                2
                   sudo systemctl start docker

              
                3
                3
                 end