Compare commits
561 Commits
14fe788e31
...
master
Author | SHA1 | Date | |
---|---|---|---|
057b0bf93a
|
|||
954138b1ef
|
|||
75f1174ace
|
|||
c49c8b2a09
|
|||
d6eadbd7b6
|
|||
6cb491d338
|
|||
2079564fe5
|
|||
b49e7ad83d
|
|||
a588a8299e
|
|||
d21a1a5c07
|
|||
7a519522ca
|
|||
e094e72395
|
|||
93d3b4440c
|
|||
f5ded6a5e6
|
|||
c9ac5f42ab
|
|||
819de0e9ae
|
|||
19dcc18963
|
|||
311e2003b5
|
|||
cc21679185
|
|||
f279b82081
|
|||
0c8cd8f76a
|
|||
095b489048
|
|||
5dd29e237e
|
|||
c36b53f60c
|
|||
cbbb91f09f
|
|||
4f90249a30
|
|||
f3753a98f6
|
|||
a8dce2df03
|
|||
cc266cb355
|
|||
31d7116fb7
|
|||
ed5e6b5981
|
|||
e33f4eb6fd
|
|||
93f83ec173
|
|||
7b39dd1506
|
|||
8bdc3f8586
|
|||
8054a2f6a4
|
|||
475e27f56e
|
|||
cb54a2309a | |||
882e6c58af | |||
0e225e78cf | |||
eb7c0490dd | |||
0142999c1e | |||
d777fa98cb | |||
03ec47296e | |||
9e0c732306 | |||
3f9cd30676 | |||
2eea0e2289 | |||
6d4efa9426 | |||
5e19d80d7e | |||
28dcc47992 | |||
650c49efd4 | |||
0a6bb7ada8 | |||
9e59271dfe | |||
323d08896e | |||
7b4a824021 | |||
e74133f7cb | |||
0f96b6942d | |||
ab58cf021b | |||
21492521c9 | |||
415c69627d | |||
021760ebc1 | |||
aee7025f30 | |||
8baad53fc3 | |||
c2ff59a919 | |||
5649b5a5fe | |||
1fc65342a6 | |||
61dbf3b400 | |||
09538b7d5c | |||
a9473f088a | |||
42657ae6ec | |||
496d332166 | |||
77bf1d5e8e | |||
ac925639f6 | |||
11b2c1e779 | |||
0428c99de7 | |||
e412dd8f56 | |||
4e456f3148 | |||
eb624b6a26 | |||
05f993c96d | |||
7b92b1fc80 | |||
175f3abe2a | |||
276e9ee9cf | |||
8f3d72084f | |||
1a850c8b1e | |||
7463a35b1a | |||
bc0d6e9607 | |||
b8295309c7 | |||
c57dfaa9ef | |||
3a14c7bc68 | |||
7c63490d16 | |||
8a0beb3060 | |||
b7eaa3c123 | |||
14225a0d7c | |||
fa5841057d | |||
d40765c362 | |||
4665d24f4e | |||
98c17ad9b3 | |||
430c3a3c5e | |||
ed18ee8dac | |||
bb21b5cb22 | |||
ae2c2826ba | |||
bc88bc74a2 | |||
ac1545739e | |||
326197f2a1 | |||
11220af170 | |||
b705959ca0 | |||
f13602adf4 | |||
4a997dd50d | |||
18bb822da6 | |||
6d590b7183 | |||
d986cad68c | |||
8fcd3570d8 | |||
f4e10e25b5 | |||
2bd018e968 | |||
ee35b65882 | |||
3c479b9bf8 | |||
f5a2922bbd | |||
faac54db40 | |||
596c89a2c1 | |||
c566f1baa2 | |||
a01ded3392 | |||
f95b040b6c | |||
e99779bb74 | |||
78158b1c48 | |||
68df27ae7d | |||
75d41bd546 | |||
1ef9806441 | |||
cd1e2e1780 | |||
daefb82668 | |||
6018670710 | |||
331e59a785 | |||
2dcc1e12ac | |||
956c09924c | |||
a27cf9126d | |||
d0294a8c55 | |||
952b075c59 | |||
cd67e11d14 | |||
50b6735399 | |||
24ca1f0079 | |||
1a9724545f | |||
1367f981e6 | |||
8298d1573c | |||
6237424ea4 | |||
9eb98b9253 | |||
74a35c18a5 | |||
34d8eb920c | |||
ff7ecd94ad | |||
2bd52b60ab | |||
9f6f98687a | |||
2696510cac | |||
6c72e54dbd | |||
5c54d15e9b | |||
a32ec8790f | |||
767df75e28 | |||
35241009bd | |||
235a1e6e14 | |||
1ea4fad2ed | |||
cdb5af5bfd | |||
be3b7054a0 | |||
f9f1c2533e | |||
2bbf925871 | |||
39507980c6 | |||
4e3551662a | |||
9eb8d53b5d | |||
3aaec25e62 | |||
418eff1593 | |||
142da10532 | |||
6ba43fb782 | |||
6883feb432 | |||
0395102a68 | |||
3d57a89303 | |||
a18acc0d10 | |||
c434f1f982 | |||
ab7a6d7eaa | |||
ea416e23ba | |||
91e8cf58ed | |||
0244d97a6e | |||
71ab51588c | |||
8f74624bc3 | |||
cd7cbb132d | |||
38f1da33cc | |||
0b579b3d6d | |||
3769db26e7 | |||
58a3617582 | |||
24c643bed8 | |||
17557d3770 | |||
766d3d51cd | |||
59734ee03b | |||
a68cbe34f5 | |||
b78f863171 | |||
fb27098087 | |||
3229117762 | |||
aff1b27ec5 | |||
760fe17539 | |||
5db09b12bf | |||
cf18e085a6 | |||
6d91e0e2ca | |||
63d3e07729 | |||
80a705ee7f | |||
573c23c517 | |||
3d60510a63 | |||
771b742b1e | |||
cbd759f5c5 | |||
415641509c | |||
9b762faa5a | |||
be52bcfd3d | |||
215a419b5a | |||
1efb4fea92 | |||
b4d162323e | |||
96bea7888c | |||
e3e8eb8b80 | |||
23cad14acf | |||
97e8b22694 | |||
c71299e0ce | |||
14463f5325 | |||
58672f24f0 | |||
631affbb2b | |||
29eb59da0d | |||
f1384da351 | |||
0a506c316b | |||
7804bb7aa7 | |||
162e9f1498 | |||
b4deefda7f | |||
a2425933a0 | |||
6ab16c8751 | |||
c36ec58280 | |||
4a63d66967 | |||
003366f0ff | |||
17527b6761 | |||
93b238537f | |||
0b7f054ade | |||
b2fec9b942 | |||
36a820efaa | |||
e517eda335 | |||
95517539e6 | |||
8fef236d64 | |||
232703d3c4 | |||
7c4a6df3b3 | |||
5b6372d174 | |||
23aa564e0b | |||
d1f7315162 | |||
879b3cc7ad | |||
160c367949 | |||
afff65a6b4 | |||
f39fcfa0e7 | |||
fce8f9642d | |||
dbdf5592e3 | |||
801cec6547 | |||
ed1590dcf6 | |||
0d10d0633e | |||
17169efca0 | |||
11bb4e8495 | |||
4e4e75c7ec | |||
981124e6d9 | |||
67bb80abb0 | |||
d7ef397227 | |||
fa0f85c9d2 | |||
f7e96201c8 | |||
7e1392a827 | |||
098bf053f0 | |||
441ec820d2 | |||
5a6c1bfa87 | |||
8fbd54e147 | |||
49fb04b3d9 | |||
1771639605 | |||
82c62fb1d3 | |||
4043b2f9ed | |||
83c0193b5a | |||
d7df198fdb | |||
d1069fb8b1 | |||
0a2951fb12 | |||
ec1ac6b57c | |||
16e8dfd480 | |||
ccdf8cdb31 | |||
d9bbfa6595 | |||
065afa1fef | |||
97dab633b9 | |||
b7749b619f | |||
9b6b4072c7 | |||
2599505e72 | |||
322735c7d3 | |||
e196032a38 | |||
6d2cc28a6f | |||
4e0a799a86 | |||
362a590308 | |||
b343852d00 | |||
948dd5f919 | |||
2ec8d663b1 | |||
85c2e66178 | |||
3fbb3681b1 | |||
99b91391c5 | |||
56e756a33f | |||
eb31cfcac3 | |||
e5462ddb42 | |||
4ee688a2ec | |||
7b1216ac8f | |||
8dc315bf7f | |||
afeb14cbcf | |||
1e0833599b | |||
4f82e9bc36 | |||
068436fd4c | |||
961acab260 | |||
601648b7ed | |||
4c0238daff | |||
51d3789f13 | |||
c9de404db4 | |||
ca0d781987 | |||
60f9bc68ae | |||
785ba4c5bd | |||
90483bdaef | |||
1ec7284ae2 | |||
baba0677c6 | |||
54ee5a8b7a | |||
3dc049d678 | |||
848ad9e50f | |||
c9aa90a52b | |||
89724af48a | |||
0e75e96d59 | |||
8d9a348c37 | |||
ae1d8fd399 | |||
bbbed3bd3b | |||
27de46fe5d | |||
541172fc58 | |||
87845b546d | |||
925c1fad44 | |||
9d13e0edef | |||
6ff1ebc700 | |||
64e8c1d32a | |||
38ef03e51b | |||
6608e8e38f | |||
823813b214 | |||
c42f5e549c | |||
5b5c7dfccc | |||
a6a04ee63e | |||
a501713cdd | |||
0387204376 | |||
0c20d23f24 | |||
638ad50518 | |||
f5bbd5d2cc | |||
f12505f635 | |||
d4c5e0bcdc | |||
4e06384b78 | |||
a54247e8d2 | |||
23ed014e34 | |||
7b79d119b3 | |||
4d9af084d6 | |||
707e5a96ee | |||
f63e06ed01 | |||
a03c179e6d | |||
71f4d3dd0c | |||
19fcfa8992 | |||
7c35537b81 | |||
6f39ed6860 | |||
1bbcf9f7ed | |||
969733bc9d | |||
a25fa189ce | |||
56f713481a | |||
3f65b8c998 | |||
dd246a4382 | |||
64432791bc | |||
0a783e54a2 | |||
4b7ff2fd81 | |||
9a2c2231f6 | |||
dfe784f5cd | |||
c7d4a39786 | |||
698d127a0e | |||
e8635decfb | |||
75dc941751 | |||
4919f8d0a2 | |||
6a84aa8d1b | |||
e88fd96667 | |||
86b168325f | |||
dfd681cc4c | |||
59ef656bf8 | |||
30a5af220d | |||
a2daecae0f | |||
d8aa622061 | |||
e8f30402fa | |||
fb807cf54b | |||
272e155542 | |||
35996dc77d | |||
553498395d | |||
495f7beb83 | |||
0dd168659e | |||
0d34f7ee77 | |||
ebea253dbc | |||
850bf1660a | |||
3f91a97103 | |||
d054c58496 | |||
6ad7f787db | |||
58bbaf0dda | |||
7656dc7898 | |||
d4d4c6a6ef | |||
b690ff7442 | |||
a8be78701d | |||
cee01c0470 | |||
d6ebb9f52b | |||
8746126b31 | |||
7f082cf324 | |||
b26ecf0339 | |||
80e8f694ca | |||
a922b12494 | |||
75b9c90788 | |||
397c24f5c3 | |||
0aab01f190 | |||
17941a76ba | |||
52b6c3b61f | |||
adbe0ccd11 | |||
9e7731b9cc | |||
42430ddd61 | |||
f2f2fb6a63 | |||
5355f9549d | |||
fab5e806e3 | |||
3b504bfcae | |||
1f58c3d31a | |||
62f4e77daf | |||
113b932098 | |||
318a07913c | |||
94987352f1 | |||
c12f40f292 | |||
41e8b10c24 | |||
866fe4850e | |||
26aa1466aa | |||
c97f48acb4 | |||
12d8b16ef2 | |||
0d1036d7a7 | |||
23fd3fdbcb | |||
9f03f53151 | |||
299f1fa916 | |||
faa667934b | |||
eb93bf6ed2 | |||
270255325b | |||
70866e50db | |||
d066b66267 | |||
395907292d | |||
c48229f46c | |||
a3e1c60849 | |||
a67da5a4d7 | |||
730ff7a368 | |||
601a22b216 | |||
e6e1bb81b9 | |||
4ce758e0a8 | |||
0f5669d700 | |||
f8e8049a4c | |||
03427242d7 | |||
ab1f378e97 | |||
6fe6e04a52 | |||
70e6a0674d | |||
55aaad06a3 | |||
1b48bf6d53 | |||
da5fd8f556 | |||
a495fc074c | |||
20dab04a38 | |||
bd2996bbae | |||
3cd3c0739f | |||
ced74f92a5 | |||
27f322ca8f | |||
d5df2c06e8 | |||
313d3f774e | |||
04b2e621a2 | |||
c2d3e36a85 | |||
cf8d6367de | |||
eba55c4128 | |||
51cea25971 | |||
499406b118 | |||
15386558a8 | |||
2d2e5c55f7 | |||
5fcb062a3f | |||
e144fa02e1 | |||
45b97dae62 | |||
e768d2aa32 | |||
640cfdb01f | |||
9b75f48a37 | |||
f064286da2 | |||
1aea36e45b | |||
9101cee625 | |||
d514fc9da9 | |||
4ea07f5901 | |||
23551705b9 | |||
382d462480 | |||
9aef953ad8 | |||
6a1a38495d | |||
fd91af78dc | |||
baba512285 | |||
532b92e130 | |||
f8bb6f5dd8 | |||
a91e2bb413 | |||
722cca0d35 | |||
ae6cef6707 | |||
53e9c3602f | |||
4b4c2b9651 | |||
884e5a9623 | |||
0f1a4f1345 | |||
5c35a65839 | |||
2e79f31252 | |||
12a8434f97 | |||
1fc8119b39 | |||
cc731f1ee4 | |||
535dd5cdcb | |||
c19ef35ac5 | |||
4d4b7e98ab | |||
3bbc66eb6d | |||
c74f6e3573 | |||
b4f35d05b7 | |||
8e31a58e2e | |||
993bb0c1de | |||
2624a08fbd | |||
6678d56c6b | |||
6a285b59be | |||
40f40a13c9 | |||
b52c74cacb | |||
00b30d1bdf | |||
c2e85cd402 | |||
b346bd043c | |||
9a875d58e8 | |||
558c84b847 | |||
2632a9377a | |||
d9a8ed7f26 | |||
7b5264ea4a | |||
238aeb3c9a | |||
cdc0c84a27 | |||
6ee5f0956d | |||
9fbb769adb | |||
62d65557e4 | |||
812e429da2 | |||
b706e147fc | |||
19700b7623 | |||
586823454b | |||
56755892a7 | |||
316e049ec8 | |||
2def6cbf52 | |||
307edf3fb3 | |||
3dc7c2e0da | |||
8f9f31e5b8 | |||
0b46369c62 | |||
dae5434b7b | |||
8db6f8a646 | |||
ec1d2a37ee | |||
f21492ba6d | |||
65daf9203a | |||
6555599368 | |||
15afc44150 | |||
ec311f60c4 | |||
dbd7d88e10 | |||
1e37a924b6 | |||
447c95186d | |||
232263763b | |||
9d2c961b3b | |||
5e58859d06 | |||
fde0e59a71 | |||
eb9fe34802 | |||
bb333f31ba | |||
699b3447cb | |||
844d104afe | |||
040719936a | |||
38069c0771 | |||
b8ce5d22f5 | |||
5348cdf9dd | |||
446b0dc005 | |||
cdc5ca6192 | |||
a03228ee70 |
26
.brew_programs
Normal file
26
.brew_programs
Normal file
@ -0,0 +1,26 @@
|
||||
bash
|
||||
coreutils
|
||||
dockutil
|
||||
duti
|
||||
fastfetch
|
||||
ffmpeg
|
||||
git
|
||||
gnu-sed
|
||||
htop
|
||||
imagemagick
|
||||
ipcalc
|
||||
iperf3
|
||||
mtr
|
||||
neovim
|
||||
newsboat
|
||||
parallel
|
||||
pinentry-mac
|
||||
ranger
|
||||
ripgrep
|
||||
rsync
|
||||
texinfo
|
||||
tmux
|
||||
tree
|
||||
wget
|
||||
zoxide
|
||||
zsh
|
38
.brew_programs_cask
Normal file
38
.brew_programs_cask
Normal file
@ -0,0 +1,38 @@
|
||||
alacritty
|
||||
akiflow
|
||||
alfred
|
||||
chatterino
|
||||
dbeaver-community
|
||||
discord
|
||||
displaylink
|
||||
docker
|
||||
firefox@nightly
|
||||
font-hack-nerd-font
|
||||
gimp
|
||||
google-chrome
|
||||
hiddenbar
|
||||
karabiner-elements
|
||||
keepassxc
|
||||
megasync
|
||||
microsoft-teams
|
||||
mongodb-compass
|
||||
mpv
|
||||
obsidian
|
||||
platypus
|
||||
postman
|
||||
qbittorrent
|
||||
qview
|
||||
rustdesk
|
||||
scroll-reverser
|
||||
signal
|
||||
spotify
|
||||
stats
|
||||
telegram
|
||||
the-unarchiver
|
||||
transfer
|
||||
twingate
|
||||
visual-studio-code
|
||||
vlc
|
||||
winbox
|
||||
wine-crossover
|
||||
wireshark
|
187
.config/Ublock.txt
Normal file
187
.config/Ublock.txt
Normal file
File diff suppressed because one or more lines are too long
89
.config/alacritty/alacritty.toml
Normal file
89
.config/alacritty/alacritty.toml
Normal file
@ -0,0 +1,89 @@
|
||||
# use_thin_strokes = true
|
||||
[env]
|
||||
TERM = "xterm-256color"
|
||||
|
||||
[general]
|
||||
import = ["~/.config/alacritty/dracula.toml"]
|
||||
|
||||
[keyboard]
|
||||
bindings = [
|
||||
{ key = "F", mods = "Control", action = "SearchForward" },
|
||||
{ key = "Left", mods = "Alt", chars = "\u001BB" },
|
||||
{ key = "Return", mods = "Control|Shift", action = "SpawnNewInstance" },
|
||||
{ key = "Right", mods = "Alt", chars = "\u001BF" },
|
||||
{ key = "Space", mods = "Control", chars = "\u0000" },
|
||||
{ key = "V", mods = "Control|Shift", action = "Paste" },
|
||||
]
|
||||
|
||||
[font]
|
||||
size = 22
|
||||
|
||||
[font.normal]
|
||||
family = "Terminess Nerd Font"
|
||||
style = "Regular"
|
||||
|
||||
# [font.bold]
|
||||
# family = "Teminess Nerd Font"
|
||||
# style = "Bold"
|
||||
|
||||
[font.bold_italic]
|
||||
family = "Terminess Nerd Font"
|
||||
style = "Bold Italic"
|
||||
|
||||
[font.italic]
|
||||
family = "Terminess Nerd Font"
|
||||
style = "Italic"
|
||||
|
||||
[font.glyph_offset]
|
||||
x = 0
|
||||
y = 0
|
||||
|
||||
# [mouse.hints]
|
||||
# modifiers = "Command"
|
||||
|
||||
# [mouse.hints.launcher]
|
||||
# program = "open"
|
||||
|
||||
[font.offset]
|
||||
x = 0
|
||||
y = 0
|
||||
|
||||
[selection]
|
||||
save_to_clipboard = true
|
||||
|
||||
# Unused
|
||||
[colors.bright]
|
||||
black = "0x7f7f7f"
|
||||
blue = "0x5c5cff"
|
||||
cyan = "0x00ffff"
|
||||
green = "0x00ff00"
|
||||
magenta = "0xff00ff"
|
||||
red = "0xff0000"
|
||||
white = "0xffffff"
|
||||
yellow = "0xffff00"
|
||||
|
||||
[colors.normal]
|
||||
black = "0x000000"
|
||||
blue = "0x0000ee"
|
||||
cyan = "0x00cdcd"
|
||||
green = "0x00cd00"
|
||||
magenta = "0xcd00cd"
|
||||
red = "0xcd0000"
|
||||
white = "0xe5e5e5"
|
||||
yellow = "0xcdcd00"
|
||||
|
||||
[colors.primary]
|
||||
background = "0x000000"
|
||||
foreground = "0xffffff"
|
||||
|
||||
[colors.search.focused_match]
|
||||
background = "#ab4642"
|
||||
foreground = "#181818"
|
||||
|
||||
# [colors.search.footer_bar]
|
||||
# background = "#262626"
|
||||
# foreground = "#d0d0d0"
|
||||
|
||||
[colors.search.matches]
|
||||
background = "#f4bf75"
|
||||
foreground = "#181818"
|
76
.config/alacritty/dracula.toml
Executable file
76
.config/alacritty/dracula.toml
Executable file
@ -0,0 +1,76 @@
|
||||
# Dracula theme for Alacritty
|
||||
# https://draculatheme.com/alacritty
|
||||
#
|
||||
# Color palette
|
||||
# https://spec.draculatheme.com
|
||||
#
|
||||
# Instructions
|
||||
# https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd
|
||||
|
||||
[colors.primary]
|
||||
|
||||
background = "#282a36"
|
||||
foreground = "#f8f8f2"
|
||||
bright_foreground = "#ffffff"
|
||||
|
||||
[colors.cursor]
|
||||
|
||||
text = "#282a36"
|
||||
cursor = "#f8f8f2"
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
|
||||
text = "CellBackground"
|
||||
cursor = "CellForeground"
|
||||
|
||||
[colors.selection]
|
||||
|
||||
text = "CellForeground"
|
||||
background = "#44475a"
|
||||
|
||||
[colors.normal]
|
||||
|
||||
black = "#21222c"
|
||||
red = "#ff5555"
|
||||
green = "#50fa7b"
|
||||
yellow = "#f1fa8c"
|
||||
blue = "#bd93f9"
|
||||
magenta = "#ff79c6"
|
||||
cyan = "#8be9fd"
|
||||
white = "#f8f8f2"
|
||||
|
||||
[colors.bright]
|
||||
|
||||
black = "#6272a4"
|
||||
red = "#ff6e6e"
|
||||
green = "#69ff94"
|
||||
yellow = "#ffffa5"
|
||||
blue = "#d6acff"
|
||||
magenta = "#ff92df"
|
||||
cyan = "#a4ffff"
|
||||
white = "#ffffff"
|
||||
|
||||
[colors.search.matches]
|
||||
|
||||
foreground = "#44475a"
|
||||
background = "#50fa7b"
|
||||
|
||||
[colors.search.focused_match]
|
||||
|
||||
foreground = "#44475a"
|
||||
background = "#ffb86c"
|
||||
|
||||
[colors.footer_bar]
|
||||
|
||||
background = "#282a36"
|
||||
foreground = "#f8f8f2"
|
||||
|
||||
[colors.hints.start]
|
||||
|
||||
foreground = "#282a36"
|
||||
background = "#f1fa8c"
|
||||
|
||||
[colors.hints.end]
|
||||
|
||||
foreground = "#f1fa8c"
|
||||
background = "#282a36"
|
@ -1,22 +1,19 @@
|
||||
# CONFIGURATION:
|
||||
# Default configuration to DROP
|
||||
iptables -P INPUT DROP
|
||||
iptables -P FORWARD DROP
|
||||
iptables -P OUTPUT DROP
|
||||
|
||||
# Accept on localhost
|
||||
iptables -A INPUT -i lo -j ACCEPT
|
||||
iptables -A OUTPUT -o lo -j ACCEPT
|
||||
# iptables -A INPUT -i lo -j ACCEPT
|
||||
# iptables -A OUTPUT -o lo -j ACCEPT
|
||||
|
||||
# Accept outgoing network
|
||||
iptables -A OUTPUT -o eth0 -j ACCEPT
|
||||
|
||||
# Allow established sessions to receive traffic
|
||||
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||
iptables -A INPUT -m state --state NEW,ESTABLISHED -j ACCEPT
|
||||
|
||||
# Enable SSH (to internet)
|
||||
#iptables -A OUTPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
|
||||
#iptables -A OUTPUT -p tcp -m state --state NEW -m tcp --dport 10571 -j ACCEPT
|
||||
|
||||
# Disable SSH (to that machine)
|
||||
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --sport 22 -j DROP
|
||||
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 22 -j DROP
|
||||
# Enable SSH (to that machine)
|
||||
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --sport 22 -j ACCEPT
|
||||
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 22 -j ACCEPT
|
||||
|
||||
# Enable INZ
|
||||
#iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 1285 -j ACCEPT
|
||||
@ -26,8 +23,12 @@ iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 2
|
||||
#Enable CSGO
|
||||
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27015 -j ACCEPT
|
||||
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27020 -j ACCEPT
|
||||
iptables -A INPUT -p udp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27015 -j ACCEPT
|
||||
iptables -A INPUT -p udp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27020 -j ACCEPT
|
||||
#iptables -A INPUT -p udp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27015 -j ACCEPT
|
||||
#iptables -A INPUT -p udp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27020 -j ACCEPT
|
||||
|
||||
# Allow established sessions to receive traffic
|
||||
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||
# iptables -A INPUT -m state --state NEW,ESTABLISHED -j ACCEPT
|
||||
|
||||
iptables -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP
|
||||
iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP
|
||||
|
@ -0,0 +1 @@
|
||||
{"title":"Mouse keys ambidextrous - yorune","rules":[{"description":"Mouse keys Ambidextrous","manipulators":[{"from":{"key_code":"k","modifiers":{"mandatory":["fn"],"optional":["any"]}},"to":[{"mouse_key":{"vertical_wheel":-64}}],"type":"basic"},{"from":{"key_code":"j","modifiers":{"mandatory":["fn"],"optional":["any"]}},"to":[{"mouse_key":{"vertical_wheel":64}}],"type":"basic"},{"from":{"key_code":"h","modifiers":{"mandatory":["fn"],"optional":["any"]}},"to":[{"mouse_key":{"horizontal_wheel":64}}],"type":"basic"},{"from":{"key_code":"l","modifiers":{"mandatory":["fn"],"optional":["any"]}},"to":[{"mouse_key":{"horizontal_wheel":-64}}],"type":"basic"},{"from":{"key_code":"u","modifiers":{"mandatory":["left_control","left_shift"],"optional":["any"]}},"to":[{"pointing_button":"button1"}],"type":"basic"},{"from":{"key_code":"o","modifiers":{"mandatory":["left_control","left_shift"],"optional":["any"]}},"to":[{"pointing_button":"button2"}],"type":"basic"},{"from":{"key_code":"h","modifiers":{"mandatory":["left_control","left_shift"],"optional":["any"]}},"to":[{"mouse_key":{"x":-1018}}],"type":"basic"},{"from":{"key_code":"j","modifiers":{"mandatory":["left_control","left_shift"],"optional":["any"]}},"to":[{"mouse_key":{"y":1018}}],"type":"basic"},{"from":{"key_code":"k","modifiers":{"mandatory":["left_control","left_shift"],"optional":["any"]}},"to":[{"mouse_key":{"y":-1018}}],"type":"basic"},{"from":{"key_code":"l","modifiers":{"mandatory":["left_control","left_shift"],"optional":["any"]}},"to":[{"mouse_key":{"x":1018}}],"type":"basic"},{"from":{"key_code":"q","modifiers":{"mandatory":["left_control","left_shift"],"optional":["any"]}},"to":[{"pointing_button":"button1"}],"type":"basic"},{"from":{"key_code":"e","modifiers":{"mandatory":["left_control","left_shift"],"optional":["any"]}},"to":[{"pointing_button":"button2"}],"type":"basic"}]}]}
|
417
.config/karabiner/karabiner.json
Normal file
417
.config/karabiner/karabiner.json
Normal file
@ -0,0 +1,417 @@
|
||||
{
|
||||
"global": { "show_in_menu_bar": false },
|
||||
"profiles": [
|
||||
{
|
||||
"complex_modifications": {
|
||||
"rules": [
|
||||
{
|
||||
"description": "Maps F5 to ⌘⇧M in MS Teams or ⌘⇧A to ZOOM. F5 has an MIC symbol on recent MacOS keyboards.",
|
||||
"manipulators": [
|
||||
{
|
||||
"from": { "key_code": "f5" },
|
||||
"to": [{ "shell_command": "if [ $(ps aux | grep -v grep | grep -ci \"Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper.app\") -gt 0 ]; then osascript -e 'activate application id \"com.microsoft.teams\"' -e 'tell application \"System Events\" to keystroke \"m\" using {command down, shift down}'; fi & if [ $(ps aux | grep -v grep | grep -ci \"zoom.us.app/Contents/Frameworks/cpthost.app/Contents/MacOS/CptHost\") -gt 0 ]; then osascript -e 'activate application id \"us.zoom.xos\"' -e 'tell application \"System Events\" to keystroke \"a\" using {command down, shift down}'; fi" }],
|
||||
"type": "basic"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Change right_command+hjkl to arrow keys",
|
||||
"manipulators": [
|
||||
{
|
||||
"from": {
|
||||
"key_code": "h",
|
||||
"modifiers": {
|
||||
"mandatory": ["right_command"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [{ "key_code": "left_arrow" }],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "j",
|
||||
"modifiers": {
|
||||
"mandatory": ["right_command"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [{ "key_code": "down_arrow" }],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "k",
|
||||
"modifiers": {
|
||||
"mandatory": ["right_command"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [{ "key_code": "up_arrow" }],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "l",
|
||||
"modifiers": {
|
||||
"mandatory": ["right_command"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [{ "key_code": "right_arrow" }],
|
||||
"type": "basic"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"devices": [
|
||||
{
|
||||
"fn_function_keys": [
|
||||
{
|
||||
"from": { "key_code": "f1" },
|
||||
"to": [{ "consumer_key_code": "mute" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f2" },
|
||||
"to": [{ "consumer_key_code": "volume_decrement" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f3" },
|
||||
"to": [{ "consumer_key_code": "volume_increment" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f10" },
|
||||
"to": [{ "consumer_key_code": "play_or_pause" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f11" },
|
||||
"to": [{ "consumer_key_code": "display_brightness_decrement" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f12" },
|
||||
"to": [{ "consumer_key_code": "display_brightness_increment" }]
|
||||
}
|
||||
],
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 591,
|
||||
"vendor_id": 1452
|
||||
},
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "key_code": "caps_lock" },
|
||||
"to": [{ "key_code": "escape" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "down_arrow" },
|
||||
"to": [{ "pointing_button": "button32" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "escape" },
|
||||
"to": [{ "key_code": "grave_accent_and_tilde" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "left_arrow" },
|
||||
"to": [{ "pointing_button": "button32" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "left_command" },
|
||||
"to": [{ "key_code": "left_option" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "left_option" },
|
||||
"to": [{ "key_code": "right_command" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "right_arrow" },
|
||||
"to": [{ "pointing_button": "button32" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "right_command" },
|
||||
"to": [{ "key_code": "right_option" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "up_arrow" },
|
||||
"to": [{ "pointing_button": "button32" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 631,
|
||||
"vendor_id": 1452
|
||||
},
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "key_code": "non_us_backslash" },
|
||||
"to": [{ "key_code": "grave_accent_and_tilde" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "right_command" },
|
||||
"to": [{ "key_code": "right_option" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 6194,
|
||||
"vendor_id": 4152
|
||||
},
|
||||
"ignore": true,
|
||||
"manipulate_caps_lock_led": false
|
||||
},
|
||||
{
|
||||
"fn_function_keys": [
|
||||
{
|
||||
"from": { "key_code": "f1" },
|
||||
"to": [{ "key_code": "f1" }]
|
||||
}
|
||||
],
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 615,
|
||||
"vendor_id": 76
|
||||
},
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "key_code": "right_command" },
|
||||
"to": [{ "key_code": "right_option" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifiers": {
|
||||
"is_pointing_device": true,
|
||||
"product_id": 6194,
|
||||
"vendor_id": 4152
|
||||
},
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "pointing_button": "button5" },
|
||||
"to": [{ "apple_vendor_keyboard_key_code": "launchpad" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 30264,
|
||||
"vendor_id": 3141
|
||||
},
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "key_code": "escape" },
|
||||
"to": [{ "key_code": "grave_accent_and_tilde" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "left_command" },
|
||||
"to": [{ "key_code": "left_option" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "left_option" },
|
||||
"to": [{ "key_code": "right_command" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifiers": { "is_keyboard": true },
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "key_code": "right_command" },
|
||||
"to": [{ "key_code": "right_option" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "right_option" },
|
||||
"to": [{ "key_code": "right_command" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 34056,
|
||||
"vendor_id": 3141
|
||||
},
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "key_code": "left_command" },
|
||||
"to": [{ "key_code": "left_option" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "left_option" },
|
||||
"to": [{ "key_code": "right_command" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 615,
|
||||
"vendor_id": 1452
|
||||
},
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "consumer_key_code": "eject" },
|
||||
"to": [{ "consumer_key_code": "al_terminal_lock_or_screensaver" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "right_command" },
|
||||
"to": [{ "key_code": "right_option" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "right_option" },
|
||||
"to": [{ "key_code": "right_command" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 668,
|
||||
"vendor_id": 76
|
||||
},
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "key_code": "right_command" },
|
||||
"to": [{ "key_code": "right_option" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "right_option" },
|
||||
"to": [{ "key_code": "right_command" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"fn_function_keys": [
|
||||
{
|
||||
"from": { "key_code": "f1" },
|
||||
"to": [{ "key_code": "f1" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f2" },
|
||||
"to": [{ "key_code": "f2" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f3" },
|
||||
"to": [{ "key_code": "f3" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f4" },
|
||||
"to": [{ "key_code": "f4" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f5" },
|
||||
"to": [{ "key_code": "f5" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f6" },
|
||||
"to": [{ "key_code": "f13" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f7" },
|
||||
"to": [{ "key_code": "f7" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f8" },
|
||||
"to": [{ "key_code": "f8" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f9" },
|
||||
"to": [{ "key_code": "f9" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f10" },
|
||||
"to": [{ "consumer_key_code": "play_or_pause" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f11" },
|
||||
"to": [{ "consumer_key_code": "mute" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f12" },
|
||||
"to": [{ "consumer_key_code": "volume_increment" }]
|
||||
}
|
||||
],
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 45929,
|
||||
"vendor_id": 1133
|
||||
},
|
||||
"manipulate_caps_lock_led": false,
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "key_code": "right_command" },
|
||||
"to": [{ "key_code": "right_option" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "right_option" },
|
||||
"to": [{ "key_code": "right_command" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"fn_function_keys": [
|
||||
{
|
||||
"from": { "key_code": "f1" },
|
||||
"to": [{ "key_code": "f1" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f2" },
|
||||
"to": [{ "key_code": "f2" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f11" },
|
||||
"to": [{ "key_code": "f11" }]
|
||||
}
|
||||
],
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 785,
|
||||
"vendor_id": 13364
|
||||
}
|
||||
},
|
||||
{
|
||||
"identifiers": {
|
||||
"is_keyboard": true,
|
||||
"product_id": 666,
|
||||
"vendor_id": 76
|
||||
},
|
||||
"ignore": true
|
||||
}
|
||||
],
|
||||
"fn_function_keys": [
|
||||
{
|
||||
"from": { "key_code": "f5" },
|
||||
"to": [{ "key_code": "f5" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "f6" },
|
||||
"to": [{ "key_code": "f13" }]
|
||||
}
|
||||
],
|
||||
"name": "Default profile",
|
||||
"selected": true,
|
||||
"simple_modifications": [
|
||||
{
|
||||
"from": { "consumer_key_code": "eject" },
|
||||
"to": [{ "consumer_key_code": "al_terminal_lock_or_screensaver" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "caps_lock" },
|
||||
"to": [{ "key_code": "escape" }]
|
||||
},
|
||||
{
|
||||
"from": { "key_code": "left_command" },
|
||||
"to": [{ "key_code": "right_command" }]
|
||||
}
|
||||
],
|
||||
"virtual_hid_keyboard": {
|
||||
"country_code": 0,
|
||||
"keyboard_type_v2": "iso"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
206
.config/karabiner/mouse-keys-ambidextrous-yorune.json
Normal file
206
.config/karabiner/mouse-keys-ambidextrous-yorune.json
Normal file
@ -0,0 +1,206 @@
|
||||
{
|
||||
"title": "Mouse keys ambidextrous - yorune",
|
||||
"rules": [
|
||||
{
|
||||
"description": "Mouse keys Ambidextrous",
|
||||
"manipulators": [
|
||||
{
|
||||
"from": {
|
||||
"key_code": "k",
|
||||
"modifiers": {
|
||||
"mandatory": ["fn"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"mouse_key": {
|
||||
"vertical_wheel": -64
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "j",
|
||||
"modifiers": {
|
||||
"mandatory": ["fn"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"mouse_key": {
|
||||
"vertical_wheel": 64
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "h",
|
||||
"modifiers": {
|
||||
"mandatory": ["fn"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"mouse_key": {
|
||||
"horizontal_wheel": 64
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "l",
|
||||
"modifiers": {
|
||||
"mandatory": ["fn"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"mouse_key": {
|
||||
"horizontal_wheel": -64
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "u",
|
||||
"modifiers": {
|
||||
"mandatory": ["left_control", "left_shift"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"pointing_button": "button1"
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "o",
|
||||
"modifiers": {
|
||||
"mandatory": ["left_control", "left_shift"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"pointing_button": "button2"
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "h",
|
||||
"modifiers": {
|
||||
"mandatory": ["left_control", "left_shift"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"mouse_key": {
|
||||
"x": -1018
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "j",
|
||||
"modifiers": {
|
||||
"mandatory": ["left_control", "left_shift"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"mouse_key": {
|
||||
"y": 1018
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "k",
|
||||
"modifiers": {
|
||||
"mandatory": ["left_control", "left_shift"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"mouse_key": {
|
||||
"y": -1018
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "l",
|
||||
"modifiers": {
|
||||
"mandatory": ["left_control", "left_shift"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"mouse_key": {
|
||||
"x": 1018
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "q",
|
||||
"modifiers": {
|
||||
"mandatory": ["left_control", "left_shift"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"pointing_button": "button1"
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
},
|
||||
{
|
||||
"from": {
|
||||
"key_code": "e",
|
||||
"modifiers": {
|
||||
"mandatory": ["left_control", "left_shift"],
|
||||
"optional": ["any"]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"pointing_button": "button2"
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
417
.config/keyboard/keychron_v1.json
Normal file
417
.config/keyboard/keychron_v1.json
Normal file
@ -0,0 +1,417 @@
|
||||
{
|
||||
"name": "Keychron V1",
|
||||
"vendorProductId": 875823889,
|
||||
"macros": [
|
||||
"",
|
||||
"{KC_LGUI,KC_LCTL,KC_Q}",
|
||||
"{KC_RGUI,KC_L}",
|
||||
"Have a nice day",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"it-infra-stream@wundermanthompson.com",
|
||||
"marcin.wozniak@wundermanthompson.com",
|
||||
"Have a nice day!\n\n---\nMarcin\n"
|
||||
],
|
||||
"layers": [
|
||||
[
|
||||
"KC_GRV",
|
||||
"KC_F1",
|
||||
"KC_F2",
|
||||
"KC_F3",
|
||||
"KC_F4",
|
||||
"KC_F5",
|
||||
"KC_F6",
|
||||
"KC_F7",
|
||||
"KC_F8",
|
||||
"KC_F9",
|
||||
"KC_F10",
|
||||
"KC_F11",
|
||||
"KC_F12",
|
||||
"KC_DEL",
|
||||
"KC_NO",
|
||||
"KC_MUTE",
|
||||
"KC_GRV",
|
||||
"KC_1",
|
||||
"KC_2",
|
||||
"KC_3",
|
||||
"KC_4",
|
||||
"KC_5",
|
||||
"KC_6",
|
||||
"KC_7",
|
||||
"KC_8",
|
||||
"KC_9",
|
||||
"KC_0",
|
||||
"KC_MINS",
|
||||
"KC_EQL",
|
||||
"KC_BSPC",
|
||||
"KC_NO",
|
||||
"KC_PGUP",
|
||||
"KC_TAB",
|
||||
"KC_Q",
|
||||
"KC_W",
|
||||
"KC_E",
|
||||
"KC_R",
|
||||
"KC_T",
|
||||
"KC_Y",
|
||||
"KC_U",
|
||||
"KC_I",
|
||||
"KC_O",
|
||||
"KC_P",
|
||||
"KC_LBRC",
|
||||
"KC_RBRC",
|
||||
"KC_BSLS",
|
||||
"KC_NO",
|
||||
"KC_PGDN",
|
||||
"KC_ESC",
|
||||
"KC_A",
|
||||
"KC_S",
|
||||
"KC_D",
|
||||
"KC_F",
|
||||
"KC_G",
|
||||
"KC_H",
|
||||
"KC_J",
|
||||
"KC_K",
|
||||
"KC_L",
|
||||
"KC_SCLN",
|
||||
"KC_QUOT",
|
||||
"KC_NO",
|
||||
"KC_ENT",
|
||||
"KC_NO",
|
||||
"KC_HOME",
|
||||
"KC_LSFT",
|
||||
"KC_NO",
|
||||
"KC_Z",
|
||||
"KC_X",
|
||||
"KC_C",
|
||||
"KC_V",
|
||||
"KC_B",
|
||||
"KC_N",
|
||||
"KC_M",
|
||||
"KC_COMM",
|
||||
"KC_DOT",
|
||||
"KC_SLSH",
|
||||
"KC_NO",
|
||||
"KC_RSFT",
|
||||
"KC_UP",
|
||||
"KC_NO",
|
||||
"KC_LCTL",
|
||||
"USER02",
|
||||
"USER05",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_SPC",
|
||||
"KC_VOLD",
|
||||
"KC_VOLU",
|
||||
"KC_NO",
|
||||
"USER03",
|
||||
"MO(1)",
|
||||
"USER05",
|
||||
"KC_LEFT",
|
||||
"KC_DOWN",
|
||||
"KC_RGHT"
|
||||
],
|
||||
[
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"BL_DEC",
|
||||
"BL_INC",
|
||||
"KC_MPRV",
|
||||
"KC_MPLY",
|
||||
"KC_MNXT",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_PSCR",
|
||||
"KC_NO",
|
||||
"RGB_TOG",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"MACRO01",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"MACRO13",
|
||||
"MACRO14",
|
||||
"MACRO15",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_MS_BTN1",
|
||||
"KC_MS_UP",
|
||||
"KC_MS_BTN2",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_MS_LEFT",
|
||||
"KC_MS_DOWN",
|
||||
"KC_MS_RIGHT",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_END",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_MS_WH_UP",
|
||||
"KC_MS_WH_DOWN",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"RGB_VAD",
|
||||
"RGB_VAI",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS"
|
||||
],
|
||||
[
|
||||
"KC_GRV",
|
||||
"KC_F1",
|
||||
"KC_F2",
|
||||
"KC_F3",
|
||||
"KC_F4",
|
||||
"KC_F5",
|
||||
"KC_F6",
|
||||
"KC_F7",
|
||||
"KC_F8",
|
||||
"KC_F9",
|
||||
"KC_F10",
|
||||
"KC_F11",
|
||||
"KC_F12",
|
||||
"KC_DEL",
|
||||
"KC_NO",
|
||||
"KC_MUTE",
|
||||
"KC_GRV",
|
||||
"KC_1",
|
||||
"KC_2",
|
||||
"KC_3",
|
||||
"KC_4",
|
||||
"KC_5",
|
||||
"KC_6",
|
||||
"KC_7",
|
||||
"KC_8",
|
||||
"KC_9",
|
||||
"KC_0",
|
||||
"KC_MINS",
|
||||
"KC_EQL",
|
||||
"KC_BSPC",
|
||||
"KC_NO",
|
||||
"KC_PGUP",
|
||||
"KC_TAB",
|
||||
"KC_Q",
|
||||
"KC_W",
|
||||
"KC_E",
|
||||
"KC_R",
|
||||
"KC_T",
|
||||
"KC_Y",
|
||||
"KC_U",
|
||||
"KC_I",
|
||||
"KC_O",
|
||||
"KC_P",
|
||||
"KC_LBRC",
|
||||
"KC_RBRC",
|
||||
"KC_BSLS",
|
||||
"KC_NO",
|
||||
"KC_PGDN",
|
||||
"KC_ESC",
|
||||
"KC_A",
|
||||
"KC_S",
|
||||
"KC_D",
|
||||
"KC_F",
|
||||
"KC_G",
|
||||
"KC_H",
|
||||
"KC_J",
|
||||
"KC_K",
|
||||
"KC_L",
|
||||
"KC_SCLN",
|
||||
"KC_QUOT",
|
||||
"KC_NO",
|
||||
"KC_ENT",
|
||||
"KC_NO",
|
||||
"KC_HOME",
|
||||
"KC_LSFT",
|
||||
"KC_NO",
|
||||
"KC_Z",
|
||||
"KC_X",
|
||||
"KC_C",
|
||||
"KC_V",
|
||||
"KC_B",
|
||||
"KC_N",
|
||||
"KC_M",
|
||||
"KC_COMM",
|
||||
"KC_DOT",
|
||||
"KC_SLSH",
|
||||
"KC_NO",
|
||||
"KC_RSFT",
|
||||
"KC_UP",
|
||||
"KC_NO",
|
||||
"KC_LCTL",
|
||||
"KC_LGUI",
|
||||
"KC_LALT",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_SPC",
|
||||
"KC_VOLD",
|
||||
"KC_VOLU",
|
||||
"KC_NO",
|
||||
"KC_RALT",
|
||||
"MO(3)",
|
||||
"KC_RCTL",
|
||||
"KC_LEFT",
|
||||
"KC_DOWN",
|
||||
"KC_RGHT"
|
||||
],
|
||||
[
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"BL_DEC",
|
||||
"BL_INC",
|
||||
"KC_MPRV",
|
||||
"KC_MPLY",
|
||||
"KC_MNXT",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_PSCR",
|
||||
"KC_NO",
|
||||
"RGB_TOG",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"MACRO02",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"MACRO13",
|
||||
"MACRO14",
|
||||
"MACRO15",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_MS_BTN1",
|
||||
"KC_MS_UP",
|
||||
"KC_MS_BTN2",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_MS_LEFT",
|
||||
"KC_MS_DOWN",
|
||||
"KC_MS_RIGHT",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_END",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_MS_WH_UP",
|
||||
"KC_MS_WH_DOWN",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"RGB_VAD",
|
||||
"RGB_VAI",
|
||||
"KC_NO",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS",
|
||||
"KC_TRNS"
|
||||
]
|
||||
],
|
||||
"encoders": []
|
||||
}
|
248
.config/keyboard/v1_ansi_knob_rev1.05.json
Normal file
248
.config/keyboard/v1_ansi_knob_rev1.05.json
Normal file
@ -0,0 +1,248 @@
|
||||
{
|
||||
"name": "Keychron V1",
|
||||
"vendorId": "0x3434",
|
||||
"productId": "0x0311",
|
||||
"lighting": {
|
||||
"extends": "qmk_rgblight",
|
||||
"underglowEffects": [
|
||||
["None", 0],
|
||||
["SOLID_COLOR", 1],
|
||||
["BREATHING", 1],
|
||||
["CYCLE_ALL", 1],
|
||||
["CYCLE_LEFT_RIGHT", 1],
|
||||
["CYCLE_UP_DOWN", 1],
|
||||
["RAINBOW_MOVING_CHEVRON", 1],
|
||||
["CYCLE_OUT_IN", 1],
|
||||
["CYCLE_OUT_IN_DUAL", 1],
|
||||
["CYCLE_PINWHEEL", 1],
|
||||
["CYCKE_SPIRAL", 1],
|
||||
["DUAL_BEACON", 1],
|
||||
["RAINBOW_BEACON", 1],
|
||||
["RAINDROPS", 1]
|
||||
]
|
||||
},
|
||||
"matrix": {"rows": 6, "cols": 16},
|
||||
"customKeycodes": [
|
||||
{"name": "Mission Control", "title": "Mission Control in macOS", "shortName": "Mission Control"},
|
||||
{"name": "Launch Pad", "title": "Launch Pad in macOS", "shortName": "Launch Pad"},
|
||||
{"name": "Left Option", "title": "Left Option in macOS", "shortName": "Left Option"},
|
||||
{"name": "Right Option", "title": "Right Option in macOS", "shortName": "Right Option"},
|
||||
{"name": "Left Cmd", "title": "Left Command in macOS", "shortName": "Left Command"},
|
||||
{"name": "Right Cmd", "title": "Right Command in macOS", "shortName": "Right Command"},
|
||||
{"name": "Task View", "title": "Task View in windows", "shortName": "Task View"},
|
||||
{"name": "File Explorer", "title": "File Explorer in windows", "shortName": "File Explorer"}
|
||||
],
|
||||
"layouts": {
|
||||
"keymap": [
|
||||
[
|
||||
{
|
||||
"c": "#777777"
|
||||
},
|
||||
"0,0\nESC",
|
||||
{
|
||||
"x": 0.25,
|
||||
"c": "#cccccc"
|
||||
},
|
||||
"0,1",
|
||||
"0,2",
|
||||
"0,3",
|
||||
"0,4",
|
||||
{
|
||||
"x": 0.25
|
||||
},
|
||||
"0,5",
|
||||
"0,6",
|
||||
"0,7",
|
||||
"0,8",
|
||||
{
|
||||
"x": 0.25
|
||||
},
|
||||
"0,9",
|
||||
"0,10",
|
||||
"0,11",
|
||||
"0,12",
|
||||
{
|
||||
"x": 0.25,
|
||||
"c": "#aaaaaa"
|
||||
},
|
||||
"0,13",
|
||||
{
|
||||
"x": 0.25,
|
||||
"w": 0.75
|
||||
},
|
||||
"0,15",
|
||||
{
|
||||
"h": 0.5
|
||||
},
|
||||
"5,7",
|
||||
{
|
||||
"x": -1,
|
||||
"y": 0.5,
|
||||
"h": 0.5
|
||||
},
|
||||
"5,8"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.25
|
||||
},
|
||||
"1,0",
|
||||
{
|
||||
"c": "#cccccc"
|
||||
},
|
||||
"1,1",
|
||||
"1,2",
|
||||
"1,3",
|
||||
"1,4",
|
||||
"1,5",
|
||||
"1,6",
|
||||
"1,7",
|
||||
"1,8",
|
||||
"1,9",
|
||||
"1,10",
|
||||
"1,11",
|
||||
"1,12",
|
||||
{
|
||||
"c": "#aaaaaa",
|
||||
"w": 2
|
||||
},
|
||||
"1,13",
|
||||
{
|
||||
"x": 0.25
|
||||
},
|
||||
"1,15"
|
||||
],
|
||||
[
|
||||
{
|
||||
"w": 1.5
|
||||
},
|
||||
"2,0",
|
||||
{
|
||||
"c": "#cccccc"
|
||||
},
|
||||
"2,1",
|
||||
"2,2",
|
||||
"2,3",
|
||||
"2,4",
|
||||
"2,5",
|
||||
"2,6",
|
||||
"2,7",
|
||||
"2,8",
|
||||
"2,9",
|
||||
"2,10",
|
||||
"2,11",
|
||||
"2,12",
|
||||
{
|
||||
"w": 1.5
|
||||
},
|
||||
"2,13",
|
||||
{
|
||||
"x": 0.25,
|
||||
"c": "#aaaaaa"
|
||||
},
|
||||
"2,15"
|
||||
],
|
||||
[
|
||||
{
|
||||
"w": 1.75
|
||||
},
|
||||
"3,0",
|
||||
{
|
||||
"c": "#cccccc"
|
||||
},
|
||||
"3,1",
|
||||
"3,2",
|
||||
"3,3",
|
||||
"3,4",
|
||||
"3,5",
|
||||
"3,6",
|
||||
"3,7",
|
||||
"3,8",
|
||||
"3,9",
|
||||
"3,10",
|
||||
"3,11",
|
||||
{
|
||||
"c": "#777777",
|
||||
"w": 2.25
|
||||
},
|
||||
"3,13",
|
||||
{
|
||||
"x": 0.25,
|
||||
"c": "#aaaaaa"
|
||||
},
|
||||
"3,15"
|
||||
],
|
||||
[
|
||||
{
|
||||
"w": 2.25
|
||||
},
|
||||
"4,0",
|
||||
{
|
||||
"c": "#cccccc"
|
||||
},
|
||||
"4,2",
|
||||
"4,3",
|
||||
"4,4",
|
||||
"4,5",
|
||||
"4,6",
|
||||
"4,7",
|
||||
"4,8",
|
||||
"4,9",
|
||||
"4,10",
|
||||
"4,11",
|
||||
{
|
||||
"c": "#aaaaaa",
|
||||
"w": 1.75
|
||||
},
|
||||
"4,13"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.75,
|
||||
"x": 14.25,
|
||||
"c": "#777777"
|
||||
},
|
||||
"4,14"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.25,
|
||||
"c": "#aaaaaa",
|
||||
"w": 1.25
|
||||
},
|
||||
"5,0",
|
||||
{
|
||||
"w": 1.25
|
||||
},
|
||||
"5,1",
|
||||
{
|
||||
"w": 1.25
|
||||
},
|
||||
"5,2",
|
||||
{
|
||||
"c": "#cccccc",
|
||||
"a": 7,
|
||||
"w": 6.25
|
||||
},
|
||||
"5,6",
|
||||
{
|
||||
"c": "#aaaaaa",
|
||||
"a": 4
|
||||
},
|
||||
"5,10",
|
||||
"5,11",
|
||||
"5,12"
|
||||
],
|
||||
[
|
||||
{
|
||||
"y": -0.75,
|
||||
"x": 13.25,
|
||||
"c": "#777777"
|
||||
},
|
||||
"5,13",
|
||||
"5,14",
|
||||
"5,15"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
15
.config/lazygit/config.yml
Normal file
15
.config/lazygit/config.yml
Normal file
@ -0,0 +1,15 @@
|
||||
refresher:
|
||||
refreshInterval: 60
|
||||
gui:
|
||||
mainPanelSplitMode: "horizontal"
|
||||
theme:
|
||||
selectedLineBgColor:
|
||||
- "#413660"
|
||||
git:
|
||||
autoFetch: true
|
||||
paging:
|
||||
colorArg: always
|
||||
commit:
|
||||
signOff: true
|
||||
pull:
|
||||
mode: "rebase"
|
@ -1,11 +1,24 @@
|
||||
# Restrict readahead and backbuffer to 40MiB from default of 400MiB
|
||||
cache=yes
|
||||
demuxer-max-bytes=2147483647
|
||||
demuxer-max-back-bytes=2147483647
|
||||
|
||||
# Always allow seeking, e.g. allow seeking within a local cache of HTTP stream
|
||||
force-seekable=yes
|
||||
|
||||
# Always open a video window even with no video
|
||||
force-window=yes
|
||||
|
||||
# Don't exit when the end of playlist is reached
|
||||
keep-open=yes
|
||||
|
||||
# Always save the current playback position on exit
|
||||
save-position-on-quit=yes
|
||||
# ontop=yes
|
||||
|
||||
# Geometry settings
|
||||
geometry=50%:50%
|
||||
autofit=50%
|
||||
|
||||
# Create 'high-quality' profile
|
||||
[high-quality]
|
||||
|
@ -15,12 +15,26 @@ unbind-key p
|
||||
bind-key n next
|
||||
bind-key p prev
|
||||
|
||||
color listnormal cyan default
|
||||
# unbind keys
|
||||
unbind-key j
|
||||
unbind-key k
|
||||
unbind-key J
|
||||
unbind-key K
|
||||
|
||||
# bind keys - vim style
|
||||
bind-key j down
|
||||
bind-key k up
|
||||
bind-key l open
|
||||
bind-key h quit
|
||||
bind-key ESC quit
|
||||
|
||||
highlight all "====.*====" yellow
|
||||
color listnormal default default
|
||||
color listfocus black yellow standout bold
|
||||
color listnormal_unread blue default
|
||||
color listnormal_unread cyan default
|
||||
color listfocus_unread yellow default bold
|
||||
color info red black bold
|
||||
color article white default bold
|
||||
|
||||
browser "/home/yorune/.local/bin/browser-x -new-tab %u"
|
||||
browser "$HOME/.local/bin/browser-x -new-tab %u"
|
||||
player mpv
|
||||
|
@ -1,67 +1,19 @@
|
||||
=====================NEWS====================================
|
||||
shttps://wtf.roflcopter.fr/rss-bridge/?action=display&bridge=Facebook&context=User&u=gminakleczew&media_type=all&limit=-1&format=Mrss "~Gmina Kleczew - Facebook"
|
||||
https://wtf.roflcopter.fr/rss-bridge/?action=display&bridge=Facebook&context=User&u=portalLM&media_type=all&limit=-1&format=Mrss "~Portal lm.pl - Facebook"
|
||||
https://nitter.net/MZ_GOV_PL/rss "~MZ_GOV_PL - Twitter"
|
||||
http://www.epoznan.pl/rss.php "~Epoznan - Website"
|
||||
https://sekurak.pl/feed/ "~Sekurak"
|
||||
https://feeds.feedburner.com/niebezpiecznik/ "~Niebezpiecznik"
|
||||
============================================================
|
||||
https://repology.org/maintainer/y0rune%40aol.com/feed-for-repo/gentoo_ovl_guru/atom "~GURU OUTDATE MAINTAINER"
|
||||
https://bugs.gentoo.org/buglist.cgi?bug_status=UNCONFIRMED&chfieldfrom=24h&ctype=atom&title=NEW&list_id=4468306&order=changeddate%20DESC%2Cbug_status%2Cpriority%2Cassigned_to%2Cbug_id&query_format=advanced Gentoo
|
||||
https://bugs.gentoo.org/buglist.cgi?component=Package%20issues&product=GURU&query_format=advanced&resolution=---&title=Bug%20List&ctype=atom GURU-BUGS
|
||||
https://bugs.gentoo.org/buglist.cgi?component=Trusted%20Contributor%20ascension&product=GURU&query_format=advanced&resolution=---&title=Bug%20List&ctype=atom
|
||||
https://bugs.gentoo.org/buglist.cgi?email1=y0rune%40aol.com&emailassigned_to1=1&emailtype1=substring&list_id=5834010&query_format=advanced&resolution=---&title=Bug%20List&ctype=atom "~ASSIGNEE TO ME"
|
||||
https://bugs.gentoo.org/buglist.cgi?component=Package%20issues&product=GURU&query_format=advanced&resolution=---&title=Bug%20List&ctype=atom "~GURU-BUGS"
|
||||
https://www.reddit.com/r/gentoo/new.rss "~Gentoo - Reddit"
|
||||
=====================PODCASTY===============================
|
||||
https://www.internet-czas-dzialac.pl/rss/
|
||||
============================================================
|
||||
http://rss.uptimerobot.com/u674346-753d02ab763f3725330347d4419a7569 "~UpTimeRoboot"
|
||||
=====================YOUTUBE=================================
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCzuvRWjh7k1SZm1RvqvIx4w "~Krzysztof Gonciarz"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UC3QOjSZmJuYgb98BAzKfzig "~Zapytaj Beczkę"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UC2qQkGwReBfucb6yWr7idRA "~Asia Ladowska"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UC5ZSM0kOGhtLdtZiqM2noWw "~StudyWithInSpo"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UC84AaEtr7hlaYYwXDSKAbNg "~Ignacy z Japonii"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UC8JbbaZ_jgdsoUqrZ2bXtQQ "~Lekko Stronniczy"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UC8q23MpiyWjv9vd4r85oj1A "~Daniel Rakowiecki"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UC9Vi25H6lQvPqcepJCJ3sEg "~Emma"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCAD-xOOaUI6N7Uq9laOVbcw "~Rene Rene"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCAEQl0BbYrPyTnsWVBJuIqQ
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCaG-Uk3PSpHexeUJaJC_TPw
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCAkBZtIl-a0fBLcY7JCPSQw
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCB-4hoTjsE3VIFI862C5SZA
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCE5Au4LfcBHxTQR_yLbncrQ
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCe6nK69Yc1zna7QSJEfA9pw
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCEbYhDd6c6vngsF5PQpFVWg
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCELsE3w85wy7hXFmU2eRn_w
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCfegHHvKywKjJ69Ymcb6j0w
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCFGud6qsbaAjuP6WaXAJj3Q
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCH2OHdQF5c2r2M_l_vPiXRA
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCIDf8pzX2oZmjXtqMwHn0xg
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCIj6yjWVKPKO5zNLBjQ8Beg
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCJ24N4O0bP7LGLBDvye7oCA
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCJkmbV_cndEe6Af8b5qVyoQ
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCJLLl6AraX1POemgLfhirwg
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCjS2aGCvsnhExcWRAI8T4Pw
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCMsi03EhTUsUs2OtPus6XDQ
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCMTkC2dA25yFsmtaevpYWfg
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCnOo8dtBgwJbdwl4HxqPHwg
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCO8DQrSp5yEP937qNqTooOw
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCoJjEsNkU-Md3xB6BursT0Q
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCoXxgqIOTa8qCM7Hd7RiURw
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCPc_saLjikyw-1sscFsHIsA
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCPKgIhTC3BdkAwMw6s-GEug
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCRxAgfYexGLlu1WHGIMUDqw
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCs02jgjMVeirmDHaxAXApkg
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCsnGwSIHyoYN0kiINAGUKxg
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCv9wKjBogC5AVG54s_Imn0A
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCvbEYH_h8k-hHq2oS-7zIdQ
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCVbn813ctsoChuTT4LuLqrA
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCVVt5tbZEzfQSIsHUh3b_vg
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCw3T7SvPYDHCkdMhC0NcKsw
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCWcz2SQMCcijkVta0hSERIA
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCWFKCr40YwOZQx8FHU_ZqqQ
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCXRJfVWEjv9qxooSbOkFmkw
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCZgyxIrQnTDLwwEr9VSkoPA
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCZKqIdmPtIU6DOTmWxzudKw
|
||||
=====================ANIME===================================
|
||||
https://mirror.animetosho.org/feed/rss2?only_tor=1&q=%5BHorribleSubs%5D%20Sword%20Art%20Online%20720p&filter%5B0%5D%5Bt%5D=nyaa_class&filter%5B0%5D%5Bv%5D=trusted "~Sword Art Online"
|
||||
=============================================================
|
||||
|
@ -1,24 +1,62 @@
|
||||
{
|
||||
"yaml.schemaStore.enable": true,
|
||||
"yaml.format.enable": true,
|
||||
"yaml.validate": true,
|
||||
"yaml.schemas": {
|
||||
"https://json.schemastore.org/ansible-role-2.9.json": "*.yaml",
|
||||
"https://json.schemastore.org/ansible-playbook.json": "*.yaml",
|
||||
"https://json.schemastore.org/ansible-inventory.json": "*yaml",
|
||||
"https://raw.githubusercontent.com/ansible-community/schemas/main/f/ansible-galaxy.json": "*.yaml",
|
||||
"https://raw.githubusercontent.com/docker/cli/master/cli/compose/schema/data/config_schema_v3.9.json": "*docker-compose.yml",
|
||||
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*",
|
||||
|
||||
"https://json.schemastore.org/docker-compose.json": "*.yaml"
|
||||
},
|
||||
"python.formatting.provider": "black",
|
||||
"python.formatting.blackArgs": ["--line-length", "80"],
|
||||
"python.pythonPath": "python3",
|
||||
"diagnostic.refreshOnInsertMode": "true",
|
||||
"coc.preferences.formatOnSaveFiletypes": [
|
||||
"sh",
|
||||
"yaml",
|
||||
"json",
|
||||
"python",
|
||||
"css",
|
||||
"Markdown",
|
||||
"ruby"
|
||||
"markdown",
|
||||
"ruby",
|
||||
"go"
|
||||
],
|
||||
"diagnostic.virtualText": true,
|
||||
"diagnostic.virtualTextCurrentLineOnly": false,
|
||||
"diagnostic.checkCurrentLine": false,
|
||||
"diagnostic-languageserver.filetypes": {
|
||||
"markdown": ["write-good", "markdownlint"],
|
||||
"sh": "shellcheck"
|
||||
},
|
||||
"languageserver": {
|
||||
"bash": {
|
||||
"command": "bash-language-server",
|
||||
"args": ["start"],
|
||||
"filetypes": ["sh"],
|
||||
"ignoredRootPaths": ["~"]
|
||||
},
|
||||
"ccls": {
|
||||
"command": "ccls",
|
||||
"filetypes": ["c", "cpp", "objc", "objcpp"],
|
||||
"rootPatterns": [
|
||||
".ccls",
|
||||
"compile_commands.json",
|
||||
".vim/",
|
||||
".git/",
|
||||
".hg/"
|
||||
],
|
||||
"trace.server": "verbose",
|
||||
"initializationOptions": {
|
||||
"cache": {
|
||||
"directory": "/tmp/ccls"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"solargraph.commandPath": "~/.gem/ruby/2.6.0/bin/solargraph",
|
||||
"solargraph.formatting": true
|
||||
}
|
||||
|
@ -1,81 +1,45 @@
|
||||
" settings
|
||||
if ! filereadable(system('echo -n "$HOME/.config/nvim/autoload/plug.vim"'))
|
||||
""""""""""""""""""""""""""""""""
|
||||
" Download vim-plug
|
||||
""""""""""""""""""""""""""""""""
|
||||
if has('nvim')
|
||||
if ! filereadable(system('echo -n "$HOME/.config/nvim/autoload/plug.vim"'))
|
||||
silent !mkdir -p $HOME/.config/nvim/autoload/
|
||||
silent !curl --silent "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > $HOME/.config/nvim/autoload/plug.vim
|
||||
autocmd VimEnter * PlugInstall
|
||||
endif
|
||||
endif
|
||||
|
||||
let mapleader = ","
|
||||
set laststatus=2
|
||||
set shiftwidth=4
|
||||
""""""""""""""""""""""""""""""""
|
||||
" Default settings nvim
|
||||
""""""""""""""""""""""""""""""""
|
||||
let g:python3_host_prog = expand('/opt/homebrew/bin/python3.13')
|
||||
let g:loaded_python_provider = 0
|
||||
let g:python_host_prog = ''
|
||||
set autoindent
|
||||
set expandtab
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
set tabstop=4
|
||||
au BufWritePre * let &bex = '@' . strftime("%F.%H:%M")
|
||||
let g:python3_host_prog = expand('/usr/src/python')
|
||||
|
||||
" plugins
|
||||
call plug#begin('~/.config/nvim/plugged')
|
||||
Plug 'tpope/vim-markdown'
|
||||
Plug 'masukomi/vim-markdown-folding'
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'nmante/vim-latex-live-preview'
|
||||
Plug 'lervag/vimtex'
|
||||
Plug 'junegunn/goyo.vim'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'ap/vim-css-color'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'neoclide/coc-solargraph', {'do': 'gem install solargraph'}
|
||||
Plug 'fannheyward/coc-pyright', {'do': 'yarn install --frozen-lockfile; sudo npm install -g npx-run; pip install --user jedi'}
|
||||
Plug 'neoclide/coc-yaml', {'do': 'yarn install --frozen-lockfile'}
|
||||
Plug 'neoclide/coc-json', {'do': 'yarn install --frozen-lockfile'}
|
||||
Plug 'fannheyward/coc-markdownlint', {'do': 'yarn install --frozen-lockfile; sudo npm install markdownlint --save-dev'}
|
||||
Plug 'josa42/coc-sh', {'do': 'yarn install --frozen-lockfile; sudo npm i -g bash-language-server'}
|
||||
Plug 'neoclide/coc-prettier', {'do': 'yarn install --frozen-lockfile'}
|
||||
Plug 'dracula/vim', { 'as': 'dracula'}
|
||||
Plug 'jnurmine/Zenburn', { 'as': 'zenburn'}
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
call plug#end()
|
||||
|
||||
" Status-line
|
||||
set statusline=
|
||||
set statusline+=%#IncSearch#
|
||||
set statusline+=\ %y
|
||||
set statusline+=\ %r
|
||||
set statusline+=%#CursorLineNr#
|
||||
set statusline+=\ %F
|
||||
set statusline+=%= "Right side settings
|
||||
set statusline+=%#Search#
|
||||
set statusline+=\ %l/%L
|
||||
set statusline+=\ [%c]
|
||||
|
||||
set nocompatible
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set noshowmode
|
||||
set noerrorbells
|
||||
set wrap
|
||||
set hidden
|
||||
set cmdheight=1
|
||||
syntax on
|
||||
filetype plugin indent on
|
||||
set encoding=utf-8
|
||||
set undofile
|
||||
set scrolloff=8
|
||||
set termguicolors
|
||||
set t_BE=
|
||||
au BufWritePre * let &bex = '@' . strftime("%F.%H:%M")
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
|
||||
" fzf
|
||||
" https://github.com/masukomi/masuconfigs/blob/master/.vimrc
|
||||
nmap <Leader>f :FZF<CR>
|
||||
nmap <Leader>b :Buffers<CR>
|
||||
nmap <Leader>/ :Rg<CR>
|
||||
" Disable by default indent line
|
||||
" let g:indentLine_enabled = 0
|
||||
|
||||
" livepreviewer
|
||||
let g:livepreview_previewer = 'mupdf'
|
||||
|
||||
" markdown preview
|
||||
let g:mkdp_browser = '/home/yorune/.local/bin/browser-x'
|
||||
let g:mkdp_echo_preview_url = 1
|
||||
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']
|
||||
let g:markdown_minlines = 1
|
||||
autocmd FileType markdown set foldexpr=NestedMarkdownFolds()
|
||||
|
||||
au BufNewFile,BufRead *.conf setfiletype conf
|
||||
" ansible
|
||||
let g:ansible_extra_keywords_highlight = 1
|
||||
|
||||
" line numbers
|
||||
set number
|
||||
@ -84,12 +48,12 @@ set title
|
||||
|
||||
" indent
|
||||
set backspace=indent,eol,start
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
"set list listchars=nbsp:¬,tab:»·,trail:·,extends:>
|
||||
set list listchars=tab:\│\ ,trail:·
|
||||
let g:indentLine_char_list = ['│', '│', '│', '│']
|
||||
|
||||
" editing
|
||||
runtime! macros/matchit.vim
|
||||
set backspace=indent,eol,start
|
||||
|
||||
" visual feedback
|
||||
set laststatus=2
|
||||
@ -108,32 +72,438 @@ set smartcase
|
||||
set ic
|
||||
|
||||
" cursor
|
||||
set guicursor=
|
||||
set guicursor+=a:blinkon0
|
||||
let &t_SI = "\<esc>[6 q"
|
||||
let &t_EI = "\<esc>[2 q"
|
||||
let &t_SR = "\<esc>[6 q"
|
||||
let &t_EI = "\<esc>[6 q"
|
||||
|
||||
" colors
|
||||
""""""""""""""""""""""""""""""""
|
||||
" Plugins
|
||||
""""""""""""""""""""""""""""""""
|
||||
call plug#begin('~/.config/nvim/plugged')
|
||||
" Markdown
|
||||
Plug 'tpope/vim-markdown'
|
||||
|
||||
" Live-preview
|
||||
Plug 'nmante/vim-latex-live-preview'
|
||||
|
||||
" Goyo plugin for writing mutt mail
|
||||
Plug 'junegunn/goyo.vim'
|
||||
|
||||
" Themes
|
||||
Plug 'gruvbox-community/gruvbox', { 'as': 'gruvbox'}
|
||||
Plug 'Mofiqul/dracula.nvim'
|
||||
|
||||
" Fzf plugin
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'junegunn/fzf'
|
||||
|
||||
" CSS
|
||||
Plug 'ap/vim-css-color'
|
||||
|
||||
" Copilot
|
||||
Plug 'github/copilot.vim'
|
||||
|
||||
" PyRight
|
||||
Plug 'sakhnik/nvim-gdb', { 'do': ':!./install.sh' }
|
||||
|
||||
" Ansible yaml
|
||||
Plug 'pearofducks/ansible-vim', { 'do': './UltiSnips/generate.sh' }
|
||||
Plug 'Yggdroot/indentLine'
|
||||
|
||||
" Terraform
|
||||
Plug 'hashivim/vim-terraform'
|
||||
|
||||
" GoLang
|
||||
Plug 'fatih/vim-go'
|
||||
|
||||
" Multiple cursors
|
||||
Plug 'terryma/vim-multiple-cursors'
|
||||
|
||||
" Enable gentoo-syntax in vim
|
||||
Plug 'gentoo/gentoo-syntax'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'junegunn/vim-easy-align'
|
||||
|
||||
" Git tool
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
" Prettier
|
||||
Plug 'prettier/vim-prettier', { 'do': 'yarn install --frozen-lockfile --production' }
|
||||
|
||||
" Debug
|
||||
Plug 'puremourning/vimspector'
|
||||
Plug 'mfussenegger/nvim-dap'
|
||||
|
||||
" LSP
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'hrsh7th/nvim-cmp'
|
||||
Plug 'hrsh7th/cmp-buffer'
|
||||
Plug 'hrsh7th/cmp-path'
|
||||
Plug 'hrsh7th/cmp-cmdline'
|
||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||
Plug 'saadparwaiz1/cmp_luasnip'
|
||||
Plug 'L3MON4D3/LuaSnip'
|
||||
Plug 'sbdchd/neoformat'
|
||||
|
||||
Plug 'hrsh7th/cmp-vsnip'
|
||||
Plug 'hrsh7th/vim-vsnip'
|
||||
Plug 'hrsh7th/vim-vsnip-integ'
|
||||
|
||||
" Telescope
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'nvim-telescope/telescope.nvim'
|
||||
|
||||
" Tree
|
||||
Plug 'nvim-tree/nvim-web-devicons'
|
||||
Plug 'nvim-tree/nvim-tree.lua'
|
||||
|
||||
" SHFMT
|
||||
Plug 'z0mbix/vim-shfmt', { 'for': 'sh' }
|
||||
|
||||
" Mikrotik
|
||||
Plug 'zainin/vim-mikrotik'
|
||||
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
Plug 'nvim-treesitter/nvim-treesitter-context'
|
||||
|
||||
" Autopair
|
||||
Plug 'windwp/nvim-autopairs'
|
||||
|
||||
call plug#end()
|
||||
|
||||
" LUA
|
||||
lua<<EOF
|
||||
local opts = { noremap=true, silent=true }
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ge', '<cmd>lua vim.diagnostic.setqflist()<CR>', opts)
|
||||
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
--vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||
end
|
||||
|
||||
-- LSP settings (for overriding per client)
|
||||
local handlers = {
|
||||
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border}),
|
||||
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {border = border }),
|
||||
}
|
||||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
local servers = { 'clangd', 'bashls', 'yamlls', 'ansiblels', 'gopls', 'solargraph', 'terraformls', 'tflint', 'marksman', 'rust_analyzer' }
|
||||
for _, lsp in pairs(servers) do
|
||||
require('lspconfig')[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
handlers=handlers,
|
||||
capabilities = capabilities,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
-- Handlers when you are in the insert mode you see the errors
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"] =
|
||||
vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics,
|
||||
{update_in_insert = true})
|
||||
|
||||
-- Setup a yamlls plugin
|
||||
require'lspconfig'.yamlls.setup{
|
||||
settings = {
|
||||
json = {
|
||||
schemas = {
|
||||
["https://raw.githubusercontent.com/quantumblacklabs/kedro/develop/static/jsonschema/kedro-catalog-0.17.json"]= "conf/**/*catalog*",
|
||||
["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*",
|
||||
["https://github.com/ansible/schemas/blob/main/f/ansible.json"] = "*.yaml,*.yml"
|
||||
}
|
||||
},
|
||||
yaml = {
|
||||
keyOrdering = false
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
-- Setup GoLang
|
||||
require'lspconfig'.gopls.setup {
|
||||
cmd = {"gopls", "serve"},
|
||||
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
||||
on_attach = on_attach,
|
||||
handlers=handlers,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
gopls = {
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
},
|
||||
staticcheck = true,
|
||||
linksInHover = false,
|
||||
codelenses = {
|
||||
generate = true,
|
||||
gc_details = true,
|
||||
regenerate_cgo = true,
|
||||
tidy = true,
|
||||
upgrade_depdendency = true,
|
||||
vendor = true,
|
||||
},
|
||||
completeUnimported = true,
|
||||
usePlaceholders = true,
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Setup Python (ruff)
|
||||
require('lspconfig').ruff.setup({})
|
||||
|
||||
-- luasnip setup
|
||||
local luasnip = require 'luasnip'
|
||||
|
||||
-- nvim-cmp setup
|
||||
local cmp = require 'cmp'
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-a>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-s>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
},
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'vsnip' },
|
||||
{ name = 'ultisnips' },
|
||||
{ name = 'snippy' },
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer' }
|
||||
},
|
||||
}
|
||||
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
|
||||
cmp.setup.cmdline('/', {
|
||||
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
require("nvim-tree").setup({
|
||||
})
|
||||
|
||||
require'treesitter-context'.setup{}
|
||||
|
||||
require("nvim-autopairs").setup {}
|
||||
|
||||
require'lspconfig'.rust_analyzer.setup {}
|
||||
EOF
|
||||
|
||||
" Added popout window to see diagnostic
|
||||
set updatetime=250
|
||||
autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false, scope="cursor"})
|
||||
|
||||
" CoPilot
|
||||
imap <silent><script><expr> <F1> copilot#Accept("\<CR>")
|
||||
let g:copilot_no_tab_map = v:true
|
||||
|
||||
" Neoformat
|
||||
let g:neoformat_try_formatprg = 1
|
||||
let g:neoformat_basic_format_trim = 1
|
||||
let g:neoformat_only_msg_on_error = 1
|
||||
" autocmd BufWritePre * silent! undojoin | Neoformat
|
||||
|
||||
let g:neoformat_python_ruff = {
|
||||
\ 'exe': 'ruff',
|
||||
\ 'stdin': 1,
|
||||
\ 'args': ['format', '--line-length=80', '-q', '-'],
|
||||
\ }
|
||||
let g:neoformat_enabled_python = ['ruff']
|
||||
|
||||
" Terraform
|
||||
let g:terraform_fmt_on_save=1
|
||||
let g:terraform_align=1
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
" Enable show hidden in NerdTree
|
||||
let NERDTreeShowHidden=1
|
||||
|
||||
" latex
|
||||
let g:tex_flavor = "latex"
|
||||
|
||||
" Debug
|
||||
let g:vimspector_enable_mappings = 'VISUAL_STUDIO'
|
||||
let g:vimspector_install_gadgets = [ 'debugpy', 'vscode-go', 'CodeLLDB', 'vscode-node-debug2' ]
|
||||
|
||||
""""""""""""""""""""""""""""""""
|
||||
" Theme
|
||||
""""""""""""""""""""""""""""""""
|
||||
"colorscheme gruvbox
|
||||
"colorscheme default
|
||||
colorscheme dracula
|
||||
let g:gruvbox_invert_selection='0'
|
||||
let g:gruvbox_contrast_dark = 'hard'
|
||||
set background=dark
|
||||
"hi Normal ctermbg=NONE
|
||||
hi Pmenu ctermfg=NONE ctermbg=236 cterm=NONE guifg=NONE guibg=#64666d gui=NONE
|
||||
hi PmenuSel ctermfg=NONE ctermbg=24 cterm=NONE guifg=NONE guibg=#204a87 gui=NONE
|
||||
set bg=dark
|
||||
hi PmenuSel ctermfg=NONE ctermbg=246 cterm=NONE guifg=NONE guibg=#204a87 gui=NONE
|
||||
hi CursorLine cterm=NONE term=NONE ctermbg=NONE guibg=NONE
|
||||
hi CursorLine ctermbg=235
|
||||
colorscheme zenburn
|
||||
hi DiffAdd cterm=BOLD ctermfg=NONE ctermbg=22
|
||||
hi DiffDelete cterm=BOLD ctermfg=NONE ctermbg=52
|
||||
hi DiffChange cterm=BOLD ctermfg=NONE ctermbg=23
|
||||
hi DiffText cterm=BOLD ctermfg=NONE ctermbg=23
|
||||
set t_ZH="\e[3m"
|
||||
set t_ZR="\e[23m"
|
||||
highlight Comment cterm=italic gui=italic
|
||||
highlight htmlArg gui=italic cterm=italic
|
||||
|
||||
" columne
|
||||
set textwidth=80
|
||||
set colorcolumn=-3
|
||||
highlight ColorColumn ctermbg=235
|
||||
set colorcolumn=80
|
||||
highlight ColorColumn ctermbg=236
|
||||
|
||||
" map
|
||||
nnoremap S :%s//g<Left><Left>
|
||||
nnoremap ee :!mupdf $(echo % \| sed 's/tex$/pdf/') & disown<CR><CR>
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
nnoremap <silent> <C-t> :tabnew <CR>
|
||||
nnoremap <F11> :Goyo <CR>
|
||||
nnoremap <F7> :tabprevious<CR>
|
||||
nnoremap <F8> :tabnext<CR>
|
||||
""""""""""""""""""""""""""""""""
|
||||
" Status Line
|
||||
""""""""""""""""""""""""""""""""
|
||||
function! GitBranch()
|
||||
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
|
||||
endfunction
|
||||
|
||||
"" Moving line up or down using alt
|
||||
function! StatuslineGit()
|
||||
let l:branchname = GitBranch()
|
||||
return strlen(l:branchname) > 0?' '.l:branchname.' ':''
|
||||
endfunction
|
||||
|
||||
set statusline=
|
||||
set statusline+=%#IncSearch#
|
||||
set statusline+=%{&filetype!=#''?'\ \ ['.&filetype.']\ ':'\ '}
|
||||
set statusline+=%{&modified?'[+]\ ':''}
|
||||
set statusline+=%#CursorLineNr#
|
||||
set statusline+=\ %F
|
||||
set statusline+=%= "Right side settings
|
||||
set statusline+=%#CursorLineNr#
|
||||
set statusline+=%{StatuslineGit()}
|
||||
set statusline+=%#Search#
|
||||
set statusline+=\ %l/%L
|
||||
set statusline+=\ [%c]
|
||||
|
||||
" Disable godoc keys
|
||||
let g:go_doc_keywordprg_enabled = 0
|
||||
set completeopt-=preview
|
||||
|
||||
""""""""""""""""""""""""""""""""
|
||||
" Keyboard shortcuts
|
||||
""""""""""""""""""""""""""""""""
|
||||
let mapleader = "\<Space>"
|
||||
nmap <leader>2 :w!<cr>
|
||||
|
||||
" Adding print message
|
||||
autocmd FileType python nmap <leader>f i print("--------DEBUG--------")<CR>print()<CR>print("--------END DEBUG--------")<UP><LEFT>
|
||||
autocmd FileType sh nmap <leader>f i echo -e "--------DEBUG--------"<CR>echo -e ""<CR>echo -e "--------END DEBUG--------"<UP><LEFT>
|
||||
|
||||
" Adding commentary
|
||||
xmap <leader>c <Plug>Commentary
|
||||
nmap <leader>c <Plug>Commentary
|
||||
omap <leader>c <Plug>Commentary
|
||||
nmap <leader>c <Plug>CommentaryLine
|
||||
|
||||
xmap <C-_> <Plug>Commentary
|
||||
nmap <C-_> <Plug>Commentary
|
||||
omap <C-_> <Plug>Commentary
|
||||
nmap <C-_> <Plug>CommentaryLine
|
||||
|
||||
" Better tab
|
||||
vnoremap <Tab> >
|
||||
vnoremap <S-Tab> <
|
||||
|
||||
" Better word
|
||||
nmap yw vey
|
||||
|
||||
" Select all text
|
||||
nmap <C-a> gg<S-v>G
|
||||
|
||||
" Telescope
|
||||
nmap <Leader>e <cmd>Telescope buffers<cr>
|
||||
nmap <Leader>w <cmd>Telescope find_files<cr>
|
||||
nmap <Leader>q <cmd>Telescope live_grep<cr>
|
||||
nmap <Leader>g <cmd>Telescope git_branches<cr>
|
||||
nmap <Leader>a <cmd>Telescope diagnostics<cr>
|
||||
|
||||
" Resize window
|
||||
nnoremap <C-L> :vertical resize +5<CR>
|
||||
nnoremap <C-H> :vertical resize -5<CR>
|
||||
nnoremap <C-J> :res -5<CR>
|
||||
nnoremap <C-K> :res +5<CR>
|
||||
|
||||
" Split window
|
||||
nnoremap _ :vsp <CR>
|
||||
nnoremap - :split <CR>
|
||||
|
||||
" Reload file
|
||||
nnoremap <F5> :edit <CR>
|
||||
nnoremap <Leader><F5> :edit! <CR>
|
||||
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
" Moving line up or down using alt
|
||||
nnoremap <A-Up> :m-2<CR>
|
||||
nnoremap <A-Down> :m+<CR>
|
||||
inoremap <A-Up> <Esc>:m-2<CR>
|
||||
@ -141,21 +511,224 @@ inoremap <A-Down> <Esc>:m+<CR>
|
||||
vnoremap <A-Down> :m '>+1<CR>gv=gv
|
||||
vnoremap <A-Up> :m '<-2<CR>gv=gv
|
||||
|
||||
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
|
||||
nnoremap Ż :m-2<CR>
|
||||
nnoremap ∆ :m+<CR>
|
||||
vnoremap ∆ :m '>+1<CR>gv=gv
|
||||
vnoremap Ż :m '<-2<CR>gv=gv
|
||||
|
||||
" latex
|
||||
let g:tex_flavor = "latex"
|
||||
nnoremap <A-k> :m-2<CR>
|
||||
nnoremap <A-j> :m+<CR>
|
||||
inoremap <A-k> <Esc>:m-2<CR>
|
||||
inoremap <A-j> <Esc>:m+<CR>
|
||||
vnoremap <A-j> :m '>+1<CR>gv=gv
|
||||
vnoremap <A-k> :m '<-2<CR>gv=gv
|
||||
|
||||
" Better replace
|
||||
nnoremap <Leader>s :%s//g<Left><Left>
|
||||
vnoremap <Leader>s :s//g<Left><Left>
|
||||
|
||||
" Better adding into begging and ending line
|
||||
vnoremap F <C-v>$A
|
||||
vnoremap f <C-v>0I
|
||||
|
||||
" Better management of tabs
|
||||
nnoremap <C-t> :tabnew<CR>
|
||||
|
||||
nnoremap <F7> :tabprevious<CR>
|
||||
nnoremap <F8> :tabnext<CR>
|
||||
inoremap <F7> <Esc>:tabprevious<CR>i
|
||||
inoremap <F8> <Esc>:tabnext<CR>i
|
||||
|
||||
nnoremap <Leader>k :tabprevious<CR>
|
||||
nnoremap <Leader>j :tabnext<CR>
|
||||
|
||||
inoremap <C-t> <Esc>:tabnew<CR>
|
||||
|
||||
" Better moving
|
||||
nnoremap J }
|
||||
nnoremap K {
|
||||
vnoremap J }
|
||||
vnoremap K {
|
||||
|
||||
" Copy into system
|
||||
noremap <Leader>y "*y
|
||||
noremap <Leader>p "*p
|
||||
|
||||
" Code
|
||||
map <Leader><Tab> Vgaip= <CR>
|
||||
|
||||
" Multiple cursors
|
||||
let g:multi_cursor_start_word_key = '<C-n>'
|
||||
let g:multi_cursor_select_all_word_key = '<A-n>'
|
||||
let g:multi_cursor_start_key = 'g<C-n>'
|
||||
let g:multi_cursor_select_all_key = 'g<A-n>'
|
||||
let g:multi_cursor_next_key = '<C-n>'
|
||||
let g:multi_cursor_prev_key = '<C-p>'
|
||||
let g:multi_cursor_skip_key = '<C-x>'
|
||||
let g:multi_cursor_quit_key = '<Esc>'
|
||||
|
||||
" Others
|
||||
nnoremap ee :!mupdf $(echo % \| sed 's/tex$/pdf/') & disown<CR><CR>
|
||||
map <C-d> :NvimTreeToggle<CR>
|
||||
nnoremap <leader>r :NvimTreeRefresh<CR>
|
||||
nnoremap <leader>n :NvimTreeFindFile<CR>
|
||||
nnoremap <F11> :Goyo <CR>
|
||||
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
|
||||
map <F3> :setlocal spell! spelllang=en<CR>
|
||||
map <F4> :setlocal spell! spelllang=pl<CR>
|
||||
|
||||
" Human Errors
|
||||
:command! W w
|
||||
:command! Q q
|
||||
:command! Wq wq
|
||||
|
||||
""""""""""""""""""""""""""""""""
|
||||
" Custom functions
|
||||
""""""""""""""""""""""""""""""""
|
||||
lua <<EOF
|
||||
function go_org_imports(wait_ms)
|
||||
local params = vim.lsp.util.make_range_params()
|
||||
params.context = {only = {"source.organizeImports"}}
|
||||
local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, wait_ms)
|
||||
for cid, res in pairs(result or {}) do
|
||||
for _, r in pairs(res.result or {}) do
|
||||
if r.edit then
|
||||
local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16"
|
||||
vim.lsp.util.apply_workspace_edit(r.edit, enc)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
EOF
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""
|
||||
" Files
|
||||
""""""""""""""""""""""""""""""""
|
||||
|
||||
" Bash
|
||||
if executable('shfmt')
|
||||
let &l:formatprg='shfmt -i ' . &l:shiftwidth . ' -ln posix -sr -ci -s'
|
||||
endif
|
||||
|
||||
let g:shfmt_extra_args = '-i 4 -ci -sr -s'
|
||||
let g:shfmt_fmt_on_save = 1
|
||||
let g:shfmt_opt="-ci"
|
||||
|
||||
" Python
|
||||
autocmd BufRead,BufNewFile *.py set textwidth=0
|
||||
autocmd BufRead,BufNewFile *.py set fo-=t
|
||||
autocmd BufWritePre *.py silent! undojoin | Neoformat ruff
|
||||
noremap <Leader>f :silent! undojoin \| Neoformat ruff <CR> :w<CR>
|
||||
|
||||
" Newsboat
|
||||
autocmd BufRead,BufNewFile urls set textwidth=0
|
||||
|
||||
" Latex
|
||||
autocmd BufWritePost *.tex silent! execute "!pdflatex --shell-escape -synctex=1 -interaction=nonstopmode % > /dev/null " | redraw!
|
||||
autocmd BufWritePost *.tex silent! execute "!latexmk -pdf -silent % > /dev/null" | redraw!
|
||||
autocmd BufWritePost *.tex silent! execute "!sudo rm -rf *.fls *.ilg *.nav *.snm *.toc *.idx *.lof *.lot *.synctex.gz *.aux *.fdb_latexmk *.fls *.log *.out > /dev/null" | redraw!
|
||||
autocmd BufWritePost *.tex silent! execute "!sudo pkill -HUP mupdf > /dev/null" | redraw!
|
||||
autocmd BufWritePost *.tex silent! execute "!rm -rf *.fls *.ilg *.nav *.snm *.toc *.idx *.lof *.lot *.synctex.gz *.aux *.fdb_latexmk *.fls *.log *.out > /dev/null" | redraw!
|
||||
autocmd BufWritePost *.tex silent! execute "!pkill -HUP mupdf > /dev/null" | redraw!
|
||||
|
||||
" mutt
|
||||
" Mutt
|
||||
autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80
|
||||
autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo
|
||||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR>
|
||||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR>
|
||||
|
||||
" Yaml
|
||||
autocmd BufRead,BufNewFile *.yaml,*.yml let g:indentLine_enabled = 1
|
||||
autocmd BufRead,BufNewFile *.yaml,*.yml let g:indentLine_char = '⦙'
|
||||
au BufRead,BufNewFile *.yaml,*.yml if search('hosts:\|tasks:', 'nw') | set ft=yaml.ansible | endif
|
||||
autocmd BufWritePre *.yaml,*.yml silent! undojoin | Neoformat prettier
|
||||
|
||||
" JSON
|
||||
autocmd BufWritePre *.json silent! undojoin | Neoformat prettier
|
||||
|
||||
" GoLang
|
||||
autocmd BufRead *.go set noexpandtab
|
||||
autocmd BufWritePre *.go lua go_org_imports()
|
||||
let g:go_def_mapping_enabled = 0
|
||||
let g:go#fmt#autosave = v:true
|
||||
autocmd BufWritePre *.go silent! undojoin | Neoformat
|
||||
autocmd BufWritePre *.gomod silent! undojoin | Neoformat
|
||||
|
||||
" Conf
|
||||
au BufNewFile,BufRead *.conf setfiletype conf
|
||||
|
||||
" Mikrotik
|
||||
au BufNewFile,BufRead *.mikrotik setfiletype routeros
|
||||
|
||||
" Ebuild
|
||||
au BufNewFile,BufRead,BufWritePre *.ebuild let g:shfmt_extra_args = '-ci -sr -s'
|
||||
|
||||
" TOML
|
||||
autocmd BufWritePre *.toml silent! undojoin | Neoformat taplo
|
||||
|
||||
" Terrafrom
|
||||
autocmd BufWritePre *.tf lua vim.lsp.buf.format()
|
||||
autocmd BufWritePre *.tfvars lua vim.lsp.buf.format()
|
||||
|
||||
" Markdown
|
||||
autocmd BufRead,BufNewFile *.md setlocal spell spelllang=en_us
|
||||
autocmd BufWritePre *.md silent! undojoin | Neoformat mdformat
|
||||
|
||||
" Automatically deletes all trailing whitespace and newlines at end of file on save.
|
||||
autocmd BufWritePre * %s/\s\+$//e
|
||||
autocmd BufWritepre * %s/\n\+\%$//e
|
||||
|
||||
" Source: https://vi.stackexchange.com/questions/20077/automatically-highlight-all-occurrences-of-the-selected-text-in-visual-mode
|
||||
" highlight the visual selection after pressing enter.
|
||||
xnoremap <silent> <cr> "*y:silent! let searchTerm = '\V'.substitute(escape(@*, '\/'), "\n", '\\n', "g") <bar> let @/ = searchTerm <bar> echo '/'.@/ <bar> call histadd("search", searchTerm) <bar> set hls<cr>
|
||||
|
||||
""""""""""""""""""""""""""""""""
|
||||
" FZF
|
||||
""""""""""""""""""""""""""""""""
|
||||
let $FZF_DEFAULT_COMMAND = 'find . -type f -not -path "*/\.git/*" -not -path "*/\.local/share/nvim/*" -not -path "./Library/*" '
|
||||
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --color "always" '.shellescape(<q-args>), 1, <bang>0)
|
||||
command! -bang -nargs=* FindCurrentWord call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --color "always" '.shellescape(expand('<cword>')), 1, <bang>0)
|
||||
set grepprg=rg\ --vimgrep
|
||||
|
||||
" Custom functions "
|
||||
function! RemoveForti()
|
||||
:%g/set uuid .*/d
|
||||
:%g/set comment .*/d
|
||||
:%s/ \+//g
|
||||
:%s/edit \(\d\{1,}\)/edit 0/g
|
||||
:g/^$/d
|
||||
endfunction
|
||||
|
||||
function! RemoveFortiAddresses()
|
||||
:e!
|
||||
:%g/set uuid .*/d
|
||||
:%g/set comment .*/d
|
||||
:%s/ \+//g
|
||||
:%s/edit \(\d\{1,}\)/edit 0/g
|
||||
:%s/next\n/set allow-routing enable\rnext\r/g
|
||||
:g/^$/d
|
||||
:%!uniq
|
||||
:w!
|
||||
endfunction
|
||||
|
||||
function! BlurForti()
|
||||
:%g/set uuid .*/d
|
||||
:%g/set description .*/d
|
||||
:%g/set comment .*/d
|
||||
:%g/set comments .*/d
|
||||
:%s/username .*/username "XXXXXXXXXXXXXXXXXXXXXXX"/g
|
||||
:%s/dn .*/dn "XXXXXXXXXXXXXXXXXXXXXXX"/g
|
||||
:%s/psksecret ENC .*/psksecret XXXXXXXXXXXXXXXXXXXXXXX/g
|
||||
:%s/password ENC .*/password XXXXXXXXXXXXXXXXXXXXXXX/g
|
||||
:%s/passwd ENC .*/passwd XXXXXXXXXXXXXXXXXXXXXXX/g
|
||||
:%s/group-name .*/group-name "XXXXXXXXXXXXXXXXXXXXXXX"/g
|
||||
:%s/ssh-rsa .*/ssh-rsa XXXXXXXXXXXXXXXXXXXXXXX/g
|
||||
:%s/-----BEGIN OPENSSH PRIVATE KEY.*----/-----BEGIN OPENSSH PRIVATE KEY -----\rXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/g
|
||||
:%s/-----BEGIN CERTIFICATE.*----/-----BEGIN CERTIFICATE -----\rXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/g
|
||||
:%s/-----BEGIN ENCRYPTED PRIVATE KEY.*----/-----BEGIN ENCRYPTED PRIVATE KEY -----\rXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/g
|
||||
:%s/"VPN_.*"/"VPN_XXXXX"/g
|
||||
:%s/\v(\d{1,3}\.){3}\d{1,3}/X.X.X.X/g
|
||||
endfunction
|
||||
|
||||
function! ColoursFortiSSL()
|
||||
:%s/next\n/set color 23\rset allow-routing enable\rnext\r/g
|
||||
endfunction
|
||||
|
12
.config/streamlink/config
Normal file
12
.config/streamlink/config
Normal file
@ -0,0 +1,12 @@
|
||||
default-stream "1080p60,1080p,720p60,720p"
|
||||
default-stream best
|
||||
hls-live-edge 2
|
||||
hls-segment-stream-data
|
||||
player-no-close
|
||||
player=mpv
|
||||
retry-max 100
|
||||
retry-open 10
|
||||
retry-streams 10
|
||||
stream-segment-threads=4
|
||||
twitch-disable-ads
|
||||
twitch-low-latency
|
@ -1,14 +0,0 @@
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(markdown-command "/usr/bin/pandoc")
|
||||
'(package-selected-packages
|
||||
'(python-black zenburn-theme yaml-mode use-package treemacs-projectile treemacs-persp treemacs-magit treemacs-icons-dired treemacs-evil switch-window smex robe prettier ox-reveal multiple-cursors move-text lsp-java htmlize helm flymake-yaml flymake-shellcheck flymake-shell flymake-ruby flycheck-haskell flycheck-bashate dracula-theme dockerfile-mode dired-sidebar company-tabnine company-jedi company-c-headers company-ansible auto-complete-clang apache-mode ansible-doc ansible)))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
)
|
@ -14,18 +14,15 @@
|
||||
(package-initialize)
|
||||
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
||||
|
||||
;; UTF-8
|
||||
(set-language-environment "UTF-8")
|
||||
|
||||
;; Remove welcome screen
|
||||
(setq inhibit-startup-screen t)
|
||||
|
||||
;; Disable menu
|
||||
(menu-bar-mode 0)
|
||||
|
||||
;; Enable IDO mode
|
||||
(setq ido-enable-flex-matching t)
|
||||
;;(setq ido-everywhere t)
|
||||
(ido-mode 1)
|
||||
(global-set-key (kbd "C-x b") 'ido-switch-buffer)
|
||||
|
||||
;; Remove working cl
|
||||
(require 'cl-lib)
|
||||
(setq byte-compile-warnings '(cl-functions))
|
||||
@ -40,6 +37,24 @@
|
||||
(package-install 'use-package)
|
||||
)
|
||||
|
||||
;; Packages list refresh
|
||||
(when (not package-archive-contents)
|
||||
(package-refresh-contents))
|
||||
|
||||
;; Auto Package Update
|
||||
(use-package auto-package-update
|
||||
:ensure t
|
||||
:config
|
||||
(progn
|
||||
(setq
|
||||
auto-package-update-delete-old-verions t
|
||||
auto-package-update-interval 5
|
||||
)
|
||||
(auto-package-update-maybe)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; Set path to store "custom-set"
|
||||
(setq custom-file "~/.emacs.d/emacs-custom.el")
|
||||
|
||||
@ -79,6 +94,26 @@
|
||||
(setq browse-url-browser-function 'browse-url-generic
|
||||
browse-url-generic-program "browser-x")
|
||||
|
||||
;; Amx
|
||||
(use-package amx
|
||||
:ensure t
|
||||
:after ivy
|
||||
:custom
|
||||
(
|
||||
(amx-backend 'ivy)
|
||||
(amx-show-key-bindings t)
|
||||
)
|
||||
:config
|
||||
(amx-mode t)
|
||||
)
|
||||
|
||||
;; Counsel
|
||||
(use-package counsel
|
||||
:ensure t
|
||||
)
|
||||
|
||||
|
||||
|
||||
;; Custom theme
|
||||
(add-to-list 'custom-theme-load-path
|
||||
"~/.emacs.d/plugins/")
|
||||
@ -107,15 +142,6 @@
|
||||
(message "Monz not available; not configuring") )
|
||||
(setq default-input-method "japanese-mozc")
|
||||
|
||||
;; Enable Smex
|
||||
(use-package smex
|
||||
:ensure t
|
||||
:init
|
||||
(smex-initialize)
|
||||
:bind
|
||||
("M-x" . smex)
|
||||
)
|
||||
|
||||
;; reveal dependency
|
||||
(use-package htmlize
|
||||
:ensure t
|
||||
@ -167,20 +193,20 @@
|
||||
(defun rc/get-default-font ()
|
||||
(cond
|
||||
((eq system-type 'windows-nt) "Consolas-13")
|
||||
((eq system-type 'gnu/linux) "xos4 Terminus Bold 16")))
|
||||
((eq system-type 'gnu/linux) "xos4 Terminus (TTF) Medium 16")))
|
||||
|
||||
(add-to-list 'default-frame-alist `(font . ,(rc/get-default-font)))
|
||||
|
||||
;; Theme
|
||||
;;(use-package dracula-theme
|
||||
;;(use-package gruvbox-theme
|
||||
;; :ensure t
|
||||
;; :config
|
||||
;; (load-theme 'dracula t))
|
||||
;; (load-theme 'gruvbox-dark-hard t))
|
||||
|
||||
(use-package zenburn-theme
|
||||
(use-package dracula-theme
|
||||
:ensure t
|
||||
:config
|
||||
(load-theme 'zenburn t))
|
||||
(load-theme 'dracula t))
|
||||
|
||||
;; Sitebar dirred
|
||||
(use-package dired-sidebar
|
||||
@ -193,15 +219,19 @@
|
||||
;; Smex
|
||||
(require 'smex)
|
||||
(smex-initialize)
|
||||
(global-set-key (kbd "M-x") 'smex)
|
||||
(global-set-key (kbd "M-x") 'counsel-M-x)
|
||||
|
||||
;;buffer-move
|
||||
(require 'buffer-move)
|
||||
(global-set-key (kbd "C-x b") 'counsel-buffer-or-recentf)
|
||||
(global-set-key (kbd "<C-S-up>") 'buf-move-up)
|
||||
(global-set-key (kbd "<C-S-down>") 'buf-move-down)
|
||||
(global-set-key (kbd "<C-S-left>") 'buf-move-left)
|
||||
(global-set-key (kbd "<C-S-right>") 'buf-move-right)
|
||||
|
||||
;; Files
|
||||
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
|
||||
|
||||
;; Multiple-cursors
|
||||
(use-package multiple-cursors
|
||||
:ensure t
|
||||
@ -445,6 +475,8 @@
|
||||
:config (treemacs-set-scope-type 'Perspectives))
|
||||
|
||||
;; Python
|
||||
(setq python-shell-interpreter "python3")
|
||||
(setq py-python-command "/usr/bin/python3")
|
||||
(use-package company-jedi
|
||||
:ensure t
|
||||
:config
|
||||
@ -457,6 +489,11 @@
|
||||
|
||||
(setq-default ebuild-mode-update-copyright nil)
|
||||
|
||||
(setq jedi:environment-root "jedi") ; or any other name you like
|
||||
(setq jedi:environment-virtualenv
|
||||
(append python-environment-virtualenv
|
||||
'("--python" "/usr/local/bin/python3")))
|
||||
|
||||
(defun infer-indentation-style () (interactive)
|
||||
(let ((space-count (how-many "^ " (point-min) (point-max)))
|
||||
(tab-count (how-many "^\t" (point-min) (point-max))))
|
||||
@ -478,6 +515,16 @@
|
||||
|
||||
;;; --- Look & Feel ---
|
||||
|
||||
;; Org-bullets
|
||||
|
||||
(use-package org-bullets
|
||||
:ensure t
|
||||
:config
|
||||
:after org
|
||||
:hook (org-mode . org-bullets-mode)
|
||||
:custom
|
||||
(org-bullets-bullet-list '("◉" "○" "●" "○" "●" "○" "●")))
|
||||
|
||||
;; Helm
|
||||
(use-package helm
|
||||
:ensure t
|
||||
@ -578,3 +625,4 @@
|
||||
(other-window 1)
|
||||
)
|
||||
(global-set-key (kbd "C-x x") 'kill-and-remove-split)
|
||||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
||||
|
@ -1,64 +0,0 @@
|
||||
|
||||
;; ----- smex-history -----
|
||||
(
|
||||
python-black
|
||||
message-tab
|
||||
python-black-on-save-mode
|
||||
package-install
|
||||
prettier-prettify
|
||||
prettier-prettify-region
|
||||
prettier-mode
|
||||
)
|
||||
|
||||
;; ----- smex-data -----
|
||||
(
|
||||
(lsp-install-server . 6)
|
||||
(treemacs . 17)
|
||||
(lsp-java-update-server . 1)
|
||||
(set-frame-font . 1)
|
||||
(lsp-jt-browser . 6)
|
||||
(sort-lines . 5)
|
||||
(lsp-jt-report-open . 17)
|
||||
(treemacs-edit-workspaces . 2)
|
||||
(treemacs-refresh . 1)
|
||||
(treemacs-mode . 3)
|
||||
(menu-set-font . 2)
|
||||
(magit-commit . 1)
|
||||
(column-number-mode . 1)
|
||||
(set-fill-column . 3)
|
||||
(dap-java-debug . 7)
|
||||
(ruby-indent-exp . 1)
|
||||
(ruby-indent-line . 1)
|
||||
(ruby-mode-menu . 1)
|
||||
(inf-ruby-console-auto . 8)
|
||||
(shell . 8)
|
||||
(package-install-selected-packages . 1)
|
||||
(package-install . 3)
|
||||
(compile . 2)
|
||||
(lsp-mode . 2)
|
||||
(load-theme . 18)
|
||||
(overwrite-mode . 1)
|
||||
(goto-line . 2)
|
||||
(package-refresh-contents . 1)
|
||||
(epc:pop-to-last-server-process-buffer . 3)
|
||||
(disable-theme . 1)
|
||||
(table-insert . 3)
|
||||
(table-insert-row . 1)
|
||||
(kill-rectangle . 1)
|
||||
(delete-rectangle . 1)
|
||||
(avy-isearch . 1)
|
||||
(customize-themes . 1)
|
||||
(ido-mode . 1)
|
||||
(lsp-describe-session . 1)
|
||||
(whitespace-mode . 2)
|
||||
(python-shell-switch-to-shell . 1)
|
||||
(run-python . 2)
|
||||
(display-fill-column-indicator-mode . 3)
|
||||
(prettier-restart . 1)
|
||||
(prettier-prettify . 8)
|
||||
(prettier-mode . 2)
|
||||
(prettier-prettify-region . 2)
|
||||
(python-black . 9)
|
||||
(python-black-on-save-mode . 1)
|
||||
(message-tab . 1)
|
||||
)
|
8
.gitconfig
Normal file
8
.gitconfig
Normal file
@ -0,0 +1,8 @@
|
||||
[user]
|
||||
name = Marcin Woźniak
|
||||
email = y0rune@aol.com
|
||||
signingkey = D34FB8A44F324B8A
|
||||
|
||||
[include]
|
||||
path = ~/.gituser.config
|
||||
path = ~/.gitconfig.local
|
52
.gitconfig.local
Normal file
52
.gitconfig.local
Normal file
@ -0,0 +1,52 @@
|
||||
[gpg]
|
||||
program = gpg
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
||||
verbose = true
|
||||
|
||||
[pull]
|
||||
rebase = false
|
||||
|
||||
[push]
|
||||
autoSetupRemote = true
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
[alias]
|
||||
ci = commit --verbose
|
||||
co = checkout
|
||||
cp = cherry-pick
|
||||
df = !git --no-pager diff
|
||||
br = !git branch | cat
|
||||
dfh = !git --no-pager diff
|
||||
diffh = !git --no-pager diff
|
||||
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an - %ae>%Creset' --abbrev-commit --branches
|
||||
prune-tags = !git tag -l | xargs git tag -d && git fetch -t
|
||||
show = --no-pager show --color --pretty=format:%b
|
||||
squash-all = "!f(){ git reset $(git commit-tree HEAD^{tree} \"$@\");};f"
|
||||
st = status --ignore-submodules=dirty -s
|
||||
untrack-file = !git update-index --assume-unchanged
|
||||
exclude-file = !git update-index --assume-unchanged
|
||||
c = commit --author='Marcin Woźniak <y0rune@aol.com> -s'
|
||||
cw = commit --author='Marcin Woźniak <marcin.wozniak@wundermanthompson.com> -s'
|
||||
retag = "!f() { if [ -z \"$1\" ]; then echo \"No version provided. Skipping git push.\"; else git tag --delete $1 2>/dev/null; git tag -a $1 -m \"Version $1\"; git push --tags -f; git push -f; fi; }; f"
|
||||
delete-branch = "!$HOME/.local/bin/git-delete-branch"
|
||||
|
||||
[url "git@github.com:"]
|
||||
insteadOf = "https://github.com/"
|
||||
|
||||
[credential "https://github.com"]
|
||||
helper =
|
||||
helper = !/usr/bin/gh auth git-credential
|
||||
|
||||
[credential "https://gist.github.com"]
|
||||
helper =
|
||||
helper = !/usr/bin/gh auth git-credential
|
||||
|
||||
[filter "lfs"]
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
87
.gitignore
vendored
87
.gitignore
vendored
@ -1,10 +1,34 @@
|
||||
.config/backup-started*
|
||||
.Xauthority
|
||||
.matplotlib
|
||||
.Trash
|
||||
.DS_Store
|
||||
.ansible
|
||||
.CFUserTextEncoding
|
||||
.cups/
|
||||
.docker/
|
||||
.oh-my-zsh/
|
||||
.shell.pre-oh-my-zsh
|
||||
.zcompdum*
|
||||
.zsh_history
|
||||
.zsh_sessions/
|
||||
.emacs.d/emacs-custom.el
|
||||
.emacs.d/smex-items
|
||||
notes
|
||||
Applications/
|
||||
Desktop/
|
||||
Library/
|
||||
Pictures/
|
||||
Public/
|
||||
VirtualBox*
|
||||
synergy.log
|
||||
.config/Element/
|
||||
.config/TabNine/
|
||||
.config/coc/
|
||||
.config/google-chrome/
|
||||
.config/teamviewer/
|
||||
.ipython/
|
||||
.bugz_token
|
||||
.irbrc
|
||||
.jupyter/
|
||||
.local/bin/autopep8
|
||||
@ -12,6 +36,14 @@
|
||||
.local/bin/pycodestyle
|
||||
.local/bin/surprise
|
||||
.local/bin/yamllint
|
||||
.config/Signal/
|
||||
.config/lazygit/
|
||||
.config/libreoffice/
|
||||
.config/quassel-irc.org/
|
||||
.local/bin/pytube
|
||||
.local/bin/spotify_dl
|
||||
.packer.d/
|
||||
.spotifydl/
|
||||
.netrc
|
||||
.nvimlog
|
||||
.python_history
|
||||
@ -41,6 +73,7 @@
|
||||
.fzf.bash
|
||||
.fzf.zsh
|
||||
.fzf/
|
||||
.local/bin/ansible*
|
||||
.recently-used
|
||||
.eclipse/
|
||||
.emacs.d/.dap-breakpoints
|
||||
@ -124,6 +157,24 @@
|
||||
.local/bin/symilar
|
||||
.local/bin/vpnst
|
||||
.local/bin/wheel
|
||||
.local/bin/estimator_ckpt_converter
|
||||
.local/bin/f2py3.9
|
||||
.local/bin/google-oauthlib-tool
|
||||
.local/bin/import_pb_to_tensorboard
|
||||
.local/bin/markdown_py
|
||||
.local/bin/pyrsa-*
|
||||
.local/bin/saved_model_cli
|
||||
.local/bin/tensorboard
|
||||
.local/bin/tf_upgrade_v2
|
||||
.local/bin/tflite_convert
|
||||
.local/bin/toco
|
||||
.local/bin/toco_from_protos
|
||||
.local/bin/tqdm
|
||||
.local/bin/f2py
|
||||
.local/bin/f2py3
|
||||
.keras/
|
||||
.config/menus
|
||||
.local/bin/wheel
|
||||
.local/include/
|
||||
.local/lib/
|
||||
.local/lib64/
|
||||
@ -193,3 +244,39 @@ www
|
||||
Movies/
|
||||
Music/
|
||||
notes.org
|
||||
|
||||
.config/backup.log
|
||||
.config/gh/config.yml
|
||||
.config/gh/hosts.yml
|
||||
.local/state/gh/state.yml
|
||||
.emacs.d/ido.last~
|
||||
.config/karabiner/automatic_backups
|
||||
.config/qBittorrent
|
||||
.config/envman
|
||||
.emacs.d/.last-package-update-day
|
||||
.emacs.d/amx-items
|
||||
.local/bin/pathman
|
||||
.local/bin/webi
|
||||
.local/opt/pathman-v0.5.2/bin
|
||||
Musik/
|
||||
|
||||
.config/ytmdl
|
||||
golang
|
||||
.virtualenvs/debugpy
|
||||
.local/bin/mgorny-dev-scripts
|
||||
.local/bin/serviceman
|
||||
.local/opt/serviceman-v0.8.0/bin
|
||||
.emacs.d/recentf
|
||||
.config/filezilla
|
||||
.local/state/mume
|
||||
.putty
|
||||
.redhat
|
||||
.cpanm
|
||||
.node-gyp/14.16.0
|
||||
.packettracer
|
||||
.dlv
|
||||
Cisco Packet Tracer 8.0.0
|
||||
.local/bin/kubectl
|
||||
.rustup
|
||||
.local/tss-sdk
|
||||
.local/bin/tss
|
||||
|
23
.local/bin/Logc
Executable file
23
.local/bin/Logc
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
NUMBER="-1"
|
||||
|
||||
while true
|
||||
do
|
||||
clear
|
||||
|
||||
LOGS=( $(sudo find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") $(sudo find /var/tmpnotmpfs/portage/ -mindepth 1 -maxdepth 5 -name "build.log") )
|
||||
LEN=${#LOGS[@]}
|
||||
|
||||
for (( i=0; i<$LEN; i++ ));
|
||||
do
|
||||
echo "$(( $i + 1 )) - ${LOGS[$i]}"
|
||||
done
|
||||
|
||||
echo
|
||||
read -rsp $'Select number to show logs...\n' -t2 -n1 NUMBER
|
||||
|
||||
[[ $NUMBER -gt 0 ]] && break
|
||||
done
|
||||
|
||||
echo -e "\n\e[93m File: ${LOGS[$NUMBER-1]} \e[0m\n"
|
||||
sudo cat ${LOGS[$NUMBER-1]}
|
@ -1 +0,0 @@
|
||||
emerge-logs
|
31
.local/bin/Logs
Executable file
31
.local/bin/Logs
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
NUMBER="-1"
|
||||
|
||||
if command -v sudo; then
|
||||
sudo=$(which sudo)
|
||||
elif command -v doas; then
|
||||
sudo=$(which doas)
|
||||
else
|
||||
echo "Do you have installed sudo or doas on your system??"
|
||||
fi
|
||||
|
||||
while true
|
||||
do
|
||||
clear
|
||||
|
||||
LOGS=( $(${sudo} find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") $(${sudo} find /var/tmpnotmpfs/portage/ -mindepth 1 -maxdepth 5 -name "build.log") )
|
||||
LEN=${#LOGS[@]}
|
||||
|
||||
for (( i=0; i<$LEN; i++ ));
|
||||
do
|
||||
echo "$(( $i + 1 )) - ${LOGS[$i]}"
|
||||
done
|
||||
|
||||
echo
|
||||
read -rsp $'Select number to show logs...\n' -t2 -n1 NUMBER
|
||||
|
||||
[[ $NUMBER -gt 0 ]] && break
|
||||
done
|
||||
|
||||
echo -e "\n\e[93m File: ${LOGS[$NUMBER-1]} \e[0m\n"
|
||||
${sudo} tail -f "${LOGS[$NUMBER-1]}"
|
@ -4,12 +4,9 @@ echo
|
||||
echo -e $(date)
|
||||
echo
|
||||
echo
|
||||
sudo /home/yorune/.local/bin/eix-repos-sync
|
||||
sudo eix-sync -a
|
||||
sudo emerge --sync
|
||||
sudo $HOME/.local/bin/eix-repos-sync
|
||||
sudo eix-update
|
||||
#sudo emerge-webrsync
|
||||
#sudo emerge --sync
|
||||
#sudo emaint sync -a
|
||||
sudo emerge -auDN @world
|
||||
echo
|
||||
echo
|
||||
|
@ -1,15 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
BACKUP="/home/yorune/Linux/portage"
|
||||
LOG_FILE="/tmp/update-kernel.log"
|
||||
TMP_KERNEL="/tmp/kernel-config-`uname -r`"
|
||||
BACKUP="/home/yorune/MEGA/Systems/Linux/portage"
|
||||
TMP_KERNEL="/tmp/kernel-config-$(uname -r)"
|
||||
DEFAULT_KERNEL="/usr/src/linux/.config"
|
||||
GRUBRELOAD=1
|
||||
|
||||
function starting() {
|
||||
echo -e "\e[93m----------------------COMPILING------------------------------\e[0m"
|
||||
sudo cp -rv $DEFAULT_KERNEL $TMP_KERNEL
|
||||
cp -r $TMP_KERNEL $BACKUP/kernel-config
|
||||
cp -r /etc/portage/* $BACKUP
|
||||
sudo cp -rv "$DEFAULT_KERNEL" "$TMP_KERNEL"
|
||||
cp -r "$TMP_KERNEL" "$BACKUP/kernel-config"
|
||||
sudo cp -r /etc/portage/* $BACKUP
|
||||
qlist -I | sort -u > $BACKUP/list-of-programs
|
||||
}
|
||||
|
||||
@ -18,26 +18,30 @@ echo -e "\e[93m----------------------SELECTION-----------------------------\e[0m
|
||||
sudo eselect kernel list
|
||||
echo
|
||||
echo
|
||||
read -p "New kernel is: " KERVER
|
||||
read -rp "New kernel is: " KERVER
|
||||
echo
|
||||
echo -e "Your kernel now is \e[91m$(uname -sr)\e[0m"
|
||||
echo -e "Your selected kernel is \e[91m"$KERVER"\e[0m"
|
||||
sudo eselect kernel set $KERVER
|
||||
sudo eselect kernel list | grep "*"
|
||||
echo -e "Your selected kernel is \e[91m$KERVER\e[0m"
|
||||
sudo eselect kernel set "$KERVER"
|
||||
sudo eselect kernel list | grep -iE "\*"
|
||||
echo
|
||||
}
|
||||
|
||||
function compilation() {
|
||||
read -p "Do you want to accept and compile (Y/N): " agreed
|
||||
read -rp "Do you want to accept and compile (Y/N): " agreed
|
||||
echo
|
||||
if [ "$agreed" == "y" ] || [ "$agreed" == "Y" ]
|
||||
then
|
||||
echo -e "\e[91m----------------------\e[5mSTARTING\e[0m\e[91m------------------------------\e[0m" && sleep 10
|
||||
$NOW > /tmp/compiling-starting
|
||||
NEW_KERNEL="/tmp/new-kernel-config"
|
||||
sudo cp -r $TMP_KERNEL $DEFAULT_KERNEL
|
||||
cd /usr/src/linux; sudo make menuconfig; sleep 2; sudo cp -r $DEFAULT_KERNEL $NEW_KERNEL
|
||||
sudo genkernel all --makeopts=-j$(nproc --all) --kernel-config=$NEW_KERNEL --callback="emerge nvidia-drivers::gentoo" --lvm --btrfs --luks
|
||||
sudo cp -r "$TMP_KERNEL" "$DEFAULT_KERNEL"
|
||||
cd /usr/src/linux || exit
|
||||
sudo make menuconfig; sleep 2; sudo cp -r "$DEFAULT_KERNEL" "$NEW_KERNEL"
|
||||
sudo genkernel all --makeopts=-j"$(nproc --all)" \
|
||||
--kernel-config=$NEW_KERNEL \
|
||||
--callback="emerge nvidia-drivers::gentoo" \
|
||||
--zfs
|
||||
elif [ "$agreed" == "N" ] || [ "$agreed" == "n" ]
|
||||
then
|
||||
exit
|
||||
@ -64,16 +68,20 @@ echo -e "AFTER EVERYTHING YOU MUST WRITE COMMAND \e[91m"sudo grub-mkconfig -o /b
|
||||
}
|
||||
|
||||
function checking() {
|
||||
KERNEL=`eselect kernel list | awk '{print $2}' | egrep -o '[0-9]+.[0-9]+.[0-9]+' | tail -n1`
|
||||
KERNEL=$(eselect kernel list \
|
||||
| awk '{print $2}' \
|
||||
| grep -Eo '[0-9]+.[0-9]+.[0-9]+' \
|
||||
| tail -n1)
|
||||
|
||||
INITRANFS="initramfs-$KERNEL-gentoo-x86_64.img"
|
||||
SYSTEMMAP="System.map-$KERNEL-gentoo-x86_64"
|
||||
VMLINUZ="vmlinuz-$KERNEL-gentoo-x86_64"
|
||||
|
||||
ifchecking $INITRANFS
|
||||
ifchecking $SYSTEMMAP
|
||||
ifchecking $VMLINUZ
|
||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||
ifchecking "$INITRANFS"
|
||||
ifchecking "$SYSTEMMAP"
|
||||
ifchecking "$VMLINUZ"
|
||||
[ "$GRUBRELOAD" -eq "1" ] && sudo grub-mkconfig -o /boot/grub/grub.cfg \
|
||||
|| echo "Please check all files and regenerate grub again!"
|
||||
}
|
||||
|
||||
function ifchecking () {
|
||||
@ -82,15 +90,17 @@ if test -f "$FILE"; then
|
||||
echo "$FILE exist in the /boot folder ;)"
|
||||
else
|
||||
echo "$FILE NOT exist in the /boot folder ;)"
|
||||
GRUBRELOAD=0
|
||||
fi
|
||||
}
|
||||
|
||||
function addgit() {
|
||||
cd ~/Linux/portage || exit
|
||||
cd "$BACKUP" || exit
|
||||
sleep 20
|
||||
git add .
|
||||
git commit -m "Updated: $(date)"
|
||||
git push
|
||||
cd ~ || exit
|
||||
cd "$HOME" || exit
|
||||
}
|
||||
|
||||
function main() {
|
||||
|
621
.local/bin/Update-pkg
Executable file
621
.local/bin/Update-pkg
Executable file
@ -0,0 +1,621 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=2010,2045,2086,2155
|
||||
|
||||
# Path to the zsh folder
|
||||
ZSHFOLDER=$HOME/.config/zsh
|
||||
CONFIG="$HOME/.config"
|
||||
OHMYZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
mkdir -p $ZSHFOLDER $CONFIG $OHMYZSH
|
||||
|
||||
# Colours
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;0;32m'
|
||||
NC='\033[0m'
|
||||
|
||||
# Stable version
|
||||
TERRAFORM_VERSION="1.5.7"
|
||||
|
||||
# Python
|
||||
if which python3 > /dev/null 2>&1; then
|
||||
python="python3"
|
||||
pip="pip3"
|
||||
else
|
||||
export PYTHONVERSION=$(ls -la /opt/homebrew/opt/ |
|
||||
grep -iEo 'python@.* ->' |
|
||||
sed 's/ ->//g' |
|
||||
sort |
|
||||
tail -n1 |
|
||||
sed 's/python@//g')
|
||||
python="/opt/homebrew/bin/python$PYTHONVERSION"
|
||||
pip="/opt/homebrew/bin/pip$PYTHONVERSION"
|
||||
fi
|
||||
|
||||
PIPEXT="--user --force --quiet --break-system-packages --no-warn-script-location"
|
||||
PIPEXTPRE="--pre $PIPEXT"
|
||||
|
||||
# Gentoo release
|
||||
GENTOO="/etc/gentoo-release"
|
||||
|
||||
# Function for basic install
|
||||
|
||||
install=""
|
||||
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
install="brew install"
|
||||
elif [[ -f $GENTOO ]]; then
|
||||
install="sudo emerge --update"
|
||||
elif [[ -f /etc/debian_version ]]; then
|
||||
sudo apt update
|
||||
install="sudo apt install -y"
|
||||
elif [[ -f /etc/redhat-release ]]; then
|
||||
install="sudo dnf install"
|
||||
fi
|
||||
|
||||
function timestamp() {
|
||||
echo -e "${GREEN}[+]${NC} $(date +'%F %T') [INFO] $*"
|
||||
}
|
||||
|
||||
function err() {
|
||||
echo -e "${RED}[-] $(date +'%F %T') [ERROR] $*${NC}" >&2
|
||||
}
|
||||
|
||||
function command_start() {
|
||||
timestamp "Command $* has been started."
|
||||
if ! "$*"; then
|
||||
err "---------"
|
||||
err "Command $* went wrong."
|
||||
err "---------"
|
||||
# exit
|
||||
fi
|
||||
timestamp "Command $* has been ended."
|
||||
}
|
||||
|
||||
function command_exists() {
|
||||
if command -v "$1" > /dev/null 2>&1; then
|
||||
timestamp "Command $1 has been found"
|
||||
else
|
||||
err "Command $1 has been NOT found"
|
||||
|
||||
# Return false
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function update_pip() {
|
||||
# Update the pip
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
$python -m pip install --upgrade pip --user --no-warn-script-location --break
|
||||
elif [[ -f $GENTOO ]]; then
|
||||
$install dev-python/pip
|
||||
fi
|
||||
}
|
||||
|
||||
function install_neovim_module_for_python() {
|
||||
# Python module in neovim
|
||||
$pip install pynvim neovim imps $PIPEXTPRE
|
||||
}
|
||||
|
||||
function install_node() {
|
||||
if command_exists npm; then
|
||||
timestamp "Node has been found"
|
||||
else
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
brew uninstall node --ignore-dependencies
|
||||
sudo rm -rf /opt/homebrew/lib/node_modules/npm/
|
||||
$install node
|
||||
elif [[ -f $GENTOO ]]; then
|
||||
$install dev-lang/nodejs
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function install_pyright() {
|
||||
# Install pyright
|
||||
sudo npm -s -g i pyright --force
|
||||
}
|
||||
|
||||
function install_mdformat() {
|
||||
# Install mdformat
|
||||
$pip install mdformat $PIPEXTPRE
|
||||
}
|
||||
|
||||
function install_ruff() {
|
||||
# Install ruff
|
||||
$pip install ruff $PIPEXTPRE
|
||||
}
|
||||
|
||||
function install_bash-language-server() {
|
||||
# Install bash-language-server
|
||||
sudo npm -s -g i bash-language-server --force
|
||||
}
|
||||
|
||||
function install_yaml-language-server() {
|
||||
# Install yaml-language-server
|
||||
sudo npm -s -g i yaml-language-server --force
|
||||
}
|
||||
|
||||
function install_shfmt() {
|
||||
# Install shfmt
|
||||
GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest
|
||||
}
|
||||
|
||||
function install_lazy() {
|
||||
# Install shfmt
|
||||
GO111MODULE=on go install github.com/jesseduffield/lazygit@latest
|
||||
GO111MODULE=on go install github.com/jesseduffield/lazydocker@latest
|
||||
}
|
||||
|
||||
function install_dlv() {
|
||||
GO111MODULE=on go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
}
|
||||
|
||||
function install_terraform_stable() {
|
||||
# Install terraform and terraform-ls
|
||||
GO111MODULE=on go install github.com/hashicorp/terraform-ls@latest
|
||||
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
$install tflint -q
|
||||
$install tfenv -q
|
||||
TFENV_ARCH=amd64 tfenv install "$TERRAFORM_VERSION"
|
||||
tfenv use "$TERRAFORM_VERSION"
|
||||
else
|
||||
GO111MODULE=on go install github.com/hashicorp/terraform@v"$TERRAFORM_VERSION"
|
||||
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
|
||||
fi
|
||||
}
|
||||
|
||||
function install_terraform() {
|
||||
# Install terraform and terraform-ls
|
||||
GO111MODULE=on go install github.com/hashicorp/terraform-ls@latest
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
$install tflint -q
|
||||
$install tfenv -q
|
||||
TFENV_ARCH=amd64 tfenv install latest
|
||||
mapfile -t TFENV_VER_ARRAY < <(tfenv list | grep -ioE ' [0-9.]+' | sed -e '1,1d')
|
||||
if [ "${#TFENV_VER_ARRAY[@]}" -gt "2" ]; then
|
||||
for i in "${TFENV_VER_ARRAY[@]}"; do
|
||||
tfenv uninstall "$i" && timestamp "Removed - terraform '$i' version"
|
||||
done
|
||||
fi
|
||||
else
|
||||
GO111MODULE=on go install github.com/hashicorp/terraform@latest
|
||||
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
|
||||
fi
|
||||
}
|
||||
|
||||
function install_terragrunt() {
|
||||
# Install terragrunt
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
$install terragrunt -q
|
||||
else
|
||||
TERRAGRUNT=$HOME/.local/bin/terragrunt
|
||||
REMOTE_VERSION=$(curl -s https://api.github.com/repos/gruntwork-io/terragrunt/releases/latest | grep -iEo '"tag_name":.*' | sed 's/"tag_name"://g;s/"//g;s/,//g;s/ //g')
|
||||
|
||||
CURRENT_VERSION="0.0.0"
|
||||
[ -f $TERRAGRUNT ] && CURRENT_VERSION=$($TERRAGRUNT version)
|
||||
|
||||
if [ "$REMOTE_VERSION" == "$CURRENT_VERSION" ]; then
|
||||
timestamp "The current version of the TSS-SDK is the same as the newest version"
|
||||
return 0
|
||||
else
|
||||
brew install wget
|
||||
wget https://github.com/gruntwork-io/terragrunt/releases/latest/download/terragrunt_linux_amd64 -O $TERRAGRUNT
|
||||
chmod +x "$TERRAGRUNT"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function install_shellcheck() {
|
||||
# Install shellcheck
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
$install shellcheck -q
|
||||
else
|
||||
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
|
||||
fi
|
||||
}
|
||||
|
||||
function install_marksman() {
|
||||
# Install marksman
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
$install marksman -q
|
||||
else
|
||||
wget https://github.com/artempyanykh/marksman/releases/latest/download/marksman-linux-x64 -O $HOME/.local/bin/marksman
|
||||
chmod +x $HOME/.local/bin/marksman
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function install_go() {
|
||||
# Install the golang
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
$install golang -q
|
||||
elif [[ -f $GENTOO ]]; then
|
||||
$install dev-lang/go
|
||||
fi
|
||||
}
|
||||
|
||||
function install_gopls() {
|
||||
# Install gopls
|
||||
GO111MODULE=on go install golang.org/x/tools/gopls@latest
|
||||
}
|
||||
|
||||
function install_ansible() {
|
||||
# Install Ansible
|
||||
$pip install ansible ansible-lint ansible-core $PIPEXTPRE
|
||||
$pip install ansible-parallel $PIPEXTPRE
|
||||
}
|
||||
|
||||
function install_ansible-language-server() {
|
||||
# Install ansible-language-server
|
||||
sudo npm -s -g i @ansible/ansible-language-server --force
|
||||
sudo npm -s -g i yaml-language-server --force
|
||||
}
|
||||
|
||||
function install_meraki_ansible() {
|
||||
# Install python, ansible module for meraki
|
||||
ansible-galaxy collection install cisco.meraki --force
|
||||
$pip install meraki $PIPEXT
|
||||
}
|
||||
|
||||
function install_azure_cli() {
|
||||
# Install azure_cli
|
||||
$install azure-cli
|
||||
}
|
||||
|
||||
function install_awscli() {
|
||||
# Install awscli
|
||||
$install awscli
|
||||
}
|
||||
|
||||
function install_aws_adfs() {
|
||||
# Install aws-adfs
|
||||
$pip install aws-adfs $PIPEXTPRE
|
||||
}
|
||||
|
||||
function install_ytdlp() {
|
||||
# Install yt-dlp
|
||||
$pip install yt-dlp $PIPEXTPRE
|
||||
}
|
||||
|
||||
function install_spotifydl() {
|
||||
# Install spotify_dl
|
||||
$pip install spotdl $PIPEXTPRE
|
||||
}
|
||||
|
||||
function install_fzf() {
|
||||
# Install fzf
|
||||
FOLDER="$CONFIG/fzf"
|
||||
mkdir -p $FOLDER
|
||||
|
||||
if [ -d $FOLDER ]; then
|
||||
cd $CONFIG || err "Folder $CONFIG has been NOT found"
|
||||
git clone https://github.com/junegunn/fzf.git $FOLDER && timestamp "Cloning the FZF"
|
||||
cd $FOLDER || err "Folder $FOLDER has been NOT found"
|
||||
git pull -q && timestamp "Pulled the $FOLDER configuration"
|
||||
make install
|
||||
fi
|
||||
}
|
||||
|
||||
function install_zsh_addons() {
|
||||
|
||||
if [ ! -d $ZSHFOLDER/aws ]; then
|
||||
mkdir -p "$ZSHFOLDER/azure-cli" "$ZSHFOLDER/aws"
|
||||
|
||||
curl -s https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/plugins/aws/aws.plugin.zsh \
|
||||
-o "$ZSHFOLDER"/aws/aws.plugin.zsh &&
|
||||
timestamp "Downloaded the newest version of aws plugin for zsh"
|
||||
|
||||
curl -s https://raw.githubusercontent.com/Azure/azure-cli/dev/az.completion \
|
||||
-o "$ZSHFOLDER"/azure-cli/az.completion &&
|
||||
timestamp "Downloaded the newest version of az plugin for zsh"
|
||||
|
||||
cd $ZSHFOLDER || err "Folder $ZSHFOLDER has been NOT found"
|
||||
git clone https://github.com/popstas/zsh-command-time.git &&
|
||||
timestamp "Cloning the zsh-command-time"
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git &&
|
||||
timestamp "Cloning the zsh-syntax-highlighting"
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions.git &&
|
||||
timestamp "Cloning the zsh-autosuggestions"
|
||||
fi
|
||||
|
||||
for i in $(ls $ZSHFOLDER); do
|
||||
FOLDER="$ZSHFOLDER/$i"
|
||||
if [ -d "$FOLDER/.git" ]; then
|
||||
cd "$FOLDER" || err "Folder $FOLDER has been NOT found"
|
||||
git pull -q && timestamp "Pulling the $FOLDER configuration"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d $OHMYZSH ]; then
|
||||
cd $OHMYZSH || err "Folder $OHMYZSH has been NOT found"
|
||||
git pull -q && timestamp "Pulling the $OHMYZSH configuration"
|
||||
fi
|
||||
|
||||
curl -s https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/plugins/aws/aws.plugin.zsh -o "$ZSHFOLDER"/aws/aws.plugin.zsh && timestamp "Downloaded the newest version of aws plugin for zsh"
|
||||
curl -s https://raw.githubusercontent.com/Azure/azure-cli/dev/az.completion -o "$ZSHFOLDER"/azure-cli/az.completion && timestamp "Downloaded the newest version of az plugin for zsh"
|
||||
|
||||
}
|
||||
|
||||
function install_speedtest() {
|
||||
# Install speedtest-cli
|
||||
$pip install speedtest-cli $PIPEXTPRE
|
||||
}
|
||||
|
||||
function install_gh_cli() {
|
||||
# Install gh-cli
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
$install gh
|
||||
elif [[ -f $GENTOO ]]; then
|
||||
$install dev-util/github-cli
|
||||
fi
|
||||
}
|
||||
|
||||
function install_kubernetes() {
|
||||
# Install kubectl
|
||||
LINK=""
|
||||
CURRENT_VERSION=""
|
||||
REMOTE_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
|
||||
KUBECTL_LOCATION="/opt/homebrew/bin/kubectl"
|
||||
|
||||
[ -f $KUBECTL_LOCATION ] && CURRENT_VERSION=$($KUBECTL_LOCATION version --client | grep --color=no -iEo 'Client Version: v[0-9\.]+' | grep -ioE --color=no 'v[0-9\.]+')
|
||||
|
||||
if [ "$REMOTE_VERSION" == "$CURRENT_VERSION" ]; then
|
||||
timestamp "The current version of the kubectl is the same as the newest version"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
LINK="http://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
|
||||
else
|
||||
LINK="http://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||
fi
|
||||
|
||||
wget "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -O $KUBECTL_LOCATION
|
||||
chmod +x $KUBECTL_LOCATION
|
||||
}
|
||||
|
||||
function install_rust() {
|
||||
# Install rust
|
||||
if command_exists rustc; then
|
||||
rustup update
|
||||
rustup component add rust-analyzer
|
||||
else
|
||||
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
|
||||
fi
|
||||
}
|
||||
|
||||
function install_tss_client() {
|
||||
# Install tss
|
||||
CURRENT_VERSION="1.5.7"
|
||||
|
||||
# Example link: https://downloads.ss.thycotic.com/secretserversdk/1.5.7/secretserver-sdk-1.5.7-linux-x64.zip
|
||||
TSSDOCS="https://docs.delinea.com/online-help/secret-server/api-scripting/sdk-devops/sdk-downloads/index.htm"
|
||||
LINK=""
|
||||
REMOTE_VERSION=""
|
||||
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
LINK=$(curl -s -L $TSSDOCS | grep -iEo 'href=".*-osx-x64.zip"' | sed 's/href\=//g;s/"//g' | sort -r | head -n1)
|
||||
REMOTE_VERSION=$(echo $LINK | grep -iEo '[0-9.]+-osx' | sed 's/-osx//g')
|
||||
else
|
||||
LINK=$(curl -s -L $TSSDOCS | grep -iEo 'href=".*-linux-x64.zip"' | sed 's/href\=//g;s/"//g' | sort -r | head -n1)
|
||||
REMOTE_VERSION=$(echo $LINK | grep -iEo '[0-9.]+-linux' | sed 's/-linux//g')
|
||||
fi
|
||||
|
||||
TSSFOLDER="$HOME/.local/tss-sdk"
|
||||
TSSLINK="$HOME/.local/bin/tss"
|
||||
|
||||
[ -f $TSSLINK ] && CURRENT_VERSION=$($TSSLINK version)
|
||||
|
||||
timestamp "Current version of the TSS-SDK: $CURRENT_VERSION"
|
||||
timestamp "Remote version of the TSS-SDK: $REMOTE_VERSION"
|
||||
|
||||
if [ "$REMOTE_VERSION" == "$CURRENT_VERSION" ]; then
|
||||
timestamp "The current version of the TSS-SDK is the same as the newest version"
|
||||
return 0
|
||||
else
|
||||
rm -rfv $TSSFOLDER $TSSLINK
|
||||
mkdir $TSSFOLDER
|
||||
timestamp "Downloading the newest version of the TSS-SDK"
|
||||
timestamp "Link: $LINK"
|
||||
wget $LINK -P $TSSFOLDER
|
||||
unzip $TSSFOLDER/secretserver-sdk-*.zip -d $TSSFOLDER
|
||||
rm -rfv $TSSFOLDER/secretserver-sdk-*.zip
|
||||
ln -s $TSSFOLDER/tss $TSSLINK
|
||||
chmod +x $TSSLINK
|
||||
fi
|
||||
}
|
||||
|
||||
function install_taplo() {
|
||||
# Install taplo
|
||||
$install taplo
|
||||
}
|
||||
|
||||
function install_precommit() {
|
||||
# Install pre-commit
|
||||
$pip install pre-commit $PIPEXTPRE
|
||||
}
|
||||
|
||||
function install_streamlink() {
|
||||
# Install streamlink
|
||||
$pip install streamlink $PIPEXTPRE
|
||||
}
|
||||
|
||||
function install_brew_programs() {
|
||||
# Install brew programs
|
||||
INSTALLED_PROGRAMS=$(brew list)
|
||||
while IFS='' read -r line; do LIST_OF_PROGRAMS+=("$line"); done < <(cat "$HOME"/.brew_programs)
|
||||
while IFS='' read -r line; do LIST_OF_PROGRAMS_CASK+=("$line"); done < <(cat "$HOME"/.brew_programs_cask)
|
||||
|
||||
for i in "${LIST_OF_PROGRAMS[@]}"; do
|
||||
if [[ ! " ${INSTALLED_PROGRAMS[*]} " =~ ${i} ]]; then
|
||||
brew install $i --force
|
||||
fi
|
||||
done
|
||||
|
||||
for i in "${LIST_OF_PROGRAMS_CASK[@]}"; do
|
||||
if [[ ! " ${INSTALLED_PROGRAMS[*]} " =~ ${i} ]]; then
|
||||
brew install $i --cask --force
|
||||
fi
|
||||
done
|
||||
|
||||
xattr -r -d com.apple.quarantine /Applications/Spotify.app
|
||||
xattr -r -d com.apple.quarantine /Applications/Stats.app
|
||||
|
||||
xattr -r -d com.apple.quarantine /opt/homebrew/bin/mpv /Applications/mpv.app
|
||||
duti -s io.mpv avi all
|
||||
duti -s io.mpv mkv all
|
||||
duti -s io.mpv mp4 all
|
||||
duti -s io.mpv ts all
|
||||
|
||||
xattr -r -d com.apple.quarantine /Applications/qView.app
|
||||
duti -s com.interversehq.qView public.jpeg all
|
||||
duti -s com.interversehq.qView public.png all
|
||||
duti -s com.interversehq.qView com.compuserve.gif all
|
||||
duti -s com.interversehq.qView public.tiff all
|
||||
|
||||
xattr -r -d com.apple.quarantine /Applications/chatterino.app
|
||||
|
||||
brew cleanup --prune=all
|
||||
}
|
||||
|
||||
function install_winbox_old() {
|
||||
curl -o /tmp/winbox64.exe \
|
||||
"$(curl --silent https://mikrotik.com/download | grep -o 'https:\/\/download.*winbox64.exe')"
|
||||
mv -v /tmp/winbox64.exe ~/Applications/winbox.exe
|
||||
xattr -cr ~/Applications/winbox.exe
|
||||
}
|
||||
|
||||
function install_prettier() {
|
||||
$install prettier
|
||||
$install prettierd
|
||||
}
|
||||
|
||||
function install_google_cloud_sdk() {
|
||||
# Install google cloud sdk
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
$install google-cloud-sdk
|
||||
else
|
||||
curl -s https://sdk.cloud.google.com | bash
|
||||
fi
|
||||
}
|
||||
|
||||
function install_lib_wandio() {
|
||||
local REPO="LibtraceTeam/wandio"
|
||||
local REMOTE_VERSION=$(curl -s \
|
||||
https://api.github.com/repos/$REPO/releases/latest |
|
||||
grep -iEo '"tag_name":.*' |
|
||||
sed 's/"tag_name"://g;s/"//g;s/,//g;s/ //g')
|
||||
local RELEASE="${REMOTE_VERSION}.tar.gz"
|
||||
local DEST="/tmp/wandio-$REMOTE_VERSION.tar.gz"
|
||||
local DEST_FOLDER="/tmp/wandio-$REMOTE_VERSION"
|
||||
|
||||
$install autoconf automake libtool
|
||||
wget https://github.com/$REPO/archive/refs/tags/$RELEASE -O $DEST
|
||||
tar -xvf $DEST -C /tmp
|
||||
cd $DEST_FOLDER || err "Folder $DEST_FOLDER has been NOT found"
|
||||
./bootstrap.sh
|
||||
./configure
|
||||
make -j"$(nproc)"
|
||||
sudo make install && timestamp "Installed the newest version of the $REPO"
|
||||
rm -rfv $DEST $DEST_FOLDER
|
||||
}
|
||||
|
||||
function install_bgpreader() {
|
||||
local CURRENT_VERSION="0.0.0"
|
||||
local REPO="CAIDA/libbgpstream"
|
||||
local NAME="${REPO##*/}"
|
||||
local REMOTE_VERSION=$(curl -s \
|
||||
https://api.github.com/repos/$REPO/releases/latest |
|
||||
grep -iEo '"tag_name":.*' |
|
||||
sed 's/"tag_name"://g;s/"//g;s/,//g;s/ //g')
|
||||
local RELEASE="$NAME-${REMOTE_VERSION/v/}.tar.gz"
|
||||
local DEST="/tmp/$NAME-$REMOTE_VERSION.tar.gz"
|
||||
local DEST_FOLDER="/tmp/$NAME-$REMOTE_VERSION"
|
||||
|
||||
if command_exists bgpreader; then
|
||||
CURRENT_VERSION="v$(bgpreader -v 2>&1 | grep -ioE '[0-9\.]+')"
|
||||
fi
|
||||
|
||||
if [ "$CURRENT_VERSION" == "$REMOTE_VERSION" ]; then
|
||||
timestamp "The current version of the BGPREADER is the same as the newest version"
|
||||
return 0
|
||||
else
|
||||
$install autoconf automake libtool
|
||||
command_start install_lib_wandio
|
||||
wget https://github.com/$REPO/releases/download/$REMOTE_VERSION/$RELEASE -O $DEST
|
||||
tar -xvf $DEST -C /tmp
|
||||
cd /tmp/$NAME-* || err "Folder /tmp/$NAME-* has been NOT found"
|
||||
./configure --without-kafka
|
||||
make -j"$(nproc)"
|
||||
sudo make install && timestamp "Installed the newest version of the $REPO"
|
||||
rm -rfv /tmp/$NAME-*
|
||||
fi
|
||||
}
|
||||
|
||||
function install_font_terminess() {
|
||||
local REPO="ryanoasis/nerd-fonts"
|
||||
local REMOTE_VERSION=$(curl -s \
|
||||
https://api.github.com/repos/$REPO/releases/latest |
|
||||
grep -iEo '"tag_name":.*' |
|
||||
sed 's/"tag_name"://g;s/"//g;s/,//g;s/ //g')
|
||||
local RELEASE="Terminus.zip"
|
||||
local DEST="/tmp/Terminess"
|
||||
|
||||
if [ ! -f $HOME/Library/Fonts/TerminessNerdFont-Regular.ttf ]; then
|
||||
mkdir -p $DEST
|
||||
cd $DEST || err "Folder $DEST has been NOT found"
|
||||
wget https://github.com/$REPO/releases/download/$REMOTE_VERSION/$RELEASE -O $DEST/$RELEASE
|
||||
unzip $RELEASE -d $DEST
|
||||
mv $DEST/*.ttf ~/Library/Fonts
|
||||
cd $HOME || err "Folder $HOME has been NOT found"
|
||||
rm -rfv $DEST
|
||||
fi
|
||||
}
|
||||
|
||||
function main() {
|
||||
command_start update_pip
|
||||
command_start install_neovim_module_for_python
|
||||
command_start install_node
|
||||
command_start install_go
|
||||
# command_start install_pyright
|
||||
command_start install_mdformat
|
||||
command_start install_ruff
|
||||
command_start install_lazy
|
||||
command_start install_dlv
|
||||
command_start install_bash-language-server
|
||||
command_start install_yaml-language-server
|
||||
command_start install_marksman
|
||||
command_start install_shfmt
|
||||
command_start install_shellcheck
|
||||
command_start install_gopls
|
||||
# command_start install_terraform
|
||||
command_start install_terraform_stable
|
||||
command_start install_terragrunt
|
||||
command_start install_azure_cli
|
||||
command_start install_ansible
|
||||
command_start install_meraki_ansible
|
||||
command_start install_ansible-language-server
|
||||
command_start install_ytdlp
|
||||
command_start install_spotifydl
|
||||
command_start install_awscli
|
||||
command_start install_aws_adfs
|
||||
command_start install_speedtest
|
||||
command_start install_gh_cli
|
||||
command_start install_kubernetes
|
||||
command_start install_rust
|
||||
command_start install_tss_client
|
||||
command_start install_taplo
|
||||
command_start install_precommit
|
||||
command_start install_streamlink
|
||||
command_start install_fzf
|
||||
command_start install_winbox_old
|
||||
command_start install_prettier
|
||||
command_start install_google_cloud_sdk
|
||||
command_start install_bgpreader
|
||||
command_start install_font_terminess
|
||||
command_start install_zsh_addons
|
||||
command_start install_brew_programs
|
||||
}
|
||||
|
||||
main
|
6
.local/bin/WinBox
Executable file
6
.local/bin/WinBox
Executable file
@ -0,0 +1,6 @@
|
||||
#/bin/bash
|
||||
function main(){
|
||||
wineapp=$(readlink -f $(whereis wine64))
|
||||
"$wineapp" "~/Applications/Winbox.exe"
|
||||
}
|
||||
main
|
@ -1,177 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# PYTHON_ARGCOMPLETE_OK
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
__requires__ = ['ansible_core']
|
||||
|
||||
|
||||
import errno
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from ansible import context
|
||||
from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
|
||||
from ansible.module_utils._text import to_text
|
||||
|
||||
|
||||
# Used for determining if the system is running a new enough python version
|
||||
# and should only restrict on our documented minimum versions
|
||||
_PY38_MIN = sys.version_info[:2] >= (3, 8)
|
||||
_PY3_MIN = sys.version_info[:2] >= (3, 5)
|
||||
_PY2_MIN = (2, 6) <= sys.version_info[:2] < (3,)
|
||||
_PY_MIN = _PY3_MIN or _PY2_MIN
|
||||
if not _PY_MIN:
|
||||
raise SystemExit('ERROR: Ansible requires a minimum of Python2 version 2.6 or Python3 version 3.5. Current version: %s' % ''.join(sys.version.splitlines()))
|
||||
|
||||
|
||||
class LastResort(object):
|
||||
# OUTPUT OF LAST RESORT
|
||||
def display(self, msg, log_only=None):
|
||||
print(msg, file=sys.stderr)
|
||||
|
||||
def error(self, msg, wrap_text=None):
|
||||
print(msg, file=sys.stderr)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
display = LastResort()
|
||||
|
||||
try: # bad ANSIBLE_CONFIG or config options can force ugly stacktrace
|
||||
import ansible.constants as C
|
||||
from ansible.utils.display import Display, initialize_locale
|
||||
except AnsibleOptionsError as e:
|
||||
display.error(to_text(e), wrap_text=False)
|
||||
sys.exit(5)
|
||||
|
||||
initialize_locale()
|
||||
|
||||
cli = None
|
||||
me = os.path.basename(sys.argv[0])
|
||||
|
||||
try:
|
||||
display = Display()
|
||||
if C.CONTROLLER_PYTHON_WARNING and not _PY38_MIN:
|
||||
display.deprecated(
|
||||
(
|
||||
'Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. '
|
||||
'Current version: %s' % ''.join(sys.version.splitlines())
|
||||
),
|
||||
version='2.12',
|
||||
collection_name='ansible.builtin',
|
||||
)
|
||||
display.debug("starting run")
|
||||
|
||||
sub = None
|
||||
target = me.split('-')
|
||||
if target[-1][0].isdigit():
|
||||
# Remove any version or python version info as downstreams
|
||||
# sometimes add that
|
||||
target = target[:-1]
|
||||
|
||||
if len(target) > 1:
|
||||
sub = target[1]
|
||||
myclass = "%sCLI" % sub.capitalize()
|
||||
elif target[0] == 'ansible':
|
||||
sub = 'adhoc'
|
||||
myclass = 'AdHocCLI'
|
||||
else:
|
||||
raise AnsibleError("Unknown Ansible alias: %s" % me)
|
||||
|
||||
try:
|
||||
mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
|
||||
except ImportError as e:
|
||||
# ImportError members have changed in py3
|
||||
if 'msg' in dir(e):
|
||||
msg = e.msg
|
||||
else:
|
||||
msg = e.message
|
||||
if msg.endswith(' %s' % sub):
|
||||
raise AnsibleError("Ansible sub-program not implemented: %s" % me)
|
||||
else:
|
||||
raise
|
||||
|
||||
b_ansible_dir = os.path.expanduser(os.path.expandvars(b"~/.ansible"))
|
||||
try:
|
||||
os.mkdir(b_ansible_dir, 0o700)
|
||||
except OSError as exc:
|
||||
if exc.errno != errno.EEXIST:
|
||||
display.warning("Failed to create the directory '%s': %s"
|
||||
% (to_text(b_ansible_dir, errors='surrogate_or_replace'),
|
||||
to_text(exc, errors='surrogate_or_replace')))
|
||||
else:
|
||||
display.debug("Created the '%s' directory" % to_text(b_ansible_dir, errors='surrogate_or_replace'))
|
||||
|
||||
try:
|
||||
args = [to_text(a, errors='surrogate_or_strict') for a in sys.argv]
|
||||
except UnicodeError:
|
||||
display.error('Command line args are not in utf-8, unable to continue. Ansible currently only understands utf-8')
|
||||
display.display(u"The full traceback was:\n\n%s" % to_text(traceback.format_exc()))
|
||||
exit_code = 6
|
||||
else:
|
||||
cli = mycli(args)
|
||||
exit_code = cli.run()
|
||||
|
||||
except AnsibleOptionsError as e:
|
||||
cli.parser.print_help()
|
||||
display.error(to_text(e), wrap_text=False)
|
||||
exit_code = 5
|
||||
except AnsibleParserError as e:
|
||||
display.error(to_text(e), wrap_text=False)
|
||||
exit_code = 4
|
||||
# TQM takes care of these, but leaving comment to reserve the exit codes
|
||||
# except AnsibleHostUnreachable as e:
|
||||
# display.error(str(e))
|
||||
# exit_code = 3
|
||||
# except AnsibleHostFailed as e:
|
||||
# display.error(str(e))
|
||||
# exit_code = 2
|
||||
except AnsibleError as e:
|
||||
display.error(to_text(e), wrap_text=False)
|
||||
exit_code = 1
|
||||
except KeyboardInterrupt:
|
||||
display.error("User interrupted execution")
|
||||
exit_code = 99
|
||||
except Exception as e:
|
||||
if C.DEFAULT_DEBUG:
|
||||
# Show raw stacktraces in debug mode, It also allow pdb to
|
||||
# enter post mortem mode.
|
||||
raise
|
||||
have_cli_options = bool(context.CLIARGS)
|
||||
display.error("Unexpected Exception, this is probably a bug: %s" % to_text(e), wrap_text=False)
|
||||
if not have_cli_options or have_cli_options and context.CLIARGS['verbosity'] > 2:
|
||||
log_only = False
|
||||
if hasattr(e, 'orig_exc'):
|
||||
display.vvv('\nexception type: %s' % to_text(type(e.orig_exc)))
|
||||
why = to_text(e.orig_exc)
|
||||
if to_text(e) != why:
|
||||
display.vvv('\noriginal msg: %s' % why)
|
||||
else:
|
||||
display.display("to see the full traceback, use -vvv")
|
||||
log_only = True
|
||||
display.display(u"the full traceback was:\n\n%s" % to_text(traceback.format_exc()), log_only=log_only)
|
||||
exit_code = 250
|
||||
|
||||
sys.exit(exit_code)
|
@ -1 +0,0 @@
|
||||
ansible
|
@ -1,342 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
# Copyright: (c) 2017, Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
__metaclass__ = type
|
||||
__requires__ = ['ansible_core']
|
||||
|
||||
|
||||
import fcntl
|
||||
import hashlib
|
||||
import os
|
||||
import signal
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
import errno
|
||||
import json
|
||||
|
||||
from contextlib import contextmanager
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.six import PY3
|
||||
from ansible.module_utils.six.moves import cPickle, StringIO
|
||||
from ansible.module_utils.connection import Connection, ConnectionError, send_data, recv_data
|
||||
from ansible.module_utils.service import fork_process
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder, AnsibleJSONDecoder
|
||||
from ansible.playbook.play_context import PlayContext
|
||||
from ansible.plugins.loader import connection_loader
|
||||
from ansible.utils.path import unfrackpath, makedirs_safe
|
||||
from ansible.utils.display import Display
|
||||
from ansible.utils.jsonrpc import JsonRpcServer
|
||||
|
||||
|
||||
def read_stream(byte_stream):
|
||||
size = int(byte_stream.readline().strip())
|
||||
|
||||
data = byte_stream.read(size)
|
||||
if len(data) < size:
|
||||
raise Exception("EOF found before data was complete")
|
||||
|
||||
data_hash = to_text(byte_stream.readline().strip())
|
||||
if data_hash != hashlib.sha1(data).hexdigest():
|
||||
raise Exception("Read {0} bytes, but data did not match checksum".format(size))
|
||||
|
||||
# restore escaped loose \r characters
|
||||
data = data.replace(br'\r', b'\r')
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@contextmanager
|
||||
def file_lock(lock_path):
|
||||
"""
|
||||
Uses contextmanager to create and release a file lock based on the
|
||||
given path. This allows us to create locks using `with file_lock()`
|
||||
to prevent deadlocks related to failure to unlock properly.
|
||||
"""
|
||||
|
||||
lock_fd = os.open(lock_path, os.O_RDWR | os.O_CREAT, 0o600)
|
||||
fcntl.lockf(lock_fd, fcntl.LOCK_EX)
|
||||
yield
|
||||
fcntl.lockf(lock_fd, fcntl.LOCK_UN)
|
||||
os.close(lock_fd)
|
||||
|
||||
|
||||
class ConnectionProcess(object):
|
||||
'''
|
||||
The connection process wraps around a Connection object that manages
|
||||
the connection to a remote device that persists over the playbook
|
||||
'''
|
||||
def __init__(self, fd, play_context, socket_path, original_path, task_uuid=None, ansible_playbook_pid=None):
|
||||
self.play_context = play_context
|
||||
self.socket_path = socket_path
|
||||
self.original_path = original_path
|
||||
self._task_uuid = task_uuid
|
||||
|
||||
self.fd = fd
|
||||
self.exception = None
|
||||
|
||||
self.srv = JsonRpcServer()
|
||||
self.sock = None
|
||||
|
||||
self.connection = None
|
||||
self._ansible_playbook_pid = ansible_playbook_pid
|
||||
|
||||
def start(self, variables):
|
||||
try:
|
||||
messages = list()
|
||||
result = {}
|
||||
|
||||
messages.append(('vvvv', 'control socket path is %s' % self.socket_path))
|
||||
|
||||
# If this is a relative path (~ gets expanded later) then plug the
|
||||
# key's path on to the directory we originally came from, so we can
|
||||
# find it now that our cwd is /
|
||||
if self.play_context.private_key_file and self.play_context.private_key_file[0] not in '~/':
|
||||
self.play_context.private_key_file = os.path.join(self.original_path, self.play_context.private_key_file)
|
||||
self.connection = connection_loader.get(self.play_context.connection, self.play_context, '/dev/null',
|
||||
task_uuid=self._task_uuid, ansible_playbook_pid=self._ansible_playbook_pid)
|
||||
self.connection.set_options(var_options=variables)
|
||||
|
||||
self.connection._socket_path = self.socket_path
|
||||
self.srv.register(self.connection)
|
||||
messages.extend([('vvvv', msg) for msg in sys.stdout.getvalue().splitlines()])
|
||||
|
||||
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
self.sock.bind(self.socket_path)
|
||||
self.sock.listen(1)
|
||||
messages.append(('vvvv', 'local domain socket listeners started successfully'))
|
||||
except Exception as exc:
|
||||
messages.extend(self.connection.pop_messages())
|
||||
result['error'] = to_text(exc)
|
||||
result['exception'] = traceback.format_exc()
|
||||
finally:
|
||||
result['messages'] = messages
|
||||
self.fd.write(json.dumps(result, cls=AnsibleJSONEncoder))
|
||||
self.fd.close()
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
while not self.connection._conn_closed:
|
||||
signal.signal(signal.SIGALRM, self.connect_timeout)
|
||||
signal.signal(signal.SIGTERM, self.handler)
|
||||
signal.alarm(self.connection.get_option('persistent_connect_timeout'))
|
||||
|
||||
self.exception = None
|
||||
(s, addr) = self.sock.accept()
|
||||
signal.alarm(0)
|
||||
signal.signal(signal.SIGALRM, self.command_timeout)
|
||||
while True:
|
||||
data = recv_data(s)
|
||||
if not data:
|
||||
break
|
||||
log_messages = self.connection.get_option('persistent_log_messages')
|
||||
|
||||
if log_messages:
|
||||
display.display("jsonrpc request: %s" % data, log_only=True)
|
||||
|
||||
request = json.loads(to_text(data, errors='surrogate_or_strict'))
|
||||
if request.get('method') == "exec_command" and not self.connection.connected:
|
||||
self.connection._connect()
|
||||
|
||||
signal.alarm(self.connection.get_option('persistent_command_timeout'))
|
||||
|
||||
resp = self.srv.handle_request(data)
|
||||
signal.alarm(0)
|
||||
|
||||
if log_messages:
|
||||
display.display("jsonrpc response: %s" % resp, log_only=True)
|
||||
|
||||
send_data(s, to_bytes(resp))
|
||||
|
||||
s.close()
|
||||
|
||||
except Exception as e:
|
||||
# socket.accept() will raise EINTR if the socket.close() is called
|
||||
if hasattr(e, 'errno'):
|
||||
if e.errno != errno.EINTR:
|
||||
self.exception = traceback.format_exc()
|
||||
else:
|
||||
self.exception = traceback.format_exc()
|
||||
|
||||
finally:
|
||||
# allow time for any exception msg send over socket to receive at other end before shutting down
|
||||
time.sleep(0.1)
|
||||
|
||||
# when done, close the connection properly and cleanup the socket file so it can be recreated
|
||||
self.shutdown()
|
||||
|
||||
def connect_timeout(self, signum, frame):
|
||||
msg = 'persistent connection idle timeout triggered, timeout value is %s secs.\nSee the timeout setting options in the Network Debug and ' \
|
||||
'Troubleshooting Guide.' % self.connection.get_option('persistent_connect_timeout')
|
||||
display.display(msg, log_only=True)
|
||||
raise Exception(msg)
|
||||
|
||||
def command_timeout(self, signum, frame):
|
||||
msg = 'command timeout triggered, timeout value is %s secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide.'\
|
||||
% self.connection.get_option('persistent_command_timeout')
|
||||
display.display(msg, log_only=True)
|
||||
raise Exception(msg)
|
||||
|
||||
def handler(self, signum, frame):
|
||||
msg = 'signal handler called with signal %s.' % signum
|
||||
display.display(msg, log_only=True)
|
||||
raise Exception(msg)
|
||||
|
||||
def shutdown(self):
|
||||
""" Shuts down the local domain socket
|
||||
"""
|
||||
lock_path = unfrackpath("%s/.ansible_pc_lock_%s" % os.path.split(self.socket_path))
|
||||
if os.path.exists(self.socket_path):
|
||||
try:
|
||||
if self.sock:
|
||||
self.sock.close()
|
||||
if self.connection:
|
||||
self.connection.close()
|
||||
if self.connection.get_option("persistent_log_messages"):
|
||||
for _level, message in self.connection.pop_messages():
|
||||
display.display(message, log_only=True)
|
||||
except Exception:
|
||||
pass
|
||||
finally:
|
||||
if os.path.exists(self.socket_path):
|
||||
os.remove(self.socket_path)
|
||||
setattr(self.connection, '_socket_path', None)
|
||||
setattr(self.connection, '_connected', False)
|
||||
|
||||
if os.path.exists(lock_path):
|
||||
os.remove(lock_path)
|
||||
|
||||
display.display('shutdown complete', log_only=True)
|
||||
|
||||
|
||||
def main():
|
||||
""" Called to initiate the connect to the remote device
|
||||
"""
|
||||
rc = 0
|
||||
result = {}
|
||||
messages = list()
|
||||
socket_path = None
|
||||
|
||||
# Need stdin as a byte stream
|
||||
if PY3:
|
||||
stdin = sys.stdin.buffer
|
||||
else:
|
||||
stdin = sys.stdin
|
||||
|
||||
# Note: update the below log capture code after Display.display() is refactored.
|
||||
saved_stdout = sys.stdout
|
||||
sys.stdout = StringIO()
|
||||
|
||||
try:
|
||||
# read the play context data via stdin, which means depickling it
|
||||
vars_data = read_stream(stdin)
|
||||
init_data = read_stream(stdin)
|
||||
|
||||
if PY3:
|
||||
pc_data = cPickle.loads(init_data, encoding='bytes')
|
||||
variables = cPickle.loads(vars_data, encoding='bytes')
|
||||
else:
|
||||
pc_data = cPickle.loads(init_data)
|
||||
variables = cPickle.loads(vars_data)
|
||||
|
||||
play_context = PlayContext()
|
||||
play_context.deserialize(pc_data)
|
||||
display.verbosity = play_context.verbosity
|
||||
|
||||
except Exception as e:
|
||||
rc = 1
|
||||
result.update({
|
||||
'error': to_text(e),
|
||||
'exception': traceback.format_exc()
|
||||
})
|
||||
|
||||
if rc == 0:
|
||||
ssh = connection_loader.get('ssh', class_only=True)
|
||||
ansible_playbook_pid = sys.argv[1]
|
||||
task_uuid = sys.argv[2]
|
||||
cp = ssh._create_control_path(play_context.remote_addr, play_context.port, play_context.remote_user, play_context.connection, ansible_playbook_pid)
|
||||
# create the persistent connection dir if need be and create the paths
|
||||
# which we will be using later
|
||||
tmp_path = unfrackpath(C.PERSISTENT_CONTROL_PATH_DIR)
|
||||
makedirs_safe(tmp_path)
|
||||
|
||||
socket_path = unfrackpath(cp % dict(directory=tmp_path))
|
||||
lock_path = unfrackpath("%s/.ansible_pc_lock_%s" % os.path.split(socket_path))
|
||||
|
||||
with file_lock(lock_path):
|
||||
if not os.path.exists(socket_path):
|
||||
messages.append(('vvvv', 'local domain socket does not exist, starting it'))
|
||||
original_path = os.getcwd()
|
||||
r, w = os.pipe()
|
||||
pid = fork_process()
|
||||
|
||||
if pid == 0:
|
||||
try:
|
||||
os.close(r)
|
||||
wfd = os.fdopen(w, 'w')
|
||||
process = ConnectionProcess(wfd, play_context, socket_path, original_path, task_uuid, ansible_playbook_pid)
|
||||
process.start(variables)
|
||||
except Exception:
|
||||
messages.append(('error', traceback.format_exc()))
|
||||
rc = 1
|
||||
|
||||
if rc == 0:
|
||||
process.run()
|
||||
else:
|
||||
process.shutdown()
|
||||
|
||||
sys.exit(rc)
|
||||
|
||||
else:
|
||||
os.close(w)
|
||||
rfd = os.fdopen(r, 'r')
|
||||
data = json.loads(rfd.read(), cls=AnsibleJSONDecoder)
|
||||
messages.extend(data.pop('messages'))
|
||||
result.update(data)
|
||||
|
||||
else:
|
||||
messages.append(('vvvv', 'found existing local domain socket, using it!'))
|
||||
conn = Connection(socket_path)
|
||||
conn.set_options(var_options=variables)
|
||||
pc_data = to_text(init_data)
|
||||
try:
|
||||
conn.update_play_context(pc_data)
|
||||
conn.set_check_prompt(task_uuid)
|
||||
except Exception as exc:
|
||||
# Only network_cli has update_play context and set_check_prompt, so missing this is
|
||||
# not fatal e.g. netconf
|
||||
if isinstance(exc, ConnectionError) and getattr(exc, 'code', None) == -32601:
|
||||
pass
|
||||
else:
|
||||
result.update({
|
||||
'error': to_text(exc),
|
||||
'exception': traceback.format_exc()
|
||||
})
|
||||
|
||||
if os.path.exists(socket_path):
|
||||
messages.extend(Connection(socket_path).pop_messages())
|
||||
messages.append(('vvvv', sys.stdout.getvalue()))
|
||||
result.update({
|
||||
'messages': messages,
|
||||
'socket_path': socket_path
|
||||
})
|
||||
|
||||
sys.stdout = saved_stdout
|
||||
if 'exception' in result:
|
||||
rc = 1
|
||||
sys.stderr.write(json.dumps(result, cls=AnsibleJSONEncoder))
|
||||
else:
|
||||
rc = 0
|
||||
sys.stdout.write(json.dumps(result, cls=AnsibleJSONEncoder))
|
||||
|
||||
sys.exit(rc)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
display = Display()
|
||||
main()
|
@ -1 +0,0 @@
|
||||
ansible
|
@ -1 +0,0 @@
|
||||
ansible
|
@ -1 +0,0 @@
|
||||
ansible
|
@ -1 +0,0 @@
|
||||
ansible
|
@ -1 +0,0 @@
|
||||
ansible
|
@ -1 +0,0 @@
|
||||
ansible
|
@ -1,28 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
# PYTHON_ARGCOMPLETE_OK
|
||||
"""Command line entry point for ansible-test."""
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
"""Main program entry point."""
|
||||
ansible_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
source_root = os.path.join(ansible_root, 'test', 'lib')
|
||||
|
||||
if os.path.exists(os.path.join(source_root, 'ansible_test', '_internal', 'cli.py')):
|
||||
# running from source, use that version of ansible-test instead of any version that may already be installed
|
||||
sys.path.insert(0, source_root)
|
||||
|
||||
# noinspection PyProtectedMember
|
||||
from ansible_test._internal.cli import main as cli_main
|
||||
|
||||
cli_main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -1 +0,0 @@
|
||||
ansible
|
@ -1,17 +1,21 @@
|
||||
#!/bin/bash
|
||||
source ~/.password
|
||||
source $HOME/.password
|
||||
mkdir -p ~/Movies/{Anime,Videos}
|
||||
mkdir -p ~/Music
|
||||
|
||||
#sudo mount -t cifs //192.168.0.220/Mega -o username=${USERNAME},password=${PASSWORD},vers=2\.0 /mnt/Synology
|
||||
#sudo mount -t cifs //192.168.0.220/Mega -o username=${USERNAME},password=${PASSWORD},vers=2\.0 /mnt/synology
|
||||
#sudo mount -t cifs //192.168.0.220/music -o username=${USERNAME},password=${PASSWORD},vers=2\.0 ~/Music
|
||||
#sudo mount -t cifs //192.168.0.220/usbshare1/Video -o username=${USERNAME},password=${PASSWORD},vers=2\.0 ~/Movies/Videos
|
||||
#sudo mount -t cifs //192.168.0.220/usbshare1/Anime -o username=${USERNAME},password=${PASSWORD},vers=2\.0 ~/Movies/Anime
|
||||
#sudo mount -t cifs //192.168.0.220/Studia -o username=${USERNAME},password=${PASSWORD},vers=2\.0 ~/Collage
|
||||
|
||||
if [ -e /mnt/Synology/Systems ]
|
||||
if [ -e /mnt/synology/Systems ]
|
||||
then
|
||||
echo "Starting $(date)" > ~/.cache/.logSynology
|
||||
sudo rsync -r --bwlimit=1024 --update --progress /usr/mega/ /mnt/Synology >> ~/.cache/.logSynology
|
||||
sudo rsync -r --bwlimit=512 --update --progress /home/yorune/MEGA/ /mnt/synology >> ~/.cache/.logSynology
|
||||
rsync -r --bwlimit=512 --update --progress \
|
||||
/home/yorune/Documents/Mega-Documents/Magisterka-Marcin/ \
|
||||
~/Documents/Collage/Magisterka-Marcin
|
||||
cp -rv /home/yorune/git/{dwm,dwmblocks,st,dmenu,mons,slock} ~/MEGA/Systems/Linux/apps
|
||||
echo "Ending $(date)" >> ~/.cache/.logSynology
|
||||
fi
|
||||
|
35
.local/bin/backupSynologyMac
Executable file
35
.local/bin/backupSynologyMac
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
MEGA_VOLUME="/Volumes/MEGA"
|
||||
MEGA="$HOME/MEGA"
|
||||
STARTED="$HOME/.config/backup-started-$(date +%d-%m)"
|
||||
|
||||
function main() {
|
||||
if [[ ! -e "$STARTED" ]]; then
|
||||
touch "$STARTED" && echo -e "[LOG] $(date) Created the file $STARTED"
|
||||
|
||||
echo -e "[LOG] $(date) Started $HOME/.ssh/ -> $MEGA/ssh"
|
||||
rsync --bwlimit=2048 --update --progress -r "$HOME/.ssh/" "$MEGA/ssh/"
|
||||
echo -e "[LOG] $(date) Finished $HOME/.ssh/ -> $MEGA/ssh"
|
||||
|
||||
echo -e "[LOG] $(date) Started $HOME/.gnupg/ -> $MEGA/gnupg"
|
||||
rsync --bwlimit=2048 --update --progress -r "$HOME/.gnupg/" "$MEGA/gnupg/"
|
||||
echo -e "[LOG] $(date) Finished $HOME/.gnupg/ -> $MEGA/gnupg"
|
||||
|
||||
if [[ -e "$MEGA_VOLUME" ]]; then
|
||||
echo -e "[LOG] $(date) Started $MEGA -> $MEGA_VOLUME"
|
||||
rsync --bwlimit=2048 --update --progress -r --exclude '.DS_Store' \
|
||||
--exclude '.debris' \
|
||||
--exclude 'Icon*' \
|
||||
"$MEGA/" "$MEGA_VOLUME/"
|
||||
else
|
||||
echo -e "[ERROR] The folder $MEGA_VOLUME does NOT exist"
|
||||
fi
|
||||
|
||||
echo -e "[LOG] $(date) Removed the files $STARTED and $STARTED *"
|
||||
rm -rf "$STARTED"
|
||||
rm -rf "$HOME/.config/backup-started-*"
|
||||
fi
|
||||
}
|
||||
|
||||
main >"$HOME/.config/backup.log"
|
58
.local/bin/bgp-check
Executable file
58
.local/bin/bgp-check
Executable file
@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Marcin Wozniak
|
||||
# Last edit: 2023-05-05
|
||||
#
|
||||
# shellcheck disable=1091
|
||||
################################################################################
|
||||
|
||||
set -u
|
||||
set -e
|
||||
|
||||
# Colours
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;0;32m'
|
||||
NC='\033[0m'
|
||||
|
||||
ADDR=$1
|
||||
LOG_FILE="bgp-$ADDR-$(date -I).log"
|
||||
|
||||
function timestamp() {
|
||||
echo -e "${GREEN}[+]${NC} $(date +'%F %T') [INFO] $*"
|
||||
}
|
||||
|
||||
function err() {
|
||||
echo -e "${RED}[-] $(date +'%F %T') [ERROR] $*${NC}" >&2
|
||||
}
|
||||
|
||||
function command_start() {
|
||||
timestamp "Command $* has been started."
|
||||
if ! "$@"; then
|
||||
err "Command $* went wrong."
|
||||
exit 0
|
||||
fi
|
||||
timestamp "Command $* has been ended."
|
||||
}
|
||||
|
||||
function bgpcheck() {
|
||||
timestamp "CHECKING BGP FOR $ADDR at RT.IR9.AMS.NL.retn.net"
|
||||
curl --silent \
|
||||
"https://lg.retn.net/cgi/LG.cgi?r=87&p=4&q=b&a=$ADDR" |
|
||||
sed '/table>/d;/<link/d;/<meta/d;/tr>/d;/td>/d;/query/d;/html/d;/head/d;/title/d;/img/d;/body/d;/center/d;/h2/d;/<p>/d;/<hr /d '
|
||||
timestamp "---------------------------------------"
|
||||
|
||||
timestamp "CHECKING BGP FOR $ADDR at RT.NIA.POZ.PL.retn.net"
|
||||
curl --silent \
|
||||
"https://lg.retn.net/cgi/LG.cgi?r=ab&p=4&q=b&a=$ADDR" |
|
||||
sed '/table>/d;/<link/d;/<meta/d;/tr>/d;/td>/d;/query/d;/html/d;/head/d;/title/d;/img/d;/body/d;/center/d;/h2/d;/<p>/d;/<hr /d'
|
||||
timestamp "---------------------------------------"
|
||||
|
||||
}
|
||||
|
||||
function main() {
|
||||
command_start bgpcheck
|
||||
}
|
||||
|
||||
main | tee "$LOG_FILE"
|
@ -6,6 +6,7 @@ export QT_IM_MODULE=ibus
|
||||
KERNEL=$(uname -sr)
|
||||
[[ $KERNEL =~ "icrosoft" ]] && "/mnt/c/Program Files/Mozilla Firefox/firefox.exe" "$@"
|
||||
[[ $KERNEL =~ "gentoo" ]] && GDK_DPI_SCALE="1.2" firefox "$@"
|
||||
[[ $KERNEL =~ "Darwin" ]] && open -a Firefox\ Nightly "$@"
|
||||
#[[ $KERNEL =~ "gentoo" ]] && __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia __GL_SYNC_TO_VBLANK=0 GDK_DPI_SCALE="1.2" firefox "$@"
|
||||
|
||||
# Firefox
|
||||
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
java -jar $HOME/.local/bin/Chatty/Chatty.jar 2>/dev/null
|
2
.local/bin/chatty-run
Executable file
2
.local/bin/chatty-run
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
java -jar "$HOME"/.local/bin/Chatty/Chatty.jar 2>/dev/null
|
21
.local/bin/cidr2mask
Executable file
21
.local/bin/cidr2mask
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
cidr2mask() {
|
||||
local i mask=""
|
||||
local full_octets=$(($1 / 8))
|
||||
local partial_octet=$(($1 % 8))
|
||||
|
||||
for ((i = 0; i < 4; i += 1)); do
|
||||
if [ $i -lt $full_octets ]; then
|
||||
mask+=255
|
||||
elif [ $i -eq $full_octets ]; then
|
||||
mask+=$((256 - 2 ** (8 - partial_octet)))
|
||||
else
|
||||
mask+=0
|
||||
fi
|
||||
test $i -lt 3 && mask+=.
|
||||
done
|
||||
|
||||
echo $mask
|
||||
}
|
||||
|
||||
cidr2mask "$@"
|
@ -1,9 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
sudo rm -rf /var/tmp/portage/*
|
||||
sudo rm -rf /var/tmp/binpkgs/*
|
||||
sudo rm -rf /var/tmp/genkernel/*
|
||||
sudo rm -rf /var/cache/genkernel/*
|
||||
"$HOME/.local/bin/cleanertmp"
|
||||
sudo emerge -a --depclean
|
||||
sudo emerge -a @preserved-rebuild
|
||||
sudo eclean -C -q packages
|
||||
|
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
sudo rm -rf /var/tmp/portage/*
|
||||
sudo rm -rf /var/tmp/binpkgs/*
|
||||
sudo rm -rf /var/tmp/genkernel/*
|
||||
sudo rm -rf /var/cache/genkernel/*
|
||||
sudo rm -rf /var/tmpnotmpfs/portage/*
|
||||
sudo eclean-dist -d
|
||||
sudo eclean-pkg -d
|
||||
|
12
.local/bin/debugger
Executable file
12
.local/bin/debugger
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
FILE="$(readlink -f "$(echo "$*" | cut -d' ' -f2)" 2>/dev/null)"
|
||||
|
||||
if [ -f "$FILE" ] ; then
|
||||
case "$FILE" in
|
||||
*.py) python3 -m pdb "$FILE" ;;
|
||||
*.sh) /bin/bash -ex "$FILE" ;;
|
||||
*) printf "File \"%s\" not debugger found.\\n" "$FILE"
|
||||
esac
|
||||
printf "File \"%s\" not found.\\n" "$FILE"
|
||||
fi
|
@ -14,4 +14,4 @@
|
||||
|
||||
sudo rc-service docker start
|
||||
sleep 10
|
||||
sudo docker ps
|
||||
sudo docker ps --all
|
||||
|
@ -1,2 +1,9 @@
|
||||
#!/bin/bash
|
||||
for i in /usr/repos/*/.git; do ( echo $i; cd $i/..; sudo git pull; ); done
|
||||
|
||||
if [ -e /etc/portage/make.conf ]; then
|
||||
. /etc/portage/make.conf
|
||||
if [ ! -d $PORTDIR/metadata/md5-cache -o -d $PORTDIR/.git ]; then
|
||||
echo "updating metadata cache ..."
|
||||
egencache --repo=gentoo --update
|
||||
fi
|
||||
fi
|
||||
|
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
LOGS=( $(sudo find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") )
|
||||
LEN=${#LOGS[@]}
|
||||
|
||||
for (( i=0; i<$LEN; i++ ));
|
||||
do
|
||||
echo "$(( $i + 1 )) - ${LOGS[$i]}"
|
||||
done
|
||||
|
||||
echo
|
||||
read -p 'Select number to show logs: ' NUMBER
|
||||
|
||||
sudo tail -f ${LOGS[$NUMBER-1]}
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python3.8
|
||||
#!/usr/bin/python3.9
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python3.8
|
||||
#!/usr/bin/python3.9
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
|
16
.local/bin/ffmpeg-resize-sub
Executable file
16
.local/bin/ffmpeg-resize-sub
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
FILE_FFMPEG="$1"
|
||||
ffmpeg -i "$FILE_FFMPEG" \
|
||||
-vf "scale=1920:1080" \
|
||||
-c:v h264_videotoolbox \
|
||||
-b:v 3000k \
|
||||
-preset medium \
|
||||
-movflags \
|
||||
+faststart \
|
||||
-c:a aac \
|
||||
-b:a 192k \
|
||||
-ac 2 \
|
||||
-map 0:v \
|
||||
-map 0:a \
|
||||
-map 0:s \
|
||||
-c:s copy resized.mkv
|
44
.local/bin/get-meraki-network-list
Executable file
44
.local/bin/get-meraki-network-list
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Marcin Wozniak
|
||||
# y0rune@aol.com
|
||||
#
|
||||
# That script is for easier getting a Meraki network list
|
||||
#
|
||||
# shellcheck disable=1091,2048
|
||||
################################################################################
|
||||
|
||||
set -e
|
||||
|
||||
function timestamp() {
|
||||
echo "[+] $(date +'%F %T') [INFO] $*"
|
||||
}
|
||||
|
||||
function err() {
|
||||
echo "[-] $(date +'%F %T') [ERROR] $*" >&2
|
||||
}
|
||||
|
||||
function command_start() {
|
||||
timestamp "Command $* has been started."
|
||||
if ! $*; then
|
||||
err "Command $* went wrong."
|
||||
exit
|
||||
fi
|
||||
timestamp "Command $* has been ended."
|
||||
}
|
||||
|
||||
function main() {
|
||||
[ -z "$MERAKI_API_KEY" ] && err "Meraki Key is not set up. Please set it via export MERAKI_API_KEY=<XXXXX>"
|
||||
[ -z "$MERAKI_ORG_ID" ] && err "Meraki Organization ID is not set up. Please set it via export MERAKI_ORG_ID=<XXXXX>"
|
||||
|
||||
timestamp "Getting a list of the network"
|
||||
curl --silent \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'X-Cisco-Meraki-API-Key: '"$MERAKI_API_KEY"'' \
|
||||
https://api.meraki.com/api/v1/organizations/"$MERAKI_ORG_ID"/networks |
|
||||
jq -M '.[] | .id + " " + .name'
|
||||
}
|
||||
|
||||
main "$@"
|
63
.local/bin/getting-spotify
Executable file
63
.local/bin/getting-spotify
Executable file
@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
|
||||
FOLDER_AUDIOBOOK="/Volumes/Music/Jellyfin/Playlist-Audiobook"
|
||||
FOLDER_FAV="/Volumes/Music/Jellyfin/Playlist-Fav"
|
||||
FOLDER_DUB="/Volumes/Music/Jellyfin/Playlist-Dub"
|
||||
FOLDER_PIANO="/Volumes/Music/Jellyfin/Playlist-Piano"
|
||||
|
||||
# Check if folder exists
|
||||
[ ! -d $FOLDER_AUDIOBOOK ] && exit 1
|
||||
[ ! -d $FOLDER_DUB ] && exit 1
|
||||
[ ! -d $FOLDER_FAV ] && exit 1
|
||||
[ ! -d $FOLDER_PIANO ] && exit 1
|
||||
|
||||
# Remove old files
|
||||
rm -rfv $FOLDER_AUDIOBOOK/errors.txt
|
||||
rm -rfv $FOLDER_DUB/errors.txt
|
||||
rm -rfv $FOLDER_FAV/errors.txt
|
||||
rm -rfv $FOLDER_PIANO/errors.txt
|
||||
|
||||
# Download new files for DUB
|
||||
cd $FOLDER_DUB || exit 1
|
||||
spotdl --user-auth --keep-alive \
|
||||
--threads 8 \
|
||||
--output "{artist}/{album}/{track-number} - {title}.{output-ext}" \
|
||||
download "https://open.spotify.com/playlist/5Y6hRcNinZaoZGiadaXDEC?si=78d89f9a1a974fdf" \
|
||||
--print-errors \
|
||||
--save-errors $FOLDER_DUB/errors.txt \
|
||||
--yt-dlp-args no-check-certificates
|
||||
|
||||
# Download new files for NEW
|
||||
cd $FOLDER_FAV || exit 1
|
||||
spotdl --user-auth --keep-alive \
|
||||
--threads 8 \
|
||||
--output "{artist}/{album}/{track-number} - {title}.{output-ext}" \
|
||||
download "https://open.spotify.com/playlist/2P063NZZOPC9gvZrPAHZh9?si=33c34cdd981c4949" \
|
||||
--print-errors \
|
||||
--save-errors $FOLDER_FAV/errors.txt \
|
||||
--yt-dlp-args no-check-certificates
|
||||
|
||||
# Sync to Jellyfin
|
||||
rsync -h --progress --recursive --ignore-existing \
|
||||
$FOLDER_AUDIOBOOK/* docker-de:/mnt/HC_Volume_34966154/jellifin/media/music/Audiobook
|
||||
|
||||
rsync -h --progress --recursive --ignore-existing \
|
||||
$FOLDER_DUB/* docker-de:/mnt/HC_Volume_34966154/jellifin/media/music/Dub
|
||||
|
||||
rsync -h --progress --recursive --ignore-existing \
|
||||
$FOLDER_FAV/* docker-de:/mnt/HC_Volume_34966154/jellifin/media/music/Fav
|
||||
|
||||
rsync -h --progress --recursive --ignore-existing \
|
||||
$FOLDER_PIANO/* docker-de:/mnt/HC_Volume_34966154/jellifin/media/music/Piano
|
||||
|
||||
# Generate playlist
|
||||
ssh docker-de -t "cd /mnt/HC_Volume_34966154/jellifin/media/music/Audiobook; find . -type f \( -name '*.mp3' -o -name '*.flac' -o -name '*.loss' -o -name '*.aiff' -o -name '*.aif' \) -printf './%P\n' | sort > playlist.m3u"
|
||||
|
||||
ssh docker-de -t "cd /mnt/HC_Volume_34966154/jellifin/media/music/Dub; find . -type f \( -name '*.mp3' -o -name '*.flac' -o -name '*.loss' -o -name '*.aiff' -o -name '*.aif' \) -printf './%P\n' | sort > playlist.m3u"
|
||||
|
||||
ssh docker-de -t "cd /mnt/HC_Volume_34966154/jellifin/media/music/Fav; find . -type f \( -name '*.mp3' -o -name '*.flac' -o -name '*.loss' -o -name '*.aiff' -o -name '*.aif' \) -printf './%P\n' | sort > playlist.m3u"
|
||||
|
||||
ssh docker-de -t "cd /mnt/HC_Volume_34966154/jellifin/media/music/Piano; find . -type f \( -name '*.mp3' -o -name '*.flac' -o -name '*.loss' -o -name '*.aiff' -o -name '*.aif' \) -printf './%P\n' | sort > playlist.m3u"
|
||||
|
||||
# Fix permissions
|
||||
ssh docker-de -t 'chown docker-user: /mnt/HC_Volume_34966154/jellifin -R'
|
3
.local/bin/gfg
Executable file
3
.local/bin/gfg
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
BRANCH_GIT=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
|
||||
git checkout "$BRANCH_GIT" && git fetch upstream && git pull upstream "$BRANCH_GIT"
|
52
.local/bin/git-delete-branch
Executable file
52
.local/bin/git-delete-branch
Executable file
@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck disable=2162
|
||||
|
||||
function delete_local_branch() {
|
||||
git branch -D "$1"
|
||||
}
|
||||
|
||||
function delete_remote_branch() {
|
||||
git push origin --delete "$1"
|
||||
}
|
||||
|
||||
function list_of_the_branches() {
|
||||
echo
|
||||
echo "List of branches:"
|
||||
echo -e "$(git branch)"
|
||||
echo
|
||||
}
|
||||
|
||||
function remove_branch() {
|
||||
BRANCH="$1"
|
||||
echo "$BRANCH"
|
||||
read -p "Remove locally / remote / both [L/R/B]: " CHOOSE
|
||||
case $CHOOSE in
|
||||
[Bb]*)
|
||||
delete_local_branch "$BRANCH"
|
||||
delete_remote_branch "$BRANCH"
|
||||
unset -f BRANCH
|
||||
;;
|
||||
[Ll]*)
|
||||
delete_local_branch "$BRANCH"
|
||||
unset -f BRANCH
|
||||
;;
|
||||
[Rr]*)
|
||||
delete_remote_branch "$BRANCH"
|
||||
unset -f BRANCH
|
||||
;;
|
||||
*) echo "Please write good answer" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
BRANCH="$1"
|
||||
|
||||
if [ -z "$BRANCH" ]; then
|
||||
while true; do
|
||||
list_of_the_branches
|
||||
read -p "Select branch to remove: " BRANCH
|
||||
remove_branch "$BRANCH"
|
||||
done
|
||||
else
|
||||
remove_branch "$BRANCH"
|
||||
fi
|
9
.local/bin/gswitch
Executable file
9
.local/bin/gswitch
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
BRANCH=$1
|
||||
git checkout main
|
||||
git checkout master
|
||||
git checkout -b "$BRANCH"
|
||||
git checkout "$BRANCH"
|
||||
git branch --set-upstream-to=origin/"$BRANCH" "$BRANCH"
|
||||
git pull
|
||||
git reset --hard origin/"$BRANCH"
|
10
.local/bin/jupyter-note
Executable file
10
.local/bin/jupyter-note
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
docker stop "$(docker ps --all | grep -i jupyter | awk '{print $1}')" >/dev/null
|
||||
docker rm "$(docker ps --all | grep -i jupyter | awk '{print $1}')" >/dev/null
|
||||
docker pull jupyter/scipy-notebook:latest
|
||||
docker run \
|
||||
--rm \
|
||||
-p 8888:8888 \
|
||||
-e JUPYTER_ENABLE_LAB=yes \
|
||||
-v "$HOME/MEGA/Documents/Collage/":/home/jovyan/ \
|
||||
jupyter/scipy-notebook
|
20
.local/bin/mask2cidr
Executable file
20
.local/bin/mask2cidr
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
mask2cidr() {
|
||||
local mask=$1
|
||||
|
||||
# In RFC 4632 netmasks there's no "255." after a non-255 byte in the mask
|
||||
local left_stripped_mask=${mask##*255.}
|
||||
local len_mask=${#mask}
|
||||
local len_left_stripped_mask=${#left_stripped_mask}
|
||||
|
||||
local conversion_table=0^^^128^192^224^240^248^252^254^
|
||||
local number_of_bits_stripped=$(((len_mask - len_left_stripped_mask) * 2))
|
||||
local signifacant_octet=${left_stripped_mask%%.*}
|
||||
|
||||
local right_stripped_conversion_table=${conversion_table%%$signifacant_octet*}
|
||||
local len_right_stripped_conversion_table=${#right_stripped_conversion_table}
|
||||
local number_of_bits_from_conversion_table=$((len_right_stripped_conversion_table / 4))
|
||||
echo $((number_of_bits_stripped + number_of_bits_from_conversion_table))
|
||||
}
|
||||
|
||||
mask2cidr "$@"
|
19
.local/bin/mount-synology
Executable file
19
.local/bin/mount-synology
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
~/.local/bin/sidebar-restore-macos
|
||||
open -gj "afp://10.0.0.14/Downloads"
|
||||
open -gj "afp://10.0.0.14/Anime"
|
||||
open -gj "afp://10.0.0.14/Music"
|
||||
open -gj "afp://10.0.0.14/Video"
|
||||
open -gj "afp://10.0.0.14/Series"
|
||||
open -gj "afp://10.0.0.14/Photos"
|
||||
open -gj "afp://10.0.0.14/Backups"
|
||||
open -gj "afp://10.0.0.14/Recordings"
|
||||
|
||||
/usr/local/bin/mysides add Synology file:///Volumes/Recordings/
|
||||
/usr/local/bin/mysides add Synology file:///Volumes/Backups/
|
||||
/usr/local/bin/mysides add Synology file:///Volumes/Downloads/
|
||||
/usr/local/bin/mysides add Synology file:///Volumes/Music/
|
||||
/usr/local/bin/mysides add Synology file:///Volumes/Video/
|
||||
/usr/local/bin/mysides add Synology file:///Volumes/Series/
|
||||
/usr/local/bin/mysides add Synology file:///Volumes/Photos/
|
||||
/usr/local/bin/mysides add Synology file:///Volumes/Anime/
|
@ -2,3 +2,4 @@
|
||||
KERNEL=$(uname -sr)
|
||||
[[ $KERNEL =~ "icrosoft" ]] && $HOME/.local/bin/wsl-notify "$@"
|
||||
[[ $KERNEL =~ "gentoo" ]] && /usr/bin/notify-send "$@"
|
||||
[[ $KERNEL =~ "Darwin" ]] && osascript -e "display notification \"$*\""
|
||||
|
48
.local/bin/pinger
Executable file
48
.local/bin/pinger
Executable file
@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Marcin Wozniak
|
||||
# Last edit: 2023-05-05
|
||||
#
|
||||
# shellcheck disable=1091
|
||||
################################################################################
|
||||
|
||||
set -u
|
||||
set -e
|
||||
|
||||
# Colours
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;0;32m'
|
||||
NC='\033[0m'
|
||||
|
||||
ADDR=$1
|
||||
LOG_FILE="pinger-$ADDR-$(date -I).log"
|
||||
|
||||
function timestamp() {
|
||||
echo -e "${GREEN}[+]${NC} $(date +'%F %T') [INFO] $*"
|
||||
}
|
||||
|
||||
function err() {
|
||||
echo -e "${RED}[-] $(date +'%F %T') [ERROR] $*${NC}" >&2
|
||||
}
|
||||
|
||||
function command_start() {
|
||||
timestamp "Command $* has been started."
|
||||
if ! "$@"; then
|
||||
err "Command $* went wrong."
|
||||
# sendmailerr
|
||||
exit 0
|
||||
fi
|
||||
timestamp "Command $* has been ended."
|
||||
}
|
||||
|
||||
function pinger() {
|
||||
ping "$ADDR" | while read pong; do timestamp "$pong"; done
|
||||
}
|
||||
|
||||
function main() {
|
||||
command_start pinger
|
||||
}
|
||||
|
||||
main | tee "$LOG_FILE"
|
11
.local/bin/sidebar-restore-macos
Executable file
11
.local/bin/sidebar-restore-macos
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
/usr/local/bin/mysides remove all
|
||||
/usr/local/bin/mysides add yorune file:///Users/yorune/
|
||||
/usr/local/bin/mysides add Git file:///Users/yorune/git/
|
||||
/usr/local/bin/mysides add Linux file:///Users/yorune/MEGA/Systems/Linux/
|
||||
/usr/local/bin/mysides add Downloads file:///Users/yorune/Downloads/
|
||||
/usr/local/bin/mysides add Aplikacje file:///Applications/
|
||||
/usr/local/bin/mysides add Pictures file:///Users/yorune/Pictures/
|
||||
/usr/local/bin/mysides add Screenshots file:///Users/yorune/Screenshots/
|
||||
/usr/local/bin/mysides add Movies file:///Users/yorune/Movies/
|
||||
/usr/local/bin/mysides add Desktop file:///Users/yorune/Desktop/
|
File diff suppressed because it is too large
Load Diff
@ -2,5 +2,13 @@ chmod 700 ~/.ssh
|
||||
chmod 644 ~/.ssh/authorized_keys
|
||||
chmod 644 ~/.ssh/known_hosts
|
||||
chmod 644 ~/.ssh/config
|
||||
chmod 400 ~/.ssh/id_rsa
|
||||
chmod 400 ~/.ssh/id_rsa.pub
|
||||
# chmod 400 ~/.ssh/id_rsa
|
||||
# chmod 400 ~/.ssh/id_rsa.pub
|
||||
# chmod 400 ~/.ssh/*/id_rsa
|
||||
# chmod 400 ~/.ssh/*/id_rsa.pub
|
||||
|
||||
chmod 600 ~/.ssh/*/id_rsa
|
||||
chmod 600 ~/.ssh/*/id_rsa.pub
|
||||
chmod 600 ~/.ssh/authorized_keys
|
||||
chmod 600 ~/.ssh/known_hosts
|
||||
chmod 600 ~/.ssh/config
|
||||
|
11
.local/bin/tester-ebuild
Executable file
11
.local/bin/tester-ebuild
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo ebuildtester \
|
||||
--threads 8 \
|
||||
--pull \
|
||||
--update \
|
||||
--unstable \
|
||||
--rm \
|
||||
--portage-dir "$HOME/git/dev/gentoo" \
|
||||
--overlay-dir "$HOME/git/dev/guru" \
|
||||
--atom "$@"
|
32
.local/bin/tester-ubuntu
Executable file
32
.local/bin/tester-ubuntu
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
|
||||
# Resolving problem with systemd in mac
|
||||
# # Stop running Docker
|
||||
# test -z "$(docker ps -q 2>/dev/null)" && osascript -e 'quit app "Docker"'
|
||||
# # Install jq and moreutils so we can merge into the existing json file
|
||||
# brew install jq moreutils
|
||||
# # Add the needed cgroup config to docker settings.json
|
||||
# echo '{"deprecatedCgroupv1": true}' |
|
||||
# jq -s '.[0] * .[1]' ~/Library/Group\ Containers/group.com.docker/settings.json - |
|
||||
# sponge ~/Library/Group\ Containers/group.com.docker/settings.json
|
||||
# # Restart docker desktop
|
||||
# open --background -a Docker
|
||||
|
||||
docker stop "$(docker ps --all | grep -i ubuntu | awk '{print $1}')" >/dev/null
|
||||
docker rm "$(docker ps --all | grep -i ubuntu | awk '{print $1}')" >/dev/null
|
||||
docker pull jrei/systemd-ubuntu:22.04
|
||||
docker run \
|
||||
-d \
|
||||
--name systemd-ubuntu \
|
||||
-v "$HOME/git/dev":/opt \
|
||||
--tmpfs /tmp \
|
||||
--tmpfs /run \
|
||||
--tmpfs /run/lock \
|
||||
--privileged \
|
||||
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
|
||||
jrei/systemd-ubuntu:22.04
|
||||
# container="$(docker ps --all | grep -i ubuntu | awk '{print $1}')"
|
||||
# sleep 15 && docker exec -it "$container" /bin/bash
|
||||
# docker stop "$container" >/dev/null
|
||||
# docker rm "$container" >/dev/null
|
2
.local/bin/tmux-display-fix
Executable file
2
.local/bin/tmux-display-fix
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
export DISPLAY="`tmux show-env | sed -n 's/^DISPLAY=//p'`"
|
@ -18,5 +18,5 @@ if [ -z "$1" ]; then
|
||||
'-> if is-empty(it) then "No one you are following is streaming right now." else it' \
|
||||
-o table
|
||||
else
|
||||
streamlink -p mpv twitch.tv/$1 ${2:-best}
|
||||
__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia __GL_SYNC_TO_VBLANK=0 streamlink -p mpv twitch.tv/$1 ${2:-best}
|
||||
fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python3.8
|
||||
#!/usr/bin/python3.9
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
|
@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
youtube-dl --extract-audio --audio-format mp3 $1
|
||||
yt-dlp --extract-audio --audio-format mp3 $1
|
||||
|
@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
youtube-dl $1
|
||||
yt-dlp "$@" -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best"
|
||||
|
2
.local/bin/yt-video-cut
Executable file
2
.local/bin/yt-video-cut
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
yt-dlp --external-downloader ffmpeg --external-downloader-args "ffmpeg_i:-ss $1 -to $2" "${@:3}"
|
1
.parallel/runs-without-willing-to-cite
Normal file
1
.parallel/runs-without-willing-to-cite
Normal file
@ -0,0 +1 @@
|
||||
4
|
0
.parallel/will-cite
Normal file
0
.parallel/will-cite
Normal file
77
.skhdrc
Normal file
77
.skhdrc
Normal file
@ -0,0 +1,77 @@
|
||||
# focus window
|
||||
alt - h : yabai -m window --focus west
|
||||
alt - l : yabai -m window --focus east
|
||||
alt - k : yabai -m window --focus north
|
||||
alt - j : yabai -m window --focus south
|
||||
|
||||
# swap managed window
|
||||
shift + alt - h : yabai -m window --swap west
|
||||
shift + alt - l : yabai -m window --swap east
|
||||
shift + alt - k : yabai -m window --swap north
|
||||
shift + alt - j : yabai -m window --swap south
|
||||
|
||||
# move managed window
|
||||
# shift + cmd - h : yabai -m window --warp east
|
||||
|
||||
# Search
|
||||
alt - d : open -a Alfred\ 4
|
||||
|
||||
# Close app
|
||||
alt - q : yabai -m window --close
|
||||
|
||||
# balance size of windows
|
||||
shift + alt - space : yabai -m space --balance
|
||||
|
||||
# create desktop, move window and follow focus - uses jq for parsing json (brew install jq)
|
||||
shift + cmd - n : yabai -m space --create && \
|
||||
index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \
|
||||
yabai -m window --space "${index}" && \
|
||||
yabai -m space --focus "${index}"
|
||||
|
||||
shift + alt - 1 : yabai -m window --space 1
|
||||
shift + alt - 2 : yabai -m window --space 2
|
||||
shift + alt - 3 : yabai -m window --space 3
|
||||
shift + alt - 4 : yabai -m window --space 4
|
||||
shift + alt - 5 : yabai -m window --space 5
|
||||
shift + alt - 6 : yabai -m window --space 6
|
||||
shift + alt - 7 : yabai -m window --space 7
|
||||
shift + alt - 8 : yabai -m window --space 8
|
||||
shift + alt - 9 : yabai -m window --space 9
|
||||
|
||||
# focus monitor
|
||||
ctrl + alt - z : yabai -m display --focus prev
|
||||
# ctrl + alt - 3 : yabai -m display --focus 3
|
||||
|
||||
# send window to monitor and follow focus
|
||||
# ctrl + cmd - c : yabai -m window --display next; yabai -m display --focus next
|
||||
# ctrl + cmd - 1 : yabai -m window --display 1; yabai -m display --focus 1
|
||||
|
||||
# move floating window
|
||||
# shift + ctrl - a : yabai -m window --move rel:-20:0
|
||||
# shift + ctrl - s : yabai -m window --move rel:0:20
|
||||
|
||||
# increase window size
|
||||
# shift + alt - a : yabai -m window --resize left:-20:0
|
||||
# shift + alt - w : yabai -m window --resize top:0:-20
|
||||
|
||||
# decrease window size
|
||||
# shift + cmd - s : yabai -m window --resize bottom:0:-20
|
||||
# shift + cmd - w : yabai -m window --resize top:0:20
|
||||
|
||||
# set insertion point in focused container
|
||||
# ctrl + alt - h : yabai -m window --insert west
|
||||
|
||||
# toggle window zoom
|
||||
alt - f : yabai -m window --toggle zoom-fullscreen
|
||||
|
||||
# toggle window split type
|
||||
# alt - e : yabai -m window --toggle split
|
||||
|
||||
# float / unfloat window and center on screen
|
||||
alt - space : yabai -m window --toggle float;\
|
||||
yabai -m window --grid 4:4:1:1:2:2
|
||||
|
||||
# toggle sticky(+float), topmost, picture-in-picture
|
||||
# alt - p : yabai -m window --toggle sticky;\
|
||||
# yabai -m window --toggle topmost;\
|
||||
# yabai -m window --toggle pip
|
1
.tilde-switch
Executable file
1
.tilde-switch
Executable file
@ -0,0 +1 @@
|
||||
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000064},{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035}]}'
|
73
.tmux.conf
73
.tmux.conf
@ -1,14 +1,38 @@
|
||||
set -g prefix C-a
|
||||
# Default shell configuration
|
||||
set-option -g default-shell /bin/zsh
|
||||
bind-key p command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -JS -32768 ; save-buffer %1 ; delete-buffer'
|
||||
unbind C-b
|
||||
bind-key C-a send-prefix
|
||||
unbind q
|
||||
bind q confirm kill-window
|
||||
bind Q confirm kill-pane
|
||||
set -g status on
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -ga terminal-overrides ",*256col*:Tc"
|
||||
|
||||
# Keybindings
|
||||
unbind C-b # Unbind a default keys conbination
|
||||
unbind q # Unbind a q key
|
||||
set -g prefix C-a # Set a default keys conbination
|
||||
bind-key C-a send-prefix # Set a default keys conbination
|
||||
bind q confirm kill-window # Set a kill-window keybind
|
||||
bind Q confirm kill-pane # Set a kill-pane keybind
|
||||
bind - split-window -v # Split window vertical
|
||||
bind _ split-window -h # Split window horizontal
|
||||
bind > swap-pane -D # Swap current pane with the next one
|
||||
bind < swap-pane -U # Swap current pane with the previous one
|
||||
bind C-w select-pane -l # Go to last panel
|
||||
bind h select-pane -L # Go to left panel
|
||||
bind j select-pane -D # Go to down panel
|
||||
bind k select-pane -U # Go to up panel
|
||||
bind l select-pane -R # Go to right panel
|
||||
bind -r H resize-pane -L 2 # Resize panel left
|
||||
bind -r J resize-pane -D 2 # Resize panel down
|
||||
bind -r K resize-pane -U 2 # Resize panel up
|
||||
bind -r L resize-pane -R 2 # Resize panel right
|
||||
bind -r C-h previous-window # Select previous window
|
||||
bind -r C-l next-window # Select next window
|
||||
bind Tab last-window # Move to last active window
|
||||
bind C-c new-session # Keybind for a new session
|
||||
bind C-f command-prompt -p find-session 'switch-client -t %%'
|
||||
bind-key -n C-f copy-mode \; send-key ?
|
||||
set -g default-terminal "st-256color"
|
||||
|
||||
# Copying a output from panel the terminal to file ~/tmux.history
|
||||
bind-key p command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -JS -32768 ; save-buffer %1 ; delete-buffer'
|
||||
|
||||
set -g history-limit 20000
|
||||
set-option -sg escape-time 0
|
||||
set -g base-index 1 # start windows numbering at 1
|
||||
@ -21,16 +45,21 @@ set -g display-time 1000 # slightly longer status messages display time
|
||||
set -g status-interval 10 # redraw status line every 10 seconds
|
||||
set -g monitor-activity on
|
||||
set -g visual-activity off
|
||||
bind C-c new-session
|
||||
bind C-f command-prompt -p find-session 'switch-client -t %%'
|
||||
bind - split-window -v
|
||||
bind _ split-window -h
|
||||
bind > swap-pane -D # swap current pane with the next one
|
||||
bind < swap-pane -U # swap current pane with the previous one
|
||||
bind -r H resize-pane -L 2
|
||||
bind -r J resize-pane -D 2
|
||||
bind -r K resize-pane -U 3
|
||||
bind -r L resize-pane -R 2
|
||||
bind -r C-h previous-window # select previous window
|
||||
bind -r C-l next-window # select next window
|
||||
bind Tab last-window # move to last active window
|
||||
set -g visual-bell off
|
||||
|
||||
# Coloring of the panel
|
||||
set -g pane-border-style fg=default
|
||||
set -g pane-active-border-style "bg=default fg=color244"
|
||||
|
||||
# Status bar
|
||||
## Source of example configuration
|
||||
## https://arcolinux.com/everything-you-need-to-know-about-tmux-status-bar/
|
||||
set-option -g status on
|
||||
set-option -g status-interval 1
|
||||
set-option -g status-position bottom
|
||||
set-option -g status-style fg=white,bg=black
|
||||
set-option -g status-left-length 20
|
||||
set-option -g status-left-style default
|
||||
set-option -g status-right-length 140
|
||||
set-option -g status-right-style default
|
||||
set-option -g status-right "%a %H:%M:%S %Y-%m-%d"
|
||||
|
98
.vimrc-def
98
.vimrc-def
@ -83,6 +83,104 @@ nnoremap <F8> :tabnext<CR>
|
||||
|
||||
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""
|
||||
" Keyboard shortcuts
|
||||
""""""""""""""""""""""""""""""""
|
||||
let mapleader = "\<Space>"
|
||||
nmap <leader>2 :w!<cr>
|
||||
|
||||
" Better tab
|
||||
vnoremap <Tab> >
|
||||
vnoremap <S-Tab> <
|
||||
|
||||
" Better word
|
||||
nmap yw vey
|
||||
|
||||
" Select all text
|
||||
nmap <C-a> gg<S-v>G
|
||||
|
||||
" Resize window
|
||||
nnoremap <C-L> :vertical resize +5<CR>
|
||||
nnoremap <C-H> :vertical resize -5<CR>
|
||||
nnoremap <C-J> :res -5<CR>
|
||||
nnoremap <C-K> :res +5<CR>
|
||||
|
||||
" Split window
|
||||
nnoremap _ :vsp <CR>
|
||||
nnoremap - :split <CR>
|
||||
|
||||
" Reload file
|
||||
nnoremap <F5> :edit <CR>
|
||||
nnoremap <Leader><F5> :edit! <CR>
|
||||
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
" Moving line up or down using alt
|
||||
nnoremap <A-Up> :m-2<CR>
|
||||
nnoremap <A-Down> :m+<CR>
|
||||
inoremap <A-Up> <Esc>:m-2<CR>
|
||||
inoremap <A-Down> <Esc>:m+<CR>
|
||||
vnoremap <A-Down> :m '>+1<CR>gv=gv
|
||||
vnoremap <A-Up> :m '<-2<CR>gv=gv
|
||||
|
||||
nnoremap Ż :m-2<CR>
|
||||
nnoremap ∆ :m+<CR>
|
||||
vnoremap ∆ :m '>+1<CR>gv=gv
|
||||
vnoremap Ż :m '<-2<CR>gv=gv
|
||||
|
||||
nnoremap <A-k> :m-2<CR>
|
||||
nnoremap <A-j> :m+<CR>
|
||||
inoremap <A-k> <Esc>:m-2<CR>
|
||||
inoremap <A-j> <Esc>:m+<CR>
|
||||
vnoremap <A-j> :m '>+1<CR>gv=gv
|
||||
vnoremap <A-k> :m '<-2<CR>gv=gv
|
||||
|
||||
" Better replace
|
||||
nnoremap <Leader>s :%s//g<Left><Left>
|
||||
vnoremap <Leader>s :s//g<Left><Left>
|
||||
|
||||
" Better adding into begging and ending line
|
||||
vnoremap F <C-v>$A
|
||||
vnoremap f <C-v>0I
|
||||
|
||||
" Better management of tabs
|
||||
nnoremap <C-t> :tabnew<CR>
|
||||
|
||||
nnoremap <F7> :tabprevious<CR>
|
||||
nnoremap <F8> :tabnext<CR>
|
||||
inoremap <F7> <Esc>:tabprevious<CR>i
|
||||
inoremap <F8> <Esc>:tabnext<CR>i
|
||||
|
||||
nnoremap <Leader>k :tabprevious<CR>
|
||||
nnoremap <Leader>j :tabnext<CR>
|
||||
|
||||
inoremap <C-t> <Esc>:tabnew<CR>
|
||||
|
||||
" Better moving
|
||||
nnoremap J }
|
||||
nnoremap K {
|
||||
vnoremap J }
|
||||
vnoremap K {
|
||||
|
||||
" Copy into system
|
||||
noremap <Leader>y "*y
|
||||
noremap <Leader>p "*p
|
||||
|
||||
" Code
|
||||
map <Leader><Tab> Vgaip= <CR>
|
||||
|
||||
" Others
|
||||
nnoremap <F11> :Goyo <CR>
|
||||
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
|
||||
map <F3> :setlocal spell! spelllang=en_gb<CR>
|
||||
map <F4> :setlocal spell! spelllang=pl<CR>
|
||||
|
||||
" Human Errors
|
||||
:command! W w
|
||||
:command! Q q
|
||||
:command! Wq wq
|
||||
|
||||
" Automatically deletes all trailing whitespace and newlines at end of file on save.
|
||||
autocmd BufWritePre * %s/\s\+$//e
|
||||
autocmd BufWritepre * %s/\n\+\%$//e
|
||||
|
BIN
.wall.jpg
BIN
.wall.jpg
Binary file not shown.
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 6.1 MiB |
5
.xinitrc
5
.xinitrc
@ -18,12 +18,13 @@ xautolock -time 60 -locker slock&
|
||||
dwmblocks&
|
||||
nm-applet --sm-disable&
|
||||
dunst -config&
|
||||
#browser-x&
|
||||
browser-x&
|
||||
QT_SCALE_FACTOR=1.5 keepassxc &
|
||||
/usr/local/bin/st -e /bin/sh -c "tmux new-session -s BASE -n HOME '/bin/zsh'\; split-window -h 'cpumhz'\; split-window 'htop'\; new-window -n MAIL 'neomutt'\; new-window -n MUSIC 'cmus'"&
|
||||
/usr/local/bin/st -e /bin/sh -c "tmux new-session -s BASE -n HOME '/bin/zsh'\; split-window -h 'cpumhz'\; split-window 'htop'\; new-window -n NEWS 'newsboat'\; new-window -n MAIL 'neomutt'\; new-window -n MUSIC 'cmus'"&
|
||||
sudo /usr/bin/rdate -s ntp.task.gda.pl && sudo /sbin/hwclock --systohc
|
||||
megasync &
|
||||
ibus-daemon&
|
||||
#quasselclient&
|
||||
|
||||
# Two monitors are enabled?
|
||||
if [[ $(mons | awk '/Monitors/{print $2}') = 2 ]]
|
||||
|
73
.yabairc
Executable file
73
.yabairc
Executable file
@ -0,0 +1,73 @@
|
||||
#!/usr/bin/env sh
|
||||
sudo yabai --load-sa
|
||||
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
|
||||
|
||||
yabai -m config external_bar all:20:20
|
||||
|
||||
# Without Ubersicht
|
||||
#yabai -m config external_bar all:0:0
|
||||
|
||||
# global settings
|
||||
yabai -m config mouse_follows_focus on
|
||||
yabai -m config focus_follows_mouse on
|
||||
yabai -m config window_placement second_child
|
||||
yabai -m config window_topmost off
|
||||
yabai -m config window_shadow on
|
||||
yabai -m config window_border off
|
||||
yabai -m config window_border_placement exterior
|
||||
yabai -m config window_border_width 1.0
|
||||
yabai -m config window_border_radius 1.0
|
||||
yabai -m config active_window_border_color 0xff008bff
|
||||
yabai -m config normal_window_border_color 0x01000000
|
||||
yabai -m config insert_window_border_color 0xB2EBDBB2
|
||||
yabai -m config window_opacity off
|
||||
yabai -m config split_ratio 0.50
|
||||
yabai -m config auto_balance on
|
||||
yabai -m config mouse_modifier fn
|
||||
yabai -m config mouse_action1 move
|
||||
yabai -m config mouse_action2 resize
|
||||
|
||||
# general space settings
|
||||
yabai -m config layout bsp
|
||||
yabai -m config top_padding 10
|
||||
yabai -m config bottom_padding 10
|
||||
yabai -m config left_padding 10
|
||||
yabai -m config right_padding 10
|
||||
yabai -m config window_gap 10
|
||||
|
||||
yabai -m config window_topmost on
|
||||
yabai -m config window_shadow float
|
||||
|
||||
# From DWM
|
||||
yabai -m rule --add app="^System Preferences$" manage=off border=off
|
||||
yabai -m rule --add app="^Alfred$" manage=off border=off
|
||||
yabai -m rule --add app="choose" manage=off
|
||||
yabai -m rule --add app="Calendar" manage=off
|
||||
yabai -m rule --add app="JDownloader 2*" manage=off
|
||||
|
||||
yabai -m rule --add app="Terminal" space=^1 display=1
|
||||
yabai -m rule --add app="iTerm2" space=^1 display=1
|
||||
|
||||
yabai -m rule --add app="Firefox" space=^2
|
||||
yabai -m rule --add app="Opera" space=^2
|
||||
yabai -m rule --add app="Safari" space=^2
|
||||
|
||||
yabai -m rule --add app="Mail" space=^3
|
||||
|
||||
# Communication
|
||||
yabai -m rule --add app="Slack" space=^4
|
||||
yabai -m rule --add app="Signal" space=^4
|
||||
yabai -m rule --add app="Discord" space=^4
|
||||
yabai -m rule --add app="WhatsApp" space=^4
|
||||
yabai -m rule --add app="Microsoft Teams" space=^4
|
||||
yabai -m rule --add app="Microsoft Outlook" space=^4
|
||||
yabai -m rule --add app="Messages" space=^4
|
||||
|
||||
# Tools
|
||||
yabai -m rule --add app="Music" space=^5
|
||||
yabai -m rule --add app="QuickTime Player" space=^5
|
||||
yabai -m rule --add app="VLC" space=^5
|
||||
yabai -m rule --add app="Spotify" space=^5
|
||||
|
||||
# Floating
|
||||
yabai -m rule --add app="DisplayLinkUserAgent" space=^7
|
247
.zshrc
247
.zshrc
@ -1,11 +1,15 @@
|
||||
|
||||
# ZSHRC
|
||||
|
||||
CONFIG=$HOME/.config
|
||||
|
||||
parse_git_branch() {
|
||||
command=$(git symbolic-ref --short HEAD 2> /dev/null)
|
||||
[ -z $command ] && echo -e "$ " || echo -e "$(git symbolic-ref --short HEAD 2> /dev/null) $ "
|
||||
command=$(git branch \
|
||||
2> /dev/null |
|
||||
sed -n -e 's/^\* \(.*\)/\1/p' |
|
||||
awk 'NF{print $NF}' |
|
||||
sed 's/)//g' \
|
||||
2> /dev/null)
|
||||
[ -z $command ] && echo -e "$ " || echo -e "$command $ "
|
||||
}
|
||||
|
||||
gbranch() {
|
||||
@ -15,27 +19,36 @@ gbranch() {
|
||||
[ -f /etc/gentoo-release ] && export ZSH="/usr/share/zsh/site-contrib/oh-my-zsh"
|
||||
[ -f /etc/centos-release ] && export ZSH="$HOME/.oh-my-zsh"
|
||||
[ -f /etc/debian_version ] && export ZSH="$HOME/.oh-my-zsh"
|
||||
[[ "$(uname)" == "Darwin" ]] && export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
HISTFILE=$HOME/.history_zsh
|
||||
HISTSIZE=10000
|
||||
HISTSIZE=10000000
|
||||
SAVEHIST=10000000
|
||||
autoload -U colors && colors
|
||||
autoload bashcompinit && bashcompinit
|
||||
setopt PROMPT_SUBST
|
||||
PS1='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(parse_git_branch)%{$reset_color%}'
|
||||
plugins=(rake ruby vagrant knife knife_ssh kitchen )
|
||||
plugins=(rake ruby vagrant knife knife_ssh kitchen)
|
||||
|
||||
ZSH_DISABLE_COMPFIX=true
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
[ ! -d $CONFIG/zsh ] && { mkdir -p $CONFIG/zsh ; cd $CONFIG/zsh ; git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ; git clone https://github.com/zsh-users/zsh-autosuggestions.git }
|
||||
[ -d $CONFIG/zsh ] && source $CONFIG/zsh/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh &>> /dev/null
|
||||
[ -d $CONFIG/zsh ] && source $CONFIG/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh &>> /dev/null
|
||||
[ -d $CONFIG/zsh/zsh-autosuggestions ] && source $CONFIG/zsh/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh &>> /dev/null
|
||||
[ -d $CONFIG/zsh/zsh-syntax-highlighting ] && source $CONFIG/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh &>> /dev/null
|
||||
[ -d $CONFIG/zsh/zsh-command-time ] && source $CONFIG/zsh/zsh-command-time/command-time.plugin.zsh &>> /dev/null
|
||||
[ -d $CONFIG/zsh/aws ] && source $CONFIG/zsh/aws/aws.plugin.zsh &>> /dev/null
|
||||
[ -d $CONFIG/zsh/azure-cli ] && source $CONFIG/zsh/azure-cli/az.completion &>> /dev/null
|
||||
[ -f $HOME/.password ] && source $HOME/.password
|
||||
[ ! -d $CONFIG/fzf ] && git clone https://github.com/junegunn/fzf.git $HOME/.config/fzf
|
||||
[ -f $CONFIG/fzf/shell/key-bindings.zsh ] && source $HOME/.config/fzf/shell/key-bindings.zsh
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
FPATH=/usr/local/share/zsh/site-functions:$FPATH
|
||||
|
||||
# Configuration of command-time
|
||||
# If command execution time above min. time, plugins will not output time.
|
||||
ZSH_COMMAND_TIME_MIN_SECONDS=10
|
||||
ZSH_COMMAND_TIME_MSG="Execution time: %s sec"
|
||||
ZSH_COMMAND_TIME_EXCLUDE=(ranger git nvim fzf vim mcedit v ssh lg lazygit tmux)
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
export TERM=xterm-256color
|
||||
export SHELL=/bin/bash
|
||||
@ -47,63 +60,185 @@ export CCACHE_DIR="/usr/ccache"
|
||||
export LC_ALL="en_US.UTF-8"
|
||||
export LANG=en_US.UTF-8
|
||||
export LC_ALL=en_US.UTF-8
|
||||
export BROWSER=/home/yorune/.local/bin/browser-x
|
||||
export BROWSER=$HOME/.local/bin/browser-x
|
||||
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse'
|
||||
export EIX_LIMIT_COMPACT=0
|
||||
export TERMINAL="st"
|
||||
export QT_SCALE_FACTOR=1.5
|
||||
export VISUAL='nvim'
|
||||
export EDITOR='nvim'
|
||||
alias vimc="nvim $HOME/.vimrc"
|
||||
alias svm="sudo nvim /etc/portage/make.conf"
|
||||
alias svr="sudo nvim /etc/portage/repos.conf"
|
||||
alias svp="sudo nvim /etc/portage/package.use"
|
||||
alias sva="sudo nvim /etc/portage/package.accept_keywords"
|
||||
|
||||
# Declerating the PATHs
|
||||
unset PATH
|
||||
export PATH=/bin:$PATH
|
||||
export PATH=/usr/bin:$PATH
|
||||
export PATH=/usr/sbin:$PATH
|
||||
export PATH=/sbin:$PATH
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
export PATH=$HOME/go/bin:$PATH
|
||||
export PATH=$HOME/golang/bin:$PATH
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
export PATH=$HOME/node_modules/.bin:$PATH
|
||||
export PATH=$CONFIG/fzf/bin:$PATH
|
||||
export GOPATH=$HOME/golang
|
||||
export PATH=$PATH:$HOME/.gem/ruby/2.6.0/bin
|
||||
export PATH=$PATH:$HOME/.cargo/bin
|
||||
[ -d $HOME/git/fortigate/bin ] && export PATH=$HOME/git/fortigate/bin:$PATH
|
||||
|
||||
# History
|
||||
export HISTTIMEFORMAT="%F %T "
|
||||
|
||||
# Export for WSL
|
||||
if [[ "$(uname -sr)" =~ "Microsoft" ]]; then
|
||||
export GOROOT=/usr/lib/go
|
||||
fi
|
||||
|
||||
# Work
|
||||
alias ansible-lint-work='GIT_SSH_COMMAND="ssh -i ~/.ssh/work/id_rsa" ansible-lint'
|
||||
alias ansible-galaxy-work='GIT_SSH_COMMAND="ssh -i ~/.ssh/work/id_rsa" ansible-galaxy'
|
||||
alias ssh-work="ssh -i ~/.ssh/work/id_rsa"
|
||||
alias rsyncwork="rsync -h --progress -e 'ssh -i ~/.ssh/work/id_rsa'"
|
||||
alias git-work='GIT_SSH_COMMAND="ssh -i ~/.ssh/work/id_rsa" git'
|
||||
alias git-commit-work="git commit --author='Marcin Woźniak <marcin.wozniak@wundermanthompson.com>'"
|
||||
|
||||
# Alias ssh
|
||||
alias ssh-restore="cp -rv ~/ssh-mega/config ~/.ssh/ ; ssh-permissions"
|
||||
alias ssh-backup="cp -rv ~/.ssh/config ~/ssh-mega/"
|
||||
|
||||
# Alias and Export Gentoo
|
||||
alias svm="sudo $EDITOR /etc/portage/make.conf"
|
||||
alias svr="sudo $EDITOR /etc/portage/repos.conf"
|
||||
alias svp="sudo $EDITOR /etc/portage/package.use"
|
||||
alias sva="sudo $EDITOR /etc/portage/package.accept_keywords"
|
||||
alias emerge="sudo emerge"
|
||||
alias channel-check='sudo iwlist wlan0 scan | egrep -i "essid|frequency"'
|
||||
alias grep="grep --color=always"
|
||||
alias egrep="egrep --color=always"
|
||||
alias ls='ls -h --color=auto'
|
||||
alias ll='ls -lha'
|
||||
alias cp='cp -v'
|
||||
alias mv='mv -v'
|
||||
alias myip="curl ipinfo.io/ip"
|
||||
alias logi="journalctl -f"
|
||||
alias mpv="__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia __GL_SYNC_TO_VBLANK=0 mpv --vo=x11 --hwdec=no --ytdl-raw-options="yes-playlist=" --no-resume-playback --ytdl-format='bestvideo[height<=?1080]+bestaudio/best'"
|
||||
alias code="vscodium-bin"
|
||||
alias pl="setxkbmap pl"
|
||||
alias feh="feh --edit --scale-down"
|
||||
alias graphic-card="glxinfo|egrep 'OpenGL vendor|OpenGL renderer'"
|
||||
alias mylaptop-components="inxi -Fxz"
|
||||
alias update_time="sudo ntpdate -b -u vega.cbk.poznan.pl"
|
||||
alias dn='LC_TIME=C /bin/date "+%Y%m%d%H%M%S"'
|
||||
|
||||
# Alias and Export for Mac
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
# Resolve problem with GOPATH
|
||||
# https://stackoverflow.com/questions/66284870/go-get-not-downloading-to-src-folder
|
||||
export GO111MODULE=on
|
||||
|
||||
# Other export
|
||||
export OPENSSLVER=$(ls "/opt/homebrew/Cellar/openssl@3/" |
|
||||
sort |
|
||||
grep -iE '[0-9]+\.[0-9]+\.' |
|
||||
tail -n1)
|
||||
|
||||
export PATH="/opt/homebrew/Cellar/openssl@3/$OPENSSLVER/bin:$PATH"
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
export LDFLAGS="-L/opt/homebrew/Cellar/openssl@3/$OPENSSLVER/lib"
|
||||
export CPPFLAGS="-I/opt/homebrew/Cellar/openssl@3/$OPENSSLVER/include"
|
||||
export PKG_CONFIG_PATH="/opt/homebrew/openssl@3/$OPENSSLVER/lib/pkgconfig"
|
||||
export GOROOT="$(brew --prefix golang)/libexec"
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
export PATH=$PATH:$GOROOT/bin
|
||||
|
||||
export PYTHONVERSION=$(ls -la /opt/homebrew/opt/ |
|
||||
grep -iEo 'python@.* ->' |
|
||||
sed 's/ ->//g' |
|
||||
sort |
|
||||
tail -n1 |
|
||||
sed 's/python@//g')
|
||||
|
||||
export PATH=$PATH:$HOME/Library/Python/$PYTHONVERSION/bin
|
||||
export PATH=$PATH:/usr/local/opt/python@$PYTHONVERSION/Frameworks/Python.framework/Versions/$PYTHONVERSION/bin
|
||||
export PATH="$(brew --prefix python@$PYTHONVERSION)/bin:$PATH"
|
||||
alias python3='/opt/homebrew/bin/python$PYTHONVERSION'
|
||||
alias pip3='/opt/homebrew/bin/pip$PYTHONVERSION'
|
||||
alias python='/opt/homebrew/bin/python$PYTHONVERSION'
|
||||
alias pip='/opt/homebrew/bin/pip$PYTHONVERSION'
|
||||
alias sed='gsed'
|
||||
alias zcat='gzcat'
|
||||
alias date='gdate'
|
||||
|
||||
alias lsblk="diskutil list"
|
||||
alias Update="$HOME/.local/bin/Update-pkg; brew update; brew upgrade; brew upgrade --greedy; sudo softwareupdate -i -a -R"
|
||||
alias ls="ls -Gh"
|
||||
alias mpv="mpv --ytdl-raw-options="yes-playlist=" --no-resume-playback --ytdl-format='bestvideo[height<=?1080]+bestaudio/best'"
|
||||
alias code="open -a 'Visual Studio Code'"
|
||||
alias xclip="pbcopy"
|
||||
alias mtr="sudo /opt/homebrew/opt/mtr/sbin/mtr"
|
||||
alias sleep-lid-off="sudo pmset -b sleep 0; sudo pmset -b disablesleep 1"
|
||||
alias sleep-lid-on="sudo pmset -b sleep 5; sudo pmset -b disablesleep 0"
|
||||
alias restart-network-share="sudo pkill -i netauthsysagent"
|
||||
alias streamlink="streamlink --config $HOME/.config/streamlink/config"
|
||||
|
||||
# Terraform
|
||||
export TFENV_ARCH=amd64
|
||||
export TFENVVERSION=$(ls -la /opt/homebrew/Cellar/tfenv/ |
|
||||
grep -iEo '[0-9]\.[0-9]\.[0-9]' |
|
||||
sort |
|
||||
tail -n1)
|
||||
export TFVERSION=$(ls -la /opt/homebrew/Cellar/tfenv/*/versions |
|
||||
grep -iEo '[0-9]\.[0-9]\.[0-9]' |
|
||||
sort |
|
||||
tail -n1)
|
||||
export PATH=$PATH:/opt/homebrew/Cellar/tfenv/$TFENVVERSION/versions/$TFVERSION/
|
||||
|
||||
# Unset browser
|
||||
unset BROWSER
|
||||
|
||||
# Docker as linux/amd64
|
||||
export DOCKER_DEFAULT_PLATFORM=linux/amd64
|
||||
fi
|
||||
|
||||
# Setting the right editor
|
||||
if which nvim > /dev/null 2>&1; then
|
||||
export VISUAL='nvim -u $HOME/.vimrc'
|
||||
export EDITOR='nvim -u $HOME/.vimrc'
|
||||
else
|
||||
export VISUAL='vim -u $HOME/.vimrc-def'
|
||||
export EDITOR='vim -u $HOME/.vimrc-def'
|
||||
fi
|
||||
|
||||
# Vim
|
||||
alias vimc="$EDITOR $HOME/.vimrc"
|
||||
alias v="$EDITOR -p"
|
||||
alias vim="$EDITOR -p"
|
||||
|
||||
# Commands
|
||||
alias traceroute="mtr"
|
||||
alias rsync="rsync -h --progress"
|
||||
alias lg="lazygit"
|
||||
alias ldocker="lazydocker"
|
||||
alias ls="ls -h --color=auto"
|
||||
alias ll='ls -lha'
|
||||
alias r="ranger"
|
||||
alias v="nvim"
|
||||
alias feh="feh --scale-down"
|
||||
alias changefont="figlet"
|
||||
alias gmaster="git checkout master"
|
||||
alias gcommit="git commit --author='Marcin Woźniak <y0rune@aol.com>' -s"
|
||||
alias gcommitw="git commit --author='Marcin Woźniak <marcin.wozniak@wundermanthompson.com>'"
|
||||
alias gdel="git push origin --delete"
|
||||
alias gadd="git add"
|
||||
alias gpush="git push"
|
||||
alias gpull="git pull"
|
||||
alias gstatus="git status -s"
|
||||
alias gst="git status -s"
|
||||
alias gdiff="git diff"
|
||||
alias gnew="git checkout -b"
|
||||
alias glog="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --branches"
|
||||
alias gfg="git checkout master && git fetch upstream && git pull upstream master"
|
||||
alias cp='cp -v'
|
||||
alias mv='mv -v'
|
||||
alias cal="cal -3"
|
||||
alias code="vscodium-bin"
|
||||
alias vpn="sudo /root/.local/bin/protonvpn c -f"
|
||||
alias vpnch="sudo /root/.local/bin/protonvpn c --cc CH"
|
||||
alias vpnd="sudo /root/.local/bin/protonvpn d"
|
||||
alias tv="~/MEGA/tv/tv.sh"
|
||||
alias newswork="newsboat --url=$HOME/.config/newsboat/urlswork"
|
||||
alias vim="nvim -p"
|
||||
alias denpl="trans en:pl"
|
||||
alias dplen="trans pl:en"
|
||||
alias notes="nvim $HOME/git/notes/index.md"
|
||||
alias mgr="cd $HOME/Documents/Collage/Magisterka-Marcin/Semestr1/"
|
||||
alias mpv="__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia __GL_SYNC_TO_VBLANK=0 mpv --vo=x11 --hwdec=no --ytdl-raw-options="yes-playlist=" --ytdl-format='bestvideo[ext=mp4][height<=?1080]+bestaudio[ext=m4a]' --no-resume-playback"
|
||||
alias aria2c="aria2c --seed-time=0 --disable-ipv6 --max-upload-limit=1k"
|
||||
alias myip="curl ipinfo.io/ip"
|
||||
alias changefont="figlet"
|
||||
|
||||
# Cleaning-up
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
export HISTTIMEFORMAT="%F %T "
|
||||
# Others
|
||||
alias channel-check='sudo iwlist wlan0 scan | egrep -i "essid|frequency"'
|
||||
alias newswork="newsboat --url=$HOME/.config/newsboat/urlswork"
|
||||
alias aria2c="aria2c --seed-time=0 --disable-ipv6 --max-upload-limit=1k"
|
||||
alias irc="ssh mikrus -t 'screen -r'"
|
||||
alias neofetch=fastfetch
|
||||
|
||||
# Zoxide
|
||||
[ -f $(which zoxide) ] && {eval "$(zoxide init zsh)"; alias cd='z'}
|
||||
|
||||
# GoLang
|
||||
alias go-mod="go mod edit -go $(go version | grep -oE 'go[0-9]*\.[0-9]*\.[0-9]*' | sed 's/go//g'); go get -u; go mod verify; go get -x -v; go mod verify; go mod tidy"
|
||||
|
||||
# Resolve problem with - zsh: no matches found
|
||||
setopt +o nomatch
|
||||
|
||||
# Error with icu
|
||||
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
|
||||
|
||||
# Security changes made in High Sierra that are breaking lots of Python things that use fork()
|
||||
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
||||
|
||||
# Error with Delinea - Linux
|
||||
[ -f "/etc/ssl/certs/ca-certificates.crt" ] && export REQUESTS_CA_BUNDLE='/etc/ssl/certs/ca-certificates.crt'
|
||||
|
2
Library/Application Support/streamlink/config/config
Normal file
2
Library/Application Support/streamlink/config/config
Normal file
@ -0,0 +1,2 @@
|
||||
player=mpv --cache 2048 --no-resume-playback
|
||||
player-no-close
|
Reference in New Issue
Block a user