all repos

dotfiles @ 4f8c4ae7397ea8f90f0d3b01dc8b344580cd4490

i use rach linux btw
5 files changed, 32 insertions(+), 3 deletions(-)
add some scripts
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2024-11-02 15:12:25 +0200
Parent: 72cc1a3
A bin/ex
···
                
                1
                +#!/usr/bin/env bash

              
                
                2
                +

              
                
                3
                +ex () {

              
                
                4
                +  file=$1

              
                
                5
                +  [ -z "$file" ] && echo 'ex <compressed>' && return 1

              
                
                6
                +  [ ! -f "$file" ] && echo 'Invalid file: `'"$file"'`' && return 1

              
                
                7
                +  case "$file" in

              
                
                8
                +    *.tar.bz2) tar xjf "$file";;

              
                
                9
                +    *.tar.gz)  tar xzf "$file";;

              
                
                10
                +    *.bz2)     bunzip2 "$file";;

              
                
                11
                +    *.rar)     unrar x "$file";;

              
                
                12
                +    *.gz)      gunzip "$file";;

              
                
                13
                +    *.tar)     tar xf "$file";;

              
                
                14
                +    *.tbz2)    tar xjf "$file";;

              
                
                15
                +    *.tgz)     tar xzf "$file";;

              
                
                16
                +    *.zip)     unzip "$file";;

              
                
                17
                +    *.Z)       uncompress "$file";;

              
                
                18
                +    *.7z)      7z x "$file";;

              
                
                19
                +    *.xz)      unxz "$file";;

              
                
                20
                +    *)         echo 'Unknown suffix on file: `'"$file"'`'; return 1 ;;

              
                
                21
                +  esac

              
                
                22
                +}

              
                
                23
                +

              
                
                24
                +ex "$@"

              
A bin/goclean
···
                
                1
                +#!/usr/bin/env bash

              
                
                2
                +exec go clean -cache -modcache -i -r

              
A bin/kittyreload
···
                
                1
                +#!/usr/bin/env bash

              
                
                2
                +kill -SIGUSR1 "$(pidof kitty | awk '{ print $1 }')"

              
A bin/today
···
                
                1
                +#!/usr/bin/env bash

              
                
                2
                +p=$HOME/Documents/Syncthing/logseq/journals

              
                
                3
                +d=$(date +%Y-%m-%d)

              
                
                4
                +[ -d "$p" ] && exec nvim "$p/$d.md"

              
D config/fish/functions/kitty_reload.fish
···
                1
                
                -function kitty_reload

              
                2
                
                -  kill -SIGUSR1 (pidof kitty | awk '{ print $1 }')

              
                3
                
                -end