Skip to content

Commit 1ff6534

Browse files
committed
added pre-commit suggestions
1 parent 9b26999 commit 1ff6534

File tree

8 files changed

+49
-48
lines changed

8 files changed

+49
-48
lines changed

docs/ubuntu_install_notes.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Install programs
2-
DO NOT INSTALL 3rd PARTY DRIVERS DURING THE OS INSTALATION!
2+
DO NOT INSTALL 3rd PARTY DRIVERS DURING THE OS INSTALLATION!
33

44

55
### From repos
@@ -78,7 +78,7 @@ pip3 install -r requirements_base_pip.txt
7878
sudo cp *.otf /usr/share/fonts/opentype/
7979
```
8080
* kitty terminal
81-
* kity terminal dropdown script dependecies
81+
* kity terminal dropdown script dependencies
8282
```bash
8383
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
8484
sudo ln -s /home/$USER/.local/kitty.app/bin/kitty /bin/kitty
@@ -88,13 +88,13 @@ pip3 install -r requirements_base_pip.txt
8888
* change default shell -> `chsh -s /bin/zsh $USER`
8989
* GPU drivers
9090
* nvidia-driver, cuda
91-
* `sudo apt install nvidia-driver-$NEWEST nvidia-dkms-$NEWEST`
91+
* `sudo apt install nvidia-driver-$NEWEST nvidia-dkms-$NEWEST`
9292
* Docker
9393
* docker-cuda-toolkit
9494
* MS Teams
9595
* `https://go.microsoft.com/fwlink/p/?LinkID=2112886&clcid=0x415&culture=pl-pl&country=PL`
9696
* ROS2
97-
* see script bellow
97+
* see script below
9898
* IDEs
9999
* Visual Studio Code `https://code.visualstudio.com/docs/?dv=linux64_deb`
100100
* CLion `sudo snap install clion --classic`
@@ -109,8 +109,8 @@ pip3 install -r requirements_base_pip.txt
109109
sudo cp 49-onlykey.rules /etc/udev/rules.d/
110110
sudo udevadm control --reload-rules && udevadm trigger
111111
```
112-
IF DOSENT WORK, CHECK THIS `https://github.com/trustcrypto/onlykey-agent`
113-
112+
IF DOESN'T WORK, CHECK THIS `https://github.com/trustcrypto/onlykey-agent`
113+
114114
* Python3 neovim integration
115115
* `sudo pip3 install pynvim`
116116
* Refersh neofetch pciids
@@ -132,7 +132,7 @@ pip3 install -r requirements_base_pip.txt
132132
* `sudo systemctl enable ssh`
133133
* /etc/hosts
134134
* ~/.zshrc_local
135-
* DE global shortcuts
135+
* DE global shortcuts
136136
* flameshot `flameshot gui`
137137
* dropdown terminal `~/.scripts/SCRIPT.zsh`
138138
* DE visuals
@@ -147,15 +147,15 @@ pip3 install -r requirements_base_pip.txt
147147
## Programs to configure
148148
* Zotero
149149
* Thunderbird
150-
* Firefox
150+
* Firefox
151151
152152
## TODO
153153
* Script for automatic verification of checksums
154154
* Fix Kitty-dropdown for vertical monitors
155155
* Fixed by KDE auto window settings
156156
* Fix kitty-dropdown monitor selection (KDE window focus) - somehow works on arch
157157
* Fixed by toying with Window Behavior activation policy
158-
* Fix sudo mc in kitty (dosent accept arrows keys)
158+
* Fix sudo mc in kitty (doesn't accept arrows keys)
159159
* Fix fzf config for ubuntu
160160
* Add Okular to .dotfiles
161161

kitty/kitty.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ map kitty_mod+f>n kitten hints --type linenum --program nvim
112112
## Open URL
113113
map kitty_mod+e open_url_with_hints
114114
## Grab a part of terminal
115-
# TODO write custom kitten/extenstion of hints to grab current command
115+
# TODO write custom kitten/extension of hints to grab current command
116116
map kitty_mod+f>g kitten kitty_grab/grab.py
117117

118118
# Mouse

nvim/init.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Plug 'tpope/vim-sensible'
66
"Tool for commenting out lines
77
Plug 'preservim/nerdcommenter'
88

9-
"NERDTree with extenions
9+
"NERDTree with extensions
1010
Plug 'scrooloose/nerdtree'
1111
Plug 'Xuyuanp/nerdtree-git-plugin'
1212
Plug 'hankchiutw/nerdtree-ranger.vim'
@@ -21,7 +21,7 @@ Plug 'ycm-core/YouCompleteMe', { 'do': 'python3 ./install.py --clang-completer'
2121
"Automatic adding closing brackets
2222
Plug 'jiangmiao/auto-pairs'
2323

24-
"Modify surroudings of sandwiched textobject
24+
"Modify surroundings of sandwiched textobject
2525
Plug 'machakann/vim-sandwich'
2626

2727
" Black Python Formatter
@@ -35,7 +35,7 @@ Plug 'vim-airline/vim-airline-themes'
3535
"Rainbow brackets
3636
Plug 'frazrepo/vim-rainbow'
3737

38-
"Additonal Icons
38+
"Additional Icons
3939
" TODO fix conceal in neovim
4040
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
4141
Plug 'ryanoasis/vim-devicons'

requirements.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ mc
99
neofetch
1010
neovim
1111
nvtop
12+
pre-commit
1213
ranger
1314
xclip
1415
```

scripts/checksums.sh

+18-18
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,45 @@
55
# Terminal text colours
66
RED='\033[0;31m'
77
GREEN='\033[0;32m'
8-
YELLOW='\033[1;32m'
8+
YELLOW='\033[1;32m'
99
NC='\033[0m'
1010

1111

1212
echo -e "> ${YELLOW}SHA-256, SHA-1 & MD5 checksums validation${NC}"
1313

1414

1515
if [[ -z "${1}" ]]; then
16-
echo -e "> ${RED}Missing 1st argument (file path)${NC}"
17-
exit -2
16+
echo -e "> ${RED}Missing 1st argument (file path)${NC}"
17+
exit 2
1818
fi
1919
FILE=$1
2020
echo -e "> Selected file: $FILE"
2121

2222
if [[ -z "${2}" ]]; then
23-
echo -e "> Missing 2nd argument (checksum), accesing clipboard"
24-
SUM=$(xclip -selection c -o)
23+
echo -e "> Missing 2nd argument (checksum), accessing clipboard"
24+
SUM=$(xclip -selection c -o)
2525
else
26-
SUM=$2
26+
SUM=$2
2727
fi
28-
SUM=$(echo "$SUM" | tr 'A-Z' 'a-z')
28+
SUM=$(echo "$SUM" | tr '[:upper:]' '[:lower:]')
2929
echo -e "> Input checksum: $SUM"
3030

3131

3232
IFS=' '
3333
CHECKSUMS=("sha256sum" "sha1sum" "md5sum")
3434

3535
for CHECKSUM in "${CHECKSUMS[@]}"; do
36-
RESULT=$($CHECKSUM $FILE)
37-
read -ra RESULT <<< "$RESULT"
38-
RESULT="${RESULT[0]}"
39-
40-
if [ "$SUM" == "$RESULT" ]; then
41-
echo -e "> [$CHECKSUM] \t [${GREEN}MATCH${NC}]"
42-
exit 0
43-
else
44-
echo -e "> [$CHECKSUM] \t [${RED}MISSMATCH${NC}] SUM: $RESULT"
45-
fi
36+
RESULT=$($CHECKSUM "$FILE")
37+
read -ra RESULT <<< "$RESULT"
38+
RESULT_STR="${RESULT[0]}"
39+
40+
if [ "$SUM" == "$RESULT_STR" ]; then
41+
echo -e "> [$CHECKSUM] \t [${GREEN}MATCH${NC}]"
42+
exit 0
43+
else
44+
echo -e "> [$CHECKSUM] \t [${RED}MISMATCH${NC}] SUM: $RESULT_STR"
45+
fi
4646
done
4747

4848
echo -e "> ${RED}FAILED TO VERIFY THE FILE!${NC}"
49-
exit -1
49+
exit 1

scripts/kitty_dropdown.sh

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
#!/usr/bin/bash
2-
# AUTHOR: macmacal, based on orignal script by gotbletu
2+
# AUTHOR: macmacal, based on original script by gotbletu
33
# DESC: turn kitty terminal (xwindow) into a dropdown terminal
4-
# DEPEND: coreutils xdotool wmutils
5-
4+
# DEPEND: coreutils xdotool wmutils
5+
66
# get screen resolution width and height
7-
ROOT=$(lsw -r)
7+
# ROOT=$(lsw -r)
88
# width=$(wattr w $ROOT)
99
# height=$(wattr h $ROOT)
1010
# width=1920
1111
# height=1080
12-
12+
1313
# select terminal emulator manually
1414
my_term=kitty
15-
16-
# get terminal emulator and matching name pid ex: 44040485
15+
16+
# get terminal emulator and matching name pid ex: 44040485
1717
term_pid=$(pidof -S $'\n' $my_term | tail -n1)
1818

1919
# check if the emulator window exists
20-
window_id=$(comm -12 <(xdotool search --pid $term_pid) <(xdotool search --class $my_term | sort))
20+
window_id=$(comm -12 <(xdotool search --pid "$term_pid") <(xdotool search --class "$my_term" | sort))
2121

2222
# start a new terminal if none is currently running
2323
if [[ -z $window_id ]]; then
2424
${my_term} &>/dev/null &
25-
else
25+
else
2626
# get windows id from pid ex: 0x2a00125%
27-
wid=$(printf '0x%x' $window_id)
27+
wid=$(printf '0x%x' "$window_id")
2828
# toggle show/hide terminal emulator
29-
mapw -t $wid
29+
mapw -t "$wid"
3030
# maximize terminal emulator
3131
#wrs $width $height $wid
3232
fi

zsh_plugins.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ohmyzsh/ohmyzsh path:plugins/git # Git autocomplete
1010
ohmyzsh/ohmyzsh path:plugins/extract # Adds `extract` function for any archive filetype
1111
ohmyzsh/ohmyzsh path:plugins/fzf # Integration with fzf command
1212
ohmyzsh/ohmyzsh path:plugins/jump # Adds `jump` and `mark` commands for directories
13-
ohmyzsh/ohmyzsh path:plugins/nmap # Informative alliases for nmap syntax
13+
ohmyzsh/ohmyzsh path:plugins/nmap # Informative aliases for nmap syntax
1414
ohmyzsh/ohmyzsh path:plugins/pip # Autocompletion for pip
1515
ohmyzsh/ohmyzsh path:plugins/rsync # Aliases for frequent rsync commands
1616

@@ -23,4 +23,4 @@ zsh-users/zsh-history-substring-search
2323
# sampson-chen/sack
2424

2525
# Theme
26-
ohmyzsh/ohmyzsh path:themes/agnoster.zsh-theme
26+
ohmyzsh/ohmyzsh path:themes/agnoster.zsh-theme

zshrc

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Plugins manager
22
# ===========================================================================
3-
3+
44
export PATH=${HOME}/.antidote:$PATH
55

66
# Load Antidote plugin manager
@@ -30,7 +30,7 @@
3030

3131
# Configuration
3232
# ===========================================================================
33-
33+
3434
HYPHEN_INSENSITIVE="true"
3535
COMPLETION_WAITING_DOTS="true"
3636
HIST_STAMPS="yyyy-mm-dd"
@@ -70,7 +70,7 @@
7070

7171
# Enable usage of asterisk ('*') like in bash
7272
setopt extended_glob
73-
73+
7474
# Follow directory opened in ranger
7575
alias r='. ranger'
7676

@@ -111,4 +111,4 @@
111111
# Machine depended config
112112
# ===========================================================================
113113
source ~/.zshrc_local
114-
# // Machine depended config
114+
# // Machine depended config

0 commit comments

Comments
 (0)