Compare commits
515 Commits
master
...
14fe788e31
Author | SHA1 | Date | |
---|---|---|---|
14fe788e31 | |||
70f9e8b005 | |||
4e37d931f3 | |||
01d0187036 | |||
ca4223b146 | |||
327b5b3c3b | |||
fa3d844e6e | |||
c82615d32c | |||
5146943c55 | |||
2041bf7e99 | |||
96f8e5e1d8 | |||
86e74dbc11 | |||
c83e2ce4b2 | |||
988e881e4d | |||
71d4fa6fff | |||
96c5e1706f | |||
b2f57c4178 | |||
e130218d7a | |||
9ed0f62666 | |||
1672888b2e | |||
f8328ca4ba | |||
e73027d0b6 | |||
8e6f01ef0b | |||
1ad4378df8 | |||
c4ce72b9b0 | |||
216569013a | |||
415c056abb | |||
34bf9a044b | |||
d7bd1d9dca | |||
3072b1708c | |||
b8068d8ae6 | |||
c3d18de8ec | |||
ecb03a102b | |||
d7c0c6c8e4 | |||
7437d9da2b | |||
5e2558169f | |||
93af7f969b | |||
c702453d1c | |||
783d2064fa | |||
8bf3a4566f | |||
d2a0b6940e | |||
d614134f3b | |||
d0599d77c5 | |||
6dc4ee97a0 | |||
865a487882 | |||
04863126d3 | |||
f5be8c4efa | |||
ac92c31925 | |||
d2f9d31794 | |||
97167051c3 | |||
86576a5f46 | |||
c206d1e6b0 | |||
656dfda5fa | |||
3d24103a0e | |||
63bf46a1db | |||
2311d63e6c | |||
d710fa404d | |||
6bb245ff6e | |||
aa4892e0ff | |||
41905970cb | |||
25eb974bf4 | |||
abf8e8cd8e | |||
75499ff03a | |||
577a01671f | |||
2a61f06f93 | |||
d480632429 | |||
fb194e1471 | |||
b90c0a186d | |||
2167277769 | |||
3ffc42c42d | |||
e865b649ff | |||
b5ec537c92 | |||
081978a9fe | |||
ecf72230ce | |||
e4607db288 | |||
b7a5a963fb | |||
b2d58fe7be | |||
0086bd909c | |||
24ef9cb20e | |||
b6666adf1c | |||
9eb7ad4bd3 | |||
4d6e064ea4 | |||
ca4170fed6 | |||
2a6708b6e7 | |||
e5af102077 | |||
fd98bf0c8e | |||
d1f37ca9cd | |||
5cff788429 | |||
eec651a79f | |||
a6ef4e82ec | |||
0da0373d33 | |||
2ef6e71886 | |||
fa36f22e60 | |||
41ce463519 | |||
8a91fa388a | |||
f9ca3f3bee | |||
211150f7ff | |||
2891ac2b13 | |||
fe1ab8fc9d | |||
a40bf5e6a1 | |||
6ac76e95a8 | |||
294de594aa | |||
3969663b40 | |||
9b13c8529f | |||
8fea3a0c5f | |||
d159482dca | |||
3fc26be955 | |||
225c6ff424 | |||
7ccbd7765f | |||
11beda45b9 | |||
a5dbe0016c | |||
e8e1803f06 | |||
08967454d5 | |||
63ef8e46dd | |||
a40205811e | |||
5ac1e63fc7 | |||
610e4d80e3 | |||
dc9ea393c7 | |||
0ed35ef276 | |||
6632ae9772 | |||
46c08be157 | |||
b112e483bc | |||
cb606bdc2c | |||
99072bcf63 | |||
4452e59e8a | |||
dba6f6656f | |||
557f36baca | |||
c43de6c0d0 | |||
522c5dedfb | |||
604c84c92c | |||
63d4253a3b | |||
61afb4acff | |||
4c21efa450 | |||
89dca7ca79 | |||
746283fb0b | |||
c9130d6f21 | |||
37c6014247 | |||
cf66e632eb | |||
37ed5ee569 | |||
bb6dbf0746 | |||
84a38bd4c5 | |||
8c848fa0b9 | |||
3d910ed2e2 | |||
9caf4a2ff3 | |||
b08f30b713 | |||
e85611d944 | |||
2b7715deaf | |||
2652ba2a39 | |||
8cf1e8df0c | |||
15c65cfe71 | |||
b50f48d8b1 | |||
aefa6d73ca | |||
191cd2e4e1 | |||
f58f3bd274 | |||
861cb41d1a | |||
13ba500b78 | |||
cbcbda5464 | |||
cad1e601f2 | |||
26e461e0d1 | |||
c75ac0dee2 | |||
7725509514 | |||
3a8364be2a | |||
82dc38ba71 | |||
f20ebdc590 | |||
be168ee0ef | |||
3e7de3deea | |||
82f894068d | |||
abede79a64 | |||
971002fd25 | |||
cc78ffb82e | |||
80a1578cce | |||
417471a227 | |||
86a9032775 | |||
660a54964a | |||
dd05aad7a5 | |||
9386a35b94 | |||
88001d6dbe | |||
d1c7d978d4 | |||
b94e8b91e6 | |||
eb60d5673d | |||
35d50f58b3 | |||
668168c2d6 | |||
671753ff36 | |||
f754b5f281 | |||
ec636d4093 | |||
34629af401 | |||
3673c6a07a | |||
6d7fda8649 | |||
42887e0524 | |||
0f02aaf86d | |||
650d137d62 | |||
b5f43d6c59 | |||
e46c9ba133 | |||
529d2331b3 | |||
061717d3cc | |||
987e962bc5 | |||
aaf5bb00b4 | |||
91a816f886 | |||
b921db16ab | |||
c6da842ca3 | |||
e4fdc6aaa2 | |||
0c8455b995 | |||
f2579bef04 | |||
b2f96079d4 | |||
440c1355f0 | |||
e0e41c274a | |||
e0ce9985c1 | |||
6523f77bcc | |||
446a23cacb | |||
7daf4769f1 | |||
7a8f92e3bf | |||
bc46ba6c49 | |||
9842b39ec4 | |||
300297bb02 | |||
a6aee624eb | |||
c122a397ca | |||
bd7768a517 | |||
959cd5b530 | |||
f34a39b2e9 | |||
d3fe134d65 | |||
da8d693c33 | |||
7cbdaf4439 | |||
5f2316af81 | |||
6c412fead2 | |||
c3253aa7dd | |||
2eab0e6cb1 | |||
955132f386 | |||
0fdfb947f5 | |||
f620294fd6 | |||
ddc10265ba | |||
028e30a389 | |||
7ba07ff9ab | |||
74e9cd3409 | |||
eacd435d2f | |||
f125ef2143 | |||
7765478c39 | |||
deded77055 | |||
a38803fbf9 | |||
0b434a5e9f | |||
05a2f7f8df | |||
8b7a5c8f34 | |||
93982cd8b2 | |||
31724fa2bc | |||
55837d04a8 | |||
7576887fef | |||
e0d72c5ddc | |||
0a5fa48583 | |||
494926ec9d | |||
7a4b0e95c9 | |||
9a81659555 | |||
74b92b96ce | |||
8a57d5ea3e | |||
0725aa3be9 | |||
367814e4e9 | |||
d5a525cc02 | |||
53b03ff6b8 | |||
a3ce1c59b3 | |||
3bb2f16f76 | |||
13388e1398 | |||
cd31bcde02 | |||
1d1b7fede1 | |||
40de0fca3b | |||
9e4e63df3b | |||
e04b5afae1 | |||
3cb6101ed0 | |||
afe582e3fe | |||
e73b7720d5 | |||
e76eeca63d | |||
97076eca12 | |||
4cd5dbe70c | |||
8ec93edc2e | |||
b6a30eda64 | |||
d8e936940b | |||
34ef49ae9e | |||
b11c227dca | |||
bcd4a77df3 | |||
885132180f | |||
772c6c208a | |||
655b7760cb | |||
a18c59ecf9 | |||
a6ef20a74e | |||
e5ca400981 | |||
fb883127bd | |||
8a6980d286 | |||
539dc8b407 | |||
588ce7a415 | |||
78a90f7018 | |||
59e432c439 | |||
a22f588efd | |||
00c684d865 | |||
dd82b0dc53 | |||
f293968701 | |||
02ff8f0220 | |||
3dba41eb84 | |||
b0e1412b29 | |||
fde0c46fdf | |||
dc87c6bbd8 | |||
012695659d | |||
d56ec5cba1 | |||
98135d2e19 | |||
2ff9956757 | |||
15408eaedd | |||
9c3b080302 | |||
5ea5fc6885 | |||
8d29922dc5 | |||
a55936ebef | |||
dbfca10542 | |||
35ae8b63a0 | |||
05b3e95b06 | |||
1802a9d04c | |||
ae6fa6ebb1 | |||
d96a3a18fb | |||
79329ccfee | |||
84e536b6ff | |||
b5d9273d35 | |||
f81c47dc92 | |||
a35757d81c | |||
14698560fb | |||
520e4aea73 | |||
1e99752aef | |||
1c1e24dc4c | |||
6c5631a439 | |||
f6b42e6c1e | |||
fa8449cb53 | |||
76d5f1f536 | |||
57bdd6b88c | |||
14a4a1019a | |||
d5e767f106 | |||
11ec9a9943 | |||
ff2e69b46a | |||
2a004216e3 | |||
9e285a17df | |||
3695c15050 | |||
fdec24e22d | |||
32f7fd7cba | |||
b50d2c2d51 | |||
bb38ebb1fb | |||
023a2fcf00 | |||
3fb8f8ef6a | |||
7e09ec36fb | |||
35f4c9cc66 | |||
921fe74f74 | |||
b046c03a41 | |||
48fcb8c0b9 | |||
aaa55b0224 | |||
ced2fd77ca | |||
9c55b85fc1 | |||
52dad5abe8 | |||
595c80caf2 | |||
8793ee4194 | |||
06762c62e1 | |||
44f12f651b | |||
4b07a9751d | |||
169831a62f | |||
cd93ffc8b4 | |||
5bd38de1d4 | |||
61b57ab861 | |||
9ecac0b8e5 | |||
adf599ecdb | |||
5972241303 | |||
d548e63708 | |||
2ac7da6629 | |||
8a1bb4eec5 | |||
4fb4ca840a | |||
202a425da9 | |||
811c75e435 | |||
b95e5f6a11 | |||
1f384bf891 | |||
4abf147049 | |||
01a17debfe | |||
ccb0c66cdc | |||
544db177c7 | |||
18255b7c9a | |||
6ae69c240b | |||
4b71225893 | |||
b95f489473 | |||
21b5e30251 | |||
bdc77bb6ba | |||
4c7ae38ce4 | |||
65c1f752ed | |||
dc6132b672 | |||
d2225b516b | |||
6db19ddb21 | |||
d46aab4878 | |||
b2fdcc3dcf | |||
5a6fc430ee | |||
137da30c50 | |||
815a06ec93 | |||
6c7c678a75 | |||
43cea65b40 | |||
98db882630 | |||
47840d729c | |||
5b000e2850 | |||
9326a4db8f | |||
a79f796f03 | |||
6e723a0b54 | |||
5e9014af03 | |||
6d3722742a | |||
f13783e1f3 | |||
9defb4aeeb | |||
e100efa722 | |||
45302e7807 | |||
89e5dd07c9 | |||
0b38e57978 | |||
925b6f8eac | |||
2d742db299 | |||
b81eece1d0 | |||
80e9925cc9 | |||
abb1e1aa71 | |||
da5c13da2e | |||
d6dd8513d6 | |||
8edb12a371 | |||
e6147a291c | |||
28c3426fad | |||
09364ba7ab | |||
cbe4c90805 | |||
3bebeddc69 | |||
b3409776f8 | |||
188eb5a323 | |||
9c198ad990 | |||
aba2978eb5 | |||
459a9af26d | |||
402acb8282 | |||
0e9137a73f | |||
f6af156748 | |||
6ee39e1b7e | |||
4ac5db04dd | |||
c502ca1dab | |||
b9b4ce1e38 | |||
1b8af63316 | |||
1f83b67633 | |||
4b9768cdad | |||
4fb689412c | |||
49d7a50d3a | |||
5e78a0e538 | |||
32185addef | |||
8fc271f775 | |||
3c0d7b54a0 | |||
3ff59ee0e2 | |||
3df2c80834 | |||
4a2a0e6da9 | |||
2aad09850f | |||
608b8e70c8 | |||
a1bf7d6141 | |||
20b812f1a7 | |||
2d8c56afa9 | |||
d4319f2ef5 | |||
7cf9e3c8d0 | |||
ca6d17f9a8 | |||
be0c7307ca | |||
c412989acd | |||
7e3d84d8c0 | |||
e4db68555e | |||
7e5bc01bc3 | |||
23ae3e447d | |||
d043b45556 | |||
84d10c7589 | |||
f0b6e2e64f | |||
248cd9ddff | |||
13628869d1 | |||
a493f3dbe8 | |||
1b40cb9c47 | |||
5808fc1b78 | |||
1f8b5d1e00 | |||
daa7bc5da2 | |||
a67296861d | |||
52f8f93d8a | |||
4facfc4ec5 | |||
2803eee56f | |||
a35d8cbd80 | |||
1cc2101466 | |||
2e50581d4c | |||
0696077440 | |||
5b312ef5bf | |||
be0b1800a8 | |||
96159f04b6 | |||
cd4b93effc | |||
15aaf118d4 | |||
87b1f09680 | |||
bad3da4bf0 | |||
8ac3807920 | |||
86a01a2470 | |||
774cf86d40 | |||
107c130d39 | |||
ab791bbf99 | |||
76979c664b | |||
3783f637b5 | |||
47fb141f85 | |||
8ea6d36e98 | |||
11ea8a62e9 | |||
034644ca9a | |||
ec5e78e8dc | |||
78e9086a0f | |||
05df1eaa7f | |||
4af638f381 | |||
9943bd4cb0 | |||
48d6144604 | |||
1024ca4477 | |||
5e3776d81d | |||
012075be1a | |||
8758773fe8 | |||
edbf307885 | |||
dc5d1ef2af | |||
7a436d9e15 | |||
9104e829b4 | |||
f0b1c6b64d | |||
a56bbc908d | |||
214f6ac822 | |||
a63c51d83e | |||
87e31a0ce6 | |||
a480e79b72 | |||
9aaeaedb84 | |||
e7689c2f56 | |||
9b172f4480 | |||
69f404e06e |
82
.alacritty.yml
Normal file
82
.alacritty.yml
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
font:
|
||||||
|
bold:
|
||||||
|
family: Comic Code
|
||||||
|
style: Bold
|
||||||
|
antialias: true
|
||||||
|
bold_italic:
|
||||||
|
family: Comic Code
|
||||||
|
style: Bold Italic
|
||||||
|
antialias: true
|
||||||
|
italic:
|
||||||
|
family: Comic Code
|
||||||
|
style: Italic
|
||||||
|
antialias: true
|
||||||
|
normal:
|
||||||
|
family: Comic Code
|
||||||
|
style: Medium
|
||||||
|
antialias: true
|
||||||
|
size: 16
|
||||||
|
|
||||||
|
offset:
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
|
||||||
|
glyph_offset:
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
|
||||||
|
use_thin_strokes: true
|
||||||
|
|
||||||
|
mouse:
|
||||||
|
hints:
|
||||||
|
launcher:
|
||||||
|
program: open
|
||||||
|
modifiers: Command
|
||||||
|
|
||||||
|
key_bindings:
|
||||||
|
- { key: Return, mods: Control|Shift, action: SpawnNewInstance }
|
||||||
|
- { key: F, mods: Control, action: SearchForward }
|
||||||
|
- { key: V, mods: Control|Shift, action: Paste }
|
||||||
|
- { key: Space, mods: Control, chars: "\x00" }
|
||||||
|
|
||||||
|
selection:
|
||||||
|
save_to_clipboard: true
|
||||||
|
|
||||||
|
colors:
|
||||||
|
search:
|
||||||
|
focused_match:
|
||||||
|
foreground: "#181818"
|
||||||
|
background: "#ab4642"
|
||||||
|
matches:
|
||||||
|
foreground: "#181818"
|
||||||
|
background: "#f4bf75"
|
||||||
|
footer_bar:
|
||||||
|
background: "#262626"
|
||||||
|
foreground: "#d0d0d0"
|
||||||
|
# Default colors
|
||||||
|
primary:
|
||||||
|
background: "0x000000"
|
||||||
|
foreground: "0xffffff"
|
||||||
|
# Bright colors:
|
||||||
|
bright:
|
||||||
|
black: "0x7f7f7f"
|
||||||
|
blue: "0x5c5cff"
|
||||||
|
cyan: "0x00ffff"
|
||||||
|
green: "0x00ff00"
|
||||||
|
magenta: "0xff00ff"
|
||||||
|
red: "0xff0000"
|
||||||
|
white: "0xffffff"
|
||||||
|
yellow: "0xffff00"
|
||||||
|
# Normal colors
|
||||||
|
normal:
|
||||||
|
black: "0x000000"
|
||||||
|
blue: "0x0000ee"
|
||||||
|
cyan: "0x00cdcd"
|
||||||
|
green: "0x00cd00"
|
||||||
|
magenta: "0xcd00cd"
|
||||||
|
red: "0xcd0000"
|
||||||
|
white: "0xe5e5e5"
|
||||||
|
yellow: "0xcdcd00"
|
||||||
|
|
||||||
|
import:
|
||||||
|
- C:\Users\marcin.wozniak\AppData\Roaming\alacritty\dracula.yml
|
187
.config/Ublock.txt
Normal file
187
.config/Ublock.txt
Normal file
File diff suppressed because one or more lines are too long
@ -1,22 +1,19 @@
|
|||||||
# CONFIGURATION:
|
# CONFIGURATION:
|
||||||
|
# Default configuration to DROP
|
||||||
|
iptables -P INPUT DROP
|
||||||
|
iptables -P FORWARD DROP
|
||||||
|
iptables -P OUTPUT DROP
|
||||||
|
|
||||||
# Accept on localhost
|
# Accept on localhost
|
||||||
iptables -A INPUT -i lo -j ACCEPT
|
# iptables -A INPUT -i lo -j ACCEPT
|
||||||
iptables -A OUTPUT -o lo -j ACCEPT
|
# iptables -A OUTPUT -o lo -j ACCEPT
|
||||||
|
|
||||||
# Accept outgoing network
|
# Accept outgoing network
|
||||||
iptables -A OUTPUT -o eth0 -j ACCEPT
|
iptables -A OUTPUT -o eth0 -j ACCEPT
|
||||||
|
|
||||||
# Allow established sessions to receive traffic
|
# Enable SSH (to that machine)
|
||||||
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --sport 22 -j ACCEPT
|
||||||
iptables -A INPUT -m state --state NEW,ESTABLISHED -j ACCEPT
|
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 22 -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 INZ
|
# Enable INZ
|
||||||
#iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 1285 -j ACCEPT
|
#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
|
#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 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 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 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 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 INPUT -i eth0 -m state --state NEW,INVALID -j DROP
|
||||||
iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP
|
iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP
|
||||||
|
1
.config/iterm2/AppSupport
Symbolic link
1
.config/iterm2/AppSupport
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/Users/yorune/Library/Application Support/iTerm2
|
@ -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"}]}]}
|
413
.config/karabiner/karabiner.json
Normal file
413
.config/karabiner/karabiner.json
Normal file
@ -0,0 +1,413 @@
|
|||||||
|
{
|
||||||
|
"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" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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": "grave_accent_and_tilde" },
|
||||||
|
"to": [{ "key_code": "non_us_backslash" }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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,12 +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
|
# Always allow seeking, e.g. allow seeking within a local cache of HTTP stream
|
||||||
force-seekable=yes
|
force-seekable=yes
|
||||||
|
|
||||||
# Always open a video window even with no video
|
# Always open a video window even with no video
|
||||||
force-window=yes
|
force-window=yes
|
||||||
|
|
||||||
# Don't exit when the end of playlist is reached
|
# Don't exit when the end of playlist is reached
|
||||||
keep-open=yes
|
keep-open=yes
|
||||||
|
|
||||||
# Always save the current playback position on exit
|
# Always save the current playback position on exit
|
||||||
save-position-on-quit=yes
|
save-position-on-quit=yes
|
||||||
|
|
||||||
|
# Geometry settings
|
||||||
|
geometry=50%:50%
|
||||||
|
autofit=50%
|
||||||
|
|
||||||
# Create 'high-quality' profile
|
# Create 'high-quality' profile
|
||||||
[high-quality]
|
[high-quality]
|
||||||
# Describe this profile
|
# Describe this profile
|
||||||
|
@ -15,12 +15,26 @@ unbind-key p
|
|||||||
bind-key n next
|
bind-key n next
|
||||||
bind-key p prev
|
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 listfocus black yellow standout bold
|
||||||
color listnormal_unread blue default
|
color listnormal_unread cyan default
|
||||||
color listfocus_unread yellow default bold
|
color listfocus_unread yellow default bold
|
||||||
color info red black bold
|
color info red black bold
|
||||||
color article white default 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
|
player mpv
|
||||||
|
@ -1,67 +1,19 @@
|
|||||||
=====================NEWS====================================
|
=====================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"
|
https://nitter.net/MZ_GOV_PL/rss "~MZ_GOV_PL - Twitter"
|
||||||
http://www.epoznan.pl/rss.php "~Epoznan - Website"
|
http://www.epoznan.pl/rss.php "~Epoznan - Website"
|
||||||
https://sekurak.pl/feed/ "~Sekurak"
|
https://sekurak.pl/feed/ "~Sekurak"
|
||||||
https://feeds.feedburner.com/niebezpiecznik/ "~Niebezpiecznik"
|
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?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?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=Trusted%20Contributor%20ascension&product=GURU&query_format=advanced&resolution=---&title=Bug%20List&ctype=atom
|
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"
|
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"
|
http://rss.uptimerobot.com/u674346-753d02ab763f3725330347d4419a7569 "~UpTimeRoboot"
|
||||||
=====================YOUTUBE=================================
|
=====================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===================================
|
=====================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"
|
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": [
|
"coc.preferences.formatOnSaveFiletypes": [
|
||||||
"sh",
|
"sh",
|
||||||
"yaml",
|
"yaml",
|
||||||
"json",
|
"json",
|
||||||
"python",
|
"python",
|
||||||
"css",
|
"css",
|
||||||
"Markdown",
|
"markdown",
|
||||||
"ruby"
|
"ruby",
|
||||||
|
"go"
|
||||||
],
|
],
|
||||||
"diagnostic.virtualText": true,
|
"diagnostic.virtualText": true,
|
||||||
"diagnostic.virtualTextCurrentLineOnly": false,
|
"diagnostic.virtualTextCurrentLineOnly": false,
|
||||||
"diagnostic.checkCurrentLine": false,
|
"diagnostic.checkCurrentLine": false,
|
||||||
|
"diagnostic-languageserver.filetypes": {
|
||||||
|
"markdown": ["write-good", "markdownlint"],
|
||||||
|
"sh": "shellcheck"
|
||||||
|
},
|
||||||
"languageserver": {
|
"languageserver": {
|
||||||
"bash": {
|
"bash": {
|
||||||
"command": "bash-language-server",
|
"command": "bash-language-server",
|
||||||
"args": ["start"],
|
"args": ["start"],
|
||||||
"filetypes": ["sh"],
|
"filetypes": ["sh"],
|
||||||
"ignoredRootPaths": ["~"]
|
"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
|
"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 !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
|
silent !curl --silent "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > $HOME/.config/nvim/autoload/plug.vim
|
||||||
autocmd VimEnter * PlugInstall
|
autocmd VimEnter * PlugInstall
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let mapleader = ","
|
""""""""""""""""""""""""""""""""
|
||||||
set laststatus=2
|
" Default settings nvim
|
||||||
set shiftwidth=4
|
""""""""""""""""""""""""""""""""
|
||||||
|
let g:python3_host_prog = expand('/opt/homebrew/bin/python3.12')
|
||||||
|
let g:loaded_python_provider = 0
|
||||||
|
let g:python_host_prog = ''
|
||||||
|
set autoindent
|
||||||
|
set expandtab
|
||||||
set softtabstop=4
|
set softtabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
set tabstop=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 nocompatible
|
||||||
set hlsearch
|
|
||||||
set incsearch
|
|
||||||
set noshowmode
|
set noshowmode
|
||||||
|
set noerrorbells
|
||||||
|
set wrap
|
||||||
|
set hidden
|
||||||
set cmdheight=1
|
set cmdheight=1
|
||||||
syntax on
|
|
||||||
filetype plugin indent on
|
|
||||||
set encoding=utf-8
|
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
|
" Disable by default indent line
|
||||||
" https://github.com/masukomi/masuconfigs/blob/master/.vimrc
|
" let g:indentLine_enabled = 0
|
||||||
nmap <Leader>f :FZF<CR>
|
|
||||||
nmap <Leader>b :Buffers<CR>
|
|
||||||
nmap <Leader>/ :Rg<CR>
|
|
||||||
|
|
||||||
" livepreviewer
|
" ansible
|
||||||
let g:livepreview_previewer = 'mupdf'
|
let g:ansible_extra_keywords_highlight = 1
|
||||||
|
|
||||||
" 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
|
|
||||||
|
|
||||||
" line numbers
|
" line numbers
|
||||||
set number
|
set number
|
||||||
@ -84,12 +48,12 @@ set title
|
|||||||
|
|
||||||
" indent
|
" indent
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start
|
||||||
set shiftwidth=4
|
"set list listchars=nbsp:¬,tab:»·,trail:·,extends:>
|
||||||
set expandtab
|
set list listchars=tab:\│\ ,trail:·
|
||||||
|
let g:indentLine_char_list = ['│', '│', '│', '│']
|
||||||
|
|
||||||
" editing
|
" editing
|
||||||
runtime! macros/matchit.vim
|
runtime! macros/matchit.vim
|
||||||
set backspace=indent,eol,start
|
|
||||||
|
|
||||||
" visual feedback
|
" visual feedback
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
@ -108,32 +72,438 @@ set smartcase
|
|||||||
set ic
|
set ic
|
||||||
|
|
||||||
" cursor
|
" cursor
|
||||||
|
set guicursor=
|
||||||
|
set guicursor+=a:blinkon0
|
||||||
let &t_SI = "\<esc>[6 q"
|
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 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
|
hi PmenuSel ctermfg=NONE ctermbg=246 cterm=NONE guifg=NONE guibg=#204a87 gui=NONE
|
||||||
set bg=dark
|
|
||||||
hi CursorLine cterm=NONE term=NONE ctermbg=NONE guibg=NONE
|
hi CursorLine cterm=NONE term=NONE ctermbg=NONE guibg=NONE
|
||||||
hi CursorLine ctermbg=235
|
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
|
" columne
|
||||||
set textwidth=80
|
set textwidth=80
|
||||||
set colorcolumn=-3
|
set colorcolumn=80
|
||||||
highlight ColorColumn ctermbg=235
|
highlight ColorColumn ctermbg=236
|
||||||
|
|
||||||
" map
|
""""""""""""""""""""""""""""""""
|
||||||
nnoremap S :%s//g<Left><Left>
|
" Status Line
|
||||||
nnoremap ee :!mupdf $(echo % \| sed 's/tex$/pdf/') & disown<CR><CR>
|
""""""""""""""""""""""""""""""""
|
||||||
map <C-n> :NERDTreeToggle<CR>
|
function! GitBranch()
|
||||||
nnoremap <silent> <C-t> :tabnew <CR>
|
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
|
||||||
nnoremap <F11> :Goyo <CR>
|
endfunction
|
||||||
nnoremap <F7> :tabprevious<CR>
|
|
||||||
nnoremap <F8> :tabnext<CR>
|
|
||||||
|
|
||||||
"" 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-Up> :m-2<CR>
|
||||||
nnoremap <A-Down> :m+<CR>
|
nnoremap <A-Down> :m+<CR>
|
||||||
inoremap <A-Up> <Esc>:m-2<CR>
|
inoremap <A-Up> <Esc>:m-2<CR>
|
||||||
@ -141,21 +511,221 @@ inoremap <A-Down> <Esc>:m+<CR>
|
|||||||
vnoremap <A-Down> :m '>+1<CR>gv=gv
|
vnoremap <A-Down> :m '>+1<CR>gv=gv
|
||||||
vnoremap <A-Up> :m '<-2<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
|
nnoremap <A-k> :m-2<CR>
|
||||||
let g:tex_flavor = "latex"
|
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 "!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 "!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 "!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 "!pkill -HUP mupdf > /dev/null" | redraw!
|
||||||
|
|
||||||
" mutt
|
" Mutt
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80
|
autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo
|
autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR>
|
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR>
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR>
|
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR>
|
||||||
|
|
||||||
|
" Yaml
|
||||||
|
autocmd BufRead,BufNewFile *.yaml let g:indentLine_enabled = 1
|
||||||
|
autocmd BufRead,BufNewFile *.yaml let g:indentLine_char = '⦙'
|
||||||
|
au BufRead,BufNewFile *.yaml,*.yml if search('hosts:\|tasks:', 'nw') | set ft=yaml.ansible | endif
|
||||||
|
autocmd BufWritePre *.yaml 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
|
||||||
|
|
||||||
" Automatically deletes all trailing whitespace and newlines at end of file on save.
|
" Automatically deletes all trailing whitespace and newlines at end of file on save.
|
||||||
autocmd BufWritePre * %s/\s\+$//e
|
autocmd BufWritePre * %s/\s\+$//e
|
||||||
autocmd BufWritepre * %s/\n\+\%$//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
|
||||||
|
5
.config/streamlink/config
Normal file
5
.config/streamlink/config
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
player=mpv
|
||||||
|
twitch-disable-ads
|
||||||
|
twitch-low-latency
|
||||||
|
default-stream best
|
||||||
|
player-no-close
|
@ -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)
|
(package-initialize)
|
||||||
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
||||||
|
|
||||||
|
;; UTF-8
|
||||||
|
(set-language-environment "UTF-8")
|
||||||
|
|
||||||
;; Remove welcome screen
|
;; Remove welcome screen
|
||||||
(setq inhibit-startup-screen t)
|
(setq inhibit-startup-screen t)
|
||||||
|
|
||||||
;; Disable menu
|
;; Disable menu
|
||||||
(menu-bar-mode 0)
|
(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
|
;; Remove working cl
|
||||||
(require 'cl-lib)
|
(require 'cl-lib)
|
||||||
(setq byte-compile-warnings '(cl-functions))
|
(setq byte-compile-warnings '(cl-functions))
|
||||||
@ -40,6 +37,24 @@
|
|||||||
(package-install 'use-package)
|
(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"
|
;; Set path to store "custom-set"
|
||||||
(setq custom-file "~/.emacs.d/emacs-custom.el")
|
(setq custom-file "~/.emacs.d/emacs-custom.el")
|
||||||
|
|
||||||
@ -79,6 +94,26 @@
|
|||||||
(setq browse-url-browser-function 'browse-url-generic
|
(setq browse-url-browser-function 'browse-url-generic
|
||||||
browse-url-generic-program "browser-x")
|
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
|
;; Custom theme
|
||||||
(add-to-list 'custom-theme-load-path
|
(add-to-list 'custom-theme-load-path
|
||||||
"~/.emacs.d/plugins/")
|
"~/.emacs.d/plugins/")
|
||||||
@ -107,15 +142,6 @@
|
|||||||
(message "Monz not available; not configuring") )
|
(message "Monz not available; not configuring") )
|
||||||
(setq default-input-method "japanese-mozc")
|
(setq default-input-method "japanese-mozc")
|
||||||
|
|
||||||
;; Enable Smex
|
|
||||||
(use-package smex
|
|
||||||
:ensure t
|
|
||||||
:init
|
|
||||||
(smex-initialize)
|
|
||||||
:bind
|
|
||||||
("M-x" . smex)
|
|
||||||
)
|
|
||||||
|
|
||||||
;; reveal dependency
|
;; reveal dependency
|
||||||
(use-package htmlize
|
(use-package htmlize
|
||||||
:ensure t
|
:ensure t
|
||||||
@ -167,20 +193,20 @@
|
|||||||
(defun rc/get-default-font ()
|
(defun rc/get-default-font ()
|
||||||
(cond
|
(cond
|
||||||
((eq system-type 'windows-nt) "Consolas-13")
|
((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)))
|
(add-to-list 'default-frame-alist `(font . ,(rc/get-default-font)))
|
||||||
|
|
||||||
;; Theme
|
;; Theme
|
||||||
;;(use-package dracula-theme
|
;;(use-package gruvbox-theme
|
||||||
;; :ensure t
|
;; :ensure t
|
||||||
;; :config
|
;; :config
|
||||||
;; (load-theme 'dracula t))
|
;; (load-theme 'gruvbox-dark-hard t))
|
||||||
|
|
||||||
(use-package zenburn-theme
|
(use-package dracula-theme
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(load-theme 'zenburn t))
|
(load-theme 'dracula t))
|
||||||
|
|
||||||
;; Sitebar dirred
|
;; Sitebar dirred
|
||||||
(use-package dired-sidebar
|
(use-package dired-sidebar
|
||||||
@ -193,15 +219,19 @@
|
|||||||
;; Smex
|
;; Smex
|
||||||
(require 'smex)
|
(require 'smex)
|
||||||
(smex-initialize)
|
(smex-initialize)
|
||||||
(global-set-key (kbd "M-x") 'smex)
|
(global-set-key (kbd "M-x") 'counsel-M-x)
|
||||||
|
|
||||||
;;buffer-move
|
;;buffer-move
|
||||||
(require '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-up>") 'buf-move-up)
|
||||||
(global-set-key (kbd "<C-S-down>") 'buf-move-down)
|
(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-left>") 'buf-move-left)
|
||||||
(global-set-key (kbd "<C-S-right>") 'buf-move-right)
|
(global-set-key (kbd "<C-S-right>") 'buf-move-right)
|
||||||
|
|
||||||
|
;; Files
|
||||||
|
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
|
||||||
|
|
||||||
;; Multiple-cursors
|
;; Multiple-cursors
|
||||||
(use-package multiple-cursors
|
(use-package multiple-cursors
|
||||||
:ensure t
|
:ensure t
|
||||||
@ -445,6 +475,8 @@
|
|||||||
:config (treemacs-set-scope-type 'Perspectives))
|
:config (treemacs-set-scope-type 'Perspectives))
|
||||||
|
|
||||||
;; Python
|
;; Python
|
||||||
|
(setq python-shell-interpreter "python3")
|
||||||
|
(setq py-python-command "/usr/bin/python3")
|
||||||
(use-package company-jedi
|
(use-package company-jedi
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
@ -457,6 +489,11 @@
|
|||||||
|
|
||||||
(setq-default ebuild-mode-update-copyright nil)
|
(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)
|
(defun infer-indentation-style () (interactive)
|
||||||
(let ((space-count (how-many "^ " (point-min) (point-max)))
|
(let ((space-count (how-many "^ " (point-min) (point-max)))
|
||||||
(tab-count (how-many "^\t" (point-min) (point-max))))
|
(tab-count (how-many "^\t" (point-min) (point-max))))
|
||||||
@ -478,6 +515,16 @@
|
|||||||
|
|
||||||
;;; --- Look & Feel ---
|
;;; --- 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
|
;; Helm
|
||||||
(use-package helm
|
(use-package helm
|
||||||
:ensure t
|
:ensure t
|
||||||
@ -578,3 +625,4 @@
|
|||||||
(other-window 1)
|
(other-window 1)
|
||||||
)
|
)
|
||||||
(global-set-key (kbd "C-x x") 'kill-and-remove-split)
|
(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
|
50
.gitconfig.local
Normal file
50
.gitconfig.local
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
[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'
|
||||||
|
|
||||||
|
[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
|
85
.gitignore
vendored
85
.gitignore
vendored
@ -1,10 +1,34 @@
|
|||||||
|
.config/backup-started*
|
||||||
.Xauthority
|
.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/Element/
|
||||||
.config/TabNine/
|
.config/TabNine/
|
||||||
.config/coc/
|
.config/coc/
|
||||||
.config/google-chrome/
|
.config/google-chrome/
|
||||||
.config/teamviewer/
|
.config/teamviewer/
|
||||||
.ipython/
|
.ipython/
|
||||||
|
.bugz_token
|
||||||
.irbrc
|
.irbrc
|
||||||
.jupyter/
|
.jupyter/
|
||||||
.local/bin/autopep8
|
.local/bin/autopep8
|
||||||
@ -12,6 +36,14 @@
|
|||||||
.local/bin/pycodestyle
|
.local/bin/pycodestyle
|
||||||
.local/bin/surprise
|
.local/bin/surprise
|
||||||
.local/bin/yamllint
|
.local/bin/yamllint
|
||||||
|
.config/Signal/
|
||||||
|
.config/lazygit/
|
||||||
|
.config/libreoffice/
|
||||||
|
.config/quassel-irc.org/
|
||||||
|
.local/bin/pytube
|
||||||
|
.local/bin/spotify_dl
|
||||||
|
.packer.d/
|
||||||
|
.spotifydl/
|
||||||
.netrc
|
.netrc
|
||||||
.nvimlog
|
.nvimlog
|
||||||
.python_history
|
.python_history
|
||||||
@ -41,6 +73,7 @@
|
|||||||
.fzf.bash
|
.fzf.bash
|
||||||
.fzf.zsh
|
.fzf.zsh
|
||||||
.fzf/
|
.fzf/
|
||||||
|
.local/bin/ansible*
|
||||||
.recently-used
|
.recently-used
|
||||||
.eclipse/
|
.eclipse/
|
||||||
.emacs.d/.dap-breakpoints
|
.emacs.d/.dap-breakpoints
|
||||||
@ -124,6 +157,24 @@
|
|||||||
.local/bin/symilar
|
.local/bin/symilar
|
||||||
.local/bin/vpnst
|
.local/bin/vpnst
|
||||||
.local/bin/wheel
|
.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/include/
|
||||||
.local/lib/
|
.local/lib/
|
||||||
.local/lib64/
|
.local/lib64/
|
||||||
@ -193,3 +244,37 @@ www
|
|||||||
Movies/
|
Movies/
|
||||||
Music/
|
Music/
|
||||||
notes.org
|
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
|
||||||
|
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 -e $(date)
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
sudo /home/yorune/.local/bin/eix-repos-sync
|
sudo emerge --sync
|
||||||
sudo eix-sync -a
|
sudo $HOME/.local/bin/eix-repos-sync
|
||||||
sudo eix-update
|
sudo eix-update
|
||||||
#sudo emerge-webrsync
|
|
||||||
#sudo emerge --sync
|
|
||||||
#sudo emaint sync -a
|
|
||||||
sudo emerge -auDN @world
|
sudo emerge -auDN @world
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
BACKUP="/home/yorune/Linux/portage"
|
BACKUP="/home/yorune/MEGA/Systems/Linux/portage"
|
||||||
LOG_FILE="/tmp/update-kernel.log"
|
TMP_KERNEL="/tmp/kernel-config-$(uname -r)"
|
||||||
TMP_KERNEL="/tmp/kernel-config-`uname -r`"
|
|
||||||
DEFAULT_KERNEL="/usr/src/linux/.config"
|
DEFAULT_KERNEL="/usr/src/linux/.config"
|
||||||
|
GRUBRELOAD=1
|
||||||
|
|
||||||
function starting() {
|
function starting() {
|
||||||
echo -e "\e[93m----------------------COMPILING------------------------------\e[0m"
|
echo -e "\e[93m----------------------COMPILING------------------------------\e[0m"
|
||||||
sudo cp -rv $DEFAULT_KERNEL $TMP_KERNEL
|
sudo cp -rv "$DEFAULT_KERNEL" "$TMP_KERNEL"
|
||||||
cp -r $TMP_KERNEL $BACKUP/kernel-config
|
cp -r "$TMP_KERNEL" "$BACKUP/kernel-config"
|
||||||
cp -r /etc/portage/* $BACKUP
|
sudo cp -r /etc/portage/* $BACKUP
|
||||||
qlist -I | sort -u > $BACKUP/list-of-programs
|
qlist -I | sort -u > $BACKUP/list-of-programs
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18,26 +18,30 @@ echo -e "\e[93m----------------------SELECTION-----------------------------\e[0m
|
|||||||
sudo eselect kernel list
|
sudo eselect kernel list
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
read -p "New kernel is: " KERVER
|
read -rp "New kernel is: " KERVER
|
||||||
echo
|
echo
|
||||||
echo -e "Your kernel now is \e[91m$(uname -sr)\e[0m"
|
echo -e "Your kernel now is \e[91m$(uname -sr)\e[0m"
|
||||||
echo -e "Your selected kernel is \e[91m"$KERVER"\e[0m"
|
echo -e "Your selected kernel is \e[91m$KERVER\e[0m"
|
||||||
sudo eselect kernel set $KERVER
|
sudo eselect kernel set "$KERVER"
|
||||||
sudo eselect kernel list | grep "*"
|
sudo eselect kernel list | grep -iE "\*"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
function compilation() {
|
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
|
echo
|
||||||
if [ "$agreed" == "y" ] || [ "$agreed" == "Y" ]
|
if [ "$agreed" == "y" ] || [ "$agreed" == "Y" ]
|
||||||
then
|
then
|
||||||
echo -e "\e[91m----------------------\e[5mSTARTING\e[0m\e[91m------------------------------\e[0m" && sleep 10
|
echo -e "\e[91m----------------------\e[5mSTARTING\e[0m\e[91m------------------------------\e[0m" && sleep 10
|
||||||
$NOW > /tmp/compiling-starting
|
$NOW > /tmp/compiling-starting
|
||||||
NEW_KERNEL="/tmp/new-kernel-config"
|
NEW_KERNEL="/tmp/new-kernel-config"
|
||||||
sudo cp -r $TMP_KERNEL $DEFAULT_KERNEL
|
sudo cp -r "$TMP_KERNEL" "$DEFAULT_KERNEL"
|
||||||
cd /usr/src/linux; sudo make menuconfig; sleep 2; sudo cp -r $DEFAULT_KERNEL $NEW_KERNEL
|
cd /usr/src/linux || exit
|
||||||
sudo genkernel all --makeopts=-j$(nproc --all) --kernel-config=$NEW_KERNEL --callback="emerge nvidia-drivers::gentoo" --lvm --btrfs --luks
|
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" ]
|
elif [ "$agreed" == "N" ] || [ "$agreed" == "n" ]
|
||||||
then
|
then
|
||||||
exit
|
exit
|
||||||
@ -64,16 +68,20 @@ echo -e "AFTER EVERYTHING YOU MUST WRITE COMMAND \e[91m"sudo grub-mkconfig -o /b
|
|||||||
}
|
}
|
||||||
|
|
||||||
function checking() {
|
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"
|
INITRANFS="initramfs-$KERNEL-gentoo-x86_64.img"
|
||||||
SYSTEMMAP="System.map-$KERNEL-gentoo-x86_64"
|
SYSTEMMAP="System.map-$KERNEL-gentoo-x86_64"
|
||||||
VMLINUZ="vmlinuz-$KERNEL-gentoo-x86_64"
|
VMLINUZ="vmlinuz-$KERNEL-gentoo-x86_64"
|
||||||
|
|
||||||
ifchecking $INITRANFS
|
ifchecking "$INITRANFS"
|
||||||
ifchecking $SYSTEMMAP
|
ifchecking "$SYSTEMMAP"
|
||||||
ifchecking $VMLINUZ
|
ifchecking "$VMLINUZ"
|
||||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
[ "$GRUBRELOAD" -eq "1" ] && sudo grub-mkconfig -o /boot/grub/grub.cfg \
|
||||||
|
|| echo "Please check all files and regenerate grub again!"
|
||||||
}
|
}
|
||||||
|
|
||||||
function ifchecking () {
|
function ifchecking () {
|
||||||
@ -82,15 +90,17 @@ if test -f "$FILE"; then
|
|||||||
echo "$FILE exist in the /boot folder ;)"
|
echo "$FILE exist in the /boot folder ;)"
|
||||||
else
|
else
|
||||||
echo "$FILE NOT exist in the /boot folder ;)"
|
echo "$FILE NOT exist in the /boot folder ;)"
|
||||||
|
GRUBRELOAD=0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function addgit() {
|
function addgit() {
|
||||||
cd ~/Linux/portage || exit
|
cd "$BACKUP" || exit
|
||||||
|
sleep 20
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Updated: $(date)"
|
git commit -m "Updated: $(date)"
|
||||||
git push
|
git push
|
||||||
cd ~ || exit
|
cd "$HOME" || exit
|
||||||
}
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
|
470
.local/bin/Update-pkg
Executable file
470
.local/bin/Update-pkg
Executable file
@ -0,0 +1,470 @@
|
|||||||
|
#!/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
|
||||||
|
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 update() {
|
||||||
|
if [ -d $CONFIG/fzf ]; then
|
||||||
|
FOLDER="$CONFIG/fzf"
|
||||||
|
cd $FOLDER || err "Folder $FOLDER has been NOT found"
|
||||||
|
git pull -q && timestamp "Pulling the $FOLDER configuration"
|
||||||
|
else
|
||||||
|
FOLDER="$CONFIG/fzf"
|
||||||
|
git clone https://github.com/junegunn/fzf.git $FOLDER && timestamp "Cloning the FZF"
|
||||||
|
git pull -q && timestamp "Pulling the $FOLDER configuration"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d $ZSHFOLDER/aws ]; then
|
||||||
|
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"
|
||||||
|
|
||||||
|
mkdir -p "$ZSHFOLDER/azure-cli" "$ZSHFOLDER/aws"
|
||||||
|
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 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 update
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
#!/bin/bash
|
||||||
source ~/.password
|
source $HOME/.password
|
||||||
mkdir -p ~/Movies/{Anime,Videos}
|
mkdir -p ~/Movies/{Anime,Videos}
|
||||||
mkdir -p ~/Music
|
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/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/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/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
|
#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
|
then
|
||||||
echo "Starting $(date)" > ~/.cache/.logSynology
|
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
|
echo "Ending $(date)" >> ~/.cache/.logSynology
|
||||||
fi
|
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=$(uname -sr)
|
||||||
[[ $KERNEL =~ "icrosoft" ]] && "/mnt/c/Program Files/Mozilla Firefox/firefox.exe" "$@"
|
[[ $KERNEL =~ "icrosoft" ]] && "/mnt/c/Program Files/Mozilla Firefox/firefox.exe" "$@"
|
||||||
[[ $KERNEL =~ "gentoo" ]] && GDK_DPI_SCALE="1.2" firefox "$@"
|
[[ $KERNEL =~ "gentoo" ]] && GDK_DPI_SCALE="1.2" firefox "$@"
|
||||||
|
[[ $KERNEL =~ "Darwin" ]] && open -a firefox -u "$2"
|
||||||
#[[ $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 "$@"
|
#[[ $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
|
# 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
|
#!/bin/bash
|
||||||
set -x
|
"$HOME/.local/bin/cleanertmp"
|
||||||
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 emerge -a --depclean
|
sudo emerge -a --depclean
|
||||||
sudo emerge -a @preserved-rebuild
|
sudo emerge -a @preserved-rebuild
|
||||||
sudo eclean -C -q packages
|
sudo eclean -C -q packages
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
sudo rm -rf /var/tmp/portage/*
|
sudo rm -rf /var/tmp/portage/*
|
||||||
sudo rm -rf /var/tmp/binpkgs/*
|
sudo rm -rf /var/tmp/binpkgs/*
|
||||||
sudo rm -rf /var/tmp/genkernel/*
|
sudo rm -rf /var/tmp/genkernel/*
|
||||||
sudo rm -rf /var/cache/genkernel/*
|
sudo rm -rf /var/cache/genkernel/*
|
||||||
|
sudo rm -rf /var/tmpnotmpfs/portage/*
|
||||||
sudo eclean-dist -d
|
sudo eclean-dist -d
|
||||||
sudo eclean-pkg -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
|
sudo rc-service docker start
|
||||||
sleep 10
|
sleep 10
|
||||||
sudo docker ps
|
sudo docker ps --all
|
||||||
|
@ -1,2 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/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 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python3.8
|
#!/usr/bin/python3.9
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
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 "$@"
|
47
.local/bin/getting-spotify
Executable file
47
.local/bin/getting-spotify
Executable file
@ -0,0 +1,47 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
FOLDER_FAV="/Volumes/Music/Jellyfin/Playlist-Fav"
|
||||||
|
FOLDER_DUB="/Volumes/Music/Jellyfin/Playlist-Dub"
|
||||||
|
|
||||||
|
# Check if folder exists
|
||||||
|
[ ! -d $FOLDER_DUB ] && exit 1
|
||||||
|
[ ! -d $FOLDER_FAV ] && exit 1
|
||||||
|
|
||||||
|
# Remove old files
|
||||||
|
rm -rfv $FOLDER_DUB/errors.txt
|
||||||
|
rm -rfv $FOLDER_FAV/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 \
|
||||||
|
$FOLDER_DUB/* docker-de:/mnt/HC_Volume_34966154/jellifin/media/music/Dub
|
||||||
|
|
||||||
|
rsync -h --progress --recursive \
|
||||||
|
$FOLDER_FAV/* docker-de:/mnt/HC_Volume_34966154/jellifin/media/music/Fav
|
||||||
|
|
||||||
|
# Generate playlist
|
||||||
|
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"
|
||||||
|
|
||||||
|
# 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/
|
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/authorized_keys
|
||||||
chmod 644 ~/.ssh/known_hosts
|
chmod 644 ~/.ssh/known_hosts
|
||||||
chmod 644 ~/.ssh/config
|
chmod 644 ~/.ssh/config
|
||||||
chmod 400 ~/.ssh/id_rsa
|
# chmod 400 ~/.ssh/id_rsa
|
||||||
chmod 400 ~/.ssh/id_rsa.pub
|
# 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' \
|
'-> if is-empty(it) then "No one you are following is streaming right now." else it' \
|
||||||
-o table
|
-o table
|
||||||
else
|
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
|
fi
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python3.8
|
#!/usr/bin/python3.9
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
1
.local/bin/youtube-dl
Symbolic link
1
.local/bin/youtube-dl
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/usr/local/bin/yt-dlp
|
@ -1,2 +1,2 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
youtube-dl --extract-audio --audio-format mp3 $1
|
yt-dlp --extract-audio --audio-format mp3 $1
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#!/bin/bash
|
#!/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
|
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
|
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'
|
set -g default-terminal "xterm-256color"
|
||||||
unbind C-b
|
set -ga terminal-overrides ",*256col*:Tc"
|
||||||
bind-key C-a send-prefix
|
|
||||||
unbind q
|
# Keybindings
|
||||||
bind q confirm kill-window
|
unbind C-b # Unbind a default keys conbination
|
||||||
bind Q confirm kill-pane
|
unbind q # Unbind a q key
|
||||||
set -g status on
|
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 ?
|
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 -g history-limit 20000
|
||||||
set-option -sg escape-time 0
|
set-option -sg escape-time 0
|
||||||
set -g base-index 1 # start windows numbering at 1
|
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 status-interval 10 # redraw status line every 10 seconds
|
||||||
set -g monitor-activity on
|
set -g monitor-activity on
|
||||||
set -g visual-activity off
|
set -g visual-activity off
|
||||||
bind C-c new-session
|
set -g visual-bell off
|
||||||
bind C-f command-prompt -p find-session 'switch-client -t %%'
|
|
||||||
bind - split-window -v
|
# Coloring of the panel
|
||||||
bind _ split-window -h
|
set -g pane-border-style fg=default
|
||||||
bind > swap-pane -D # swap current pane with the next one
|
set -g pane-active-border-style "bg=default fg=color244"
|
||||||
bind < swap-pane -U # swap current pane with the previous one
|
|
||||||
bind -r H resize-pane -L 2
|
# Status bar
|
||||||
bind -r J resize-pane -D 2
|
## Source of example configuration
|
||||||
bind -r K resize-pane -U 3
|
## https://arcolinux.com/everything-you-need-to-know-about-tmux-status-bar/
|
||||||
bind -r L resize-pane -R 2
|
set-option -g status on
|
||||||
bind -r C-h previous-window # select previous window
|
set-option -g status-interval 1
|
||||||
bind -r C-l next-window # select next window
|
set-option -g status-position bottom
|
||||||
bind Tab last-window # move to last active window
|
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!
|
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.
|
" Automatically deletes all trailing whitespace and newlines at end of file on save.
|
||||||
autocmd BufWritePre * %s/\s\+$//e
|
autocmd BufWritePre * %s/\s\+$//e
|
||||||
autocmd BufWritepre * %s/\n\+\%$//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&
|
dwmblocks&
|
||||||
nm-applet --sm-disable&
|
nm-applet --sm-disable&
|
||||||
dunst -config&
|
dunst -config&
|
||||||
#browser-x&
|
browser-x&
|
||||||
QT_SCALE_FACTOR=1.5 keepassxc &
|
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
|
sudo /usr/bin/rdate -s ntp.task.gda.pl && sudo /sbin/hwclock --systohc
|
||||||
megasync &
|
megasync &
|
||||||
ibus-daemon&
|
ibus-daemon&
|
||||||
|
#quasselclient&
|
||||||
|
|
||||||
# Two monitors are enabled?
|
# Two monitors are enabled?
|
||||||
if [[ $(mons | awk '/Monitors/{print $2}') = 2 ]]
|
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
|
241
.zshrc
241
.zshrc
@ -1,11 +1,15 @@
|
|||||||
|
|
||||||
# ZSHRC
|
# ZSHRC
|
||||||
|
|
||||||
CONFIG=$HOME/.config
|
CONFIG=$HOME/.config
|
||||||
|
|
||||||
parse_git_branch() {
|
parse_git_branch() {
|
||||||
command=$(git symbolic-ref --short HEAD 2> /dev/null)
|
command=$(git branch \
|
||||||
[ -z $command ] && echo -e "$ " || echo -e "$(git symbolic-ref --short HEAD 2> /dev/null) $ "
|
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() {
|
gbranch() {
|
||||||
@ -15,27 +19,36 @@ gbranch() {
|
|||||||
[ -f /etc/gentoo-release ] && export ZSH="/usr/share/zsh/site-contrib/oh-my-zsh"
|
[ -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/centos-release ] && export ZSH="$HOME/.oh-my-zsh"
|
||||||
[ -f /etc/debian_version ] && 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
|
HISTFILE=$HOME/.history_zsh
|
||||||
HISTSIZE=10000
|
HISTSIZE=10000000
|
||||||
SAVEHIST=10000000
|
SAVEHIST=10000000
|
||||||
autoload -U colors && colors
|
autoload -U colors && colors
|
||||||
|
autoload bashcompinit && bashcompinit
|
||||||
setopt PROMPT_SUBST
|
setopt PROMPT_SUBST
|
||||||
PS1='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(parse_git_branch)%{$reset_color%}'
|
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
|
ZSH_DISABLE_COMPFIX=true
|
||||||
source $ZSH/oh-my-zsh.sh
|
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/zsh-autosuggestions ] && source $CONFIG/zsh/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh &>>/dev/null
|
||||||
[ -d $CONFIG/zsh ] && 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 ] && 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
|
[ -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 $CONFIG/fzf/shell/key-bindings.zsh ] && source $HOME/.config/fzf/shell/key-bindings.zsh
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||||
FPATH=/usr/local/share/zsh/site-functions:$FPATH
|
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 GPG_TTY=$(tty)
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
export SHELL=/bin/bash
|
export SHELL=/bin/bash
|
||||||
@ -47,63 +60,179 @@ export CCACHE_DIR="/usr/ccache"
|
|||||||
export LC_ALL="en_US.UTF-8"
|
export LC_ALL="en_US.UTF-8"
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export LC_ALL=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 FZF_DEFAULT_OPTS='--height 40% --layout=reverse'
|
||||||
export EIX_LIMIT_COMPACT=0
|
export EIX_LIMIT_COMPACT=0
|
||||||
export TERMINAL="st"
|
export TERMINAL="st"
|
||||||
export QT_SCALE_FACTOR=1.5
|
export QT_SCALE_FACTOR=1.5
|
||||||
export VISUAL='nvim'
|
|
||||||
export EDITOR='nvim'
|
# Declerating the PATHs
|
||||||
alias vimc="nvim $HOME/.vimrc"
|
unset PATH
|
||||||
alias svm="sudo nvim /etc/portage/make.conf"
|
export PATH=/bin:$PATH
|
||||||
alias svr="sudo nvim /etc/portage/repos.conf"
|
export PATH=/usr/bin:$PATH
|
||||||
alias svp="sudo nvim /etc/portage/package.use"
|
export PATH=/usr/sbin:$PATH
|
||||||
alias sva="sudo nvim /etc/portage/package.accept_keywords"
|
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 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 emerge="sudo emerge"
|
||||||
alias channel-check='sudo iwlist wlan0 scan | egrep -i "essid|frequency"'
|
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 grep="grep --color=always"
|
alias code="vscodium-bin"
|
||||||
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 pl="setxkbmap pl"
|
alias pl="setxkbmap pl"
|
||||||
|
alias feh="feh --edit --scale-down"
|
||||||
alias graphic-card="glxinfo|egrep 'OpenGL vendor|OpenGL renderer'"
|
alias graphic-card="glxinfo|egrep 'OpenGL vendor|OpenGL renderer'"
|
||||||
alias mylaptop-components="inxi -Fxz"
|
alias mylaptop-components="inxi -Fxz"
|
||||||
|
alias update_time="sudo ntpdate -b -u vega.cbk.poznan.pl"
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
|
||||||
|
# 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 r="ranger"
|
||||||
alias v="nvim"
|
alias cp='cp -v'
|
||||||
alias feh="feh --scale-down"
|
alias mv='mv -v'
|
||||||
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 cal="cal -3"
|
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 denpl="trans en:pl"
|
||||||
alias dplen="trans pl:en"
|
alias dplen="trans pl:en"
|
||||||
alias notes="nvim $HOME/git/notes/index.md"
|
alias myip="curl ipinfo.io/ip"
|
||||||
alias mgr="cd $HOME/Documents/Collage/Magisterka-Marcin/Semestr1/"
|
alias changefont="figlet"
|
||||||
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"
|
|
||||||
|
|
||||||
# Cleaning-up
|
# Others
|
||||||
export PATH=$HOME/.local/bin:$PATH
|
alias channel-check='sudo iwlist wlan0 scan | egrep -i "essid|frequency"'
|
||||||
export HISTTIMEFORMAT="%F %T "
|
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
|
||||||
|
|
||||||
|
# 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