Compare commits
258 Commits
e069ccbe88
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
5e7c193a28
|
|||
|
67f7129dac
|
|||
|
333bd228d4
|
|||
|
5c7e24e645
|
|||
|
4ff5da379c
|
|||
|
53b3e791df
|
|||
|
cf7a36c3ba
|
|||
|
af3ccebaae
|
|||
|
10c12125a3
|
|||
|
6e67fa87bb
|
|||
|
2628308f0b
|
|||
|
bbb7add614
|
|||
|
5b4f97982d
|
|||
| 96f80a024a | |||
| 18a93fe079 | |||
|
8517bc121c
|
|||
|
354a7118de
|
|||
|
d7b18e47b0
|
|||
|
5ae87c8796
|
|||
|
d395cc57c8
|
|||
| c910091882 | |||
|
f51a70d0a3
|
|||
|
98af89fa7d
|
|||
|
952a358d91
|
|||
|
594b3d667b
|
|||
|
e63b1fd2e6
|
|||
|
9661b20ede
|
|||
|
a59d2f6a65
|
|||
|
e10eb03b3d
|
|||
|
5abd83a2e5
|
|||
| b48aa761bb | |||
|
ffb0c2717e
|
|||
|
399ac740fa
|
|||
|
051927907d
|
|||
|
3fd0b5a647
|
|||
|
87b77cd412
|
|||
| 57198f0f77 | |||
|
5fe3c435c5
|
|||
|
7d8410f5ad
|
|||
|
9cb3239cfe
|
|||
|
0a7942333a
|
|||
| db852f5144 | |||
| 79b41aa29f | |||
|
d3cece065e
|
|||
|
979647e7ff
|
|||
|
f01522b313
|
|||
|
f9d5c1f65a
|
|||
|
fa4126ab3d
|
|||
|
a68cd06f99
|
|||
|
78a9b670c1
|
|||
|
2c607a8e74
|
|||
|
7edbac4624
|
|||
|
3ec25cd975
|
|||
|
e0ed6a4de9
|
|||
|
e73ca2721d
|
|||
|
b563afec08
|
|||
|
957d0e91dc
|
|||
|
ceb4fa97d5
|
|||
|
c043f4e9f8
|
|||
|
90d4b80cf9
|
|||
|
d7f7fab0e7
|
|||
|
31f14bf065
|
|||
|
5b7b3ad924
|
|||
|
a411350480
|
|||
| 06affa9723 | |||
| 06257367b8 | |||
| c9a710b86b | |||
| e0d95e3bd0 | |||
|
9001a8f4bd
|
|||
|
67b7083617
|
|||
|
e26b76514e
|
|||
|
45200d0108
|
|||
|
b1c4c6d4ac
|
|||
|
840948e179
|
|||
|
38fcc71ca3
|
|||
|
da0e57ae22
|
|||
|
65ab18e077
|
|||
|
06c1211342
|
|||
|
6641a7cf7f
|
|||
|
2286485bb7
|
|||
|
258aa4b5ea
|
|||
|
13d1b5a116
|
|||
|
3527a4fd65
|
|||
|
573aac3d6f
|
|||
|
e8f6d38da5
|
|||
|
7b4a78692b
|
|||
|
fd0c14dc0c
|
|||
|
2458565137
|
|||
|
1d01dacdfd
|
|||
|
927bede28b
|
|||
|
cb22c6bbdb
|
|||
|
c99739a2e3
|
|||
|
62c641e1fc
|
|||
|
dcbdc4203c
|
|||
|
fce4839256
|
|||
|
dc460aaf4f
|
|||
|
174e7a8249
|
|||
|
6e17c8f6a6
|
|||
|
0e1f393379
|
|||
|
972bcf003d
|
|||
|
b5babe522d
|
|||
|
4ab0c938d1
|
|||
|
c037e5875a
|
|||
|
9af7a35729
|
|||
|
c64933826b
|
|||
|
6880ff625b
|
|||
|
db737efb58
|
|||
|
3a42637493
|
|||
|
8218831b06
|
|||
|
179b5ee6ae
|
|||
|
aa9e55ec13
|
|||
|
d94374c77e
|
|||
|
3d65ba5862
|
|||
|
3a4bf7d82d
|
|||
|
db25034891
|
|||
|
ff7ca4e4ba
|
|||
|
a18a03ba0e
|
|||
|
d9a68f0181
|
|||
|
a5b2a89963
|
|||
|
cb7c1dc23c
|
|||
|
6540833edc
|
|||
|
f4b52e2836
|
|||
|
ce8d911622
|
|||
|
c887d19846
|
|||
|
517b4499e1
|
|||
|
acfeed782e
|
|||
|
8d88dc5cd8
|
|||
|
3ceaf2c0ca
|
|||
|
1b11595fb3
|
|||
|
3fc49a7491
|
|||
|
34ee591b48
|
|||
|
b13ab1ee86
|
|||
|
9ea4271925
|
|||
|
0867bbae0f
|
|||
|
388856418f
|
|||
|
02f153a216
|
|||
|
032261cc53
|
|||
|
67f71e45e6
|
|||
|
2dfc7c657e
|
|||
|
519935c8c3
|
|||
|
0045b88e23
|
|||
|
d16f786da3
|
|||
|
fa5410c51e
|
|||
|
18d0304855
|
|||
|
aa18fd63fb
|
|||
|
74de1a4b69
|
|||
|
a24277188b
|
|||
|
0271518975
|
|||
|
fa6f170e78
|
|||
|
36e62c9bbf
|
|||
|
0642124a2b
|
|||
|
aa2dc6ea15
|
|||
|
9c40ab1ef4
|
|||
|
2a7ae7ee34
|
|||
|
5176480fe3
|
|||
|
d950725e34
|
|||
|
8c30126267
|
|||
|
3a4c2a3175
|
|||
| 6d195b54a9 | |||
| cae9efe25f | |||
| b08d55d093 | |||
|
056211fc5d
|
|||
|
237fa22c3c
|
|||
|
a2d35fa565
|
|||
|
1a7258a7c2
|
|||
|
a6a3e7a97d
|
|||
|
5ad22d6a0c
|
|||
|
a451e48887
|
|||
|
f09d772b43
|
|||
|
093b7afe94
|
|||
|
b6531abf57
|
|||
|
d0a13dc52d
|
|||
|
838e99f3de
|
|||
|
a77c1289a4
|
|||
|
cd2e4cc650
|
|||
|
2b60c4f42c
|
|||
|
704871969f
|
|||
|
48e4b9db44
|
|||
|
cf794d8841
|
|||
|
b69097755b
|
|||
|
a74f22a58c
|
|||
|
4520984561
|
|||
|
23886416b4
|
|||
|
e750b5ea50
|
|||
|
409ce9a05c
|
|||
|
6295099bd9
|
|||
|
85c74a418d
|
|||
|
ce78c1a39d
|
|||
|
d2e9e775ec
|
|||
|
eb5db8a34a
|
|||
|
e9cdf0b0ec
|
|||
|
136356ab82
|
|||
|
059ac7737b
|
|||
|
7c6fd745cd
|
|||
|
c8d75261c4
|
|||
|
73346ee8b5
|
|||
|
b3b082fdf8
|
|||
|
0b4a85c596
|
|||
|
5009fd118f
|
|||
|
b089ae83ec
|
|||
|
f12f056e73
|
|||
|
ecce69cad2
|
|||
|
6296c29f5d
|
|||
|
73bc4ce849
|
|||
|
25ad8f7815
|
|||
|
1d3bc14db3
|
|||
|
0effa44f7e
|
|||
|
6273769734
|
|||
|
42f770a3d7
|
|||
|
1f932481ca
|
|||
|
0716666322
|
|||
|
d10a139a8b
|
|||
|
1e81d78b73
|
|||
|
4f13de625a
|
|||
|
c341e55aad
|
|||
|
b62238086b
|
|||
|
cb8d9add96
|
|||
|
845da00c71
|
|||
|
c066783a94
|
|||
|
41281738d4
|
|||
|
872af4be73
|
|||
|
7db0ae8e10
|
|||
|
307c598252
|
|||
|
3af519cdfc
|
|||
|
4879638bdd
|
|||
|
1850aa1e8c
|
|||
|
841328257d
|
|||
|
f498559dd7
|
|||
|
fc12792d10
|
|||
|
cea6deafec
|
|||
|
8b1b0915cb
|
|||
|
a4d3d0113e
|
|||
|
a8b0fed1a1
|
|||
|
30748f41b0
|
|||
|
698612fb2a
|
|||
|
7eddfb408c
|
|||
|
00f1a77c51
|
|||
|
e4e0bff904
|
|||
|
feba30b502
|
|||
|
c51a2d1762
|
|||
|
ce64776a80
|
|||
|
9a4c9b06a6
|
|||
|
ade0a4dcf8
|
|||
|
8ad3f3f3e8
|
|||
|
2873522a2c
|
|||
|
b36137dd37
|
|||
|
2595456f36
|
|||
|
e9249caf2b
|
|||
|
059e8eebaf
|
|||
|
d0a87a7963
|
|||
|
ebbe573f95
|
|||
|
c04369fffa
|
|||
|
acb2fab4a4
|
|||
|
6e9e55bfd9
|
|||
|
932e0a0b14
|
|||
|
263be3ebfc
|
|||
|
ece7f1c92a
|
|||
|
f053595cc2
|
551
manager/Cargo.lock
generated
@ -2,6 +2,21 @@
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "addr2line"
|
||||
version = "0.15.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a"
|
||||
dependencies = [
|
||||
"gimli",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "adler"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.15"
|
||||
@ -13,9 +28,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ansi_term"
|
||||
version = "0.11.0"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
|
||||
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
@ -34,7 +49,7 @@ checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -43,16 +58,31 @@ version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"hermit-abi 0.1.19",
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.0.1"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.59"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744"
|
||||
dependencies = [
|
||||
"addr2line",
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"miniz_oxide",
|
||||
"object",
|
||||
"rustc-demangle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
@ -61,10 +91,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bitvec"
|
||||
version = "0.19.5"
|
||||
name = "bitflags"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321"
|
||||
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
||||
|
||||
[[package]]
|
||||
name = "bitvec"
|
||||
version = "0.19.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33"
|
||||
dependencies = [
|
||||
"funty",
|
||||
"radium",
|
||||
@ -74,8 +110,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "blueprint"
|
||||
version = "0.4.0"
|
||||
source = "git+https://git.nubo.sh/hulthe/blueprint.git#4808c454d6a46350cce20b48bd955ab7c9af6448"
|
||||
version = "0.5.0"
|
||||
source = "git+https://git.nubo.sh/hulthe/blueprint.git#92df5833161321f0548ae4849548b615e35a9772"
|
||||
dependencies = [
|
||||
"nom",
|
||||
"structopt",
|
||||
@ -84,9 +120,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bytes"
|
||||
version = "1.1.0"
|
||||
version = "1.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
|
||||
checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.1.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67b9470d453346108f93a59222a9a1a5724db32d0a4727b7ab7ace4b4d822dc9"
|
||||
dependencies = [
|
||||
"shlex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
@ -96,45 +141,26 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "2.33.3"
|
||||
version = "2.34.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
|
||||
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"atty",
|
||||
"bitflags",
|
||||
"bitflags 1.3.2",
|
||||
"strsim",
|
||||
"textwrap",
|
||||
"unicode-width",
|
||||
"vec_map",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs"
|
||||
version = "3.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309"
|
||||
dependencies = [
|
||||
"dirs-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs-sys"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"redox_users",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dotfiles"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"async-recursion",
|
||||
"blueprint",
|
||||
"eyre",
|
||||
"futures",
|
||||
"log",
|
||||
"pretty_env_logger",
|
||||
@ -159,6 +185,16 @@ dependencies = [
|
||||
"termcolor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eyre"
|
||||
version = "0.6.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec"
|
||||
dependencies = [
|
||||
"indenter",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "funty"
|
||||
version = "1.1.0"
|
||||
@ -167,9 +203,9 @@ checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7"
|
||||
|
||||
[[package]]
|
||||
name = "futures"
|
||||
version = "0.3.17"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca"
|
||||
checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
@ -182,9 +218,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-channel"
|
||||
version = "0.3.17"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888"
|
||||
checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
@ -192,15 +228,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.17"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d"
|
||||
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
|
||||
|
||||
[[package]]
|
||||
name = "futures-executor"
|
||||
version = "0.3.17"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c"
|
||||
checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-task",
|
||||
@ -209,42 +245,39 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "futures-io"
|
||||
version = "0.3.17"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377"
|
||||
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
|
||||
|
||||
[[package]]
|
||||
name = "futures-macro"
|
||||
version = "0.3.17"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb"
|
||||
checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"proc-macro-hack",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 2.0.87",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-sink"
|
||||
version = "0.3.17"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11"
|
||||
checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.17"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99"
|
||||
checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.17"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481"
|
||||
checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
@ -254,21 +287,14 @@ dependencies = [
|
||||
"memchr",
|
||||
"pin-project-lite",
|
||||
"pin-utils",
|
||||
"proc-macro-hack",
|
||||
"proc-macro-nested",
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.2.3"
|
||||
name = "gimli"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"wasi",
|
||||
]
|
||||
checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
@ -288,6 +314,12 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
|
||||
|
||||
[[package]]
|
||||
name = "humantime"
|
||||
version = "1.3.0"
|
||||
@ -298,19 +330,16 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.12"
|
||||
name = "indenter"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "lexical-core"
|
||||
@ -319,7 +348,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags",
|
||||
"bitflags 1.3.2",
|
||||
"cfg-if",
|
||||
"ryu",
|
||||
"static_assertions",
|
||||
@ -327,27 +356,25 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.107"
|
||||
version = "0.2.161"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219"
|
||||
checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.4.5"
|
||||
version = "0.4.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109"
|
||||
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.14"
|
||||
version = "0.4.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
@ -356,32 +383,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.7.14"
|
||||
name = "miniz_oxide"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
|
||||
checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"log",
|
||||
"miow",
|
||||
"ntapi",
|
||||
"winapi",
|
||||
"adler",
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miow"
|
||||
version = "0.3.7"
|
||||
name = "mio"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
|
||||
checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
"hermit-abi 0.3.9",
|
||||
"libc",
|
||||
"wasi",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "6.2.1"
|
||||
version = "6.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6"
|
||||
checksum = "c6a7a9657c84d5814c6196b68bb4429df09c18b1573806259fba397ea4ad0d44"
|
||||
dependencies = [
|
||||
"bitvec",
|
||||
"funty",
|
||||
@ -391,60 +418,45 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ntapi"
|
||||
version = "0.3.6"
|
||||
name = "object"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
]
|
||||
checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170"
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.8.0"
|
||||
version = "1.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
|
||||
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot"
|
||||
version = "0.11.2"
|
||||
version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
|
||||
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
|
||||
dependencies = [
|
||||
"instant",
|
||||
"lock_api",
|
||||
"parking_lot_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot_core"
|
||||
version = "0.8.5"
|
||||
version = "0.9.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
|
||||
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"instant",
|
||||
"libc",
|
||||
"redox_syscall",
|
||||
"smallvec",
|
||||
"winapi",
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.7"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443"
|
||||
checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
|
||||
|
||||
[[package]]
|
||||
name = "pin-utils"
|
||||
@ -471,7 +483,7 @@ dependencies = [
|
||||
"proc-macro-error-attr",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 1.0.109",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
@ -486,25 +498,13 @@ dependencies = [
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-hack"
|
||||
version = "0.5.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-nested"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.32"
|
||||
version = "1.0.89"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43"
|
||||
checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -515,9 +515,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.10"
|
||||
version = "1.0.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
|
||||
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
@ -530,21 +530,11 @@ checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8"
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.2.10"
|
||||
version = "0.5.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff"
|
||||
checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
"redox_syscall",
|
||||
"bitflags 2.6.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -560,62 +550,87 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.25"
|
||||
version = "0.6.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
|
||||
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.5"
|
||||
version = "1.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
|
||||
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.1.0"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.130"
|
||||
version = "1.0.214"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913"
|
||||
checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.130"
|
||||
version = "1.0.214"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"
|
||||
checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 2.0.87",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook-registry"
|
||||
version = "1.4.0"
|
||||
name = "shlex"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
|
||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook-registry"
|
||||
version = "1.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "slab"
|
||||
version = "0.4.5"
|
||||
version = "0.4.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
|
||||
checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.7.0"
|
||||
version = "1.13.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309"
|
||||
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
||||
|
||||
[[package]]
|
||||
name = "socket2"
|
||||
version = "0.5.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
@ -631,9 +646,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
||||
|
||||
[[package]]
|
||||
name = "structopt"
|
||||
version = "0.3.25"
|
||||
version = "0.3.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c"
|
||||
checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"lazy_static",
|
||||
@ -650,18 +665,29 @@ dependencies = [
|
||||
"proc-macro-error",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.81"
|
||||
version = "1.0.109"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966"
|
||||
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -672,9 +698,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
|
||||
|
||||
[[package]]
|
||||
name = "termcolor"
|
||||
version = "1.1.2"
|
||||
version = "1.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
|
||||
checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
@ -690,81 +716,79 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.30"
|
||||
version = "1.0.67"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
|
||||
checksum = "3b3c6efbfc763e64eb85c11c25320f0737cb7364c4b6336db90aa9ebe27a0bbd"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.30"
|
||||
version = "1.0.67"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
|
||||
checksum = "b607164372e89797d78b8e23a6d67d5d1038c1c65efd52e1389ef8b77caba2a6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 2.0.87",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.13.0"
|
||||
version = "1.41.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "588b2d10a336da58d877567cd8fb8a14b463e2104910f8132cd054b4b96e29ee"
|
||||
checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"backtrace",
|
||||
"bytes",
|
||||
"libc",
|
||||
"memchr",
|
||||
"mio",
|
||||
"num_cpus",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
"pin-project-lite",
|
||||
"signal-hook-registry",
|
||||
"socket2",
|
||||
"tokio-macros",
|
||||
"winapi",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-macros"
|
||||
version = "1.5.1"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "114383b041aa6212c579467afa0075fbbdd0718de036100bc0ba7961d8cb9095"
|
||||
checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"syn 2.0.87",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.5.8"
|
||||
version = "0.5.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa"
|
||||
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.8.0"
|
||||
name = "unicode-ident"
|
||||
version = "1.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
|
||||
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.9"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
||||
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
|
||||
|
||||
[[package]]
|
||||
name = "vec_map"
|
||||
@ -774,15 +798,15 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.3"
|
||||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
|
||||
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.10.2+wasi-snapshot-preview1"
|
||||
version = "0.11.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
|
||||
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
@ -802,11 +826,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.5"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
|
||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -815,6 +839,88 @@ version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.59.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_gnullvm",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
||||
[[package]]
|
||||
name = "wyz"
|
||||
version = "0.2.0"
|
||||
@ -823,9 +929,6 @@ checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214"
|
||||
|
||||
[[package]]
|
||||
name = "xdg"
|
||||
version = "2.4.0"
|
||||
version = "2.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3a23fe958c70412687039c86f578938b4a0bb50ec788e96bce4d6ab00ddd5803"
|
||||
dependencies = [
|
||||
"dirs",
|
||||
]
|
||||
checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546"
|
||||
|
||||
@ -13,6 +13,7 @@ async-recursion = "0.3.2"
|
||||
xdg = "2.2.0"
|
||||
thiserror = "1.0.24"
|
||||
toml = "0.5.8"
|
||||
eyre = "0.6.12"
|
||||
|
||||
[dependencies.blueprint]
|
||||
git = "https://git.nubo.sh/hulthe/blueprint.git"
|
||||
|
||||
@ -3,15 +3,17 @@ use crate::Config;
|
||||
use async_recursion::async_recursion;
|
||||
use blueprint::{parse_template, Env, Value};
|
||||
use futures::future::join_all;
|
||||
use futures::TryFutureExt;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
use std::ffi::OsStr;
|
||||
use std::io::ErrorKind;
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
use std::str::from_utf8;
|
||||
use tokio::fs::{copy, create_dir, read_dir, read_to_string, write};
|
||||
use tokio::fs::{copy, create_dir, read_dir, read_to_string, File};
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
use tokio::join;
|
||||
use tokio::process::Command;
|
||||
|
||||
pub const TEMPLATE_EXTENSION: &str = "tpl";
|
||||
|
||||
@ -19,6 +21,7 @@ pub async fn build_tree(cfg: &Config) -> Result<(), Errors> {
|
||||
let mut env = Env::new();
|
||||
env.insert("hostname".into(), Value::Str(get_hostname().await));
|
||||
env.insert("username".into(), Value::Str(get_username()));
|
||||
env.insert("os".into(), Value::Str(get_operating_system().await));
|
||||
|
||||
debug!("trying to read {:?}", cfg.variables_path);
|
||||
if let Ok(s) = read_to_string(&cfg.variables_path).await {
|
||||
@ -30,11 +33,7 @@ pub async fn build_tree(cfg: &Config) -> Result<(), Errors> {
|
||||
let value = match toml_value {
|
||||
toml::Value::String(s) => Value::Str(s),
|
||||
toml::Value::Boolean(b) => Value::Bool(b),
|
||||
_ => {
|
||||
return Err(InnerError::TypeErr
|
||||
.with_location(&cfg.variables_path)
|
||||
.into())
|
||||
}
|
||||
_ => return Err(InnerError::Type.with_location(&cfg.variables_path).into()),
|
||||
};
|
||||
|
||||
env.insert(key, value);
|
||||
@ -115,10 +114,22 @@ async fn file(cfg: &Config, env: &Env, relative: PathBuf) -> Result<(), Error> {
|
||||
|
||||
if template_path.extension() == Some(OsStr::new(TEMPLATE_EXTENSION)) {
|
||||
// perform templating
|
||||
let file_str = read_to_string(&template_path)
|
||||
let mut template_file = File::open(&template_path)
|
||||
.await
|
||||
.with_location(&template_path)?;
|
||||
|
||||
let mut file_str = String::new();
|
||||
template_file
|
||||
.read_to_string(&mut file_str)
|
||||
.await
|
||||
.with_location(&template_path)?;
|
||||
|
||||
let permissions = template_file
|
||||
.metadata()
|
||||
.await
|
||||
.with_location(&template_path)?
|
||||
.permissions();
|
||||
|
||||
let mut rendered = Vec::<u8>::new();
|
||||
parse_template(&file_str)
|
||||
.with_location(&template_path)?
|
||||
@ -129,8 +140,19 @@ async fn file(cfg: &Config, env: &Env, relative: PathBuf) -> Result<(), Error> {
|
||||
// remove template file extension
|
||||
new_path.set_extension("");
|
||||
|
||||
let mut rendered_file = File::create(&new_path).await.with_location(&new_path)?;
|
||||
|
||||
// write the rendered file
|
||||
write(&new_path, &rendered).await.with_location(&new_path)?;
|
||||
rendered_file
|
||||
.write_all(rendered.as_bytes())
|
||||
.await
|
||||
.with_location(&new_path)?;
|
||||
|
||||
// make sure the permissions match the original
|
||||
rendered_file
|
||||
.set_permissions(permissions)
|
||||
.await
|
||||
.with_location(&new_path)?;
|
||||
} else {
|
||||
// else just copy the file
|
||||
debug!("copying {:?}", template_path);
|
||||
@ -146,26 +168,38 @@ fn get_username() -> String {
|
||||
env::var("USER")
|
||||
.ok()
|
||||
.or_else(|| env::var("USERNAME").ok())
|
||||
.unwrap_or_else(String::new)
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
async fn get_hostname() -> String {
|
||||
async fn read_hostname_file() -> Option<String> {
|
||||
read_to_string("/etc/hostname").await.ok()
|
||||
async fn read_hostname_file() -> eyre::Result<String> {
|
||||
Ok(read_to_string("/etc/hostname").await?)
|
||||
}
|
||||
|
||||
// TODO: should be async
|
||||
fn run_hostname_cmd() -> Option<String> {
|
||||
async fn run_hostname_cmd() -> eyre::Result<String> {
|
||||
Command::new("hostname")
|
||||
.output()
|
||||
.ok()
|
||||
.and_then(|out| from_utf8(&out.stdout).ok().map(str::to_string))
|
||||
.await
|
||||
.map_err(Into::into)
|
||||
.and_then(|out| Ok(from_utf8(&out.stdout).map(str::to_string)?))
|
||||
}
|
||||
|
||||
read_hostname_file()
|
||||
.or_else(|_| run_hostname_cmd())
|
||||
.await
|
||||
.or_else(run_hostname_cmd)
|
||||
.unwrap_or_else(String::new)
|
||||
.unwrap_or(String::new())
|
||||
.trim()
|
||||
.to_string()
|
||||
}
|
||||
|
||||
async fn get_operating_system() -> String {
|
||||
Command::new("uname")
|
||||
.output()
|
||||
.await
|
||||
.ok()
|
||||
.as_ref()
|
||||
.and_then(|out| from_utf8(&out.stdout).ok())
|
||||
.unwrap_or("unknown")
|
||||
.trim()
|
||||
.to_lowercase()
|
||||
}
|
||||
|
||||
@ -15,16 +15,16 @@ pub struct Error {
|
||||
#[derive(Debug, Error)]
|
||||
pub enum InnerError {
|
||||
#[error("IO Error: {0}")]
|
||||
IoErr(#[from] io::Error),
|
||||
Io(#[from] io::Error),
|
||||
|
||||
#[error("Failed to parse template file")]
|
||||
TemplateErr(#[from] blueprint::Error),
|
||||
Template(#[from] blueprint::Error),
|
||||
|
||||
#[error("Failed to parse toml file")]
|
||||
TomlErr(#[from] toml::de::Error),
|
||||
Toml(#[from] toml::de::Error),
|
||||
|
||||
#[error("Unsupported variable type")]
|
||||
TypeErr,
|
||||
Type,
|
||||
}
|
||||
|
||||
impl From<Vec<Error>> for Errors {
|
||||
|
||||
@ -10,7 +10,7 @@ use builder::build_tree;
|
||||
use error::Errors;
|
||||
use linker::link_tree;
|
||||
use log::LevelFilter;
|
||||
use peeker::peek_tree;
|
||||
use peeker::print_variables;
|
||||
use std::env;
|
||||
use std::path::PathBuf;
|
||||
use structopt::StructOpt;
|
||||
@ -88,8 +88,8 @@ async fn run() -> Result<(), Errors> {
|
||||
};
|
||||
|
||||
if opt.print_variables {
|
||||
info!("peeking tree");
|
||||
peek_tree(&cfg).await?;
|
||||
info!("scanning tree");
|
||||
print_variables(&cfg).await?;
|
||||
} else {
|
||||
info!("building tree");
|
||||
build_tree(&cfg).await?;
|
||||
|
||||
@ -9,7 +9,8 @@ use std::path::PathBuf;
|
||||
use tokio::fs::{read_dir, read_to_string};
|
||||
use tokio::join;
|
||||
|
||||
pub async fn peek_tree(cfg: &Config) -> Result<(), Errors> {
|
||||
/// Iterate over the directory tree and print all variables used in all template files.
|
||||
pub async fn print_variables(cfg: &Config) -> Result<(), Errors> {
|
||||
for var in dir(cfg, PathBuf::new()).await? {
|
||||
println!("{}", var);
|
||||
}
|
||||
|
||||
380
tree/.config/alacritty/alacritty.toml.tpl
Normal file
@ -0,0 +1,380 @@
|
||||
[bell]
|
||||
animation = "EaseOutExpo"
|
||||
duration = 0
|
||||
|
||||
[colors]
|
||||
draw_bold_text_with_bright_colors = true
|
||||
|
||||
{% if light %}
|
||||
# Gruvbox Light
|
||||
[colors.primary]
|
||||
# hard contrast: background = '0xf9f5d7'
|
||||
background = "0xfbf1c7"
|
||||
# soft contrast: background = '0xf2e5bc'
|
||||
foreground = "0x3c3836"
|
||||
|
||||
# Normal colors
|
||||
[colors.normal]
|
||||
black = "0xfbf1c7"
|
||||
red = "0xcc241d"
|
||||
green = "0x98971a"
|
||||
yellow = "0xd79921"
|
||||
blue = "0x458588"
|
||||
magenta = "0xb16286"
|
||||
cyan = "0x689d6a"
|
||||
white = "0x7c6f64"
|
||||
|
||||
# Bright colors
|
||||
[colors.bright]
|
||||
black = "0x928374"
|
||||
red = "0x9d0006"
|
||||
green = "0x79740e"
|
||||
yellow = "0xb57614"
|
||||
blue = "0x076678"
|
||||
magenta = "0x8f3f71"
|
||||
cyan = "0x427b58"
|
||||
white = "0x3c3836"
|
||||
{% else %}
|
||||
# Gruvbox Dark
|
||||
[colors.primary]
|
||||
# hard contrast: background = '0x1d2021'
|
||||
background = "0x282828"
|
||||
# soft contrast: background = '0x32302f'
|
||||
foreground = "0xebdbb2"
|
||||
|
||||
[colors.normal]
|
||||
black = "0x282828"
|
||||
blue = "0x458588"
|
||||
cyan = "0x689d6a"
|
||||
green = "0x98971a"
|
||||
magenta = "0xb16286"
|
||||
red = "0xcc241d"
|
||||
white = "0xa89984"
|
||||
yellow = "0xd79921"
|
||||
|
||||
[colors.bright]
|
||||
black = "0x928374"
|
||||
blue = "0x83a598"
|
||||
cyan = "0x8ec07c"
|
||||
green = "0xb8bb26"
|
||||
magenta = "0xd3869b"
|
||||
red = "0xfb4934"
|
||||
white = "0xebdbb2"
|
||||
yellow = "0xfabd2f"
|
||||
{% end %}
|
||||
|
||||
|
||||
[debug]
|
||||
render_timer = false
|
||||
|
||||
[env]
|
||||
TERM = "xterm-256color"
|
||||
|
||||
[font]
|
||||
{% if hostname == "vostok" %}
|
||||
size = 10.0
|
||||
{% else %}
|
||||
size = 11.0
|
||||
{% end %}
|
||||
|
||||
[font.bold]
|
||||
style = "Bold"
|
||||
{% if hostname == "sputnik" %}
|
||||
family = "SauceCodePro Nerd Font"
|
||||
{% elif hostname == "vostok" %}
|
||||
family = "Source Code Pro for Powerline"
|
||||
{% elif os == "darwin" %}
|
||||
{% else %}
|
||||
family = "monospace"
|
||||
{% end %}
|
||||
|
||||
[font.italic]
|
||||
style = "Italic"
|
||||
{% if hostname == "sputnik" %}
|
||||
family = "SauceCodePro Nerd Font"
|
||||
{% elif hostname == "vostok" %}
|
||||
family = "Source Code Pro for Powerline"
|
||||
{% elif os == "darwin" %}
|
||||
{% else %}
|
||||
family = "monospace"
|
||||
{% end %}
|
||||
|
||||
[font.normal]
|
||||
style = "Regular"
|
||||
{% if hostname == "sputnik" %}
|
||||
family = "SauceCodePro Nerd Font"
|
||||
{% elif hostname == "vostok" %}
|
||||
family = "Source Code Pro for Powerline"
|
||||
{% elif os == "darwin" %}
|
||||
{% else %}
|
||||
family = "monospace"
|
||||
{% end %}
|
||||
|
||||
[font.offset]
|
||||
x = 0
|
||||
y = 0
|
||||
|
||||
[[keyboard.bindings]]
|
||||
action = "Paste"
|
||||
key = "V"
|
||||
mods = "Control|Shift"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
action = "Copy"
|
||||
key = "C"
|
||||
mods = "Control|Shift"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
action = "Quit"
|
||||
key = "Q"
|
||||
mods = "Command"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
action = "Quit"
|
||||
key = "W"
|
||||
mods = "Command"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
action = "IncreaseFontSize"
|
||||
key = "Plus"
|
||||
mods = "Control"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
action = "DecreaseFontSize"
|
||||
key = "Minus"
|
||||
mods = "Control"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
action = "ResetFontSize"
|
||||
key = "Key0"
|
||||
mods = "Control"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001BOH"
|
||||
key = "Home"
|
||||
mode = "AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1~"
|
||||
key = "Home"
|
||||
mode = "~AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001BOF"
|
||||
key = "End"
|
||||
mode = "AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[4~"
|
||||
key = "End"
|
||||
mode = "~AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[5~"
|
||||
key = "PageUp"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[6~"
|
||||
key = "PageDown"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;2D"
|
||||
key = "Left"
|
||||
mods = "Shift"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;5D"
|
||||
key = "Left"
|
||||
mods = "Control"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;3D"
|
||||
key = "Left"
|
||||
mods = "Alt"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[D"
|
||||
key = "Left"
|
||||
mode = "~AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001BOD"
|
||||
key = "Left"
|
||||
mode = "AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;2C"
|
||||
key = "Right"
|
||||
mods = "Shift"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;5C"
|
||||
key = "Right"
|
||||
mods = "Control"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;3C"
|
||||
key = "Right"
|
||||
mods = "Alt"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[C"
|
||||
key = "Right"
|
||||
mode = "~AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001BOC"
|
||||
key = "Right"
|
||||
mode = "AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;2A"
|
||||
key = "Up"
|
||||
mods = "Shift"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;5A"
|
||||
key = "Up"
|
||||
mods = "Control"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;3A"
|
||||
key = "Up"
|
||||
mods = "Alt"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[A"
|
||||
key = "Up"
|
||||
mode = "~AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001BOA"
|
||||
key = "Up"
|
||||
mode = "AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;2B"
|
||||
key = "Down"
|
||||
mods = "Shift"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;5B"
|
||||
key = "Down"
|
||||
mods = "Control"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[1;3B"
|
||||
key = "Down"
|
||||
mods = "Alt"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[B"
|
||||
key = "Down"
|
||||
mode = "~AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001BOB"
|
||||
key = "Down"
|
||||
mode = "AppCursor"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[Z"
|
||||
key = "Tab"
|
||||
mods = "Shift"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001BOP"
|
||||
key = "F1"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001BOQ"
|
||||
key = "F2"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001BOR"
|
||||
key = "F3"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001BOS"
|
||||
key = "F4"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[15~"
|
||||
key = "F5"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[17~"
|
||||
key = "F6"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[18~"
|
||||
key = "F7"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[19~"
|
||||
key = "F8"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[20~"
|
||||
key = "F9"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[21~"
|
||||
key = "F10"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[23~"
|
||||
key = "F11"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[24~"
|
||||
key = "F12"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u007F"
|
||||
key = "Back"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B\u007F"
|
||||
key = "Back"
|
||||
mods = "Alt"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[2~"
|
||||
key = "Insert"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[3~"
|
||||
key = "Delete"
|
||||
mode = "AppKeypad"
|
||||
|
||||
[[keyboard.bindings]]
|
||||
chars = "\u001B[P"
|
||||
key = "Delete"
|
||||
mode = "~AppKeypad"
|
||||
|
||||
[mouse]
|
||||
hide_when_typing = false
|
||||
|
||||
[[mouse.bindings]]
|
||||
action = "PasteSelection"
|
||||
mouse = "Middle"
|
||||
|
||||
[selection]
|
||||
semantic_escape_chars = ",│`|:\"' ()[]{}<>"
|
||||
|
||||
[terminal.shell]
|
||||
program = "nu"
|
||||
|
||||
[window]
|
||||
{% if demo %}
|
||||
opacity = 1.0
|
||||
{% elif os == "darwin" %}
|
||||
opacity = 0.95
|
||||
{% else %}
|
||||
opacity = 0.90
|
||||
{% end %}
|
||||
|
||||
[window.dimensions]
|
||||
columns = 80
|
||||
lines = 24
|
||||
@ -1,304 +0,0 @@
|
||||
# Configuration for Alacritty, the GPU enhanced terminal emulator
|
||||
|
||||
|
||||
# Any items in the `env` entry below will be added as
|
||||
# environment variables. Some entries may override variables
|
||||
# set by alacritty it self.
|
||||
env:
|
||||
# TERM env customization. Default is xterm-256color
|
||||
# Note: the default TERM value `xterm-256color` does not
|
||||
# specify all features alacritty supports. This does pose
|
||||
# a few issues with programs relying on terminfo and the
|
||||
# `tput` command
|
||||
#TERM: tmux-256color
|
||||
TERM: xterm-256color
|
||||
|
||||
# Window dimensions in character columns and lines
|
||||
# (changes require restart)
|
||||
window:
|
||||
dimensions:
|
||||
columns: 80
|
||||
lines: 24
|
||||
{% if demo %}
|
||||
opacity: 1.0
|
||||
{% else %}
|
||||
opacity: 0.95
|
||||
{% end %}
|
||||
|
||||
# The FreeType rasterizer needs to know the device DPI for best results
|
||||
# (changes require restart)
|
||||
dpi:
|
||||
{% if hostname == "vostok" %}
|
||||
x: 209.9
|
||||
y: 209.9
|
||||
{% else %}
|
||||
x: 96.0
|
||||
y: 96.0
|
||||
{% end %}
|
||||
|
||||
# When true, bold text is drawn using the bright variant of colors.
|
||||
draw_bold_text_with_bright_colors: true
|
||||
|
||||
# Font configuration (changes require restart)
|
||||
font:
|
||||
normal:
|
||||
{% if hostname == "sputnik" %}
|
||||
family: SauceCodePro Nerd Font
|
||||
{% elif hostname == "vostok" %}
|
||||
family: Source Code Pro for Powerline
|
||||
{% else %}
|
||||
family: monospace
|
||||
{% end %}
|
||||
|
||||
style: Regular
|
||||
|
||||
bold:
|
||||
{% if hostname == "sputnik" %}
|
||||
family: SauceCodePro Nerd Font
|
||||
{% elif hostname == "vostok" %}
|
||||
family: Source Code Pro for Powerline
|
||||
{% else %}
|
||||
family: monospace
|
||||
{% end %}
|
||||
|
||||
style: Bold
|
||||
|
||||
italic:
|
||||
{% if hostname == "sputnik" %}
|
||||
family: SauceCodePro Nerd Font
|
||||
{% elif hostname == "vostok" %}
|
||||
family: Source Code Pro for Powerline
|
||||
{% else %}
|
||||
family: monospace
|
||||
{% end %}
|
||||
|
||||
style: Italic
|
||||
|
||||
# Point size of the font
|
||||
{% if hostname == "sputnik" %}
|
||||
size: 11.0
|
||||
{% elif hostname == "vostok" %}
|
||||
size: 10.0
|
||||
{% else %}
|
||||
size: 11.0
|
||||
{% end %}
|
||||
|
||||
# Offset is the extra space around each character. offset.y can be thought of
|
||||
# as modifying the linespacing, and offset.x as modifying the letter spacing.
|
||||
offset:
|
||||
x: 0
|
||||
y: 0
|
||||
|
||||
# Should display the render timer
|
||||
debug:
|
||||
render_timer: false
|
||||
|
||||
{% if light %}
|
||||
# Colors (Gruvbox light)
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
# hard contrast: background = '0xf9f5d7'
|
||||
background: '0xfbf1c7'
|
||||
# soft contrast: background = '0xf2e5bc'
|
||||
foreground: '0x3c3836'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '0xfbf1c7'
|
||||
red: '0xcc241d'
|
||||
green: '0x98971a'
|
||||
yellow: '0xd79921'
|
||||
blue: '0x458588'
|
||||
magenta: '0xb16286'
|
||||
cyan: '0x689d6a'
|
||||
white: '0x7c6f64'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '0x928374'
|
||||
red: '0x9d0006'
|
||||
green: '0x79740e'
|
||||
yellow: '0xb57614'
|
||||
blue: '0x076678'
|
||||
magenta: '0x8f3f71'
|
||||
cyan: '0x427b58'
|
||||
white: '0x3c3836'
|
||||
{% else %}
|
||||
# Colors (Gruvbox dark)
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
# hard contrast: background = '0x1d2021'
|
||||
background: '0x282828'
|
||||
# soft contrast: background = '0x32302f'
|
||||
foreground: '0xebdbb2'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '0x282828'
|
||||
red: '0xcc241d'
|
||||
green: '0x98971a'
|
||||
yellow: '0xd79921'
|
||||
blue: '0x458588'
|
||||
magenta: '0xb16286'
|
||||
cyan: '0x689d6a'
|
||||
white: '0xa89984'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '0x928374'
|
||||
red: '0xfb4934'
|
||||
green: '0xb8bb26'
|
||||
yellow: '0xfabd2f'
|
||||
blue: '0x83a598'
|
||||
magenta: '0xd3869b'
|
||||
cyan: '0x8ec07c'
|
||||
white: '0xebdbb2'
|
||||
{% end %}
|
||||
|
||||
# Visual Bell
|
||||
#
|
||||
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
|
||||
# rung, the terminal background will be set to white and transition back to the
|
||||
# default background color. You can control the rate of this transition by
|
||||
# setting the `duration` property (represented in milliseconds). You can also
|
||||
# configure the transition function by setting the `animation` property.
|
||||
#
|
||||
# Possible values for `animation`
|
||||
# `Ease`
|
||||
# `EaseOut`
|
||||
# `EaseOutSine`
|
||||
# `EaseOutQuad`
|
||||
# `EaseOutCubic`
|
||||
# `EaseOutQuart`
|
||||
# `EaseOutQuint`
|
||||
# `EaseOutExpo`
|
||||
# `EaseOutCirc`
|
||||
# `Linear`
|
||||
#
|
||||
# To completely disable the visual bell, set its duration to 0.
|
||||
#
|
||||
bell:
|
||||
animation: EaseOutExpo
|
||||
duration: 0
|
||||
|
||||
# Key bindings
|
||||
#
|
||||
# Each binding is defined as an object with some properties. Most of the
|
||||
# properties are optional. All of the alphabetical keys should have a letter for
|
||||
# the `key` value such as `V`. Function keys are probably what you would expect
|
||||
# as well (F1, F2, ..). The number keys above the main keyboard are encoded as
|
||||
# `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`,
|
||||
# etc. These all match the glutin::VirtualKeyCode variants.
|
||||
#
|
||||
# Possible values for `mods`
|
||||
# `Command`, `Super` refer to the super/command/windows key
|
||||
# `Control` for the control key
|
||||
# `Shift` for the Shift key
|
||||
# `Alt` and `Option` refer to alt/option
|
||||
#
|
||||
# mods may be combined with a `|`. For example, requiring control and shift
|
||||
# looks like:
|
||||
#
|
||||
# mods: Control|Shift
|
||||
#
|
||||
# The parser is currently quite sensitive to whitespace and capitalization -
|
||||
# capitalization must match exactly, and piped items must not have whitespace
|
||||
# around them.
|
||||
#
|
||||
# Either an `action` or `chars` field must be present. `chars` writes the
|
||||
# specified string every time that binding is activated. These should generally
|
||||
# be escape sequences, but they can be configured to send arbitrary strings of
|
||||
# bytes. Possible values of `action` include `Paste` and `PasteSelection`.
|
||||
#
|
||||
# Want to add a binding (e.g. "PageUp") but are unsure what the X sequence
|
||||
# (e.g. "\x1b[5~") is? Open another terminal (like xterm) without tmux,
|
||||
# then run `showkey -a` to get the sequence associated to a key combination.
|
||||
key_bindings:
|
||||
- { key: V, mods: Control|Shift, action: Paste }
|
||||
- { key: C, mods: Control|Shift, action: Copy }
|
||||
- { key: Q, mods: Command, action: Quit }
|
||||
- { key: W, mods: Command, action: Quit }
|
||||
- { key: Plus, mods: Control, action: IncreaseFontSize }
|
||||
- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||
- { key: Key0, mods: Control, action: ResetFontSize }
|
||||
- { key: Home, chars: "\x1bOH", mode: AppCursor }
|
||||
- { key: Home, chars: "\x1b[1~", mode: ~AppCursor }
|
||||
- { key: End, chars: "\x1bOF", mode: AppCursor }
|
||||
- { key: End, chars: "\x1b[4~", mode: ~AppCursor }
|
||||
- { key: PageUp, chars: "\x1b[5~" }
|
||||
- { key: PageDown, chars: "\x1b[6~" }
|
||||
- { key: Left, mods: Shift, chars: "\x1b[1;2D" }
|
||||
- { key: Left, mods: Control, chars: "\x1b[1;5D" }
|
||||
- { key: Left, mods: Alt, chars: "\x1b[1;3D" }
|
||||
- { key: Left, chars: "\x1b[D", mode: ~AppCursor }
|
||||
- { key: Left, chars: "\x1bOD", mode: AppCursor }
|
||||
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
|
||||
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
|
||||
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
|
||||
- { key: Right, chars: "\x1b[C", mode: ~AppCursor }
|
||||
- { key: Right, chars: "\x1bOC", mode: AppCursor }
|
||||
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
|
||||
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
|
||||
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
|
||||
- { key: Up, chars: "\x1b[A", mode: ~AppCursor }
|
||||
- { key: Up, chars: "\x1bOA", mode: AppCursor }
|
||||
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
|
||||
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
|
||||
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
|
||||
- { key: Down, chars: "\x1b[B", mode: ~AppCursor }
|
||||
- { key: Down, chars: "\x1bOB", mode: AppCursor }
|
||||
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
|
||||
- { key: F1, chars: "\x1bOP" }
|
||||
- { key: F2, chars: "\x1bOQ" }
|
||||
- { key: F3, chars: "\x1bOR" }
|
||||
- { key: F4, chars: "\x1bOS" }
|
||||
- { key: F5, chars: "\x1b[15~" }
|
||||
- { key: F6, chars: "\x1b[17~" }
|
||||
- { key: F7, chars: "\x1b[18~" }
|
||||
- { key: F8, chars: "\x1b[19~" }
|
||||
- { key: F9, chars: "\x1b[20~" }
|
||||
- { key: F10, chars: "\x1b[21~" }
|
||||
- { key: F11, chars: "\x1b[23~" }
|
||||
- { key: F12, chars: "\x1b[24~" }
|
||||
- { key: Back, chars: "\x7f" }
|
||||
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
|
||||
- { key: Insert, chars: "\x1b[2~" }
|
||||
- { key: Delete, chars: "\x1b[3~", mode: AppKeypad }
|
||||
- { key: Delete, chars: "\x1b[P", mode: ~AppKeypad }
|
||||
|
||||
# Mouse bindings
|
||||
#
|
||||
# Currently doesn't support modifiers. Both the `mouse` and `action` fields must
|
||||
# be specified.
|
||||
#
|
||||
# Values for `mouse`:
|
||||
# - Middle
|
||||
# - Left
|
||||
# - Right
|
||||
# - Numeric identifier such as `5`
|
||||
#
|
||||
# Values for `action`:
|
||||
# - Paste
|
||||
# - PasteSelection
|
||||
# - Copy (TODO)
|
||||
mouse_bindings:
|
||||
- { mouse: Middle, action: PasteSelection }
|
||||
|
||||
mouse:
|
||||
double_click: { threshold: 300 }
|
||||
triple_click: { threshold: 300 }
|
||||
hide_when_typing: false
|
||||
|
||||
selection:
|
||||
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
|
||||
|
||||
# Shell
|
||||
#
|
||||
# You can set shell.program to the path of your favorite shell, e.g. /bin/fish.
|
||||
# Entries in shell.args are passed unmodified as arguments to the shell.
|
||||
shell:
|
||||
program: fish
|
||||
# args:
|
||||
# - --login
|
||||
3
tree/.config/alacritty/silent.toml
Normal file
@ -0,0 +1,3 @@
|
||||
[colors.primary]
|
||||
background = "#1d1f21"
|
||||
foreground = "#1d1f21"
|
||||
@ -1,8 +0,0 @@
|
||||
# Silent alacritty config
|
||||
|
||||
# Hack to hide the cursor
|
||||
colors:
|
||||
primary:
|
||||
background: "#1d1f21"
|
||||
foreground: "#1d1f21"
|
||||
|
||||
6
tree/.config/bat/config.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
{% if light %}
|
||||
--theme=gruvbox-light
|
||||
{% else %}
|
||||
--theme=gruvbox-dark
|
||||
{% end %}
|
||||
|
||||
220
tree/.config/caelestia/shell.json
Normal file
@ -0,0 +1,220 @@
|
||||
{
|
||||
"appearance": {
|
||||
"anim": {
|
||||
"durations": {
|
||||
"scale": 1
|
||||
}
|
||||
},
|
||||
"font": {
|
||||
"family": {
|
||||
"material": "Material Symbols Rounded",
|
||||
"mono": "CaskaydiaCove NF",
|
||||
"sans": "Rubik"
|
||||
},
|
||||
"size": {
|
||||
"scale": 1
|
||||
}
|
||||
},
|
||||
"padding": {
|
||||
"scale": 1
|
||||
},
|
||||
"rounding": {
|
||||
"scale": 1
|
||||
},
|
||||
"spacing": {
|
||||
"scale": 1
|
||||
},
|
||||
"transparency": {
|
||||
"enabled": false,
|
||||
"base": 0.85,
|
||||
"layers": 0.4
|
||||
}
|
||||
},
|
||||
"general": {
|
||||
"apps": {
|
||||
"terminal": [
|
||||
"foot"
|
||||
],
|
||||
"audio": [
|
||||
"pavucontrol"
|
||||
]
|
||||
}
|
||||
},
|
||||
"background": {
|
||||
"desktopClock": {
|
||||
"enabled": false
|
||||
},
|
||||
"enabled": true,
|
||||
"visualiser": {
|
||||
"enabled": true,
|
||||
"autoHide": true,
|
||||
"rounding": 1,
|
||||
"spacing": 1
|
||||
}
|
||||
},
|
||||
"bar": {
|
||||
"clock": {
|
||||
"showIcon": false
|
||||
},
|
||||
"dragThreshold": 20,
|
||||
"entries": [
|
||||
{
|
||||
"id": "logo",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "workspaces",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "spacer",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "activeWindow",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "spacer",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "tray",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "clock",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "statusIcons",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "idleInhibitor",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "power",
|
||||
"enabled": true
|
||||
}
|
||||
],
|
||||
"persistent": false,
|
||||
"showOnHover": true,
|
||||
"status": {
|
||||
"showAudio": false,
|
||||
"showBattery": true,
|
||||
"showBluetooth": true,
|
||||
"showMicrophone": false,
|
||||
"showKbLayout": false,
|
||||
"showNetwork": true
|
||||
},
|
||||
"tray": {
|
||||
"background": true,
|
||||
"recolour": true
|
||||
},
|
||||
"workspaces": {
|
||||
"activeIndicator": true,
|
||||
"activeLabel": "",
|
||||
"activeTrail": false,
|
||||
"groupIconsByApp": true,
|
||||
"groupingRespectsLayout": true,
|
||||
"windowRighClickContext": true,
|
||||
"label": "◦",
|
||||
"occupiedBg": true,
|
||||
"occupiedLabel": "⊙",
|
||||
"showWindows": true,
|
||||
"shown": 4,
|
||||
"windowIconImage": false,
|
||||
"focusedWindowBlob": true,
|
||||
"windowIconGap": 0,
|
||||
"windowIconSize": 30
|
||||
}
|
||||
},
|
||||
"border": {
|
||||
"rounding": 25,
|
||||
"thickness": 10
|
||||
},
|
||||
"dashboard": {
|
||||
"mediaUpdateInterval": 500,
|
||||
"showOnHover": true
|
||||
},
|
||||
"launcher": {
|
||||
"actionPrefix": ">",
|
||||
"dragThreshold": 50,
|
||||
"vimKeybinds": false,
|
||||
"enableDangerousActions": false,
|
||||
"maxShown": 8,
|
||||
"maxWallpapers": 9,
|
||||
"specialPrefix": "@",
|
||||
"useFuzzy": {
|
||||
"apps": false,
|
||||
"actions": false,
|
||||
"schemes": false,
|
||||
"variants": false,
|
||||
"wallpapers": false
|
||||
},
|
||||
"showOnHover": false
|
||||
},
|
||||
"lock": {
|
||||
"recolourLogo": false
|
||||
},
|
||||
"notifs": {
|
||||
"actionOnClick": false,
|
||||
"clearThreshold": 0.3,
|
||||
"defaultExpireTimeout": 5000,
|
||||
"expandThreshold": 20,
|
||||
"expire": false
|
||||
},
|
||||
"osd": {
|
||||
"enabled": true,
|
||||
"enableBrightness": true,
|
||||
"enableMicrophone": true,
|
||||
"hideDelay": 2000
|
||||
},
|
||||
"paths": {
|
||||
"mediaGif": "root:/assets/bongocat.gif",
|
||||
"sessionGif": "root:/assets/kurukuru.gif",
|
||||
"wallpaperDir": "~/.config/wallpapers/"
|
||||
},
|
||||
"services": {
|
||||
"audioIncrement": 0.1,
|
||||
"defaultPlayer": "Spotify",
|
||||
"gpuType": "",
|
||||
"playerAliases": [
|
||||
{
|
||||
"from": "com.github.th_ch.youtube_music",
|
||||
"to": "YT Music"
|
||||
}
|
||||
],
|
||||
"weatherLocation": "",
|
||||
"useFahrenheit": false,
|
||||
"useTwelveHourClock": false,
|
||||
"smartScheme": true,
|
||||
"visualiserBars": 45
|
||||
},
|
||||
"session": {
|
||||
"dragThreshold": 30,
|
||||
"vimKeybinds": true,
|
||||
"commands": {
|
||||
"logout": [
|
||||
"loginctl",
|
||||
"terminate-user",
|
||||
""
|
||||
],
|
||||
"shutdown": [
|
||||
"systemctl",
|
||||
"poweroff"
|
||||
],
|
||||
"hibernate": [
|
||||
"systemctl",
|
||||
"hibernate"
|
||||
],
|
||||
"reboot": [
|
||||
"systemctl",
|
||||
"reboot"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
210
tree/.config/eww/eww.scss
Normal file
@ -0,0 +1,210 @@
|
||||
$text: #e0c1c1;
|
||||
//$highlight1: #fdab70; // orange
|
||||
$highlight1: #f65d76; // akira pink
|
||||
$highlight2: white;
|
||||
$background: #151515;
|
||||
$lowlight2: #272727;
|
||||
$lowlight1: black;
|
||||
$transparent: rgba(#000000, 0.0);
|
||||
|
||||
*{
|
||||
all: unset;
|
||||
font-family: "Sauce Code Pro Nerd Font Mono";
|
||||
color: $text;
|
||||
}
|
||||
|
||||
window {
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
margin-top: 10px;
|
||||
margin-left: 5px;
|
||||
background: rgba($background, 1.0);
|
||||
border-radius: 30px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.workspace {
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
border: dashed $highlight1 2px;
|
||||
background: $lowlight1;
|
||||
border-radius: 30px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 6px;
|
||||
transition: border-color 0.5s;
|
||||
}
|
||||
|
||||
.workspace.active {
|
||||
border: solid $highlight2 2px;
|
||||
}
|
||||
|
||||
.workspace:hover {
|
||||
background-color: $lowlight2;
|
||||
}
|
||||
|
||||
.workspace:active {
|
||||
background-color: $highlight2;
|
||||
}
|
||||
|
||||
.workspaces {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
//background-image: linear-gradient(to right, $transparent 40%, $highlight1 40%, $highlight1 60%, $transparent 60% );
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.thingy {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
min-height: 20px;
|
||||
border-top: solid $highlight1 2px;
|
||||
}
|
||||
|
||||
.bigthingy {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
min-height: 20px;
|
||||
border-top: solid $highlight1 2px;
|
||||
font-size: 35px;
|
||||
}
|
||||
|
||||
scale trough {
|
||||
all: unset;
|
||||
background-color: #22242b;
|
||||
box-shadow: 0 0px 5px 1px #06060b;
|
||||
border-radius: 16px;
|
||||
min-width: 16px;
|
||||
min-height: 70px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.volbox {
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
.volbox.active {
|
||||
background-color: $lowlight2;
|
||||
}
|
||||
|
||||
.volume {
|
||||
min-height: 150px;
|
||||
}
|
||||
|
||||
.volume trough highlight {
|
||||
background-image: linear-gradient(to right, $highlight2 30%, $highlight1 50%, $highlight1 100% *50);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.vpn {
|
||||
font-size: 40px;
|
||||
margin: 2px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
.vpn label {
|
||||
margin-top: -5px;
|
||||
margin-bottom: -5px;
|
||||
transition: color 0.5s;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.vpn:hover {
|
||||
background-color: $lowlight2;
|
||||
}
|
||||
|
||||
.vpn:active {
|
||||
background-color: $highlight1;
|
||||
}
|
||||
|
||||
.vpn.connecting label {
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.vpn.disconnected label {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.bluetooth {
|
||||
}
|
||||
|
||||
.bluetooth.active {
|
||||
}
|
||||
|
||||
|
||||
.battery-gauge {
|
||||
color: $highlight1;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
.battery-gauge.low {
|
||||
color: red;
|
||||
animation: 1s ease-in 1s infinite alternate battery-gauge-low;
|
||||
}
|
||||
|
||||
.battery-gauge.charging {
|
||||
color: purple;
|
||||
}
|
||||
|
||||
@keyframes battery-gauge-low {
|
||||
from {
|
||||
background-color: $background;
|
||||
}
|
||||
|
||||
to {
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
.calendar {
|
||||
background: $lowlight2;
|
||||
}
|
||||
|
||||
.toggleable {
|
||||
transition: border 0.5s;
|
||||
}
|
||||
|
||||
.toggleable.on {
|
||||
border-left: solid 2px green;
|
||||
border-right: solid 2px green;
|
||||
}
|
||||
|
||||
.clickable {
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
.clickable:hover {
|
||||
background-color: $lowlight2;
|
||||
}
|
||||
.clickable:active {
|
||||
background-color: $highlight1;
|
||||
}
|
||||
|
||||
.date {
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.clock {
|
||||
font-size: 25px;
|
||||
font-weight: 400;
|
||||
color: $highlight1;
|
||||
margin-bottom: -1px;
|
||||
padding-top: 18px;
|
||||
}
|
||||
.clock label {
|
||||
padding: 0;
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
.color_scheme {
|
||||
}
|
||||
|
||||
.pwrbtn {
|
||||
font-size: 35px;
|
||||
font-weight: 400;
|
||||
border-bottom-left-radius: 30px;
|
||||
border-bottom-right-radius: 30px;
|
||||
margin-bottom: -2px;
|
||||
}
|
||||
284
tree/.config/eww/eww.yuck
Normal file
@ -0,0 +1,284 @@
|
||||
(defwindow bar0
|
||||
:monitor 0
|
||||
:geometry (geometry :height "100%"
|
||||
:width "40px"
|
||||
:anchor "center left")
|
||||
:stacking "fg"
|
||||
:exclusive true
|
||||
(centerbox :orientation "v" :active true :class "sidebar"
|
||||
(workspaces :monitor 0)
|
||||
(middle)
|
||||
(bottom)
|
||||
))
|
||||
|
||||
(defwindow bar1
|
||||
:monitor 1
|
||||
:geometry (geometry :height "100%"
|
||||
:width "40px"
|
||||
:anchor "center left")
|
||||
:stacking "fg"
|
||||
:exclusive true
|
||||
(centerbox :orientation "v" :active true :class "sidebar"
|
||||
(workspaces :monitor 1)
|
||||
(middle)
|
||||
(bottom)
|
||||
))
|
||||
|
||||
(defwidget middle []
|
||||
(box :orientation "v"
|
||||
:valign "center"
|
||||
:space-evenly false
|
||||
))
|
||||
|
||||
(defwidget bottom []
|
||||
(box :orientation "v"
|
||||
:valign "end"
|
||||
:class "bottom"
|
||||
:space-evenly false
|
||||
(vpn)
|
||||
(bluetooth)
|
||||
(speaker)
|
||||
(temperature)
|
||||
(battery)
|
||||
(ram)
|
||||
(box :class "thingy" (systray :orientation "v"))
|
||||
(color_scheme)
|
||||
(xwayland)
|
||||
(kb_layout)
|
||||
(date)
|
||||
(clock)
|
||||
(notifications)
|
||||
(lock)
|
||||
))
|
||||
|
||||
(defwidget workspaces [monitor]
|
||||
(box :orientation "v"
|
||||
:valign "start"
|
||||
:class "workspaces"
|
||||
:space-evenly: false
|
||||
; can't use a for loop here because that breaks css animations
|
||||
(workspace :monitor monitor :n 1)
|
||||
(workspace :monitor monitor :n 2)
|
||||
(workspace :monitor monitor :n 3)
|
||||
(workspace :monitor monitor :n 4)
|
||||
(workspace :monitor monitor :n 5)
|
||||
(workspace :monitor monitor :n 6)
|
||||
(workspace :monitor monitor :n 7)
|
||||
(workspace :monitor monitor :n 8)
|
||||
(workspace :monitor monitor :n 9)
|
||||
(workspace :monitor monitor :n 10)
|
||||
(workspace :monitor monitor :n 11)
|
||||
(workspace :monitor monitor :n 12)
|
||||
))
|
||||
|
||||
(defwidget workspace [monitor n]
|
||||
(button :visible {jq(workspaces, '.["${n}"] != null')}
|
||||
:class 'workspace ${workspaces?.[n]?.active == true && monitor == workspaces?.[n]?.monitor ? "active" : ""}'
|
||||
:onclick 'wmutils switch-workspace ${n}'
|
||||
(label :text n))
|
||||
)
|
||||
|
||||
(defwidget vpn []
|
||||
(button :valign "end"
|
||||
:class "vpn thingy ${vpn_status.class}"
|
||||
:onclick "${vpn_status.on_click}"
|
||||
:tooltip "${vpn_status.tooltip}"
|
||||
(label :text "${vpn_status.icon}")
|
||||
))
|
||||
|
||||
(defwidget bluetooth []
|
||||
(eventbox :onhover "${EWW_CMD} update show_bluetooth=true"
|
||||
:onhoverlost "${EWW_CMD} update show_bluetooth=false"
|
||||
(box :orientation "v"
|
||||
:class "thingy bluetooth ${show_bluetooth ? "active" : ""}"
|
||||
:space-evenly false
|
||||
(revealer :transition "slidedown"
|
||||
:reveal show_bluetooth
|
||||
(box :orientation "v"
|
||||
(button :class "clickable" :onclick "ba lurar" (label :text "LUR"))
|
||||
(button :class "clickable" :onclick "ba högtalare" (label :text "HÖG"))
|
||||
(button :class "clickable" :onclick "ba bluetoothctl disconnect" (label :text "---"))
|
||||
)
|
||||
)
|
||||
(label :text "BLU")
|
||||
(revealer :transition "slideup"
|
||||
:reveal {!show_bluetooth}
|
||||
(label :text "---")
|
||||
)
|
||||
)))
|
||||
|
||||
(defwidget speaker []
|
||||
(eventbox :onhover "${EWW_CMD} update show_volume=true"
|
||||
:onhoverlost "${EWW_CMD} update show_volume=false"
|
||||
(box :orientation "v"
|
||||
:class "thingy volbox ${show_volume ? "active" : ""}"
|
||||
:space-evenly false
|
||||
(revealer :transition "slidedown"
|
||||
:reveal show_volume
|
||||
(scale :orientation "v"
|
||||
:class "volume"
|
||||
:flipped true
|
||||
:min 0
|
||||
:max 100
|
||||
:value volume_out
|
||||
:onchange "pamixer --set-volume {} && volshow"
|
||||
))
|
||||
(label :text "VOL")
|
||||
(revealer :transition "slideup"
|
||||
:reveal {!show_volume}
|
||||
(label :text {is_muted ? "MM" : volume_out})
|
||||
)
|
||||
)))
|
||||
|
||||
(defwidget temperature []
|
||||
(box :orientation "v"
|
||||
:valign "end"
|
||||
:class "battery thingy"
|
||||
:visible {current_temp != ""}
|
||||
(label :text "TEM")
|
||||
(label :text "${current_temp / 1000}°")
|
||||
))
|
||||
|
||||
(defwidget ram []
|
||||
(box :orientation "v"
|
||||
:valign "end"
|
||||
:class "thingy"
|
||||
(label :text "RAM")
|
||||
(circular-progress
|
||||
:thickness 4.0
|
||||
:value {EWW_RAM.used_mem_perc}
|
||||
:class {
|
||||
EWW_RAM?.used_mem_perc > 80 ? "battery-gauge low" :
|
||||
"battery-gauge"
|
||||
}
|
||||
)
|
||||
))
|
||||
|
||||
(defwidget battery []
|
||||
(box :orientation "v"
|
||||
:valign "end"
|
||||
:class "thingy"
|
||||
:visible {EWW_BATTERY != "" && EWW_BATTERY?.BAT0?.capacity != ""}
|
||||
(label :text "BAT")
|
||||
(circular-progress
|
||||
:thickness 4.0
|
||||
:value {EWW_BATTERY != "" ? EWW_BATTERY?.BAT0?.capacity : 100.0}
|
||||
:class {
|
||||
EWW_BATTERY == "" ? "" :
|
||||
EWW_BATTERY?.BAT0?.status == "Charging" ? "battery-gauge charging" :
|
||||
EWW_BATTERY?.BAT0?.capacity < 15 ? "battery-gauge low" :
|
||||
"battery-gauge"
|
||||
}
|
||||
)
|
||||
))
|
||||
|
||||
(defwidget color_scheme []
|
||||
(button
|
||||
:onclick {
|
||||
color_scheme == "light" ? "set-color-scheme dark && ${EWW_CMD} update color_scheme=dark"
|
||||
: "set-color-scheme light && ${EWW_CMD} update color_scheme=light"
|
||||
}
|
||||
:hexpand true
|
||||
:class "bigthingy clickable"
|
||||
(label :text {
|
||||
color_scheme == "light" ? "" : ""
|
||||
})
|
||||
))
|
||||
|
||||
(defwidget xwayland []
|
||||
(button
|
||||
:onclick {
|
||||
xwayland_on ? "wmutils xwayland stop && ${EWW_CMD} update xwayland_on=false"
|
||||
: "wmutils xwayland start && ${EWW_CMD} update xwayland_on=true"
|
||||
}
|
||||
:hexpand true
|
||||
:class {"thingy clickable toggleable" + (xwayland_on ? " on" : "")}
|
||||
(label :text "XWL")
|
||||
))
|
||||
|
||||
(defwidget kb_layout []
|
||||
(button :onclick "wmutils next-keyboard-layout"
|
||||
:hexpand true
|
||||
:class "thingy clickable"
|
||||
(label :text keyboard_layout)
|
||||
))
|
||||
|
||||
(defwidget date []
|
||||
(tooltip :halign "fill"
|
||||
(calendar :class "calendar")
|
||||
(button :onclick "ba gnome-calendar"
|
||||
:hexpand true
|
||||
:class "thingy date clickable"
|
||||
(box :orientation "v"
|
||||
(label :text current_month)
|
||||
(label :text current_day)
|
||||
))))
|
||||
|
||||
(defwidget clock []
|
||||
(box :orientation "v"
|
||||
:valign "end"
|
||||
:class "clock thingy"
|
||||
(label :text current_hour)
|
||||
(label :text current_minute)
|
||||
))
|
||||
|
||||
(defwidget notifications []
|
||||
(button :orientation "v"
|
||||
:valign "end"
|
||||
:onclick "swaync-client -t -sw"
|
||||
:class "bigthingy clickable"
|
||||
(label :text "🕭")
|
||||
))
|
||||
|
||||
(defwidget lock []
|
||||
(button :orientation "v"
|
||||
:valign "end"
|
||||
:class "bigthingy clickable"
|
||||
:onclick "loginctl lock-session"
|
||||
(label :text "")
|
||||
))
|
||||
|
||||
(defwidget pwr []
|
||||
(button :orientation "v"
|
||||
:valign "end"
|
||||
:class "bigthingy clickable"
|
||||
:onclick "${EWW_CMD} open --toggle pwrctl"
|
||||
(label :text "⏻")
|
||||
))
|
||||
|
||||
(defwindow pwrctl
|
||||
:monitor 0
|
||||
:geometry (geometry :y "5%"
|
||||
:x "20px"
|
||||
:height "200px"
|
||||
:width "300px"
|
||||
:anchor "bottom left")
|
||||
:stacking "fg"
|
||||
;:exclusive true
|
||||
(box :orientation "v"
|
||||
:valign "end"
|
||||
:class "thingy"
|
||||
(label :text "SLEEP")
|
||||
(label :text "OFF")
|
||||
))
|
||||
|
||||
(defvar show_volume false)
|
||||
(defvar show_bluetooth false)
|
||||
|
||||
(defpoll workspaces :interval "1s" "wmutils workspaces")
|
||||
(defpoll volume_out :interval "1s" "pamixer --get-volume")
|
||||
(defpoll color_scheme :interval "5s" "get-color-scheme")
|
||||
|
||||
(defpoll is_muted :interval "1s" :initial false "pamixer --get-mute")
|
||||
|
||||
(defpoll current_minute :interval "1s" "date +%M")
|
||||
(defpoll current_hour :interval "1s" "date +%H")
|
||||
(defpoll current_day :interval "60s" "date +%d")
|
||||
(defpoll current_month :interval "60s" "date +%b")
|
||||
(defpoll current_temp :interval "5s" "cat /sys/class/thermal/thermal_zone*/temp")
|
||||
|
||||
(defpoll keyboard_layout :interval "5s" "wmutils keyboard-layout --short")
|
||||
|
||||
(defpoll xwayland_on :interval "5s" "wmutils xwayland is-running")
|
||||
|
||||
(defvar vpn_status "{'icon': '-', 'class': 'disconnected'}" )
|
||||
@ -2,11 +2,20 @@ set -x PATH $HOME/.local/bin $HOME/.cargo/bin $PATH
|
||||
set -x GPG_TTY (tty)
|
||||
set -x BROWSER firefox
|
||||
set -x EDITOR nvim
|
||||
set -x MOZ_ENABLE_WAYLAND 1
|
||||
set -x DEFMT_LOG info # default logging level for defmt
|
||||
|
||||
{% if hostname == "vostok" %}
|
||||
set -x QT_STYLE_OVERRIDE Oxygen
|
||||
{% end %}
|
||||
|
||||
{% if hostname == "buran" %}
|
||||
set -x QT_QPA_PLATFORMTHEME qt5ct
|
||||
|
||||
# enable custom file picker in e.g. firefox
|
||||
set -x GTK_USE_PORTAL 1
|
||||
{% end %}
|
||||
|
||||
{% if username == "u0_a213" %}
|
||||
set -x USER hulthe
|
||||
{% end %}
|
||||
@ -43,6 +52,18 @@ abbr --add grc gitrecap # custom recap command
|
||||
|
||||
fish_vi_key_bindings
|
||||
|
||||
fish_ssh_agent
|
||||
|
||||
zoxide init fish | source
|
||||
|
||||
starship init fish | source
|
||||
|
||||
{% if hostname != "vostok" %}
|
||||
# start sway if logging in on tty 1
|
||||
if status is-login
|
||||
and set -q XDG_SESSION_TYPE XDG_VTNR
|
||||
and test $XDG_SESSION_TYPE = "tty" -a $XDG_VTNR = "1"
|
||||
set -x XDG_CURRENT_DESKTOP sway
|
||||
exec sway
|
||||
end
|
||||
{% end %}
|
||||
|
||||
32
tree/.config/fish/functions/fish_ssh_agent.fish
Normal file
@ -0,0 +1,32 @@
|
||||
function __ssh_agent_is_started -d "check if ssh agent is already started"
|
||||
if begin; test -f $SSH_ENV; and test -z "$SSH_AGENT_PID"; end
|
||||
source $SSH_ENV > /dev/null
|
||||
end
|
||||
|
||||
if test -z "$SSH_AGENT_PID"
|
||||
return 1
|
||||
end
|
||||
|
||||
ps -ef | grep $SSH_AGENT_PID | grep -v grep | grep -q ssh-agent
|
||||
#pgrep ssh-agent
|
||||
return $status
|
||||
end
|
||||
|
||||
|
||||
function __ssh_agent_start -d "start a new ssh agent"
|
||||
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
|
||||
chmod 600 $SSH_ENV
|
||||
source $SSH_ENV > /dev/null
|
||||
true # suppress errors from setenv, i.e. set -gx
|
||||
end
|
||||
|
||||
|
||||
function fish_ssh_agent --description "Start ssh-agent if not started yet, or uses already started ssh-agent."
|
||||
if test -z "$SSH_ENV"
|
||||
set -xg SSH_ENV $HOME/.ssh/environment
|
||||
end
|
||||
|
||||
if not __ssh_agent_is_started
|
||||
__ssh_agent_start
|
||||
end
|
||||
end
|
||||
23
tree/.config/fuzzel/fuzzel.ini
Normal file
@ -0,0 +1,23 @@
|
||||
icon-theme=hicolor
|
||||
lines=10
|
||||
prompt="▶ "
|
||||
width=32
|
||||
font=FiraSans,Sans:size=18
|
||||
line-height=27
|
||||
|
||||
[colors]
|
||||
# akira pink
|
||||
text=e0c1c1ff
|
||||
|
||||
background=151515aa
|
||||
selection=282a36ff
|
||||
|
||||
match=ebebebff
|
||||
selection-match=ffffffff
|
||||
|
||||
selection-text=d4d4d4ff
|
||||
border=f65d76ff
|
||||
|
||||
[border]
|
||||
width=3
|
||||
radius=24
|
||||
4
tree/.config/gtk-3.0/settings.ini.tpl
Normal file
@ -0,0 +1,4 @@
|
||||
{% if hostname != "pinenote" %}
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme = true
|
||||
{% end %}
|
||||
5
tree/.config/gtk-4.0/settings.ini.tpl
Normal file
@ -0,0 +1,5 @@
|
||||
{% if hostname != "pinenote" %}
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme = true
|
||||
{% end %}
|
||||
|
||||
21
tree/.config/helix/config.toml.tpl
Normal file
@ -0,0 +1,21 @@
|
||||
{% if light %}
|
||||
theme = "gruvbox_light"
|
||||
{% else %}
|
||||
theme = "gruvbox"
|
||||
{% end %}
|
||||
|
||||
[editor]
|
||||
auto-format = true
|
||||
#line-number = "relative"
|
||||
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
normal = "block"
|
||||
select = "underline"
|
||||
|
||||
[keys.select]
|
||||
X = "extend_line_above" # Extend the selection with the line above the selection
|
||||
|
||||
[keys.normal]
|
||||
X = "extend_line_above" # Extend the selection with the line above the selection
|
||||
C-n = "extend_search_next" # Add next search result to selection
|
||||
6
tree/.config/helix/languages.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[[language]]
|
||||
name = "rust"
|
||||
diagnostic-severity = "info" # don't show hints
|
||||
|
||||
[language-server.qmlls]
|
||||
command = "qmlls6"
|
||||
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
18
tree/.config/hypr/hypridle.conf
Normal file
@ -0,0 +1,18 @@
|
||||
general {
|
||||
lock_cmd = screenlock
|
||||
unlock_cmd = pkill -USR1 swaylock
|
||||
#before_sleep_cmd = notify-send "Zzz" # command ran before sleep
|
||||
#after_sleep_cmd = notify-send "Awake!" # command ran after sleep
|
||||
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 585 # seconds
|
||||
on-timeout = notify-set idle-lock -t 14000 "Idle" "Locking in 15s..."
|
||||
on-resume = notify-set idle-lock -t 1000 "Idle" "Never mind."
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 600 # seconds
|
||||
on-timeout = loginctl lock-session
|
||||
}
|
||||
272
tree/.config/hypr/hyprland.conf.tpl
Normal file
@ -0,0 +1,272 @@
|
||||
#
|
||||
# Please note not all available settings / options are set here.
|
||||
# For a full list, see the wiki
|
||||
#
|
||||
|
||||
# Execute your favorite apps at launch
|
||||
# exec-once = waybar & hyprpaper & firefox
|
||||
|
||||
# Source a file (multi-file configs)
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
# default env vars.
|
||||
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
env = XDG_SESSION_DESKTOP,Hyprland
|
||||
env = XCURSOR_SIZE,24
|
||||
env = PATH,$HOME/.local/bin:$HOME/.cargo/bin:$PATH
|
||||
env = QT_QPA_PLATFORM,wayland;xcb
|
||||
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
|
||||
env = QT_QPA_PLATFORMTHEME,qt5ct:qt6ct
|
||||
env = GTK_USE_PORTAL,1
|
||||
env = BROWSER,firefox
|
||||
env = MOZ_ENABLE_WAYLAND,1
|
||||
env = EDITOR,nvim
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input {
|
||||
kb_layout = se
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options = caps:escape,altwin:swap_lalt_lwin
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = no
|
||||
}
|
||||
|
||||
# mouse sensitivity, -1.0 - 1.0, 0 means no modification.
|
||||
{% if hostname == "sputnik" %}
|
||||
sensitivity = -0.9
|
||||
{% else %}
|
||||
sensitivity = 0
|
||||
{% end %}
|
||||
}
|
||||
|
||||
# DIY keyboard config
|
||||
device {
|
||||
name = tux-tangentbord1
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options = compose:menu
|
||||
kb_rules =
|
||||
}
|
||||
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 5
|
||||
gaps_out = 5
|
||||
border_size = 2
|
||||
#col.active_border = rgba(f5deb3ff) rgba(f5deb3ee) 45deg orange
|
||||
col.active_border = rgba(f65d76ff) rgba(f65d76ee) 45deg akira pink
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
decoration {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 10
|
||||
|
||||
blur {
|
||||
enabled = true
|
||||
size = 3
|
||||
passes = 1
|
||||
}
|
||||
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
}
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = on
|
||||
}
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/
|
||||
windowrule=float,title:Volume Indicator
|
||||
windowrule=size 300 100,title:Volume Indicator
|
||||
windowrule=move 100%-375 75,title:Volume Indicator
|
||||
windowrule=rounding 35,title:Volume Indicator
|
||||
windowrule=nofocus,title:Volume Indicator
|
||||
|
||||
windowrule=float,title:Jitsi Meet
|
||||
windowrule=move 100%-375 75,title:Jitsi Meet
|
||||
|
||||
windowrule=workspace 1,title:WORKSPACE 1
|
||||
windowrule=workspace 2,title:WORKSPACE 2
|
||||
windowrule=workspace 3,title:WORKSPACE 3
|
||||
windowrule=workspace 4,title:WORKSPACE 4
|
||||
windowrule=workspace 5,title:WORKSPACE 5
|
||||
windowrule=workspace 6,title:WORKSPACE 6
|
||||
windowrule=workspace 7,title:WORKSPACE 7
|
||||
windowrule=workspace 8,title:WORKSPACE 8
|
||||
windowrule=workspace 9,title:WORKSPACE 9
|
||||
windowrule=workspace 10,title:WORKSPACE 10
|
||||
windowrule=workspace 11,title:WORKSPACE 11
|
||||
windowrule=workspace 12,title:WORKSPACE 12
|
||||
windowrule=workspace 13,title:WORKSPACE 13
|
||||
windowrule=workspace 14,title:WORKSPACE 14
|
||||
windowrule=workspace 15,title:WORKSPACE 15
|
||||
windowrule=workspace 16,title:WORKSPACE 16
|
||||
windowrule=float,title:WORKSPACE 1
|
||||
windowrule=float,title:WORKSPACE 2
|
||||
windowrule=float,title:WORKSPACE 3
|
||||
windowrule=float,title:WORKSPACE 4
|
||||
windowrule=float,title:WORKSPACE 5
|
||||
windowrule=float,title:WORKSPACE 6
|
||||
windowrule=float,title:WORKSPACE 7
|
||||
windowrule=float,title:WORKSPACE 8
|
||||
windowrule=float,title:WORKSPACE 9
|
||||
windowrule=float,title:WORKSPACE 10
|
||||
windowrule=float,title:WORKSPACE 11
|
||||
windowrule=float,title:WORKSPACE 12
|
||||
windowrule=float,title:WORKSPACE 13
|
||||
windowrule=float,title:WORKSPACE 14
|
||||
windowrule=float,title:WORKSPACE 15
|
||||
windowrule=float,title:WORKSPACE 16
|
||||
windowrule=animation slide,title:WORKSPACE 1
|
||||
windowrule=animation slide,title:WORKSPACE 2
|
||||
windowrule=animation slide,title:WORKSPACE 3
|
||||
windowrule=animation slide,title:WORKSPACE 4
|
||||
windowrule=animation slide,title:WORKSPACE 5
|
||||
windowrule=animation slide,title:WORKSPACE 6
|
||||
windowrule=animation slide,title:WORKSPACE 7
|
||||
windowrule=animation slide,title:WORKSPACE 8
|
||||
windowrule=animation slide,title:WORKSPACE 9
|
||||
windowrule=animation slide,title:WORKSPACE 10
|
||||
windowrule=animation slide,title:WORKSPACE 11
|
||||
windowrule=animation slide,title:WORKSPACE 12
|
||||
windowrule=animation slide,title:WORKSPACE 13
|
||||
windowrule=animation slide,title:WORKSPACE 14
|
||||
windowrule=animation slide,title:WORKSPACE 15
|
||||
windowrule=animation slide,title:WORKSPACE 16
|
||||
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mainMod = SUPER
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, Return, exec, alacritty
|
||||
bind = $mainMod_SHIFT, Q, killactive,
|
||||
#bind = $mainMod, M, exit,
|
||||
bind = $mainMod_SHIFT, Plus, exec, screenlock
|
||||
#bind = $mainMod, E, exec, dolphin
|
||||
bind = $mainMod, Space, togglefloating,
|
||||
bind = $mainMod, D, exec, fuzzel
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
bind = $mainMod, E, togglesplit, # dwindle
|
||||
bind = $mainMod, F, fullscreen,
|
||||
|
||||
{% if hostname == "buran" %}
|
||||
bindl=,switch:Lid Switch,exec,screenlock
|
||||
{% end %}
|
||||
|
||||
bindl = , xf86audiolowervolume, exec, voldown
|
||||
bindl = , xf86audioraisevolume, exec, volup
|
||||
bindl = , xf86audiomute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindl = , xf86audiomicmute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
bindl = , xf86monbrightnessdown, exec, brightnessctl --min-value=10 set 10%-
|
||||
bindl = , xf86monbrightnessup, exec, brightnessctl --min-value=10 set +10%
|
||||
bindl = , xf86audioplay, exec, playerctl play-pause
|
||||
bindl = , xf86audionext, exec, playerctl next
|
||||
bindl = , xf86audioprev, exec, playerctl previous
|
||||
|
||||
bind = , Print, exec, scap
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, H, movefocus, l
|
||||
bind = $mainMod, L, movefocus, r
|
||||
bind = $mainMod, K, movefocus, u
|
||||
bind = $mainMod, J, movefocus, d
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
# using wmutils instead of builtin workspace ensures eww-bar gets updated
|
||||
# bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 1, exec, wmutils switch-workspace 1
|
||||
bind = $mainMod, 2, exec, wmutils switch-workspace 2
|
||||
bind = $mainMod, 3, exec, wmutils switch-workspace 3
|
||||
bind = $mainMod, 4, exec, wmutils switch-workspace 4
|
||||
bind = $mainMod, 5, exec, wmutils switch-workspace 5
|
||||
bind = $mainMod, 6, exec, wmutils switch-workspace 6
|
||||
bind = $mainMod, 7, exec, wmutils switch-workspace 7
|
||||
bind = $mainMod, 8, exec, wmutils switch-workspace 8
|
||||
bind = $mainMod, 9, exec, wmutils switch-workspace 9
|
||||
bind = $mainMod, 0, exec, wmutils switch-workspace 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor =, preferred, auto, auto
|
||||
{% if hostname == "sputnik" %}
|
||||
monitor = desc:Microstep MSI MAG342CQR DB6H262101804, 3440x1440@100.00000, auto, auto
|
||||
{% end %}
|
||||
{% if hostname == "buran" %}
|
||||
monitor = eDP-1, preferred, 3072x380, 1.8
|
||||
monitor = eDP-2, preferred, 3072x380, 1.8
|
||||
monitor = DP-2, 3840x1600@59.99400, 0x0, 1.25
|
||||
# transform list
|
||||
# normal (no transforms) -> 0
|
||||
# 90 degrees -> 1
|
||||
# 180 degrees -> 2
|
||||
# 270 degrees -> 3
|
||||
# flipped -> 4
|
||||
# flipped + 90 degrees -> 5
|
||||
# flipped + 180 degrees -> 6
|
||||
# flipped + 270 degrees -> 7
|
||||
{% end %}
|
||||
|
||||
exec-once=hyprpaper
|
||||
exec-once=swayidle
|
||||
exec-once=dunst
|
||||
|
||||
exec-once=eww daemon
|
||||
exec-once=eww open bar0
|
||||
|
||||
exec-once=nextcloud
|
||||
160
tree/.config/hypr/hyprlock.conf.tpl
Normal file
@ -0,0 +1,160 @@
|
||||
general {
|
||||
grace = 0
|
||||
immediate_render = true
|
||||
}
|
||||
|
||||
background {
|
||||
monitor =
|
||||
|
||||
# make background transparent, used in combination with screenlock-video
|
||||
#color = rgba(00000000)
|
||||
|
||||
path = ~/.config/wallpapers/6000x3376/akira.jpg
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 300, 75
|
||||
outline_thickness = 3
|
||||
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = false
|
||||
dots_rounding = -2 # -1 default circle, -2 follow input-field rounding
|
||||
outer_color = rgb(f65d76) # akira pink
|
||||
inner_color = rgb(151515)
|
||||
font_color = rgb(e0c1c1)
|
||||
fade_on_empty = false
|
||||
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
|
||||
placeholder_text = <b>PASS_</b> # Text rendered in the input box when it's empty.
|
||||
hide_input = false
|
||||
rounding = -1 # -1 means complete rounding (circle/oval)
|
||||
check_color = rgb(204, 136, 34)
|
||||
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
|
||||
fail_text = <i>ERR__</i> # can be set to empty
|
||||
fail_timeout = 2000 # milliseconds before fail_text and fail_color disappears
|
||||
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
|
||||
capslock_color = -1
|
||||
numlock_color = -1
|
||||
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
|
||||
invert_numlock = false # change color if numlock is off
|
||||
swap_font_color = false
|
||||
|
||||
position = 0, -210
|
||||
halign = center
|
||||
valign = center
|
||||
|
||||
shadow_passes = 3
|
||||
shadow_size = 10
|
||||
shadow_boost = 1.2
|
||||
}
|
||||
|
||||
# ferris image in the center
|
||||
image {
|
||||
monitor =
|
||||
path = ~/.config/hypr/ferris-stamp.png
|
||||
rounding = 0
|
||||
size = 300
|
||||
position = 0, 0
|
||||
halign = center
|
||||
valign = center
|
||||
border_size = 0
|
||||
|
||||
shadow_passes = 3
|
||||
shadow_size = 10
|
||||
shadow_boost = 1.2
|
||||
}
|
||||
|
||||
# clock
|
||||
label {
|
||||
monitor =
|
||||
text = <b>$TIME</b>
|
||||
text_align = left
|
||||
color = rgba(ffffff69)
|
||||
font_size = 160
|
||||
font_family = Noto Sans
|
||||
rotate = 0 # degrees, counter-clockwise
|
||||
|
||||
position = 0, -160
|
||||
halign = center
|
||||
valign = top
|
||||
|
||||
shadow_passes = 4
|
||||
shadow_size = 1
|
||||
shadow_boost = 1.3
|
||||
}
|
||||
|
||||
# battery
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:5000] wmutils battery
|
||||
text_align = left
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 20
|
||||
font_family = Noto Sans
|
||||
rotate = 0 # degrees, counter-clockwise
|
||||
|
||||
position = 24, -20
|
||||
halign = left
|
||||
valign = top
|
||||
|
||||
shadow_passes = 2
|
||||
shadow_size = 1
|
||||
shadow_boost = 1.1
|
||||
}
|
||||
|
||||
# keyboard layout
|
||||
label {
|
||||
monitor =
|
||||
text = $LAYOUT
|
||||
text_align = right
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 20
|
||||
font_family = Noto Sans
|
||||
rotate = 0 # degrees, counter-clockwise
|
||||
|
||||
position = -24, -20
|
||||
halign = right
|
||||
valign = top
|
||||
|
||||
shadow_passes = 2
|
||||
shadow_size = 1
|
||||
shadow_boost = 1.1
|
||||
}
|
||||
|
||||
# greeting text
|
||||
label {
|
||||
monitor =
|
||||
text = GREET_ $user
|
||||
text_align = center
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 25
|
||||
font_family = Noto Sans
|
||||
rotate = 0 # degrees, counter-clockwise
|
||||
|
||||
position = 0, 210
|
||||
halign = center
|
||||
valign = center
|
||||
|
||||
shadow_passes = 2
|
||||
shadow_size = 1
|
||||
shadow_boost = 1.3
|
||||
}
|
||||
|
||||
# number of login attempts
|
||||
label {
|
||||
monitor =
|
||||
text = $ATTEMPTS[0]x $FAIL
|
||||
text_align = center
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 28
|
||||
font_family = Noto Sans
|
||||
rotate = 0 # degrees, counter-clockwise
|
||||
|
||||
position = 0, 160
|
||||
halign = center
|
||||
valign = bottom
|
||||
|
||||
shadow_passes = 2
|
||||
shadow_size = 2
|
||||
shadow_boost = 1.3
|
||||
}
|
||||
2
tree/.config/hypr/hyprpaper.conf
Normal file
@ -0,0 +1,2 @@
|
||||
preload = ~/.config/wallpapers/6000x3376/akira.jpg
|
||||
wallpaper = ,~/.config/wallpapers/6000x3376/akira.jpg
|
||||
@ -32,7 +32,7 @@ exec --no-startup-id dex --autostart --environment i3
|
||||
|
||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock-cool
|
||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- screenlock
|
||||
|
||||
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
||||
@ -64,7 +64,7 @@ bindsym $mod+e exec --no-startup-id dmenu_run
|
||||
|
||||
# lock screen
|
||||
#bindsym $mod+Shift+l exec loginctl lock-session
|
||||
bindsym $mod+Shift+l exec i3lock-cool
|
||||
bindsym $mod+Shift+l exec screenlock
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
@ -201,7 +201,10 @@ client.background #ffffff
|
||||
exec --no-startup-id xcompmgr -c -f -n
|
||||
|
||||
# wallpaper
|
||||
exec --no-startup-id feh --bg-scale ~/.config/i3/3440x1440-wallpaper.jpg
|
||||
exec --no-startup-id start-wallpaper
|
||||
|
||||
# notifications
|
||||
exec --no-startup-id dunst
|
||||
|
||||
# autostart
|
||||
exec --no-startup-id nextcloud
|
||||
|
||||
541
tree/.config/niri/config.kdl.tpl
Normal file
@ -0,0 +1,541 @@
|
||||
// This config is in the KDL format: https://kdl.dev
|
||||
// "/-" comments out the following node.
|
||||
// Check the wiki for a full description of the configuration:
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
|
||||
|
||||
environment {
|
||||
DISPLAY ":0"
|
||||
ELECTRON_OZONE_PLATFORM_HINT "auto"
|
||||
QT_QPA_PLATFORMTHEME "qt5ct"
|
||||
}
|
||||
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
// You can set rules, model, layout, variant and options.
|
||||
// For more information, see xkeyboard-config(7).
|
||||
layout "se,us"
|
||||
options "caps:escape,compose:menu"
|
||||
}
|
||||
}
|
||||
|
||||
// Focus windows and outputs automatically when moving the mouse into them.
|
||||
focus-follows-mouse max-scroll-amount="0%"
|
||||
|
||||
{% if hostname == "sputnik" %}
|
||||
tablet {
|
||||
map-to-output "Microstep MSI MAG342CQR DB6H262101804"
|
||||
}
|
||||
{% end %}
|
||||
}
|
||||
|
||||
clipboard {
|
||||
disable-primary // disable middle-click paste
|
||||
}
|
||||
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
|
||||
// `niri msg outputs`
|
||||
output "Microstep MSI MAG342CQR DB6H262101804" {
|
||||
mode "3440x1440@144.000"
|
||||
position x=1152 y=387
|
||||
scale 1.25
|
||||
}
|
||||
|
||||
output "Dell Inc. DELL U2724DE 1MV5L04" {
|
||||
mode "2560x1440@120.000"
|
||||
position x=0 y=0
|
||||
transform "270"
|
||||
scale 1.25
|
||||
|
||||
// layout {
|
||||
// gaps 0
|
||||
// }
|
||||
}
|
||||
|
||||
output "eDP-1" {
|
||||
scale 1.8
|
||||
// position x=0 y=0
|
||||
}
|
||||
|
||||
output "DP-2" {
|
||||
scale 1.25
|
||||
}
|
||||
|
||||
// Settings that influence how windows are positioned and sized.
|
||||
// Find more information on the wiki:
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
|
||||
layout {
|
||||
// Set gaps around windows in logical pixels.
|
||||
{% if hostname == "sputnik" %}
|
||||
gaps 2 // TODO: fix output-specific layout
|
||||
{% else %}
|
||||
gaps 12
|
||||
{% end %}
|
||||
|
||||
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
|
||||
// You can think of them as a kind of outer gaps. They are set in logical pixls.
|
||||
// Left and right struts will cause the next window to the side to always be visible.
|
||||
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
|
||||
// layer-shell panels and regular gaps.
|
||||
struts {
|
||||
left -12
|
||||
right -12
|
||||
top -12
|
||||
bottom -12
|
||||
}
|
||||
|
||||
// When to center a column when changing focus, options are:
|
||||
// - "never", default behavior, focusing an off-screen column will keep at the left
|
||||
// or right edge of the screen.
|
||||
// - "always", the focused column will always be centered.
|
||||
// - "on-overflow", focusing a column will center it if it doesn't fit
|
||||
// together with the previously focused column.
|
||||
center-focused-column "never"
|
||||
|
||||
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
|
||||
preset-column-widths {
|
||||
fixed 948 // roughly fits a single vim buffer
|
||||
//proportion 0.33333
|
||||
proportion 0.5
|
||||
proportion 0.66667
|
||||
}
|
||||
|
||||
// You can change the default width of the new windows.
|
||||
default-column-width { proportion 0.5; }
|
||||
// If you leave the brackets empty, the windows themselves will decide their initial width.
|
||||
// default-column-width {}
|
||||
|
||||
focus-ring {
|
||||
off
|
||||
}
|
||||
|
||||
shadow {
|
||||
on
|
||||
}
|
||||
|
||||
// You can also add a border. It's similar to the focus ring, but always visible.
|
||||
border {
|
||||
// The settings are the same as for the focus ring.
|
||||
// If you enable the border, you probably want to disable the focus ring.
|
||||
width 2
|
||||
active-color "#f65d76" // akira pink
|
||||
inactive-color "#505050"
|
||||
|
||||
// active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
|
||||
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
|
||||
}
|
||||
}
|
||||
|
||||
spawn-at-startup "hyprpaper"
|
||||
spawn-at-startup "swayidle" "-w" // ~/.config/swayidle/config
|
||||
spawn-at-startup "qs" "-p" "/etc/quickshell/niri-caelestia-shell"
|
||||
|
||||
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
||||
// If the client will specifically ask for CSD, the request will be honored.
|
||||
// Additionally, clients will be informed that they are tiled, removing some rounded corners.
|
||||
prefer-no-csd
|
||||
|
||||
// You can change the path where screenshots are saved.
|
||||
// A ~ at the front will be expanded to the home directory.
|
||||
// The path is formatted with strftime(3) to give you the screenshot date and time.
|
||||
screenshot-path "~/screenshots/%Y-%m-%d_%H-%M-%S.png"
|
||||
|
||||
// You can also set this to null to disable saving screenshots to disk.
|
||||
// screenshot-path null
|
||||
|
||||
// Animation settings.
|
||||
// The wiki explains how to configure individual animations:
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Animations
|
||||
animations {
|
||||
// Slow down all animations by this factor. Values below 1 speed them up instead.
|
||||
// slowdown 3.0
|
||||
|
||||
workspace-switch {
|
||||
spring damping-ratio=0.8 stiffness=500 epsilon=0.0001
|
||||
}
|
||||
|
||||
window-movement {
|
||||
spring damping-ratio=0.8 stiffness=500 epsilon=0.0001
|
||||
}
|
||||
|
||||
window-resize {
|
||||
spring damping-ratio=0.5 stiffness=500 epsilon=0.0001
|
||||
}
|
||||
|
||||
window-open {
|
||||
duration-ms 600
|
||||
custom-shader r#"
|
||||
// make the window fall into place with a slight rotation
|
||||
vec4 slide_in_from_right(vec3 coords_geo, vec3 size_geo) {
|
||||
// For this shader, set animation curve to linear for best results.
|
||||
|
||||
// Simulate decelleration: square the (linear) progress.
|
||||
float progress = 1.0 - niri_clamped_progress * niri_clamped_progress;
|
||||
|
||||
// Get our rotation pivot point coordinates at the bottom center of the window.
|
||||
vec2 coords = (coords_geo.xy - vec2(0.5, 1.0)) * size_geo.xy;
|
||||
|
||||
// Move the window in from the right
|
||||
coords.x -= progress * 200.0;
|
||||
|
||||
// Randomize rotation direction and maximum angle.
|
||||
float random = (niri_random_seed - 0.5) / 2.0;
|
||||
random = sign(random) - random;
|
||||
float max_angle = 0.05 * random;
|
||||
|
||||
// Rotate the window around our pivot point.
|
||||
float angle = progress * max_angle;
|
||||
mat2 rotate = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
|
||||
coords = rotate * coords;
|
||||
|
||||
// Transform the coordinates back.
|
||||
coords_geo = vec3(coords / size_geo.xy + vec2(0.5, 1.0), 1.0);
|
||||
|
||||
// Sample the window texture.
|
||||
vec3 coords_tex = niri_geo_to_tex * coords_geo;
|
||||
vec4 color = texture2D(niri_tex, coords_tex.st);
|
||||
|
||||
// Multiply by alpha to fade out.
|
||||
return color * niri_clamped_progress;
|
||||
}
|
||||
|
||||
// this is the main function
|
||||
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
|
||||
return slide_in_from_right(coords_geo, size_geo);
|
||||
}
|
||||
"#
|
||||
}
|
||||
|
||||
window-close {
|
||||
duration-ms 600
|
||||
custom-shader r#"
|
||||
// make the window "fall down" with slight rotation.
|
||||
vec4 fall_and_rotate(vec3 coords_geo, vec3 size_geo) {
|
||||
// For this shader, set animation curve to linear for best results.
|
||||
|
||||
// Simulate an accelerated fall: square the (linear) progress.
|
||||
float progress = niri_clamped_progress * niri_clamped_progress;
|
||||
|
||||
// Get our rotation pivot point coordinates at the bottom center of the window.
|
||||
vec2 coords = (coords_geo.xy - vec2(0.5, 1.0)) * size_geo.xy;
|
||||
|
||||
// Move the window down to simulate a fall.
|
||||
coords.y -= progress * 200.0;
|
||||
|
||||
// Randomize rotation direction and maximum angle.
|
||||
float random = (niri_random_seed - 0.5) / 2.0;
|
||||
random = sign(random) - random;
|
||||
float max_angle = 0.05 * random;
|
||||
|
||||
// Rotate the window around our pivot point.
|
||||
float angle = progress * max_angle;
|
||||
mat2 rotate = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
|
||||
coords = rotate * coords;
|
||||
|
||||
// Transform the coordinates back.
|
||||
coords_geo = vec3(coords / size_geo.xy + vec2(0.5, 1.0), 1.0);
|
||||
|
||||
// Sample the window texture.
|
||||
vec3 coords_tex = niri_geo_to_tex * coords_geo;
|
||||
vec4 color = texture2D(niri_tex, coords_tex.st);
|
||||
|
||||
// Multiply by alpha to fade out.
|
||||
return color * (1.0 - niri_clamped_progress);
|
||||
}
|
||||
|
||||
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
|
||||
return fall_and_rotate(coords_geo, size_geo);
|
||||
}
|
||||
"#
|
||||
}
|
||||
}
|
||||
|
||||
// Window rules let you adjust behavior for individual windows.
|
||||
// Find more information on the wiki:
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
||||
|
||||
window-rule {
|
||||
geometry-corner-radius 22
|
||||
clip-to-geometry true
|
||||
}
|
||||
|
||||
// Indicate screencasted windows with red colors.
|
||||
window-rule {
|
||||
match is-window-cast-target=true
|
||||
|
||||
focus-ring {
|
||||
active-color "#f38ba8"
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
|
||||
border {
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
|
||||
shadow {
|
||||
color "#7d0d2d70"
|
||||
}
|
||||
|
||||
tab-indicator {
|
||||
active-color "#f38ba8"
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match title="Volume Indicator"
|
||||
geometry-corner-radius 35
|
||||
min-width 300
|
||||
max-width 300
|
||||
min-height 100
|
||||
max-height 100
|
||||
open-floating true
|
||||
default-floating-position x=35 y=35 relative-to="top-right"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id="Mullvad VPN"
|
||||
default-floating-position x=5 y=10 relative-to="bottom-left"
|
||||
}
|
||||
|
||||
// block out password managers from screen capture.
|
||||
window-rule {
|
||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
||||
|
||||
block-out-from "screen-capture"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match title="Virtual Machine Manager"
|
||||
match app-id="virt-manager"
|
||||
//max-width 400
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id="com.nextcloud.desktopclient.nextcloud"
|
||||
open-floating true
|
||||
default-floating-position x=5 y=10 relative-to="bottom-left"
|
||||
}
|
||||
|
||||
binds {
|
||||
// Keys consist of modifiers separated by + signs, followed by an XKB key name
|
||||
// in the end. To find an XKB name for a particular key, you may use a program
|
||||
// like wev.
|
||||
//
|
||||
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
|
||||
// when running as a winit window.
|
||||
//
|
||||
// Most actions that you can bind here can also be invoked programmatically with
|
||||
// `niri msg action do-something`.
|
||||
|
||||
// Mod-Shift-/, which is usually the same as Mod-?,
|
||||
// shows a list of important hotkeys.
|
||||
Mod+Shift+Plus { show-hotkey-overlay; }
|
||||
|
||||
Mod+Return { spawn "ghostty"; }
|
||||
Mod+Plus { spawn "loginctl" "lock-session"; }
|
||||
|
||||
// TODO: why do i have to use spawn-sh?
|
||||
Mod+D { spawn "qs" "-p" "/etc/quickshell/niri-caelestia-shell" "ipc" "call" "drawers" "toggle" "launcher"; }
|
||||
|
||||
// You can also use a shell:
|
||||
// Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
|
||||
|
||||
// Example volume keys mappings for PipeWire & WirePlumber.
|
||||
// The allow-when-locked=true property makes them work even when the session is locked.
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
|
||||
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--min-value=10" "set" "10%-"; }
|
||||
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--min-value=10" "set" "+10%"; }
|
||||
|
||||
Mod+Q { close-window; }
|
||||
|
||||
Mod+Space { switch-focus-between-floating-and-tiling; }
|
||||
Mod+Ctrl+Space { toggle-window-floating; }
|
||||
|
||||
Mod+Left { focus-column-left; }
|
||||
Mod+Down { focus-window-down; }
|
||||
Mod+Up { focus-window-up; }
|
||||
Mod+Right { focus-column-right; }
|
||||
Mod+H { focus-column-left; }
|
||||
Mod+J { focus-window-or-workspace-down; }
|
||||
Mod+K { focus-window-or-workspace-up; }
|
||||
Mod+L { focus-column-right; }
|
||||
|
||||
Mod+Ctrl+Left { move-column-left; }
|
||||
Mod+Ctrl+Down { move-window-down; }
|
||||
Mod+Ctrl+Up { move-window-up; }
|
||||
Mod+Ctrl+Right { move-column-right; }
|
||||
Mod+Ctrl+H { move-column-left; }
|
||||
Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
||||
Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
||||
Mod+Ctrl+L { move-column-right; }
|
||||
|
||||
Mod+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
Mod+Ctrl+Home { move-column-to-first; }
|
||||
Mod+Ctrl+End { move-column-to-last; }
|
||||
|
||||
Mod+Shift+Left { focus-monitor-left; }
|
||||
Mod+Shift+Down { focus-monitor-down; }
|
||||
Mod+Shift+Up { focus-monitor-up; }
|
||||
Mod+Shift+Right { focus-monitor-right; }
|
||||
Mod+Shift+H { focus-monitor-left; }
|
||||
Mod+Shift+J { focus-monitor-down; }
|
||||
Mod+Shift+K { focus-monitor-up; }
|
||||
Mod+Shift+L { focus-monitor-right; }
|
||||
|
||||
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
|
||||
Mod+Page_Down { focus-workspace-down; }
|
||||
Mod+Page_Up { focus-workspace-up; }
|
||||
Mod+U { focus-workspace-down; }
|
||||
Mod+I { focus-workspace-up; }
|
||||
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
|
||||
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||
|
||||
Mod+Shift+Page_Down { move-workspace-down; }
|
||||
Mod+Shift+Page_Up { move-workspace-up; }
|
||||
Mod+Shift+U { move-workspace-down; }
|
||||
Mod+Shift+I { move-workspace-up; }
|
||||
|
||||
Mod+Backspace { toggle-overview; }
|
||||
|
||||
// You can bind mouse wheel scroll ticks using the following syntax.
|
||||
// These binds will change direction based on the natural-scroll setting.
|
||||
//
|
||||
// To avoid scrolling through workspaces really fast, you can use
|
||||
// the cooldown-ms property. The bind will be rate-limited to this value.
|
||||
// You can set a cooldown on any bind, but it's most useful for the wheel.
|
||||
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||
|
||||
Mod+WheelScrollRight { focus-column-right; }
|
||||
Mod+WheelScrollLeft { focus-column-left; }
|
||||
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
||||
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
||||
|
||||
// Usually scrolling up and down with Shift in applications results in
|
||||
// horizontal scrolling; these binds replicate that.
|
||||
Mod+Shift+WheelScrollDown { focus-column-right; }
|
||||
Mod+Shift+WheelScrollUp { focus-column-left; }
|
||||
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
||||
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
||||
|
||||
// Similarly, you can bind touchpad scroll "ticks".
|
||||
// Touchpad scrolling is continuous, so for these binds it is split into
|
||||
// discrete intervals.
|
||||
// These binds are also affected by touchpad's natural-scroll, so these
|
||||
// example binds are "inverted", since we have natural-scroll enabled for
|
||||
// touchpads by default.
|
||||
// Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
|
||||
// Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
|
||||
|
||||
// You can refer to workspaces by index. However, keep in mind that
|
||||
// niri is a dynamic workspace system, so these commands are kind of
|
||||
// "best effort". Trying to refer to a workspace index bigger than
|
||||
// the current workspace count will instead refer to the bottommost
|
||||
// (empty) workspace.
|
||||
//
|
||||
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
|
||||
// will all refer to the 3rd workspace.
|
||||
Mod+1 { spawn "wmutils" "switch-workspace" "1"; }
|
||||
Mod+2 { spawn "wmutils" "switch-workspace" "2"; }
|
||||
Mod+3 { spawn "wmutils" "switch-workspace" "3"; }
|
||||
Mod+4 { spawn "wmutils" "switch-workspace" "4"; }
|
||||
Mod+5 { spawn "wmutils" "switch-workspace" "5"; }
|
||||
Mod+6 { spawn "wmutils" "switch-workspace" "6"; }
|
||||
Mod+7 { spawn "wmutils" "switch-workspace" "7"; }
|
||||
Mod+8 { spawn "wmutils" "switch-workspace" "8"; }
|
||||
Mod+9 { spawn "wmutils" "switch-workspace" "9"; }
|
||||
Mod+Ctrl+1 { move-column-to-workspace 1; }
|
||||
Mod+Ctrl+2 { move-column-to-workspace 2; }
|
||||
Mod+Ctrl+3 { move-column-to-workspace 3; }
|
||||
Mod+Ctrl+4 { move-column-to-workspace 4; }
|
||||
Mod+Ctrl+5 { move-column-to-workspace 5; }
|
||||
Mod+Ctrl+6 { move-column-to-workspace 6; }
|
||||
Mod+Ctrl+7 { move-column-to-workspace 7; }
|
||||
Mod+Ctrl+8 { move-column-to-workspace 8; }
|
||||
Mod+Ctrl+9 { move-column-to-workspace 9; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+1 { move-window-to-workspace 1; }
|
||||
|
||||
// Switches focus between the current and the previous workspace.
|
||||
// Mod+Tab { focus-workspace-previous; }
|
||||
|
||||
Mod+Comma { consume-window-into-column; }
|
||||
Mod+Period { expel-window-from-column; }
|
||||
Mod+W { toggle-column-tabbed-display; }
|
||||
|
||||
// There are also commands that consume or expel a single window to the side.
|
||||
// Mod+BracketLeft { consume-or-expel-window-left; }
|
||||
// Mod+BracketRight { consume-or-expel-window-right; }
|
||||
|
||||
Mod+R { switch-preset-column-width; }
|
||||
Mod+F { maximize-column; }
|
||||
Mod+Shift+F { fullscreen-window; }
|
||||
Mod+C { center-column; }
|
||||
|
||||
// Finer width adjustments.
|
||||
// This command can also:
|
||||
// * set width in pixels: "1000"
|
||||
// * adjust width in pixels: "-5" or "+5"
|
||||
// * set width as a percentage of screen width: "25%"
|
||||
// * adjust width as a percentage of screen width: "-10%" or "+10%"
|
||||
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
|
||||
// set-column-width "100" will make the column occupy 200 physical screen pixels.
|
||||
Mod+Minus { set-column-width "-10%"; }
|
||||
Mod+Equal { set-column-width "+10%"; }
|
||||
|
||||
// Finer height adjustments when in column with other windows.
|
||||
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||
|
||||
// Actions to switch layouts.
|
||||
// Note: if you uncomment these, make sure you do NOT have
|
||||
// a matching layout switch hotkey configured in xkb options above.
|
||||
// Having both at once on the same hotkey will break the switching,
|
||||
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
|
||||
// Mod+Space { switch-layout "next"; }
|
||||
// Mod+Shift+Space { switch-layout "prev"; }
|
||||
|
||||
Print { screenshot; }
|
||||
Ctrl+Print { screenshot-screen; }
|
||||
Alt+Print { screenshot-window; }
|
||||
|
||||
// Switch to the next keyboard layout
|
||||
Mod+Tab { spawn "wmutils" "next-keyboard-layout"; }
|
||||
|
||||
// The quit action will show a confirmation dialog to avoid accidental exits.
|
||||
Mod+Shift+E { quit; }
|
||||
|
||||
// Powers off the monitors. To turn them back on, do any input like
|
||||
// moving the mouse or pressing any other key.
|
||||
// Mod+Shift+P { power-off-monitors; }
|
||||
|
||||
// Dynamic screencasting target
|
||||
Mod+Slash { clear-dynamic-cast-target; }
|
||||
Mod+Ctrl+Slash { set-dynamic-cast-window; }
|
||||
Mod+Shift+Slash { set-dynamic-cast-monitor; }
|
||||
|
||||
// Debugging
|
||||
Mod+Shift+Ctrl+T { toggle-debug-tint; }
|
||||
Mod+Shift+Ctrl+O { debug-toggle-opaque-regions; }
|
||||
Mod+Shift+Ctrl+D { debug-toggle-damage; }
|
||||
}
|
||||
587
tree/.config/nushell/cargo-completions.nu
Normal file
@ -0,0 +1,587 @@
|
||||
## Written by lukexor, Improved by @Dan-Gamin
|
||||
|
||||
def "nu-complete cargo targets" [type: string] {
|
||||
^cargo metadata --format-version=1 --offline --no-deps | from json | get packages.targets | flatten | where ($type in $it.kind) | get name
|
||||
}
|
||||
def "nu-complete cargo bins" [] { nu-complete cargo targets bin }
|
||||
def "nu-complete cargo examples" [] { nu-complete cargo targets example }
|
||||
|
||||
def "nu-complete cargo packages" [] {
|
||||
let metadata = (^cargo metadata --format-version=1 --offline --no-deps)
|
||||
if $metadata == '' {
|
||||
[]
|
||||
} else {
|
||||
$metadata | from json | get workspace_members | split column ' ' | get column1
|
||||
}
|
||||
}
|
||||
|
||||
def "nu-complete cargo color" [] {
|
||||
['auto', 'always', 'never']
|
||||
}
|
||||
|
||||
def "nu-complete cargo profiles" [] {
|
||||
open Cargo.toml | get profile | transpose | get column0
|
||||
}
|
||||
|
||||
def "nu-complete cargo features" [] {
|
||||
open Cargo.toml | get features | transpose | get column0
|
||||
}
|
||||
|
||||
# `cargo --list` is slow, `open` is faster.
|
||||
# TODO: Add caching.
|
||||
def "nu-complete cargo subcommands" [] {
|
||||
^cargo --list | lines | skip 1 | str join "\n" | from ssv --noheaders | get column1
|
||||
}
|
||||
def "nu-complete cargo vcs" [] {
|
||||
[
|
||||
'git',
|
||||
'hg',
|
||||
'pijul',
|
||||
'fossil',
|
||||
'none'
|
||||
]
|
||||
}
|
||||
|
||||
#*> Core <*#
|
||||
|
||||
# Disabled due to messing with undefined cargo-subcommands
|
||||
|
||||
# # Rust's package manager
|
||||
# export extern "cargo" [
|
||||
# --version(-V) # Print version info and exit
|
||||
# --list # List installed commands
|
||||
# --explain: number # Run `rustc --explain CODE`
|
||||
# --verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
# --quiet(-q) # Do not print cargo log messages
|
||||
# --color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
# --frozen # Require Cargo.lock and cache are up to date
|
||||
# --locked # Require Cargo.lock is up to date
|
||||
# --offline # Run without accessing the network
|
||||
# --config: string # Override a configuration value
|
||||
# -Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
# -h, --help # Print help information
|
||||
# ...args: any
|
||||
# ]
|
||||
|
||||
#*> Common Commands (Sorted by order shown by running the `cargo` command) <*#
|
||||
|
||||
# Compile the current package
|
||||
export extern "cargo build" [
|
||||
--package(-p): string@"nu-complete cargo packages" # Build only the specified packages
|
||||
--workspace # Build all members in the workspace
|
||||
--exclude: string@"nu-complete cargo packages" # Exclude the specified packages
|
||||
--lib # Build the package's library
|
||||
--bin: string@"nu-complete cargo bins" # Build the specified binary
|
||||
--bins # Build all binary targets
|
||||
--example: string@"nu-complete cargo examples" # Build the specified example
|
||||
--examples # Build all example targets
|
||||
--test: string # Build the specified integration test
|
||||
--tests # Build all targets in test mode that have the test = true manifest flag set
|
||||
--bench: string # Build the specified benchmark
|
||||
--benches # Build all targets in benchmark mode that have the bench = true manifest flag set
|
||||
--all-targets # Build all targets
|
||||
--features(-F): string@"nu-complete cargo features" # Space or comma separated list of features to activate
|
||||
--all-features # Activate all available features of all selected packages
|
||||
--no-default-features # Do not activate the default feature of the selected packages
|
||||
--target: string # Build for the given architecture.
|
||||
--release(-r) # Build optimized artifacts with the release profile
|
||||
--profile: string@"nu-complete cargo profiles" # Build with the given profile
|
||||
--ignore-rust-version # Ignore `rust-version` specification in packages
|
||||
--timings: string # Output information how long each compilation takes
|
||||
--target-dir: path # Directory for all generated artifacts and intermediate files
|
||||
--out-dir: path # Copy final artifacts to this directory
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--message-format: string # The output format for diagnostic messages
|
||||
--build-plan # Outputs a series of JSON messages to stdout that indicate the commands to run the build
|
||||
--manifest-path: path # Path to the Cargo.toml file
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
-h, --help # Print help information
|
||||
--jobs(-j): number # Number of parallel jobs to run
|
||||
--future-incompat-report # Displays a future-incompat report for any future-incompatible warnings
|
||||
]
|
||||
|
||||
# Check the current package
|
||||
export extern "cargo check" [
|
||||
--package(-p): string@"nu-complete cargo packages" #Check only the specified packages
|
||||
--workspace # Check all members in the workspace
|
||||
--all # Alias for --workspace (deprecated)
|
||||
--exclude: string@"nu-complete cargo packages" # Exclude the specified packages
|
||||
--lib # Check the package's library
|
||||
--bin: string@"nu-complete cargo bins" # Check the specified binary
|
||||
--example: string@"nu-complete cargo examples" # Check the specified example
|
||||
--examples # Check all example targets
|
||||
--test: string # Check the specified integration test
|
||||
--tests # Check all targets in test mode that have the test = true manifest flag set
|
||||
--bench: string # Check the specified benchmark
|
||||
--benches # Check all targets in benchmark mode that have the bench = true manifest flag set
|
||||
--all-targets # Check all targets
|
||||
--features(-F): string@"nu-complete cargo features" # Space or comma separated list of features to activate
|
||||
--all-features # Activate all available features
|
||||
--no-default-features # Do not activate the `default` feature
|
||||
--target: string # Check for the given architecture
|
||||
--release(-r) # Check optimized artifacts with the release profile
|
||||
--profile: string@"nu-complete cargo profiles" # Check with the given profile
|
||||
--ignore-rust-version # Ignore `rust-version` specification in packages
|
||||
--timings: string # Output information how long each compilation takes
|
||||
--target-dir: path # Directory for all generated artifacts and intermediate files
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--message-format: string # The output format for diagnostic messages
|
||||
--manifest-path: path # Path to the Cargo.toml file
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
-h, --help # Print help information
|
||||
--jobs(-j): number # Number of parallel jobs to run
|
||||
--keep-going # Build as many crates in the dependency graph as possible
|
||||
--future-incompat-report # Displays a future-incompat report for any future-incompatible warnings
|
||||
]
|
||||
|
||||
# Remove the target directory
|
||||
export extern "cargo clean" [
|
||||
--package(-p): string@"nu-complete cargo packages" # Clean only the specified packages
|
||||
--doc # Remove only the doc directory in the target directory
|
||||
--release # Remove all artifacts in the release directory
|
||||
--profile # Remove all artifacts in the directory with the given profile name
|
||||
--target-dir: path # Directory for all generated artifacts and intermediate files
|
||||
--target: string # Clean for the given architecture
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--message-format: string # The output format for diagnostic messages
|
||||
--manifest-path: path # Path to the Cargo.toml file
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
-h, --help # Print help information
|
||||
]
|
||||
|
||||
# Build a package's documentation
|
||||
export extern "cargo doc" [
|
||||
--open # Open the docs in a browser after building them
|
||||
--no-deps # Do not build documentation for dependencie
|
||||
--document-private-items # Include non-public items in the documentation
|
||||
--package(-p): string@"nu-complete cargo packages" # Document only the specified packages
|
||||
--workspace # Document all members in the workspace
|
||||
--exclude: string@"nu-complete cargo packages" # Exclude the specified packages
|
||||
--lib: string # Document the package's library
|
||||
--bin: string@"nu-complete cargo bins" # Document the specified binary
|
||||
--bins # Document all binary targets
|
||||
--example: string@"nu-complete cargo examples" # Document the specified example
|
||||
--examples # Document all example targets
|
||||
--features(-F): string@"nu-complete cargo features" # Space or comma separated list of features to activate
|
||||
--all-features # Activate all available features of all selected packages
|
||||
--no-default-features # Do not activate the default feature of the selected packages
|
||||
--target: string # Document for the given architecture
|
||||
--release(-r) # Document optimized artifacts with the release profile
|
||||
--profile: string@"nu-complete cargo profiles" # Document with the given profile
|
||||
--ignore-rust-version # Ignore `rust-version` specification in packages
|
||||
--timings: string # Output information how long each compilation takes
|
||||
--target-dir: path # Directory for all generated artifacts and intermediate files
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--message-format: string # The output format for diagnostic messages
|
||||
--manifest-path: path # Path to the Cargo.toml file
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
-h, --help # Print help information
|
||||
--jobs(-j): number # Number of parallel jobs to run
|
||||
--keep-going # Build as many crates in the dependency graph as possible
|
||||
]
|
||||
|
||||
# Create a new cargo package
|
||||
export extern "cargo new" [
|
||||
path: path # The directory that will contain the project
|
||||
--bin # Create a package with a binary target (src/main.rs) (default)
|
||||
--lib # Create a package with a library target (src/lib.rs)
|
||||
--edition: number # Specify the Rust edition to use (default: 2021)
|
||||
--name: string # Set the package name. Defaults to the directory name.
|
||||
--vcs: string@"nu-complete cargo vcs" # Initialize a new VCS repository for the given version control system
|
||||
--registry: string # Name of the registry to use
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
-h, --help # Print help information
|
||||
]
|
||||
|
||||
# Create a new cargo package in an existing directory
|
||||
export extern "cargo init" [
|
||||
path: path # The directory that will contain the project
|
||||
--bin # Create a package with a binary target (src/main.rs) (default)
|
||||
--lib # Create a package with a library target (src/lib.rs)
|
||||
--edition: number # Specify the Rust edition to use (default: 2021)
|
||||
--name: string # Set the package name. Defaults to the directory name.
|
||||
--vcs: string@"nu-complete cargo vcs" # Initialize a new VCS repository for the given version control system
|
||||
--registry: string # Name of the registry to use
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
-h, --help # Print help information
|
||||
]
|
||||
|
||||
# Run the current cargo package
|
||||
export extern "cargo run" [
|
||||
...args: any # Arguments to be passed to your program
|
||||
--bin: string@"nu-complete cargo bins" # Name of the bin target to run
|
||||
--example: string@"nu-complete cargo examples" # Name of the example target to run
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--package(-p): string@"nu-complete cargo packages" # Package with the target to run
|
||||
--jobs(-j): number # Number of parallel jobs, defaults to # of CPUs
|
||||
--release # Build artifacts in release mode, with optimizations
|
||||
--profile: string@"nu-complete cargo profiles" # Build artifacts with the specified profile
|
||||
--features(-F): string@"nu-complete cargo features" # Space or comma separated list of features to activate
|
||||
--all-features # Activate all available features
|
||||
--no-default-features # Do not activate the `default` feature
|
||||
--target: string # Build for the target triple
|
||||
--target-dir: path # Directory for all generated artifacts
|
||||
--manifest-path: path # Path to Cargo.toml
|
||||
--message-format: string # Error format
|
||||
--unit-graph # Output build graph in JSON (unstable)
|
||||
--ignore-rust-version # Ignore `rust-version` specification in packages
|
||||
--verbose(-v) # Use verbose output (-vv very verbose/build.rs output)
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
--config: string # Override a configuration value (unstable)
|
||||
-Z: string # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
--help(-h) # Prints help information
|
||||
]
|
||||
|
||||
# Run the tests
|
||||
export extern "cargo test" [
|
||||
test_arg_separator?: string
|
||||
...args: any # Arguments to be passed to the tests
|
||||
--no-run # Compile, but don't run tests
|
||||
--no-fail-fast # Run all tests regardless of failure
|
||||
--package(-p): string@"nu-complete cargo packages" # Test only the specified packages
|
||||
--workspace # Test all members in the workspace
|
||||
--exclude: string@"nu-complete cargo packages" # Exclude the specified packages
|
||||
--lib # Test the package's library
|
||||
--bin: string@"nu-complete cargo bins" # Test only the specified binary
|
||||
--bins # Test all binaries
|
||||
--example: string@"nu-complete cargo examples" # Test only the specified example
|
||||
--examples # Test all examples
|
||||
--test: string # Test the specified integration test
|
||||
--tests # Test all targets in test mode that have the test = true manifest flag set
|
||||
--bench: string # Test the specified benchmark
|
||||
--benches # Test all targets in benchmark mode that have the bench = true manifest flag set
|
||||
--all-targets # Test all targets
|
||||
--doc # Test ONLY the library's documentation
|
||||
--features(-F): string@"nu-complete cargo features" # Space or comma separated list of features to activate
|
||||
--all-features # Activate all available features of all selected packages
|
||||
--no-default-features # Do not activate the default feature of the selected packages
|
||||
--target: string # Test for the given architecture
|
||||
--release(-r) # Test optimized artifacts with the release profile
|
||||
--profile: string@"nu-complete cargo profiles" # Test with the given profile
|
||||
--ignore-rust-version # Ignore `rust-version` specification in packages
|
||||
--timings: string # Output information how long each compilation takes
|
||||
--target-dir: path # Directory for all generated artifacts and intermediate files
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--message-format: string # The output format for diagnostic messages
|
||||
--manifest-path: path # Path to the Cargo.toml file
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
--help(-h) # Prints help information
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
--jobs(-j): number # Number of parallel jobs to run
|
||||
--keep-going # Build as many crates in the dependency graph as possible
|
||||
--future-incompat-report # Displays a future-incompat report for any future-incompatible warnings
|
||||
]
|
||||
|
||||
# Execute benchmarks of a package
|
||||
export extern "cargo bench" [
|
||||
bench_option_seperator?: string
|
||||
...options: any # Options to be passed to the benchmarks
|
||||
--no-run # Compile, but don't run benchmarks
|
||||
--no-fail-fast # Run all benchmarks regardless of failure
|
||||
--package(-p): string@"nu-complete cargo packages" # Benchmark only the specified packages
|
||||
--workspace # Benchmark all members in the workspace
|
||||
--exclude: string@"nu-complete cargo packages" # Exclude the specified packages
|
||||
--lib # Benchmark the package's library
|
||||
--bin: string@"nu-complete cargo bins" # Benchmark only the specified binary
|
||||
--bins # Benchmark all binary targets
|
||||
--example: string@"nu-complete cargo examples" # Benchmark only the specified example
|
||||
--examples # Benchmark all example targets
|
||||
--test: string # Benchmark the specified integration test
|
||||
--tests # Benchmark all targets in test mode that have the test = true
|
||||
--bench: string # Benchmark the specified benchmark
|
||||
--benches # Benchmark all targets in benchmark mode that have the bench = true manifest flag set
|
||||
--all-targets # Benchmark all targets
|
||||
--features(-F): string@"nu-complete cargo features" # Space or comma separated list of features to activate
|
||||
--all-features # Activate all available features of all selected packages
|
||||
--no-default-features # Do not activate the default feature of the selected packages
|
||||
--target: string # Benchmark for the given architecture
|
||||
--profile: string@"nu-complete cargo profiles" # Build artifacts with the specified profile
|
||||
--ignore-rust-version # Ignore `rust-version` specification in packages
|
||||
--timings: string # Output information how long each compilation takes
|
||||
--target-dir: path # Directory for all generated artifacts and intermediate files
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--message-format: string # The output format for diagnostic messages
|
||||
--build-plan # Outputs a series of JSON messages to stdout that indicate the commands to run the build
|
||||
--manifest-path: path # Path to the Cargo.toml file
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
-h, --help # Print help information
|
||||
--jobs(-j): number # Number of parallel jobs to run
|
||||
--keep-going # Build as many crates in the dependency graph as possible
|
||||
]
|
||||
|
||||
# Update dependencies listed in Cargo.lock
|
||||
export extern "cargo update" [
|
||||
--package(-p): string@"nu-complete cargo packages" # Update only the specified packages
|
||||
--aggressive # Dependencies of the specified packages are forced to update as well
|
||||
--precise: any # Allows you to specify a specific version number to set the package to
|
||||
--workspace(-w) # Attempt to update only packages defined in the workspace
|
||||
--dry-run # Displays what would be updated but doesn't write the lockfile
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--manifest-path: path # Path to the Cargo.toml file
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
--help(-h) # Prints help information
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
]
|
||||
|
||||
# Search packages in crates.io
|
||||
export extern "cargo search" [
|
||||
query: string # The thing to search
|
||||
--limit: number # Limit the number of results. (default: 10, max: 100)
|
||||
--index: string # The URL of the registry index to use
|
||||
--registry: string # Name of the registry to use
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--help(-h) # Prints help information
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
]
|
||||
|
||||
# Package and upload a package to the registry
|
||||
export extern "cargo publish" [
|
||||
--dry-run # Perform all checks without uploading
|
||||
--token: any # API token to use when authenticating
|
||||
--no-verify # Don't verify the contents by building them
|
||||
--allow-dirty # Allow working directories with uncommitted VCS changes to be packaged
|
||||
--index: string # The URL of the registry index to use
|
||||
--registry: string # Name of the registry to publish to
|
||||
--package(-p): string@"nu-complete cargo packages" # The package to publish
|
||||
--target: string # Publish for the given architecture
|
||||
--target-dir: path # Directory for all generated artifacts and intermediate files
|
||||
--features(-F): string@"nu-complete cargo features" # Space or comma separated list of features to activate
|
||||
--all-features # Activate all available features of all selected packages
|
||||
--no-default-features # Do not activate the default feature of the selected packages
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--manifest-path: path # Path to the Cargo.toml file
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
--help(-h) # Prints help information
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
--jobs(-j): number # Number of parallel jobs to run
|
||||
--keep-going # Build as many crates in the dependency graph as possible
|
||||
]
|
||||
|
||||
# Build and install a Rust binary
|
||||
export extern "cargo install" [
|
||||
crate?: string # The crate to install
|
||||
--version: string # Specify a version to install
|
||||
--vers: string # Specify a version to install
|
||||
--git: string # Git URL to install the specified crate from
|
||||
--branch: string # Branch to use when installing from git
|
||||
--tag: string # Tag to use when installing from git
|
||||
--rev: string # Specific commit to use when installing from git
|
||||
--path: path # Filesystem path to local crate to install
|
||||
--list # List all installed packages and their versions
|
||||
--force(-f) # Force overwriting existing crates or binaries
|
||||
--no-track # Don't keep track of this package
|
||||
--bin: string@"nu-complete cargo bins" # Install only the specified binary
|
||||
--bins # Install all binaries
|
||||
--example: string@"nu-complete cargo examples" # Install only the specified example
|
||||
--examples # Install all examples
|
||||
--root: path # Directory to install packages into
|
||||
--registry: string # Name of the registry to use
|
||||
--index: string # The URL of the registry index to use
|
||||
--features(-F): string@"nu-complete cargo features" # Space or comma separated list of features to activate
|
||||
--all-features # Activate all available features of all selected packages
|
||||
--no-default-features # Do not activate the default feature of the selected packages
|
||||
--target: string # Install for the given architecture
|
||||
--target-dir: path # Directory for all generated artifacts and intermediate files
|
||||
--debug # Build with the dev profile instead the release profile
|
||||
--profile: string@"nu-complete cargo profiles" # Build artifacts with the specified profile
|
||||
--timings: string # Output information how long each compilation takes
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
--jobs(-j): number # Number of parallel jobs to run
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--message-format: string # The output format for diagnostic messages
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
-h, --help # Print help information
|
||||
]
|
||||
|
||||
# Remove a Rust binary
|
||||
export extern "cargo uninstall" [
|
||||
package?: string@"nu-complete cargo packages" # Package to uninstall
|
||||
--package(-p): string@"nu-complete cargo packages" # Package to uninstall
|
||||
--bin: string@"nu-complete cargo bins" # Only uninstall the binary name
|
||||
--root: path # Directory to uninstall packages from
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
-h, --help # Print help information
|
||||
]
|
||||
|
||||
#*> Other Commands <*#
|
||||
|
||||
# Output the resolved dependencies of a package in machine-readable format
|
||||
export extern "cargo metadata" [
|
||||
--no-deps # Output information only about the workspace members and don't fetch dependencies
|
||||
--format-version: number # Specify the version of the output format to use. Currently 1 is the only possible value
|
||||
--filter-platform: string # This filters the resolve output to only include dependencies for the iven target triple
|
||||
--features(-F): string@"nu-complete cargo features" # Space or comma separated list of features to activate
|
||||
--all-features # Activate all available features of all selected packages
|
||||
--no-default-features # Do not activate the default feature of the selected packages
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--manifest-path: path # Path to the Cargo.toml file
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
--help(-h) # Prints help information
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
]
|
||||
|
||||
# Get the help of the given cargo subcommand
|
||||
export extern "cargo help" [
|
||||
subcommand: string@"nu-complete cargo subcommands"
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--config: string # Override a configuration value
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
]
|
||||
|
||||
# A bunch of lints to catch common mistakes and improve your Rust code
|
||||
export extern "cargo clippy" [
|
||||
--no-deps # Run Clippy only on the given crate, without linting the dependencies
|
||||
--fix # Automatically apply lint suggestions. This flag implies `--no-deps
|
||||
--version(-V) # Prints version information
|
||||
--help(-h) # Prints help information
|
||||
--warn(-W) # Set lint warnings
|
||||
--allow(-A) # Set lint allowed
|
||||
--deny(-D) # Set lint denied
|
||||
--forbid(-F) # Set lint forbidden
|
||||
--package(-p): string@"nu-complete cargo packages" #Check only the specified packages
|
||||
--workspace # Check all members in the workspace
|
||||
--all # Alias for --workspace (deprecated)
|
||||
--exclude: string@"nu-complete cargo packages" # Exclude the specified packages
|
||||
--lib # Check the package's library
|
||||
--bin: string@"nu-complete cargo bins" # Check the specified binary
|
||||
--example: string@"nu-complete cargo examples" # Check the specified example
|
||||
--examples # Check all example targets
|
||||
--test: string # Check the specified integration test
|
||||
--tests # Check all targets in test mode that have the test = true manifest flag set
|
||||
--bench: string # Check the specified benchmark
|
||||
--benches # Check all targets in benchmark mode that have the bench = true manifest flag set
|
||||
--all-targets # Check all targets
|
||||
--features(-F): string@"nu-complete cargo features" # Space or comma separated list of features to activate
|
||||
--all-features # Activate all available features
|
||||
--no-default-features # Do not activate the `default` feature
|
||||
--target: string # Check for the given architecture
|
||||
--release(-r) # Check optimized artifacts with the release profile
|
||||
--profile: string@"nu-complete cargo profiles" # Check with the given profile
|
||||
--ignore-rust-version # Ignore `rust-version` specification in packages
|
||||
--timings: string # Output information how long each compilation takes
|
||||
--target-dir: path # Directory for all generated artifacts and intermediate files
|
||||
--verbose(-v) # Use verbose output. May be specified twice for "very verbose" output
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--color: string@"nu-complete cargo color" # Control when colored output is used
|
||||
--message-format: string # The output format for diagnostic messages
|
||||
--manifest-path: path # Path to the Cargo.toml file
|
||||
--frozen # Require Cargo.lock and cache are up to date
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--offline # Run without accessing the network
|
||||
-Z: any # Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
|
||||
-h, --help # Print help information
|
||||
--jobs(-j): number # Number of parallel jobs to run
|
||||
--keep-going # Build as many crates in the dependency graph as possible
|
||||
--future-incompat-report # Displays a future-incompat report for any future-incompatible warnings
|
||||
-Z: any
|
||||
]
|
||||
|
||||
# Parameters from cargo update
|
||||
export extern "cargo install-update" [
|
||||
--all(-a) # Update all packages
|
||||
--allow-no-update(-i) # Allow for fresh-installing packages
|
||||
--downdate(-d) # Downdate packages to match latest unyanked registry version
|
||||
--force(-f) # Update all packages regardless if they need updating
|
||||
--git(-g) # Also update git packages
|
||||
--help(-h) # Prints help information
|
||||
--list(-l) # Don't update packages, only list and check if they need an update (all packages by default)
|
||||
--quiet(-q) # No output printed to stdout
|
||||
--version(-V) # Prints version information
|
||||
--cargo-dir(-c) # The cargo home directory. Default: $CARGO_HOME or $HOME/.cargo
|
||||
--filter(-s) # Specify a filter a package must match to be considered
|
||||
--install-cargo(-r) # Specify an alternative cargo to run for installations
|
||||
--temp-dir(-t) # The temporary directory. Default: $TEMP/cargo-update
|
||||
]
|
||||
|
||||
# Parameters from cargo add
|
||||
export extern "cargo add" [
|
||||
--no-default-features # Disable the default features
|
||||
--default-features # Re-enable the default features
|
||||
--features(-F) # Space or comma separated list of features to activate
|
||||
--optional # Mark the dependency as optional
|
||||
--verbose(-v) # Use verbose output (-vv very verbose/build.rs output)
|
||||
--no-optional # Mark the dependency as required
|
||||
--color: string@"nu-complete cargo color" # Coloring: auto, always, never
|
||||
--rename # Rename the dependency
|
||||
--locked # Require Cargo.lock is up to date
|
||||
--package(-p) # Package to modify
|
||||
--offline # Run without accessing the network
|
||||
--quiet(-q) # Do not print cargo log messages
|
||||
--config # Override a configuration value
|
||||
--dry-run # Don't actually write the manifest
|
||||
--help(-h) # Print help information
|
||||
--path # Filesystem path to local crate to add
|
||||
--git # Git repository location
|
||||
--branch # Git branch to download the crate from
|
||||
--tag # Git tag to download the crate from
|
||||
--rev # Git reference to download the crate from
|
||||
--registry # Package registry for this dependency
|
||||
--dev # Add as development dependency
|
||||
--build # Add as build dependency
|
||||
--target # Add as dependency to the given target platform
|
||||
...args
|
||||
]
|
||||
|
||||
694
tree/.config/nushell/config.nu.tpl
Normal file
@ -0,0 +1,694 @@
|
||||
# Nushell Config File
|
||||
#
|
||||
# version = 0.83.1
|
||||
|
||||
# For more information on defining custom themes, see
|
||||
# https://www.nushell.sh/book/coloring_and_theming.html
|
||||
# And here is the theme collection
|
||||
# https://github.com/nushell/nu_scripts/tree/main/themes
|
||||
|
||||
let fish_completer = {|spans|
|
||||
fish --command $"complete '--do-complete=($spans | str replace --all "'" "\\'" | str join ' ')'"
|
||||
| from tsv --flexible --noheaders --no-infer
|
||||
| rename value description
|
||||
| update value {|row|
|
||||
let value = $row.value
|
||||
let need_quote = ['\' ',' '[' ']' '(' ')' ' ' '\t' "'" '"' "`"] | any {$in in $value}
|
||||
if ($need_quote and ($value | path exists)) {
|
||||
let expanded_path = if ($value starts-with ~) {$value | path expand --no-symlink} else {$value}
|
||||
$'"($expanded_path | str replace --all "\"" "\\\"")"'
|
||||
} else {$value}
|
||||
}
|
||||
}
|
||||
|
||||
source theme.nu
|
||||
|
||||
$env.config = {
|
||||
show_banner: false
|
||||
|
||||
display_errors: {
|
||||
exit_code: false # assume the external command prints an error message
|
||||
# Core dump errors are always printed, and SIGPIPE never triggers an error.
|
||||
# The setting below controls message printing for termination by all other signals.
|
||||
termination_signal: true
|
||||
}
|
||||
|
||||
ls: {
|
||||
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
|
||||
clickable_links: true # enable or disable clickable links. Your terminal has to support links.
|
||||
}
|
||||
|
||||
rm: {
|
||||
always_trash: false # always act as if -t was given. Can be overridden with -p
|
||||
}
|
||||
|
||||
#cd: {
|
||||
# abbreviations: false # allows `cd s/o/f` to expand to `cd some/other/folder`
|
||||
#}
|
||||
|
||||
table: {
|
||||
mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
|
||||
index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
|
||||
show_empty: true # show 'empty list' and 'empty record' placeholders for command output
|
||||
trim: {
|
||||
methodology: wrapping # wrapping or truncating
|
||||
wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
|
||||
truncating_suffix: "..." # A suffix used by the 'truncating' methodology
|
||||
}
|
||||
}
|
||||
|
||||
# datetime_format determines what a datetime rendered in the shell would look like.
|
||||
# Behavior without this configuration point will be to "humanize" the datetime display,
|
||||
# showing something like "a day ago."
|
||||
datetime_format: {
|
||||
# normal: '%a, %d %b %Y %H:%M:%S %z' # shows up in displays of variables or other datetime's outside of tables
|
||||
# table: '%m/%d/%y %I:%M:%S%p' # generally shows up in tabular outputs such as ls. commenting this out will change it to the default human readable datetime format
|
||||
}
|
||||
|
||||
explore: {
|
||||
try: {
|
||||
border_color: {fg: "white"}
|
||||
},
|
||||
status_bar_background: {fg: "#1D1F21", bg: "#C4C9C6"},
|
||||
command_bar_text: {fg: "#C4C9C6"},
|
||||
highlight: {fg: "black", bg: "yellow"},
|
||||
status: {
|
||||
error: {fg: "white", bg: "red"},
|
||||
warn: {}
|
||||
info: {}
|
||||
},
|
||||
table: {
|
||||
split_line: {fg: "#404040"},
|
||||
selected_cell: {},
|
||||
selected_row: {},
|
||||
selected_column: {},
|
||||
cursor: true,
|
||||
line_head_top: true,
|
||||
line_head_bottom: true,
|
||||
line_shift: true,
|
||||
line_index: true,
|
||||
},
|
||||
config: {
|
||||
border_color: {fg: "white"}
|
||||
cursor_color: {fg: "black", bg: "light_yellow"}
|
||||
},
|
||||
}
|
||||
|
||||
history: {
|
||||
max_size: 100_000 # Session has to be reloaded for this to take effect
|
||||
sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
|
||||
file_format: "plaintext" # "sqlite" or "plaintext"
|
||||
isolation: false # only available with sqlite file_format. true enables history isolation, false disables it. true will allow the history to be isolated to the current session using up/down arrows. false will allow the history to be shared across all sessions.
|
||||
}
|
||||
|
||||
completions: {
|
||||
case_sensitive: false # set to true to enable case-sensitive completions
|
||||
quick: true # set this to false to prevent auto-selecting completions when only one remains
|
||||
partial: true # set this to false to prevent partial filling of the prompt
|
||||
algorithm: "prefix" # prefix or fuzzy
|
||||
external: {
|
||||
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow
|
||||
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
|
||||
completer: $fish_completer
|
||||
}
|
||||
}
|
||||
|
||||
filesize: {
|
||||
unit: "binary" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto
|
||||
}
|
||||
|
||||
cursor_shape: {
|
||||
emacs: line # block, underscore, line, blink_block, blink_underscore, blink_line (line is the default)
|
||||
vi_insert: block # block, underscore, line , blink_block, blink_underscore, blink_line (block is the default)
|
||||
vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line (underscore is the default)
|
||||
}
|
||||
|
||||
# sourced from theme.nu
|
||||
color_config: $color_config
|
||||
footer_mode: 25 # always, never, number_of_rows, auto
|
||||
float_precision: 2 # the precision for displaying floats in tables
|
||||
buffer_editor: "" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
|
||||
use_ansi_coloring: true
|
||||
bracketed_paste: true # enable bracketed paste, currently useless on windows
|
||||
edit_mode: vi # emacs, vi
|
||||
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
|
||||
|
||||
hooks: {
|
||||
pre_prompt: [{ null }] # run before the prompt is shown
|
||||
pre_execution: [{ null }] # run before the repl input is run
|
||||
env_change: {
|
||||
PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input
|
||||
}
|
||||
display_output: { table } # run before the output of a command is drawn, example: `{ if (term size).columns >= 100 { table -e } else { table } }`
|
||||
command_not_found: { null } # return an error message when a command is not found
|
||||
}
|
||||
|
||||
menus: [
|
||||
# Configuration for default nushell menus
|
||||
# Note the lack of source parameter
|
||||
{
|
||||
name: completion_menu
|
||||
only_buffer_difference: false
|
||||
marker: "| "
|
||||
type: {
|
||||
layout: columnar
|
||||
columns: 4
|
||||
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
|
||||
col_padding: 2
|
||||
}
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
description_text: yellow
|
||||
}
|
||||
}
|
||||
{
|
||||
name: history_menu
|
||||
only_buffer_difference: true
|
||||
marker: "? "
|
||||
type: {
|
||||
layout: list
|
||||
page_size: 10
|
||||
}
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
description_text: yellow
|
||||
}
|
||||
}
|
||||
{
|
||||
name: help_menu
|
||||
only_buffer_difference: true
|
||||
marker: "? "
|
||||
type: {
|
||||
layout: description
|
||||
columns: 4
|
||||
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
|
||||
col_padding: 2
|
||||
selection_rows: 4
|
||||
description_rows: 10
|
||||
}
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
description_text: yellow
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
keybindings: [
|
||||
{
|
||||
name: completion_menu
|
||||
modifier: none
|
||||
keycode: tab
|
||||
mode: [emacs vi_normal vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{ send: menu name: completion_menu }
|
||||
{ send: menunext }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: history_menu
|
||||
modifier: control
|
||||
keycode: char_r
|
||||
mode: [emacs, vi_insert, vi_normal]
|
||||
event: { send: menu name: history_menu }
|
||||
}
|
||||
{
|
||||
name: help_menu
|
||||
modifier: none
|
||||
keycode: f1
|
||||
mode: [emacs, vi_insert, vi_normal]
|
||||
event: { send: menu name: help_menu }
|
||||
}
|
||||
{
|
||||
name: completion_previous_menu
|
||||
modifier: shift
|
||||
keycode: backtab
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: menuprevious }
|
||||
}
|
||||
{
|
||||
name: next_page_menu
|
||||
modifier: control
|
||||
keycode: char_x
|
||||
mode: emacs
|
||||
event: { send: menupagenext }
|
||||
}
|
||||
{
|
||||
name: undo_or_previous_page_menu
|
||||
modifier: control
|
||||
keycode: char_z
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{ send: menupageprevious }
|
||||
{ edit: undo }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: escape
|
||||
modifier: none
|
||||
keycode: escape
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: esc } # NOTE: does not appear to work
|
||||
}
|
||||
{
|
||||
name: cancel_command
|
||||
modifier: control
|
||||
keycode: char_c
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: ctrlc }
|
||||
}
|
||||
{
|
||||
name: quit_shell
|
||||
modifier: control
|
||||
keycode: char_d
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: ctrld }
|
||||
}
|
||||
{
|
||||
name: clear_screen
|
||||
modifier: control
|
||||
keycode: char_l
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: clearscreen }
|
||||
}
|
||||
#{
|
||||
# name: search_history
|
||||
# modifier: control
|
||||
# keycode: char_r
|
||||
# mode: [emacs, vi_normal, vi_insert]
|
||||
# event: { send: searchhistory }
|
||||
#}
|
||||
{
|
||||
name: open_command_editor
|
||||
modifier: control
|
||||
keycode: char_o
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: openeditor }
|
||||
}
|
||||
{
|
||||
name: move_up
|
||||
modifier: none
|
||||
keycode: up
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: menuup}
|
||||
{send: up}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_down
|
||||
modifier: none
|
||||
keycode: down
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: menudown}
|
||||
{send: down}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_left
|
||||
modifier: none
|
||||
keycode: left
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: menuleft}
|
||||
{send: left}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_right_or_take_history_hint
|
||||
modifier: none
|
||||
keycode: right
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintcomplete}
|
||||
{send: menuright}
|
||||
{send: right}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_one_word_left
|
||||
modifier: control
|
||||
keycode: left
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {edit: movewordleft}
|
||||
}
|
||||
{
|
||||
name: move_one_word_right_or_take_history_hint
|
||||
modifier: control
|
||||
keycode: right
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintwordcomplete}
|
||||
{edit: movewordright}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_to_line_start
|
||||
modifier: none
|
||||
keycode: home
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {edit: movetolinestart}
|
||||
}
|
||||
{
|
||||
name: move_to_line_start
|
||||
modifier: control
|
||||
keycode: char_a
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {edit: movetolinestart}
|
||||
}
|
||||
{
|
||||
name: move_to_line_end_or_take_history_hint
|
||||
modifier: none
|
||||
keycode: end
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintcomplete}
|
||||
{edit: movetolineend}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_to_line_end_or_take_history_hint
|
||||
modifier: control
|
||||
keycode: char_e
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintcomplete}
|
||||
{edit: movetolineend}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_to_line_start
|
||||
modifier: control
|
||||
keycode: home
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {edit: movetolinestart}
|
||||
}
|
||||
{
|
||||
name: move_to_line_end
|
||||
modifier: control
|
||||
keycode: end
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {edit: movetolineend}
|
||||
}
|
||||
{
|
||||
name: move_up
|
||||
modifier: control
|
||||
keycode: char_p
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: menuup}
|
||||
{send: up}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_down
|
||||
modifier: control
|
||||
keycode: char_t
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: menudown}
|
||||
{send: down}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: delete_one_character_backward
|
||||
modifier: none
|
||||
keycode: backspace
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: backspace}
|
||||
}
|
||||
{
|
||||
name: delete_one_word_backward
|
||||
modifier: control
|
||||
keycode: backspace
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: backspaceword}
|
||||
}
|
||||
{
|
||||
name: delete_one_character_forward
|
||||
modifier: none
|
||||
keycode: delete
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: delete}
|
||||
}
|
||||
{
|
||||
name: delete_one_character_forward
|
||||
modifier: control
|
||||
keycode: delete
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: delete}
|
||||
}
|
||||
{
|
||||
name: delete_one_character_forward
|
||||
modifier: control
|
||||
keycode: char_h
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: backspace}
|
||||
}
|
||||
{
|
||||
name: delete_one_word_backward
|
||||
modifier: control
|
||||
keycode: char_w
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: backspaceword}
|
||||
}
|
||||
{
|
||||
name: move_left
|
||||
modifier: none
|
||||
keycode: backspace
|
||||
mode: vi_normal
|
||||
event: {edit: moveleft}
|
||||
}
|
||||
{
|
||||
name: newline_or_run_command
|
||||
modifier: none
|
||||
keycode: enter
|
||||
mode: emacs
|
||||
event: {send: enter}
|
||||
}
|
||||
{
|
||||
name: move_left
|
||||
modifier: control
|
||||
keycode: char_b
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{send: menuleft}
|
||||
{send: left}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_right_or_take_history_hint
|
||||
modifier: control
|
||||
keycode: char_f
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintcomplete}
|
||||
{send: menuright}
|
||||
{send: right}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: redo_change
|
||||
modifier: control
|
||||
keycode: char_g
|
||||
mode: emacs
|
||||
event: {edit: redo}
|
||||
}
|
||||
{
|
||||
name: undo_change
|
||||
modifier: control
|
||||
keycode: char_z
|
||||
mode: emacs
|
||||
event: {edit: undo}
|
||||
}
|
||||
{
|
||||
name: paste_before
|
||||
modifier: control
|
||||
keycode: char_y
|
||||
mode: emacs
|
||||
event: {edit: pastecutbufferbefore}
|
||||
}
|
||||
{
|
||||
name: cut_word_left
|
||||
modifier: control
|
||||
keycode: char_w
|
||||
mode: emacs
|
||||
event: {edit: cutwordleft}
|
||||
}
|
||||
{
|
||||
name: cut_line_to_end
|
||||
modifier: control
|
||||
keycode: char_k
|
||||
mode: emacs
|
||||
event: {edit: cuttoend}
|
||||
}
|
||||
{
|
||||
name: cut_line_from_start
|
||||
modifier: control
|
||||
keycode: char_u
|
||||
mode: emacs
|
||||
event: {edit: cutfromstart}
|
||||
}
|
||||
{
|
||||
name: swap_graphemes
|
||||
modifier: control
|
||||
keycode: char_t
|
||||
mode: emacs
|
||||
event: {edit: swapgraphemes}
|
||||
}
|
||||
{
|
||||
name: move_one_word_left
|
||||
modifier: alt
|
||||
keycode: left
|
||||
mode: emacs
|
||||
event: {edit: movewordleft}
|
||||
}
|
||||
{
|
||||
name: move_one_word_right_or_take_history_hint
|
||||
modifier: alt
|
||||
keycode: right
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintwordcomplete}
|
||||
{edit: movewordright}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_one_word_left
|
||||
modifier: alt
|
||||
keycode: char_b
|
||||
mode: emacs
|
||||
event: {edit: movewordleft}
|
||||
}
|
||||
{
|
||||
name: move_one_word_right_or_take_history_hint
|
||||
modifier: alt
|
||||
keycode: char_f
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintwordcomplete}
|
||||
{edit: movewordright}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: delete_one_word_forward
|
||||
modifier: alt
|
||||
keycode: delete
|
||||
mode: emacs
|
||||
event: {edit: deleteword}
|
||||
}
|
||||
{
|
||||
name: delete_one_word_backward
|
||||
modifier: alt
|
||||
keycode: backspace
|
||||
mode: emacs
|
||||
event: {edit: backspaceword}
|
||||
}
|
||||
{
|
||||
name: delete_one_word_backward
|
||||
modifier: alt
|
||||
keycode: char_m
|
||||
mode: emacs
|
||||
event: {edit: backspaceword}
|
||||
}
|
||||
{
|
||||
name: cut_word_to_right
|
||||
modifier: alt
|
||||
keycode: char_d
|
||||
mode: emacs
|
||||
event: {edit: cutwordright}
|
||||
}
|
||||
{
|
||||
name: upper_case_word
|
||||
modifier: alt
|
||||
keycode: char_u
|
||||
mode: emacs
|
||||
event: {edit: uppercaseword}
|
||||
}
|
||||
{
|
||||
name: lower_case_word
|
||||
modifier: alt
|
||||
keycode: char_l
|
||||
mode: emacs
|
||||
event: {edit: lowercaseword}
|
||||
}
|
||||
{
|
||||
name: capitalize_char
|
||||
modifier: alt
|
||||
keycode: char_c
|
||||
mode: emacs
|
||||
event: {edit: capitalizechar}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
alias grep = rg
|
||||
alias find = fd
|
||||
alias cat = bat
|
||||
alias e = nvim
|
||||
alias gd = git diff
|
||||
alias ga = git add
|
||||
alias gst = git status
|
||||
alias gc = git commit
|
||||
alias gl = git pull
|
||||
alias gp = git push
|
||||
alias gpu = git push -u origin
|
||||
alias gsta = git stash push
|
||||
alias gstp = git stash pop
|
||||
alias gw = git switch
|
||||
alias lg = lazygit
|
||||
alias bt = bluetoothctl
|
||||
alias d = cd ~/.config/dotfiles/tree
|
||||
alias xo = xdg-open
|
||||
|
||||
# random scripts
|
||||
source ~/.local/nu/readelf.nu
|
||||
source ~/.local/nu/mullvad.nu
|
||||
source ~/.local/nu/git.nu
|
||||
source ~/.local/nu/tailscale.nu
|
||||
{% if os == "darwin" %}
|
||||
source ~/.local/nu/macos.nu
|
||||
{% end %}
|
||||
|
||||
# init zoxide
|
||||
source ~/.cache/zoxide.nu
|
||||
|
||||
# init starship prompt
|
||||
source ~/.cache/starship/init.nu
|
||||
|
||||
# external completions
|
||||
source ~/.config/nushell/git-completions.nu
|
||||
source ~/.config/nushell/cargo-completions.nu
|
||||
112
tree/.config/nushell/env.nu
Normal file
@ -0,0 +1,112 @@
|
||||
# Nushell Environment Config File
|
||||
#
|
||||
# version = 0.83.1
|
||||
|
||||
def create_left_prompt [] {
|
||||
mut home = ""
|
||||
try {
|
||||
if $nu.os-info.name == "windows" {
|
||||
$home = $env.USERPROFILE
|
||||
} else {
|
||||
$home = $env.HOME
|
||||
}
|
||||
}
|
||||
|
||||
let dir = ([
|
||||
($env.PWD | str substring 0..($home | str length) | str replace $home "~"),
|
||||
($env.PWD | str substring ($home | str length)..)
|
||||
] | str join)
|
||||
|
||||
let path_color = (if (is-admin) { ansi red_bold } else { ansi green_bold })
|
||||
let separator_color = (if (is-admin) { ansi light_red_bold } else { ansi light_green_bold })
|
||||
let path_segment = $"($path_color)($dir)"
|
||||
|
||||
$path_segment | str replace --all (char path_sep) $"($separator_color)/($path_color)"
|
||||
}
|
||||
|
||||
def create_right_prompt [] {
|
||||
# create a right prompt in magenta with green separators and am/pm underlined
|
||||
let time_segment = ([
|
||||
(ansi reset)
|
||||
(ansi magenta)
|
||||
(date now | date format '%Y/%m/%d %r')
|
||||
] | str join | str replace --all "([/:])" $"(ansi green)${1}(ansi magenta)" |
|
||||
str replace --all "([AP]M)" $"(ansi magenta_underline)${1}")
|
||||
|
||||
let last_exit_code = if ($env.LAST_EXIT_CODE != 0) {([
|
||||
(ansi rb)
|
||||
($env.LAST_EXIT_CODE)
|
||||
] | str join)
|
||||
} else { "" }
|
||||
|
||||
([$last_exit_code, (char space), $time_segment] | str join)
|
||||
}
|
||||
|
||||
# Use nushell functions to define your right and left prompt
|
||||
$env.PROMPT_COMMAND = {|| create_left_prompt }
|
||||
# $env.PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
|
||||
|
||||
# The prompt indicators are environmental variables that represent
|
||||
# the state of the prompt
|
||||
$env.PROMPT_INDICATOR = {|| " > " }
|
||||
$env.PROMPT_INDICATOR_VI_INSERT = {|| " : " }
|
||||
$env.PROMPT_INDICATOR_VI_NORMAL = {|| " > " }
|
||||
$env.PROMPT_MULTILINE_INDICATOR = {|| "::: " }
|
||||
|
||||
# Specifies how environment variables are:
|
||||
# - converted from a string to a value on Nushell startup (from_string)
|
||||
# - converted from a value back to a string when running external commands (to_string)
|
||||
# Note: The conversions happen *after* config.nu is loaded
|
||||
$env.ENV_CONVERSIONS = {
|
||||
"PATH": {
|
||||
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
|
||||
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
|
||||
}
|
||||
"Path": {
|
||||
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
|
||||
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
|
||||
}
|
||||
}
|
||||
|
||||
# Directories to search for scripts when calling source or use
|
||||
$env.NU_LIB_DIRS = [
|
||||
# ($nu.default-config-dir | path join 'scripts') # add <nushell-config-dir>/scripts
|
||||
]
|
||||
|
||||
# Directories to search for plugin binaries when calling register
|
||||
$env.NU_PLUGIN_DIRS = [
|
||||
# ($nu.default-config-dir | path join 'plugins') # add <nushell-config-dir>/plugins
|
||||
]
|
||||
|
||||
if XDG_CONFIG_HOME not-in $env {
|
||||
$env.XDG_CONFIG_HOME = $"($env.HOME)/.config"
|
||||
}
|
||||
|
||||
$env.PATH = ($env.PATH | split row (char esep) | prepend [
|
||||
($env.HOME + "/.local/bin"),
|
||||
($env.HOME + "/.cargo/bin"),
|
||||
($env.HOME + "/.radicle/bin"),
|
||||
($env.HOME + "/.volta/bin"),
|
||||
($env.HOME + "/.orbstack/bin"), # docker on macos
|
||||
])
|
||||
|
||||
# auto-detect which ssh-agent to use
|
||||
if ("XDG_RUNTIME_DIR" in $env) {
|
||||
if (which tkey-ssh-agent | is-empty) {
|
||||
$env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/ssh-agent.socket"
|
||||
} else {
|
||||
$env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/tkey-ssh-agent/sock"
|
||||
}
|
||||
}
|
||||
|
||||
$env.GPG_TTY = (tty)
|
||||
$env.BROWSER = "firefox"
|
||||
$env.EDITOR = "helix"
|
||||
$env.DEFMT_LOG = "info"
|
||||
$env.MOZ_ENABLE_WAYLAND = "1"
|
||||
$env.VOLTA_HOME = $"($env.HOME)/.volta"
|
||||
$env.CARGO_TARGET_DIR = $"($env.HOME)/.cargo/target"
|
||||
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save -f ~/.cache/starship/init.nu
|
||||
zoxide init nushell | save -f ~/.cache/zoxide.nu
|
||||
419
tree/.config/nushell/git-completions.nu
Normal file
@ -0,0 +1,419 @@
|
||||
def "nu-complete git available upstream" [] {
|
||||
^git branch -a | lines | each { |line| $line | str replace '\* ' "" | str trim }
|
||||
}
|
||||
|
||||
def "nu-complete git remotes" [] {
|
||||
^git remote | lines | each { |line| $line | str trim }
|
||||
}
|
||||
|
||||
def "nu-complete git log" [] {
|
||||
^git log --pretty=%h | lines | each { |line| $line | str trim }
|
||||
}
|
||||
|
||||
# Yield all existing commits in descending chronological order.
|
||||
def "nu-complete git commits all" [] {
|
||||
^git rev-list --all --remotes --pretty=oneline | lines | parse "{value} {description}"
|
||||
}
|
||||
|
||||
# Yield commits of current branch only. This is useful for e.g. cut points in
|
||||
# `git rebase`.
|
||||
def "nu-complete git commits current branch" [] {
|
||||
^git log --pretty="%h %s" | lines | parse "{value} {description}"
|
||||
}
|
||||
|
||||
# Yield local branches like `main`, `feature/typo_fix`
|
||||
def "nu-complete git local branches" [] {
|
||||
^git branch | lines | each { |line| $line | str replace '\* ' "" | str trim }
|
||||
}
|
||||
|
||||
# Yield remote branches like `origin/main`, `upstream/feature-a`
|
||||
def "nu-complete git remote branches with prefix" [] {
|
||||
^git branch -r | lines | parse -r '^\*?(\s*|\s*\S* -> )(?P<branch>\S*$)' | get branch | uniq
|
||||
}
|
||||
|
||||
# Yield remote branches *without* prefix which do not have a local counterpart.
|
||||
# E.g. `upstream/feature-a` as `feature-a` to checkout and track in one command
|
||||
# with `git checkout` or `git switch`.
|
||||
def "nu-complete git remote branches nonlocal without prefix" [] {
|
||||
# Get regex to strip remotes prefixes. It will look like `(origin|upstream)`
|
||||
# for the two remotes `origin` and `upstream`.
|
||||
let remotes_regex = (["(", ((nu-complete git remotes | each {|r| [$r, '/'] | str join}) | str join "|"), ")"] | str join)
|
||||
let local_branches = (nu-complete git local branches)
|
||||
^git branch -r | lines | parse -r (['^[\* ]+', $remotes_regex, '?(?P<branch>\S+)'] | flatten | str join) | get branch | uniq | where {|branch| $branch != "HEAD"} | where {|branch| $branch not-in $local_branches }
|
||||
}
|
||||
|
||||
def "nu-complete git switch" [] {
|
||||
(nu-complete git local branches)
|
||||
| parse "{value}"
|
||||
| insert description "local branch"
|
||||
| append (nu-complete git remote branches nonlocal without prefix
|
||||
| parse "{value}"
|
||||
| insert description "remote branch")
|
||||
}
|
||||
|
||||
def "nu-complete git checkout" [] {
|
||||
(nu-complete git local branches)
|
||||
| parse "{value}"
|
||||
| insert description "local branch"
|
||||
| append (nu-complete git remote branches nonlocal without prefix
|
||||
| parse "{value}"
|
||||
| insert description "remote branch")
|
||||
| append (nu-complete git remote branches with prefix
|
||||
| parse "{value}"
|
||||
| insert description "remote branch")
|
||||
| append (nu-complete git commits all)
|
||||
}
|
||||
|
||||
# Arguments to `git rebase --onto <arg1> <arg2>`
|
||||
def "nu-complete git rebase" [] {
|
||||
(nu-complete git local branches)
|
||||
| parse "{value}"
|
||||
| insert description "local branch"
|
||||
| append (nu-complete git remote branches with prefix
|
||||
| parse "{value}"
|
||||
| insert description "remote branch")
|
||||
| append (nu-complete git commits all)
|
||||
}
|
||||
|
||||
def "nu-complete git stash-list" [] {
|
||||
git stash list | lines | parse "{value}: {description}"
|
||||
}
|
||||
|
||||
def "nu-complete git tags" [] {
|
||||
^git tag | lines
|
||||
}
|
||||
|
||||
def "nu-complete git built-in-refs" [] {
|
||||
[HEAD FETCH_HEAD ORIG_HEAD]
|
||||
}
|
||||
|
||||
def "nu-complete git refs" [] {
|
||||
nu-complete git switchable branches
|
||||
| parse "{value}"
|
||||
| insert description Branch
|
||||
| append (nu-complete git tags | parse "{value}" | insert description Tag)
|
||||
| append (nu-complete git built-in-refs)
|
||||
}
|
||||
|
||||
def "nu-complete git subcommands" [] {
|
||||
^git help -a | lines | where $it starts-with " " | parse -r '\s*(?P<value>[^ ]+) \s*(?P<description>\w.*)'
|
||||
}
|
||||
|
||||
# Check out git branches and files
|
||||
export extern "git checkout" [
|
||||
...targets: string@"nu-complete git checkout" # name of the branch or files to checkout
|
||||
--conflict: string # conflict style (merge or diff3)
|
||||
--detach(-d) # detach HEAD at named commit
|
||||
--force(-f) # force checkout (throw away local modifications)
|
||||
--guess # second guess 'git checkout <no-such-branch>' (default)
|
||||
--ignore-other-worktrees # do not check if another worktree is holding the given ref
|
||||
--ignore-skip-worktree-bits # do not limit pathspecs to sparse entries only
|
||||
--merge(-m) # perform a 3-way merge with the new branch
|
||||
--orphan: string # new unparented branch
|
||||
--ours(-2) # checkout our version for unmerged files
|
||||
--overlay # use overlay mode (default)
|
||||
--overwrite-ignore # update ignored files (default)
|
||||
--patch(-p) # select hunks interactively
|
||||
--pathspec-from-file: string # read pathspec from file
|
||||
--progress # force progress reporting
|
||||
--quiet(-q) # suppress progress reporting
|
||||
--recurse-submodules: string # control recursive updating of submodules
|
||||
--theirs(-3) # checkout their version for unmerged files
|
||||
--track(-t) # set upstream info for new branch
|
||||
-b: string # create and checkout a new branch
|
||||
-B: string # create/reset and checkout a branch
|
||||
-l # create reflog for new branch
|
||||
]
|
||||
|
||||
# Download objects and refs from another repository
|
||||
export extern "git fetch" [
|
||||
repository?: string@"nu-complete git remotes" # name of the branch to fetch
|
||||
--all # Fetch all remotes
|
||||
--append(-a) # Append ref names and object names to .git/FETCH_HEAD
|
||||
--atomic # Use an atomic transaction to update local refs.
|
||||
--depth: int # Limit fetching to n commits from the tip
|
||||
--deepen: int # Limit fetching to n commits from the current shallow boundary
|
||||
--shallow-since: string # Deepen or shorten the history by date
|
||||
--shallow-exclude: string # Deepen or shorten the history by branch/tag
|
||||
--unshallow # Fetch all available history
|
||||
--update-shallow # Update .git/shallow to accept new refs
|
||||
--negotiation-tip: string # Specify which commit/glob to report while fetching
|
||||
--negotiate-only # Do not fetch, only print common ancestors
|
||||
--dry-run # Show what would be done
|
||||
--write-fetch-head # Write fetched refs in FETCH_HEAD (default)
|
||||
--no-write-fetch-head # Do not write FETCH_HEAD
|
||||
--force(-f) # Always update the local branch
|
||||
--keep(-k) # Keep dowloaded pack
|
||||
--multiple # Allow several arguments to be specified
|
||||
--auto-maintenance # Run 'git maintenance run --auto' at the end (default)
|
||||
--no-auto-maintenance # Don't run 'git maintenance' at the end
|
||||
--auto-gc # Run 'git maintenance run --auto' at the end (default)
|
||||
--no-auto-gc # Don't run 'git maintenance' at the end
|
||||
--write-commit-graph # Write a commit-graph after fetching
|
||||
--no-write-commit-graph # Don't write a commit-graph after fetching
|
||||
--prefetch # Place all refs into the refs/prefetch/ namespace
|
||||
--prune(-p) # Remove obsolete remote-tracking references
|
||||
--prune-tags(-P) # Remove any local tags that do not exist on the remote
|
||||
--no-tags(-n) # Disable automatic tag following
|
||||
--refmap: string # Use this refspec to map the refs to remote-tracking branches
|
||||
--tags(-t) # Fetch all tags
|
||||
--recurse-submodules: string # Fetch new commits of populated submodules (yes/on-demand/no)
|
||||
--jobs(-j): int # Number of parallel children
|
||||
--no-recurse-submodules # Disable recursive fetching of submodules
|
||||
--set-upstream # Add upstream (tracking) reference
|
||||
--submodule-prefix: string # Prepend to paths printed in informative messages
|
||||
--upload-pack: string # Non-default path for remote command
|
||||
--quiet(-q) # Silence internally used git commands
|
||||
--verbose(-v) # Be verbose
|
||||
--progress # Report progress on stderr
|
||||
--server-option(-o): string # Pass options for the server to handle
|
||||
--show-forced-updates # Check if a branch is force-updated
|
||||
--no-show-forced-updates # Don't check if a branch is force-updated
|
||||
-4 # Use IPv4 addresses, ignore IPv6 addresses
|
||||
-6 # Use IPv6 addresses, ignore IPv4 addresses
|
||||
]
|
||||
|
||||
# Push changes
|
||||
export extern "git push" [
|
||||
remote?: string@"nu-complete git remotes", # the name of the remote
|
||||
...refs: string@"nu-complete git local branches" # the branch / refspec
|
||||
--all # push all refs
|
||||
--atomic # request atomic transaction on remote side
|
||||
--delete(-d) # delete refs
|
||||
--dry-run(-n) # dry run
|
||||
--exec: string # receive pack program
|
||||
--follow-tags # push missing but relevant tags
|
||||
--force-with-lease # require old value of ref to be at this value
|
||||
--force(-f) # force updates
|
||||
--ipv4(-4) # use IPv4 addresses only
|
||||
--ipv6(-6) # use IPv6 addresses only
|
||||
--mirror # mirror all refs
|
||||
--no-verify # bypass pre-push hook
|
||||
--porcelain # machine-readable output
|
||||
--progress # force progress reporting
|
||||
--prune # prune locally removed refs
|
||||
--push-option(-o): string # option to transmit
|
||||
--quiet(-q) # be more quiet
|
||||
--receive-pack: string # receive pack program
|
||||
--recurse-submodules: string # control recursive pushing of submodules
|
||||
--repo: string # repository
|
||||
--set-upstream(-u) # set upstream for git pull/status
|
||||
--signed: string # GPG sign the push
|
||||
--tags # push tags (can't be used with --all or --mirror)
|
||||
--thin # use thin pack
|
||||
--verbose(-v) # be more verbose
|
||||
]
|
||||
|
||||
# Pull changes
|
||||
export extern "git pull" [
|
||||
remote?: string@"nu-complete git remotes", # the name of the remote
|
||||
...refs: string@"nu-complete git local branches" # the branch / refspec
|
||||
--rebase # rebase current branch on top of upstream after fetching
|
||||
]
|
||||
|
||||
# Switch between branches and commits
|
||||
export extern "git switch" [
|
||||
switch?: string@"nu-complete git switch" # name of branch to switch to
|
||||
--create(-c): string # create a new branch
|
||||
--detach(-d): string@"nu-complete git log" # switch to a commit in a detatched state
|
||||
--force-create(-C): string # forces creation of new branch, if it exists then the existing branch will be reset to starting point
|
||||
--force(-f) # alias for --discard-changes
|
||||
--guess # if there is no local branch which matches then name but there is a remote one then this is checked out
|
||||
--ignore-other-worktrees # switch even if the ref is held by another worktree
|
||||
--merge(-m) # attempts to merge changes when switching branches if there are local changes
|
||||
--no-guess # do not attempt to match remote branch names
|
||||
--no-progress # do not report progress
|
||||
--no-recurse-submodules # do not update the contents of sub-modules
|
||||
--no-track # do not set "upstream" configuration
|
||||
--orphan: string # create a new orphaned branch
|
||||
--progress # report progress status
|
||||
--quiet(-q) # suppress feedback messages
|
||||
--recurse-submodules # update the contents of sub-modules
|
||||
--track(-t) # set "upstream" configuration
|
||||
]
|
||||
|
||||
# Apply the change introduced by an existing commit
|
||||
export extern "git cherry-pick" [
|
||||
commit?: string@"nu-complete git commits all" # The commit ID to be cherry-picked
|
||||
--edit(-e) # Edit the commit message prior to committing
|
||||
--no-commit(-n) # Apply changes without making any commit
|
||||
--signoff(-s) # Add Signed-off-by line to the commit message
|
||||
--ff # Fast-forward if possible
|
||||
--continue # Continue the operation in progress
|
||||
--abort # Cancel the operation
|
||||
--skip # Skip the current commit and continue with the rest of the sequence
|
||||
]
|
||||
|
||||
# Rebase the current branch
|
||||
export extern "git rebase" [
|
||||
branch?: string@"nu-complete git rebase" # name of the branch to rebase onto
|
||||
upstream?: string@"nu-complete git rebase" # upstream branch to compare against
|
||||
--continue # restart rebasing process after editing/resolving a conflict
|
||||
--abort # abort rebase and reset HEAD to original branch
|
||||
--quit # abort rebase but do not reset HEAD
|
||||
--interactive(-i) # rebase interactively with list of commits in editor
|
||||
--onto?: string@"nu-complete git rebase" # starting point at which to create the new commits
|
||||
--root # start rebase from root commit
|
||||
]
|
||||
|
||||
# List or change branches
|
||||
export extern "git branch" [
|
||||
branch?: string@"nu-complete git local branches" # name of branch to operate on
|
||||
--abbrev # use short commit hash prefixes
|
||||
--edit-description # open editor to edit branch description
|
||||
--merged # list reachable branches
|
||||
--no-merged # list unreachable branches
|
||||
--set-upstream-to: string@"nu-complete git available upstream" # set upstream for branch
|
||||
--unset-upstream # remote upstream for branch
|
||||
--all # list both remote and local branches
|
||||
--copy # copy branch together with config and reflog
|
||||
--format # specify format for listing branches
|
||||
--move # rename branch
|
||||
--points-at # list branches that point at an object
|
||||
--show-current # print the name of the current branch
|
||||
--verbose # show commit and upstream for each branch
|
||||
--color # use color in output
|
||||
--quiet # suppress messages except errors
|
||||
--delete(-d) # delete branch
|
||||
--list # list branches
|
||||
--contains: string@"nu-complete git commits all" # show only branches that contain the specified commit
|
||||
--no-contains # show only branches that don't contain specified commit
|
||||
--track(-t) # when creating a branch, set upstream
|
||||
]
|
||||
|
||||
# List or change tracked repositories
|
||||
export extern "git remote" [
|
||||
--verbose(-v) # Show URL for remotes
|
||||
]
|
||||
|
||||
# Add a new tracked repository
|
||||
export extern "git remote add" [
|
||||
]
|
||||
|
||||
# Rename a tracked repository
|
||||
export extern "git remote rename" [
|
||||
remote: string@"nu-complete git remotes" # remote to rename
|
||||
new_name: string # new name for remote
|
||||
]
|
||||
|
||||
# Remove a tracked repository
|
||||
export extern "git remote remove" [
|
||||
remote: string@"nu-complete git remotes" # remote to remove
|
||||
]
|
||||
|
||||
# Get the URL for a tracked repository
|
||||
export extern "git remote get-url" [
|
||||
remote: string@"nu-complete git remotes" # remote to get URL for
|
||||
]
|
||||
|
||||
# Set the URL for a tracked repository
|
||||
export extern "git remote set-url" [
|
||||
remote: string@"nu-complete git remotes" # remote to set URL for
|
||||
url: string # new URL for remote
|
||||
]
|
||||
|
||||
# Show changes between commits, working tree etc
|
||||
export extern "git diff" [
|
||||
rev1?: string@"nu-complete git refs"
|
||||
rev2?: string@"nu-complete git refs"
|
||||
--cached # show staged changes
|
||||
--name-only # only show names of changed files
|
||||
--name-status # show changed files and kind of change
|
||||
--no-color # disable color output
|
||||
]
|
||||
|
||||
# Commit changes
|
||||
export extern "git commit" [
|
||||
--all(-a) # automatically stage all modified and deleted files
|
||||
--amend # amend the previous commit rather than adding a new one
|
||||
--message(-m): string # specify the commit message rather than opening an editor
|
||||
--no-edit # don't edit the commit message (useful with --amend)
|
||||
]
|
||||
|
||||
# List commits
|
||||
export extern "git log" [
|
||||
# Ideally we'd allow completion of revisions here, but that would make completion of filenames not work.
|
||||
-U # show diffs
|
||||
--follow # show history beyond renames (single file only)
|
||||
--grep: string # show log entries matching supplied regular expression
|
||||
]
|
||||
|
||||
# Show or change the reflog
|
||||
export extern "git reflog" [
|
||||
]
|
||||
|
||||
# Stage files
|
||||
export extern "git add" [
|
||||
--patch(-p) # interactively choose hunks to stage
|
||||
]
|
||||
|
||||
# Delete file from the working tree and the index
|
||||
export extern "git rm" [
|
||||
-r # recursive
|
||||
]
|
||||
|
||||
# Show the working tree status
|
||||
export extern "git status" [
|
||||
--verbose(-v) # verbose
|
||||
]
|
||||
|
||||
# Stash changes for later
|
||||
export extern "git stash push" [
|
||||
--patch(-p) # interactively choose hunks to stash
|
||||
]
|
||||
|
||||
# Unstash previously stashed changes
|
||||
export extern "git stash pop" [
|
||||
]
|
||||
|
||||
# List stashed changes
|
||||
export extern "git stash list" [
|
||||
]
|
||||
|
||||
# Show a stashed change
|
||||
export extern "git stash show" [
|
||||
stash: string@"nu-complete git stash-list"
|
||||
-U # show diff
|
||||
]
|
||||
|
||||
# Drop a stashed change
|
||||
export extern "git stash drop" [
|
||||
stash: string@"nu-complete git stash-list"
|
||||
]
|
||||
|
||||
# Create a new git repository
|
||||
export extern "git init" [
|
||||
--initial-branch(-b) # initial branch name
|
||||
]
|
||||
|
||||
# List or manipulate tags
|
||||
export extern "git tag" [
|
||||
--delete(-d): string@"nu-complete git tags" # delete a tag
|
||||
]
|
||||
|
||||
# Start a binary search to find the commit that introduced a bug
|
||||
export extern "git bisect start" [
|
||||
bad?: string # a commit that has the bug
|
||||
good?: string # a commit that doesn't have the bug
|
||||
]
|
||||
|
||||
# Mark the current (or specified) revision as bad
|
||||
export extern "git bisect bad" [
|
||||
]
|
||||
|
||||
# Mark the current (or specified) revision as good
|
||||
export extern "git bisect good" [
|
||||
]
|
||||
|
||||
# Skip the current (or specified) revision
|
||||
export extern "git bisect skip" [
|
||||
]
|
||||
|
||||
# End bisection
|
||||
export extern "git bisect reset" [
|
||||
]
|
||||
|
||||
# Show help for a git subcommand
|
||||
export extern "git help" [
|
||||
command: string@"nu-complete git subcommands" # subcommand to show help for
|
||||
]
|
||||
175
tree/.config/nushell/theme.nu.tpl
Normal file
@ -0,0 +1,175 @@
|
||||
# gruvbox-dark
|
||||
let dark_theme = {
|
||||
separator: "#a89984"
|
||||
leading_trailing_space_bg: { attr: "n" }
|
||||
header: { fg: "#98971a" attr: "b" }
|
||||
empty: "#458588"
|
||||
bool: {|| if $in { "#8ec07c" } else { "light_gray" } }
|
||||
int: "#a89984"
|
||||
filesize: {|e|
|
||||
if $e == 0b {
|
||||
"#a89984"
|
||||
} else if $e < 1mb {
|
||||
"#689d6a"
|
||||
} else {{ fg: "#458588" }}
|
||||
}
|
||||
duration: "#a89984"
|
||||
date: {|| (date now) - $in |
|
||||
if $in < 1hr {
|
||||
{ fg: "#cc241d" attr: "b" }
|
||||
} else if $in < 6hr {
|
||||
"#cc241d"
|
||||
} else if $in < 1day {
|
||||
"#d79921"
|
||||
} else if $in < 3day {
|
||||
"#98971a"
|
||||
} else if $in < 1wk {
|
||||
{ fg: "#98971a" attr: "b" }
|
||||
} else if $in < 6wk {
|
||||
"#689d6a"
|
||||
} else if $in < 52wk {
|
||||
"#458588"
|
||||
} else { "dark_gray" }
|
||||
}
|
||||
range: "#a89984"
|
||||
float: "#a89984"
|
||||
string: "#a89984"
|
||||
nothing: "#a89984"
|
||||
binary: "#a89984"
|
||||
cellpath: "#a89984"
|
||||
row_index: { fg: "#98971a" attr: "b" }
|
||||
record: "#a89984"
|
||||
list: "#a89984"
|
||||
block: "#a89984"
|
||||
hints: "dark_gray"
|
||||
search_result: { fg: "#cc241d" bg: "#a89984" }
|
||||
|
||||
shape_and: { fg: "#b16286" attr: "b" }
|
||||
shape_binary: { fg: "#b16286" attr: "b" }
|
||||
shape_block: { fg: "#458588" attr: "b" }
|
||||
shape_bool: "#8ec07c"
|
||||
shape_custom: "#98971a"
|
||||
shape_datetime: { fg: "#689d6a" attr: "b" }
|
||||
shape_directory: "#689d6a"
|
||||
shape_external: "#689d6a"
|
||||
shape_externalarg: { fg: "#98971a" attr: "b" }
|
||||
shape_filepath: "#689d6a"
|
||||
shape_flag: { fg: "#458588" attr: "b" }
|
||||
shape_float: { fg: "#b16286" attr: "b" }
|
||||
shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: "b" }
|
||||
shape_globpattern: { fg: "#689d6a" attr: "b" }
|
||||
shape_int: { fg: "#b16286" attr: "b" }
|
||||
shape_internalcall: { fg: "#689d6a" attr: "b" }
|
||||
shape_list: { fg: "#689d6a" attr: "b" }
|
||||
shape_literal: "#458588"
|
||||
shape_match_pattern: "#98971a"
|
||||
shape_matching_brackets: { attr: "u" }
|
||||
shape_nothing: "#8ec07c"
|
||||
shape_operator: "#d79921"
|
||||
shape_or: { fg: "#b16286" attr: "b" }
|
||||
shape_pipe: { fg: "#b16286" attr: "b" }
|
||||
shape_range: { fg: "#d79921" attr: "b" }
|
||||
shape_record: { fg: "#689d6a" attr: "b" }
|
||||
shape_redirection: { fg: "#b16286" attr: "b" }
|
||||
shape_signature: { fg: "#98971a" attr: "b" }
|
||||
shape_string: "#98971a"
|
||||
shape_string_interpolation: { fg: "#689d6a" attr: "b" }
|
||||
shape_table: { fg: "#458588" attr: "b" }
|
||||
shape_variable: "#b16286"
|
||||
|
||||
background: "#282828"
|
||||
foreground: "#ebdbb2"
|
||||
cursor: "#ebdbb2"
|
||||
}
|
||||
|
||||
# gruvbox-light-hard
|
||||
let light_theme = {
|
||||
separator: "#504945"
|
||||
leading_trailing_space_bg: { attr: "n" }
|
||||
header: { fg: "#79740e" attr: "b" }
|
||||
empty: "#076678"
|
||||
bool: {|| if $in { "#427b58" } else { "light_gray" } }
|
||||
int: "#504945"
|
||||
filesize: {|e|
|
||||
if $e == 0b {
|
||||
"#504945"
|
||||
} else if $e < 1mb {
|
||||
"#427b58"
|
||||
} else {{ fg: "#076678" }}
|
||||
}
|
||||
duration: "#504945"
|
||||
date: {|| (date now) - $in |
|
||||
if $in < 1hr {
|
||||
{ fg: "#9d0006" attr: "b" }
|
||||
} else if $in < 6hr {
|
||||
"#9d0006"
|
||||
} else if $in < 1day {
|
||||
"#b57614"
|
||||
} else if $in < 3day {
|
||||
"#79740e"
|
||||
} else if $in < 1wk {
|
||||
{ fg: "#79740e" attr: "b" }
|
||||
} else if $in < 6wk {
|
||||
"#427b58"
|
||||
} else if $in < 52wk {
|
||||
"#076678"
|
||||
} else { "dark_gray" }
|
||||
}
|
||||
range: "#504945"
|
||||
float: "#504945"
|
||||
string: "#504945"
|
||||
nothing: "#504945"
|
||||
binary: "#504945"
|
||||
cellpath: "#504945"
|
||||
row_index: { fg: "#79740e" attr: "b" }
|
||||
record: "#504945"
|
||||
list: "#504945"
|
||||
block: "#504945"
|
||||
hints: "dark_gray"
|
||||
search_result: { fg: "#9d0006" bg: "#504945" }
|
||||
|
||||
shape_and: { fg: "#8f3f71" attr: "b" }
|
||||
shape_binary: { fg: "#8f3f71" attr: "b" }
|
||||
shape_block: { fg: "#076678" attr: "b" }
|
||||
shape_bool: "#427b58"
|
||||
shape_custom: "#79740e"
|
||||
shape_datetime: { fg: "#427b58" attr: "b" }
|
||||
shape_directory: "#427b58"
|
||||
shape_external: "#427b58"
|
||||
shape_externalarg: { fg: "#79740e" attr: "b" }
|
||||
shape_filepath: "#427b58"
|
||||
shape_flag: { fg: "#076678" attr: "b" }
|
||||
shape_float: { fg: "#8f3f71" attr: "b" }
|
||||
shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: "b" }
|
||||
shape_globpattern: { fg: "#427b58" attr: "b" }
|
||||
shape_int: { fg: "#8f3f71" attr: "b" }
|
||||
shape_internalcall: { fg: "#427b58" attr: "b" }
|
||||
shape_list: { fg: "#427b58" attr: "b" }
|
||||
shape_literal: "#076678"
|
||||
shape_match_pattern: "#79740e"
|
||||
shape_matching_brackets: { attr: "u" }
|
||||
shape_nothing: "#427b58"
|
||||
shape_operator: "#b57614"
|
||||
shape_or: { fg: "#8f3f71" attr: "b" }
|
||||
shape_pipe: { fg: "#8f3f71" attr: "b" }
|
||||
shape_range: { fg: "#b57614" attr: "b" }
|
||||
shape_record: { fg: "#427b58" attr: "b" }
|
||||
shape_redirection: { fg: "#8f3f71" attr: "b" }
|
||||
shape_signature: { fg: "#79740e" attr: "b" }
|
||||
shape_string: "#79740e"
|
||||
shape_string_interpolation: { fg: "#427b58" attr: "b" }
|
||||
shape_table: { fg: "#076678" attr: "b" }
|
||||
shape_variable: "#8f3f71"
|
||||
|
||||
background: "#f9f5d7"
|
||||
foreground: "#504945"
|
||||
cursor: "#504945"
|
||||
}
|
||||
|
||||
{% if light %}
|
||||
let color_config = $light_theme
|
||||
$env.LS_COLORS = (vivid generate gruvbox-light-hard | str trim)
|
||||
{% else %}
|
||||
let color_config = $dark_theme
|
||||
$env.LS_COLORS = (vivid generate gruvbox-dark | str trim)
|
||||
{% end %}
|
||||
@ -1,9 +0,0 @@
|
||||
{
|
||||
"languageserver": {
|
||||
"rust": {
|
||||
"command": "rust-analyzer",
|
||||
"filetypes": ["rust"],
|
||||
"rootPatterns": ["Cargo.toml"]
|
||||
}
|
||||
}
|
||||
}
|
||||
213
tree/.config/nvim/init.lua
Normal file
@ -0,0 +1,213 @@
|
||||
vim.g.mapleader = " "
|
||||
vim.g.localleader = "\\"
|
||||
|
||||
|
||||
-- Install Lazy
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- TODO: get colored renders working
|
||||
vim.g.rustaceanvim = {
|
||||
-- Plugin configuration
|
||||
tools = {
|
||||
float_win_config = { border = 'rounded' },
|
||||
},
|
||||
|
||||
-- LSP configuration
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
vim.keymap.set('n', '<leader>lg', pick_rust_target,
|
||||
{ desc = "Pick Target (Rust)", buffer = bufnr })
|
||||
vim.keymap.set('n', "<leader>a", function() vim.cmd.RustLsp('codeAction') end,
|
||||
{ desc = "Code Action (Rust)", buffer = bufnr })
|
||||
vim.keymap.set('n', "<leader>e", function() vim.cmd.RustLsp('renderDiagnostic', 'current') end,
|
||||
{ desc = "Render Diagnostic", buffer = bufnr })
|
||||
end,
|
||||
default_settings = {
|
||||
['rust-analyzer'] = {
|
||||
checkOnSave = true,
|
||||
check = {
|
||||
overrideCommand = {
|
||||
"cargo", "check", "--message-format=json-diagnostic-rendered-ansi",
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
settings = function(project_root)
|
||||
local ra = require('rustaceanvim.config.server')
|
||||
local settings = ra.load_rust_analyzer_settings(project_root, {
|
||||
settings_file_pattern = 'rust-analyzer.json'
|
||||
})
|
||||
|
||||
-- override default target (if `set_rust_target` has been called)
|
||||
local rust_target = vim.g["rust-analyzer-target"]
|
||||
if rust_target then
|
||||
settings["rust-analyzer"]["cargo"] = { target = rust_target }
|
||||
end
|
||||
|
||||
vim.g["rust-analyzer-target-test"] = settings
|
||||
|
||||
return settings
|
||||
end,
|
||||
},
|
||||
|
||||
-- DAP configuration
|
||||
dap = {},
|
||||
}
|
||||
|
||||
|
||||
require('plugins')
|
||||
require('vars')
|
||||
require('opts')
|
||||
require('fns')
|
||||
require('keys')
|
||||
require('theme')
|
||||
require('statusline')
|
||||
--require('debugger') -- TODO:
|
||||
|
||||
-- Mason Setup
|
||||
local language_servers = {
|
||||
"pylsp",
|
||||
"eslint",
|
||||
"cssls",
|
||||
"jsonls",
|
||||
"ts_ls",
|
||||
"gopls",
|
||||
"wgsl_analyzer",
|
||||
}
|
||||
require("mason").setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "",
|
||||
package_pending = "",
|
||||
package_uninstalled = "",
|
||||
},
|
||||
},
|
||||
ensure_installed = language_servers,
|
||||
})
|
||||
require("mason-lspconfig").setup {
|
||||
automatic_enable = {
|
||||
exclude = {
|
||||
-- rust_analyzer is managed by rustaceanvim
|
||||
"rust_analyzer",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
for _, l in pairs(language_servers) do
|
||||
lspconfig[l].setup {}
|
||||
end
|
||||
|
||||
require('dapui').setup();
|
||||
|
||||
local compare = require "cmp.config.compare"
|
||||
require('cmp').setup.filetype({ "rust" }, {
|
||||
sorting = {
|
||||
priority_weight = 2,
|
||||
comparators = {
|
||||
-- deprioritize `.box`, `.mut`, etc.
|
||||
require("cmp-rust").deprioritize_postfix,
|
||||
-- deprioritize `Borrow::borrow` and `BorrowMut::borrow_mut`
|
||||
require("cmp-rust").deprioritize_borrow,
|
||||
-- deprioritize `Deref::deref` and `DerefMut::deref_mut`
|
||||
require("cmp-rust").deprioritize_deref,
|
||||
-- deprioritize `Into::into`, `Clone::clone`, etc.
|
||||
require("cmp-rust").deprioritize_common_traits,
|
||||
compare.offset,
|
||||
compare.exact,
|
||||
compare.score,
|
||||
--compare.recently_used,
|
||||
compare.locality,
|
||||
compare.sort_text,
|
||||
compare.length,
|
||||
compare.order,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Format file on save
|
||||
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
|
||||
|
||||
-- Completion Plugin Setup
|
||||
local cmp = require 'cmp'
|
||||
cmp.setup({
|
||||
-- Enable LSP snippets
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
-- Add tab support
|
||||
['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
['<C-S-f>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
})
|
||||
},
|
||||
-- Installed sources:
|
||||
sources = {
|
||||
{ name = 'path' }, -- file paths
|
||||
{ name = 'nvim_lsp', keyword_length = 3 }, -- from language server
|
||||
{ name = 'nvim_lsp_signature_help' }, -- display function signatures with current parameter emphasized
|
||||
{ name = 'nvim_lua', keyword_length = 2 }, -- complete neovim's Lua runtime API such vim.lsp.*
|
||||
{ name = 'buffer', keyword_length = 2 }, -- source current buffer
|
||||
{ name = 'vsnip', keyword_length = 2 }, -- nvim-cmp source for vim-vsnip
|
||||
{ name = 'calc' }, -- source for math calculation
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
formatting = {
|
||||
fields = { 'menu', 'abbr', 'kind' },
|
||||
format = function(entry, item)
|
||||
local menu_icon = {
|
||||
nvim_lsp = 'λ',
|
||||
vsnip = '⋗',
|
||||
buffer = 'Ω',
|
||||
path = '🖫',
|
||||
}
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
return item
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
-- Treesitter Plugin Setup
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = { "lua", "rust", "toml" },
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
ident = { enable = true },
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
max_file_lines = nil,
|
||||
}
|
||||
}
|
||||
@ -1,201 +0,0 @@
|
||||
runtime! archlinux.vim
|
||||
|
||||
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
" plugins
|
||||
call plug#begin('~/.local/share/nvim/plugged')
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'easymotion/vim-easymotion'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'airblade/vim-rooter'
|
||||
Plug 'junegunn/fzf'
|
||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
Plug 'neutaaaaan/iosvkem'
|
||||
Plug 'vimwiki/vimwiki'
|
||||
|
||||
" themes
|
||||
Plug 'chriskempson/base16-vim'
|
||||
|
||||
" gui stuff
|
||||
Plug 'itchyny/lightline.vim'
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
Plug 'terryma/vim-smooth-scroll'
|
||||
|
||||
" Language support
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'rust-lang/rust.vim'
|
||||
Plug 'cespare/vim-toml'
|
||||
Plug 'dag/vim-fish'
|
||||
|
||||
Plug 'rhysd/vim-grammarous'
|
||||
|
||||
call plug#end()
|
||||
|
||||
set nocompatible
|
||||
set backspace=indent,eol,start
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set noet
|
||||
|
||||
" preview substitute (%s/a/b)
|
||||
set inccommand=nosplit
|
||||
|
||||
" use unicode
|
||||
set encoding=utf-8
|
||||
|
||||
" show whitespace
|
||||
set listchars=nbsp:¬,trail:·,precedes:«,extends:▸,tab:»\
|
||||
set list
|
||||
|
||||
" highlight column 80
|
||||
"highlight ColorColumn ctermbg=darkgray
|
||||
highlight ColorColumn ctermbg=16
|
||||
set colorcolumn=100
|
||||
|
||||
" colors and themes
|
||||
set background = "dark"
|
||||
|
||||
if !has('gui_running')
|
||||
set t_Co=256
|
||||
endif
|
||||
if (match($TERM, "-256color") != -1) && (match($TERM, "screen-256color") == -1)
|
||||
" screen does not (yet) support truecolor
|
||||
set termguicolors
|
||||
endif
|
||||
let base16colorspace=256
|
||||
|
||||
{% if light %}
|
||||
colorscheme base16-gruvbox-light-hard
|
||||
{% else %}
|
||||
colorscheme base16-gruvbox-dark-hard
|
||||
{% end %}
|
||||
|
||||
" brighter comments
|
||||
call Base16hi("Comment", g:base16_gui09, "", g:base16_cterm09, "", "", "")
|
||||
|
||||
" Lightline
|
||||
let g:lightline = {
|
||||
\ 'active': {
|
||||
\ 'left': [ [ 'mode', 'paste' ],
|
||||
\ [ 'cocstatus', 'readonly', 'filename', 'modified' ] ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'filename': 'LightlineFilename',
|
||||
\ 'cocstatus': 'coc#status'
|
||||
\ },
|
||||
\ }
|
||||
function! LightlineFilename()
|
||||
return expand('%:t') !=# '' ? @% : '[No Name]'
|
||||
endfunction
|
||||
|
||||
" Use auocmd to force lightline update.
|
||||
autocmd User CocStatusChange,CocDiagnosticChange call lightline#update()
|
||||
|
||||
" vimwiki
|
||||
let g:vimwiki_list = [{'path': '~/wiki/text/', 'path_html': '~/wiki/html/'}]
|
||||
|
||||
" misc
|
||||
set mouse=a
|
||||
|
||||
set history=50
|
||||
set ruler
|
||||
|
||||
set wildmode=longest,full
|
||||
set wildmenu
|
||||
|
||||
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.png,.jpg
|
||||
|
||||
set number
|
||||
set relativenumber
|
||||
set clipboard+=unnamedplus
|
||||
|
||||
" No arrow keys --- force yourself to use the home row
|
||||
nnoremap <up> <nop>
|
||||
nnoremap <down> <nop>
|
||||
nnoremap <left> <nop>
|
||||
nnoremap <right> <nop>
|
||||
inoremap <up> <nop>
|
||||
inoremap <down> <nop>
|
||||
inoremap <left> <nop>
|
||||
inoremap <right> <nop>
|
||||
|
||||
syntax enable
|
||||
filetype plugin indent on
|
||||
|
||||
" Handlebars -> HTML
|
||||
autocmd BufNewFile,BufRead *.hbs set syntax=html
|
||||
|
||||
" Config template files
|
||||
autocmd BufNewFile,BufRead *.vim.tpl set syntax=vim
|
||||
autocmd BufNewFile,BufRead *.yml.tpl set syntax=yaml
|
||||
autocmd BufNewFile,BufRead *.toml.tpl set syntax=toml
|
||||
autocmd BufNewFile,BufRead *.fish.tpl set syntax=fish
|
||||
|
||||
" Rust syntax highlighting for rust-ish files
|
||||
autocmd BufNewFile,BufRead *.ron set syntax=rust
|
||||
autocmd BufNewFile,BufRead *.lalrpop set syntax=rust
|
||||
autocmd BufNewFile,BufRead *.pest set syntax=rust
|
||||
|
||||
" Word-wrapping for relevant files
|
||||
autocmd BufNewFile,BufRead *.tex set linebreak
|
||||
autocmd BufNewFile,BufRead *.wiki set linebreak
|
||||
|
||||
" rust-stuff
|
||||
let g:rustfmt_autosave = 1
|
||||
let g:rustfmt_emit_files = 1
|
||||
let g:rustfmt_fail_silently = 0
|
||||
let g:rust_clip_command = 'xclip -selection clipboard'
|
||||
|
||||
" === FISH CONFIGURATION === "
|
||||
" Use fish for compiling fish-files
|
||||
autocmd FileType fish compiler fish
|
||||
" Code block folding
|
||||
"autocmd FileType fish setlocal foldmethod=expr
|
||||
" === ================== === "
|
||||
|
||||
" === KEY BINDINGS === "
|
||||
" Map <leader> to space
|
||||
let mapleader = " "
|
||||
|
||||
" Fuzzy file search
|
||||
noremap <leader>f :FZF<Enter>
|
||||
|
||||
" Clear highlights
|
||||
noremap <leader>h :noh<Enter>
|
||||
|
||||
" trigger vim-rooter
|
||||
noremap <c-r> :Rooter<Enter>
|
||||
let g:rooter_manual_only = 1
|
||||
|
||||
" Toggle between buffers
|
||||
nnoremap <leader><leader> <c-^>
|
||||
|
||||
" Managing tabs
|
||||
nnoremap <leader>n :tabe<Enter>:FZF<Enter>
|
||||
nnoremap <c-j> gt
|
||||
nnoremap <c-k> gT
|
||||
|
||||
" undo-redo
|
||||
nnoremap U :redo<Enter>
|
||||
|
||||
" language server shortcuts
|
||||
nnoremap <leader>a :CocAction<Enter>
|
||||
nnoremap <leader>r :CocCommand document.renameCurrentWord<Enter>
|
||||
|
||||
" grammarous
|
||||
nmap <leader>gc :GrammarousCheck<Enter>
|
||||
nmap <leader>gq <Plug>(grammarous-close-info-window) <Plug>(grammarous-reset)
|
||||
nmap <leader>gn <Plug>(grammarous-move-to-next-error) <Plug>(grammarous-open-info-window)
|
||||
nmap <leader>gN <Plug>(grammarous-move-to-previous-error) <Plug>(grammarous-open-info-window)
|
||||
|
||||
" vim-smooth-scroll hotkey overrides
|
||||
noremap <silent> <c-u> :call smooth_scroll#up(&scroll, 0, 3)<CR>
|
||||
noremap <silent> <c-d> :call smooth_scroll#down(&scroll, 0, 3)<CR>
|
||||
noremap <silent> <c-b> :call smooth_scroll#up(&scroll*2, 0, 4)<CR>
|
||||
noremap <silent> <c-f> :call smooth_scroll#down(&scroll*2, 0, 4)<CR>
|
||||
" ==================== "
|
||||
5
tree/.config/nvim/lua/color-scheme.lua.tpl
Normal file
@ -0,0 +1,5 @@
|
||||
{% if light %}
|
||||
vim.o.background = "light"
|
||||
{% else %}
|
||||
vim.o.background = "dark"
|
||||
{% end %}
|
||||
176
tree/.config/nvim/lua/debugger.lua
Normal file
@ -0,0 +1,176 @@
|
||||
local dap = require('dap')
|
||||
|
||||
local codelldb_bin = "/usr/bin/codelldb"
|
||||
|
||||
-- Rust, C++, C
|
||||
dap.adapters.codelldb = {
|
||||
type = 'server',
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = codelldb_bin,
|
||||
args = { "--port", "${port}" },
|
||||
}
|
||||
}
|
||||
|
||||
local function get_default_rust_program_path()
|
||||
local workspace = vim.fn.getcwd()
|
||||
local program_name = vim.fn.fnamemodify(workspace, ":t")
|
||||
return workspace .. '/target/debug/' .. program_name
|
||||
end
|
||||
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Attach to name",
|
||||
type = "codelldb",
|
||||
request = "attach",
|
||||
pid = function()
|
||||
-- Lets user enter the name of a running process instead of looking up the pid themselves
|
||||
local name = vim.fn.input('Enter pidof name: ')
|
||||
local handle = io.popen("pidof " .. name)
|
||||
local pid = handle:read("*a")
|
||||
handle:close()
|
||||
|
||||
-- Trim the result
|
||||
pid = pid:match("^%s*(.-)%s*$")
|
||||
return pid
|
||||
end,
|
||||
stopOnEntry = true,
|
||||
},
|
||||
{
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Attach to PID",
|
||||
type = "codelldb",
|
||||
request = "attach",
|
||||
pid = function()
|
||||
return tonumber(vim.fn.input('Enter PID: '))
|
||||
end,
|
||||
stopOnEntry = true,
|
||||
},
|
||||
{
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Manually launch file",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = true,
|
||||
},
|
||||
{
|
||||
-- To debug programs that need to run as root you can run a remote lldb-server as root
|
||||
-- sudo lldb-server platform --server --listen '*:1234'
|
||||
name = "Remote attach to name",
|
||||
type = "codelldb",
|
||||
request = "attach",
|
||||
pid = function()
|
||||
-- Lets user enter the name of a running process instead of looking up the pid themselves
|
||||
local name = vim.fn.input('Enter pidof name: ')
|
||||
local handle = io.popen("pidof " .. name)
|
||||
local pid = handle:read("*a")
|
||||
handle:close()
|
||||
|
||||
-- Trim the result
|
||||
pid = pid:match("^%s*(.-)%s*$")
|
||||
return pid
|
||||
end,
|
||||
initCommands = {
|
||||
"platform select remote-linux",
|
||||
"platform connect connect://127.0.0.1:1234",
|
||||
"settings set target.inherit-env false",
|
||||
},
|
||||
},
|
||||
{
|
||||
-- To debug programs that need to run as root you can run a remote lldb-server as root
|
||||
-- sudo lldb-server platform --server --listen '*:1234'
|
||||
name = "Remote launch",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
initCommands = {
|
||||
"platform select remote-linux",
|
||||
"platform connect connect://127.0.0.1:1234",
|
||||
"settings set target.inherit-env false",
|
||||
},
|
||||
},
|
||||
}
|
||||
dap.configurations.c = dap.configurations.cpp
|
||||
dap.configurations.rust = dap.configurations.cpp
|
||||
|
||||
-- Insert this config as a rust specific one before the C++ configs
|
||||
table.insert(dap.configurations.rust, 1, {
|
||||
port = 1234,
|
||||
host = '127.0.0.1',
|
||||
name = "Launch Default Rust Program",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = get_default_rust_program_path,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = true,
|
||||
})
|
||||
|
||||
-- Python
|
||||
--dap.adapters.python = function(cb, config)
|
||||
-- if config.request == 'attach' then
|
||||
-- ---@diagnostic disable-next-line: undefined-field
|
||||
-- local port = (config.connect or config).port
|
||||
-- ---@diagnostic disable-next-line: undefined-field
|
||||
-- local host = (config.connect or config).host or '127.0.0.1'
|
||||
-- cb({
|
||||
-- type = 'server',
|
||||
-- port = assert(port, '`connect.port` is required for a python `attach` configuration'),
|
||||
-- host = host,
|
||||
-- options = {
|
||||
-- source_filetype = 'python',
|
||||
-- },
|
||||
-- })
|
||||
-- else
|
||||
-- local home = os.getenv("HOME")
|
||||
-- cb({
|
||||
-- type = 'executable',
|
||||
-- -- You need to install debugpy in $HOME/.virtualenvs/
|
||||
-- -- Like this:
|
||||
-- -- $ mkdir .virtualenvs
|
||||
-- -- $ cd .virtualenvs
|
||||
-- -- $ python -m venv debugpy
|
||||
-- -- $ debugpy/bin/python -m pip install debugpy
|
||||
-- command = home .. '/.virtualenvs/debugpy/bin/python',
|
||||
-- args = { '-m', 'debugpy.adapter' },
|
||||
-- options = {
|
||||
-- source_filetype = 'python',
|
||||
-- },
|
||||
-- })
|
||||
-- end
|
||||
--end
|
||||
|
||||
--dap.configurations.python = {
|
||||
-- {
|
||||
-- -- The first three options are required by nvim-dap
|
||||
-- type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python`
|
||||
-- request = 'launch';
|
||||
-- name = "Launch file";
|
||||
--
|
||||
-- -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options
|
||||
--
|
||||
-- program = "${file}"; -- This configuration will launch the current file if used.
|
||||
-- pythonPath = function()
|
||||
-- -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
|
||||
-- -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
|
||||
-- -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable.
|
||||
-- local cwd = vim.fn.getcwd()
|
||||
-- if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then
|
||||
-- return cwd .. '/venv/bin/python'
|
||||
-- elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then
|
||||
-- return cwd .. '/.venv/bin/python'
|
||||
-- else
|
||||
-- return '/usr/bin/python'
|
||||
-- end
|
||||
-- end;
|
||||
-- },
|
||||
--}
|
||||
26
tree/.config/nvim/lua/fns.lua
Normal file
@ -0,0 +1,26 @@
|
||||
-- change rust-analyzer target and restart
|
||||
set_rust_target = function(target)
|
||||
vim.g["rust-analyzer-target"] = target
|
||||
vim.cmd("RustAnalyzer restart")
|
||||
print("rust-analyzer.cargo.target = " .. target)
|
||||
end
|
||||
|
||||
pick_rust_target = function(opts)
|
||||
opts = opts or {}
|
||||
require("telescope.pickers").new(opts, {
|
||||
prompt_title = "rustup target list --installed",
|
||||
finder = require("telescope.finders").new_oneshot_job({ "rustup", "target", "list", "--installed" }, opts ),
|
||||
sorter = require("telescope.config").values.generic_sorter(opts),
|
||||
attach_mappings = function(prompt_bufnr, map)
|
||||
local actions = require("telescope.actions")
|
||||
actions.select_default:replace(function()
|
||||
actions.close(prompt_bufnr)
|
||||
local selection = require("telescope.actions.state").get_selected_entry()
|
||||
set_rust_target(selection[1])
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
}):find()
|
||||
end
|
||||
|
||||
|
||||
146
tree/.config/nvim/lua/keys.lua
Normal file
@ -0,0 +1,146 @@
|
||||
local telescope = require('telescope.builtin')
|
||||
local wk = require('which-key')
|
||||
local harpoon = require("harpoon")
|
||||
local telescope_conf = require("telescope.config").values
|
||||
harpoon:setup()
|
||||
|
||||
vim.keymap.set('n', '<leader>f', telescope.find_files, { desc = "File picker" })
|
||||
vim.keymap.set('n', '<leader>g', telescope.live_grep, { desc = "Grep recursively" })
|
||||
vim.keymap.set('n', '<leader>b', telescope.buffers, { desc = "Buffer picker" })
|
||||
vim.keymap.set('n', '<leader>?', telescope.help_tags, { desc = "Help tags picker" })
|
||||
vim.keymap.set('n', '<leader>s', telescope.treesitter, { desc = "Treesitter symbol picker" })
|
||||
vim.keymap.set('n', '<leader>j', telescope.jumplist, { desc = "Jumplist" })
|
||||
vim.keymap.set('n', '<leader>u', ":TodoTelescope<Enter>", { desc = "Grep for TODOs" })
|
||||
vim.keymap.set('n', 'U', ":redo<Enter>", {})
|
||||
vim.keymap.set('n', '<leader>p', ":b#<Enter>", { desc = "Go to last buffer" })
|
||||
|
||||
|
||||
|
||||
local function toggle_telescope(harpoon_files)
|
||||
local displayer = require("telescope.pickers.entry_display").create({
|
||||
separator = " | ",
|
||||
items = {
|
||||
--{ width = 0.1 },
|
||||
{ width = 0.9 },
|
||||
}
|
||||
})
|
||||
|
||||
local harpoons = {}
|
||||
for _, item in ipairs(harpoon_files.items) do
|
||||
table.insert(harpoons, {
|
||||
filepath = item.value,
|
||||
col = item.context.col,
|
||||
row = item.context.row,
|
||||
})
|
||||
end
|
||||
|
||||
require("telescope.pickers").new({}, {
|
||||
prompt_title = "Harpoon",
|
||||
finder = require("telescope.finders").new_table({
|
||||
results = harpoons,
|
||||
entry_maker = function(entry)
|
||||
--vim.print("mapping entry")
|
||||
--vim.print(entry)
|
||||
local filepath_with_row = string.format("%s:%d", entry.filepath, entry.row)
|
||||
return {
|
||||
-- Value to display. Required. type=any
|
||||
--value = { "foo", entry.filepath, },
|
||||
value = entry,
|
||||
|
||||
-- Whether to display the entry. Optional. type=bool
|
||||
valid = true,
|
||||
|
||||
-- Optional. type=string|function
|
||||
--display = entry.filepath,
|
||||
display = function(entry)
|
||||
return displayer({
|
||||
-- NOTE: the number of elements must match the
|
||||
-- configuration passed to `displayer` above
|
||||
--{ "foobar" },
|
||||
{ filepath_with_row }
|
||||
})
|
||||
end,
|
||||
|
||||
-- Used for filtering. Optional. type=string
|
||||
ordinal = filepath_with_row,
|
||||
|
||||
-- File to open when pressing enter. Optional. type=string
|
||||
filename = entry.filepath,
|
||||
|
||||
-- Buffer to open when pressing enter. Optional. type=number
|
||||
-- bufnr = 0,
|
||||
|
||||
-- Line number of file/buffer to open. Optional. type=number
|
||||
lnum = entry.row,
|
||||
|
||||
-- Line number of file/buffer to open. Optional. type=number
|
||||
col = entry.row,
|
||||
}
|
||||
end
|
||||
}),
|
||||
previewer = telescope_conf.grep_previewer({}),
|
||||
sorter = telescope_conf.generic_sorter({}),
|
||||
}):find()
|
||||
end
|
||||
vim.keymap.set("n", "<leader>h", function() toggle_telescope(harpoon:list()) end,
|
||||
{ desc = "Open harpoon window" })
|
||||
vim.keymap.set("n", "<leader>H", function() harpoon:list():add() end,
|
||||
{ desc = "Launch harpoon" })
|
||||
-- Toggle previous & next buffers stored within Harpoon list
|
||||
--vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end)
|
||||
--vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end)
|
||||
|
||||
|
||||
-- Use LspAttach autocommand to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
|
||||
-- Buffer local mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
vim.keymap.set('n', '<leader>ld', telescope.lsp_definitions, { desc = "Show definitons", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>lr', telescope.lsp_references, { desc = "Show references", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>li', telescope.lsp_implementations,
|
||||
{ desc = "Show implementations", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>lt', telescope.lsp_type_definitions,
|
||||
{ desc = "Show type definitions", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>le', telescope.diagnostics, { desc = "Show diagnostics", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>ls', telescope.lsp_workspace_symbols,
|
||||
{ desc = "Show workspace symbols", buffer = ev.buf })
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = ev.buf })
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, { buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder,
|
||||
{ desc = "Add workspace folder", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder,
|
||||
{ desc = "Remove workspace folder", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, { desc = "List workspace folders", buffer = ev.buf })
|
||||
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, { desc = "Rename symbol", buffer = ev.buf })
|
||||
vim.keymap.set('n', "<leader>a", vim.lsp.buf.code_action, { desc = "Code Action", buffer = ev.buf })
|
||||
|
||||
wk.add({
|
||||
{ "<leader>l", desc = "Language server stuff" },
|
||||
{ "<leader>w", desc = "Workspace stuff" },
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
--local rust_tools = require("rust-tools")
|
||||
|
||||
--rust_tools.setup({
|
||||
-- server = {
|
||||
-- on_attach = function(_, bufnr)
|
||||
-- -- Hover actions
|
||||
-- vim.keymap.set("n", "<C-space>", rust_tools.hover_actions.hover_actions, { buffer = bufnr })
|
||||
-- -- Code action groups
|
||||
-- vim.keymap.set("n", "<leader>a", rust_tools.code_action_group.code_action_group, { desc = "Code actions", buffer = bufnr })
|
||||
-- end,
|
||||
-- settings = {
|
||||
-- ["rust-analyzer"] = {},
|
||||
-- }
|
||||
-- },
|
||||
--})
|
||||
16
tree/.config/nvim/lua/lazy.lua
Normal file
@ -0,0 +1,16 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
52
tree/.config/nvim/lua/opts.lua
Normal file
@ -0,0 +1,52 @@
|
||||
local opt = vim.opt
|
||||
|
||||
-- Use system clipboard
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
-- [[ Context ]]
|
||||
opt.colorcolumn = '100' -- str: Show col for max line length
|
||||
opt.number = true -- bool: Show line numbers
|
||||
opt.relativenumber = true -- bool: Show relative line numbers
|
||||
opt.scrolloff = 10 -- int: Min num lines of context
|
||||
opt.signcolumn = "yes" -- str: Show the sign column
|
||||
|
||||
-- [[ Filetypes ]]
|
||||
opt.encoding = 'utf8' -- str: String encoding to use
|
||||
-- opt.fileencoding = 'utf8' -- str: File encoding to use
|
||||
vim.filetype.add({ extension = { wgsl = "wgsl" } })
|
||||
|
||||
-- [[ Theme ]]
|
||||
opt.syntax = "ON" -- str: Allow syntax highlighting
|
||||
opt.termguicolors = true -- bool: If term supports ui color then enable
|
||||
|
||||
-- [[ Search ]]
|
||||
opt.ignorecase = true -- bool: Ignore case in search patterns
|
||||
opt.smartcase = true -- bool: Override ignorecase if search contains capitals
|
||||
opt.incsearch = true -- bool: Use incremental search
|
||||
opt.hlsearch = false -- bool: Highlight search matches
|
||||
|
||||
-- [[ Whitespace ]]
|
||||
-- opt.expandtab = true -- bool: Use spaces instead of tabs
|
||||
opt.shiftwidth = 4 -- num: Size of an indent
|
||||
opt.softtabstop = 4 -- num: Number of spaces tabs count for in insert mode
|
||||
opt.tabstop = 4 -- num: Number of spaces tabs count for
|
||||
opt.list = true -- show some whitespace
|
||||
|
||||
-- [[ Splits ]]
|
||||
opt.splitright = true -- bool: Place new window to right of current one
|
||||
opt.splitbelow = true -- bool: Place new window below the current one
|
||||
|
||||
--Set completeopt to have a better completion experience
|
||||
-- :help completeopt
|
||||
-- menuone: popup even when there's only one match
|
||||
-- noinsert: Do not insert text until a selection is made
|
||||
-- noselect: Do not select, force to select one from the menu
|
||||
-- shortness: avoid showing extra messages when using completion
|
||||
-- updatetime: set updatetime for CursorHold
|
||||
vim.opt.completeopt = { 'menuone', 'noselect', 'noinsert' }
|
||||
vim.opt.shortmess = vim.opt.shortmess + { c = true }
|
||||
vim.api.nvim_set_option('updatetime', 300)
|
||||
|
||||
-- Uncomment to enable treesitter folding by default
|
||||
--vim.wo.foldmethod = 'expr'
|
||||
--vim.wo.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
122
tree/.config/nvim/lua/plugins.lua
Normal file
@ -0,0 +1,122 @@
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- install plugins
|
||||
{ 'nvim-treesitter/nvim-treesitter' },
|
||||
{ 'ellisonleao/gruvbox.nvim' },
|
||||
{ 'danilamihailov/beacon.nvim' },
|
||||
{ 'nvim-lua/plenary.nvim' },
|
||||
{
|
||||
'folke/todo-comments.nvim',
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {
|
||||
keywords = {
|
||||
SAFETY = {
|
||||
icon = "☢",
|
||||
color = "warning",
|
||||
alt = { "SOUNDNESS", "UNSAFE", "UNSOUND" },
|
||||
},
|
||||
INVARIANT = {
|
||||
icon = "🦑",
|
||||
color = "hint",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
},
|
||||
{ 'rktjmp/fwatch.nvim' },
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
opts = {
|
||||
bigfile = { enabled = true },
|
||||
notifier = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
statuscolumn = { enabled = true },
|
||||
words = { enabled = true },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
},
|
||||
|
||||
-- -- language server stuff
|
||||
{ 'williamboman/mason.nvim' },
|
||||
{ 'williamboman/mason-lspconfig.nvim' },
|
||||
{ 'neovim/nvim-lspconfig' },
|
||||
{
|
||||
'mrcjkb/rustaceanvim',
|
||||
version = '^6',
|
||||
lazy = false, -- This plugin is already lazy
|
||||
},
|
||||
{ 'mfussenegger/nvim-dap' },
|
||||
{ 'rcarriga/nvim-dap-ui', dependencies = { 'mfussenegger/nvim-dap', 'nvim-neotest/nvim-nio' } },
|
||||
{ 'theHamsta/nvim-dap-virtual-text' },
|
||||
{ 'jay-babu/mason-nvim-dap.nvim' },
|
||||
|
||||
-- -- nushell support
|
||||
-- --use { 'LhKipp/nvim-nu', run = function() vim.fn[':TSInstall nu'] end} }
|
||||
{ 'LhKipp/nvim-nu' },
|
||||
|
||||
-- -- Completion framework:
|
||||
{ 'hrsh7th/nvim-cmp' },
|
||||
|
||||
-- -- LSP completion source:
|
||||
{ 'hrsh7th/cmp-nvim-lsp' },
|
||||
|
||||
-- -- Useful completion sources:
|
||||
{ 'hrsh7th/cmp-nvim-lua' },
|
||||
{ 'hrsh7th/cmp-nvim-lsp-signature-help' },
|
||||
{ 'hrsh7th/cmp-vsnip' },
|
||||
{ 'hrsh7th/cmp-path' },
|
||||
{ 'hrsh7th/cmp-buffer' },
|
||||
{ 'hrsh7th/vim-vsnip' },
|
||||
{ 'ryo33/nvim-cmp-rust' },
|
||||
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
branch = '0.1.x',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||
},
|
||||
{
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = { "nvim-lua/plenary.nvim" }
|
||||
},
|
||||
|
||||
-- -- status line
|
||||
{ 'linrongbin16/lsp-progress.nvim' },
|
||||
{ 'nvim-lualine/lualine.nvim' },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = {
|
||||
enabled = true,
|
||||
notify = false,
|
||||
},
|
||||
})
|
||||
139
tree/.config/nvim/lua/spinners.lua
Normal file
@ -0,0 +1,139 @@
|
||||
return {
|
||||
braille = { "⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷" },
|
||||
triangles = { "◢", "◣", "◤", "◥" },
|
||||
dwarf_fortress = {
|
||||
" ██████£££ ",
|
||||
"☺██████£££ ",
|
||||
"☺██████£££ ",
|
||||
"☺▓█████£££ ",
|
||||
"☺▓█████£££ ",
|
||||
"☺▒█████£££ ",
|
||||
"☺▒█████£££ ",
|
||||
"☺░█████£££ ",
|
||||
"☺░█████£££ ",
|
||||
"☺ █████£££ ",
|
||||
" ☺█████£££ ",
|
||||
" ☺█████£££ ",
|
||||
" ☺▓████£££ ",
|
||||
" ☺▓████£££ ",
|
||||
" ☺▒████£££ ",
|
||||
" ☺▒████£££ ",
|
||||
" ☺░████£££ ",
|
||||
" ☺░████£££ ",
|
||||
" ☺ ████£££ ",
|
||||
" ☺████£££ ",
|
||||
" ☺████£££ ",
|
||||
" ☺▓███£££ ",
|
||||
" ☺▓███£££ ",
|
||||
" ☺▒███£££ ",
|
||||
" ☺▒███£££ ",
|
||||
" ☺░███£££ ",
|
||||
" ☺░███£££ ",
|
||||
" ☺ ███£££ ",
|
||||
" ☺███£££ ",
|
||||
" ☺███£££ ",
|
||||
" ☺▓██£££ ",
|
||||
" ☺▓██£££ ",
|
||||
" ☺▒██£££ ",
|
||||
" ☺▒██£££ ",
|
||||
" ☺░██£££ ",
|
||||
" ☺░██£££ ",
|
||||
" ☺ ██£££ ",
|
||||
" ☺██£££ ",
|
||||
" ☺██£££ ",
|
||||
" ☺▓█£££ ",
|
||||
" ☺▓█£££ ",
|
||||
" ☺▒█£££ ",
|
||||
" ☺▒█£££ ",
|
||||
" ☺░█£££ ",
|
||||
" ☺░█£££ ",
|
||||
" ☺ █£££ ",
|
||||
" ☺█£££ ",
|
||||
" ☺█£££ ",
|
||||
" ☺▓£££ ",
|
||||
" ☺▓£££ ",
|
||||
" ☺▒£££ ",
|
||||
" ☺▒£££ ",
|
||||
" ☺░£££ ",
|
||||
" ☺░£££ ",
|
||||
" ☺ £££ ",
|
||||
" ☺£££ ",
|
||||
" ☺£££ ",
|
||||
" ☺▓££ ",
|
||||
" ☺▓££ ",
|
||||
" ☺▒££ ",
|
||||
" ☺▒££ ",
|
||||
" ☺░££ ",
|
||||
" ☺░££ ",
|
||||
" ☺ ££ ",
|
||||
" ☺££ ",
|
||||
" ☺££ ",
|
||||
" ☺▓£ ",
|
||||
" ☺▓£ ",
|
||||
" ☺▒£ ",
|
||||
" ☺▒£ ",
|
||||
" ☺░£ ",
|
||||
" ☺░£ ",
|
||||
" ☺ £ ",
|
||||
" ☺£ ",
|
||||
" ☺£ ",
|
||||
" ☺▓ ",
|
||||
" ☺▓ ",
|
||||
" ☺▒ ",
|
||||
" ☺▒ ",
|
||||
" ☺░ ",
|
||||
" ☺░ ",
|
||||
" ☺ ",
|
||||
" ☺ &",
|
||||
" ☺ ☼&",
|
||||
" ☺ ☼ &",
|
||||
" ☺☼ &",
|
||||
" ☺☼ & ",
|
||||
" ‼ & ",
|
||||
" ☺ & ",
|
||||
" ‼ & ",
|
||||
" ☺ & ",
|
||||
" ‼ & ",
|
||||
" ☺ & ",
|
||||
"‼ & ",
|
||||
" & ",
|
||||
" & ",
|
||||
" & ░ ",
|
||||
" & ▒ ",
|
||||
" & ▓ ",
|
||||
" & £ ",
|
||||
" & ░£ ",
|
||||
" & ▒£ ",
|
||||
" & ▓£ ",
|
||||
" & ££ ",
|
||||
" & ░££ ",
|
||||
" & ▒££ ",
|
||||
"& ▓££ ",
|
||||
"& £££ ",
|
||||
" ░£££ ",
|
||||
" ▒£££ ",
|
||||
" ▓£££ ",
|
||||
" █£££ ",
|
||||
" ░█£££ ",
|
||||
" ▒█£££ ",
|
||||
" ▓█£££ ",
|
||||
" ██£££ ",
|
||||
" ░██£££ ",
|
||||
" ▒██£££ ",
|
||||
" ▓██£££ ",
|
||||
" ███£££ ",
|
||||
" ░███£££ ",
|
||||
" ▒███£££ ",
|
||||
" ▓███£££ ",
|
||||
" ████£££ ",
|
||||
" ░████£££ ",
|
||||
" ▒████£££ ",
|
||||
" ▓████£££ ",
|
||||
" █████£££ ",
|
||||
" ░█████£££ ",
|
||||
" ▒█████£££ ",
|
||||
" ▓█████£££ ",
|
||||
" ██████£££ ",
|
||||
" ██████£££ ",
|
||||
},
|
||||
}
|
||||
58
tree/.config/nvim/lua/statusline.lua
Normal file
@ -0,0 +1,58 @@
|
||||
require('lsp-progress').setup({
|
||||
spinner = require('spinners').dwarf_fortress,
|
||||
spin_update_time = 200,
|
||||
client_format = function(client_name, spinner, series_messages)
|
||||
return #series_messages > 0
|
||||
and (
|
||||
table.concat(series_messages, ", ")
|
||||
.. " " .. spinner
|
||||
.. " [" .. client_name .. "]"
|
||||
)
|
||||
or nil
|
||||
end,
|
||||
})
|
||||
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 200,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = {
|
||||
function()
|
||||
return require('lsp-progress').progress()
|
||||
end
|
||||
},
|
||||
lualine_y = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_z = { 'location' }
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
||||
33
tree/.config/nvim/lua/theme.lua
Normal file
@ -0,0 +1,33 @@
|
||||
-- setup must be called before loading the colorscheme
|
||||
-- Default options:
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = true, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = true,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = not vim.g.neovide,
|
||||
})
|
||||
|
||||
require('color-scheme')
|
||||
|
||||
local color_scheme_file = os.getenv("HOME") .. "/.cache/dotfiles/.config/nvim/lua/color-scheme.lua"
|
||||
require('fwatch').watch(color_scheme_file, "luafile " .. color_scheme_file)
|
||||
|
||||
vim.cmd([[colorscheme gruvbox]])
|
||||
4
tree/.config/nvim/lua/vars.lua
Normal file
@ -0,0 +1,4 @@
|
||||
local g = vim.g
|
||||
|
||||
g.t_co = 256
|
||||
g.background = "dark"
|
||||
@ -1,296 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: Rust
|
||||
" Maintainer: Patrick Walton <pcwalton@mozilla.com>
|
||||
" Maintainer: Ben Blum <bblum@cs.cmu.edu>
|
||||
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
||||
" Last Change: Feb 24, 2016
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Syntax definitions {{{1
|
||||
" Basic keywords {{{2
|
||||
syn keyword rustConditional match if else
|
||||
syn keyword rustRepeat for loop while
|
||||
syn keyword rustTypedef type nextgroup=rustIdentifier skipwhite skipempty
|
||||
syn keyword rustStructure struct enum nextgroup=rustIdentifier skipwhite skipempty
|
||||
syn keyword rustUnion union nextgroup=rustIdentifier skipwhite skipempty contained
|
||||
syn match rustUnionContextual /\<union\_s\+\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*/ transparent contains=rustUnion
|
||||
syn keyword rustOperator as
|
||||
|
||||
syn match rustAssert "\<assert\(\w\)*!" contained
|
||||
syn match rustPanic "\<panic\(\w\)*!" contained
|
||||
syn keyword rustKeyword break
|
||||
syn keyword rustKeyword box nextgroup=rustBoxPlacement skipwhite skipempty
|
||||
syn keyword rustKeyword continue
|
||||
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
|
||||
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
|
||||
syn keyword rustKeyword in impl dyn let
|
||||
syn keyword rustKeyword pub nextgroup=rustPubScope skipwhite skipempty
|
||||
syn keyword rustKeyword return
|
||||
syn keyword rustSuper super
|
||||
syn keyword rustKeyword unsafe where
|
||||
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
|
||||
" FIXME: Scoped impl's name is also fallen in this category
|
||||
syn keyword rustKeyword mod trait nextgroup=rustIdentifier skipwhite skipempty
|
||||
syn keyword rustKeyword async await
|
||||
syn keyword rustStorage move mut ref static const
|
||||
syn match rustDefault /\<default\ze\_s\+\(impl\|fn\|type\|const\)\>/
|
||||
|
||||
syn keyword rustInvalidBareKeyword crate
|
||||
|
||||
syn keyword rustPubScopeCrate crate contained
|
||||
syn match rustPubScopeDelim /[()]/ contained
|
||||
syn match rustPubScope /([^()]*)/ contained contains=rustPubScopeDelim,rustPubScopeCrate,rustSuper,rustModPath,rustModPathSep,rustSelf transparent
|
||||
|
||||
syn keyword rustExternCrate crate contained nextgroup=rustIdentifier,rustExternCrateString skipwhite skipempty
|
||||
" This is to get the `bar` part of `extern crate "foo" as bar;` highlighting.
|
||||
syn match rustExternCrateString /".*"\_s*as/ contained nextgroup=rustIdentifier skipwhite transparent skipempty contains=rustString,rustOperator
|
||||
syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipwhite skipempty
|
||||
|
||||
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
||||
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
||||
|
||||
syn region rustBoxPlacement matchgroup=rustBoxPlacementParens start="(" end=")" contains=TOP contained
|
||||
" Ideally we'd have syntax rules set up to match arbitrary expressions. Since
|
||||
" we don't, we'll just define temporary contained rules to handle balancing
|
||||
" delimiters.
|
||||
syn region rustBoxPlacementBalance start="(" end=")" containedin=rustBoxPlacement transparent
|
||||
syn region rustBoxPlacementBalance start="\[" end="\]" containedin=rustBoxPlacement transparent
|
||||
" {} are handled by rustFoldBraces
|
||||
|
||||
syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end=")" contains=TOP nextgroup=rustMacroRepeatCount
|
||||
syn match rustMacroRepeatCount ".\?[*+]" contained
|
||||
syn match rustMacroVariable "$\w\+"
|
||||
|
||||
" Reserved (but not yet used) keywords {{{2
|
||||
syn keyword rustReservedKeyword alignof become do offsetof priv pure sizeof typeof unsized yield abstract virtual final override macro
|
||||
|
||||
" Built-in types {{{2
|
||||
syn keyword rustType isize usize char bool u8 u16 u32 u64 u128 f32
|
||||
syn keyword rustType f64 i8 i16 i32 i64 i128 str Self
|
||||
|
||||
" Things from the libstd v1 prelude (src/libstd/prelude/v1.rs) {{{2
|
||||
" This section is just straight transformation of the contents of the prelude,
|
||||
" to make it easy to update.
|
||||
|
||||
" Reexported core operators {{{3
|
||||
syn keyword rustTrait Copy Send Sized Sync
|
||||
syn keyword rustTrait Drop Fn FnMut FnOnce
|
||||
|
||||
" Reexported functions {{{3
|
||||
" There’s no point in highlighting these; when one writes drop( or drop::< it
|
||||
" gets the same highlighting anyway, and if someone writes `let drop = …;` we
|
||||
" don’t really want *that* drop to be highlighted.
|
||||
"syn keyword rustFunction drop
|
||||
|
||||
" Reexported types and traits {{{3
|
||||
syn keyword rustTrait Box
|
||||
syn keyword rustTrait ToOwned
|
||||
syn keyword rustTrait Clone
|
||||
syn keyword rustTrait PartialEq PartialOrd Eq Ord
|
||||
syn keyword rustTrait AsRef AsMut Into From
|
||||
syn keyword rustTrait Default
|
||||
syn keyword rustTrait Iterator Extend IntoIterator
|
||||
syn keyword rustTrait DoubleEndedIterator ExactSizeIterator
|
||||
syn keyword rustEnum Option
|
||||
syn keyword rustEnumVariant Some None
|
||||
syn keyword rustEnum Result
|
||||
syn keyword rustEnumVariant Ok Err
|
||||
syn keyword rustTrait SliceConcatExt
|
||||
syn keyword rustTrait String ToString
|
||||
syn keyword rustTrait Vec
|
||||
|
||||
" Other syntax {{{2
|
||||
syn keyword rustSelf self
|
||||
syn keyword rustBoolean true false
|
||||
|
||||
" If foo::bar changes to foo.bar, change this ("::" to "\.").
|
||||
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
|
||||
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
|
||||
syn match rustModPathSep "::"
|
||||
|
||||
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1
|
||||
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>();
|
||||
|
||||
" This is merely a convention; note also the use of [A-Z], restricting it to
|
||||
" latin identifiers rather than the full Unicode uppercase. I have not used
|
||||
" [:upper:] as it depends upon 'noignorecase'
|
||||
"syn match rustCapsIdent display "[A-Z]\w\(\w\)*"
|
||||
|
||||
syn match rustOperator display "\%(+\|-\|/\|*\|=\|\^\|&\||\|!\|>\|<\|%\)=\?"
|
||||
" This one isn't *quite* right, as we could have binary-& with a reference
|
||||
syn match rustSigil display /&\s\+[&~@*][^)= \t\r\n]/he=e-1,me=e-1
|
||||
syn match rustSigil display /[&~@*][^)= \t\r\n]/he=e-1,me=e-1
|
||||
" This isn't actually correct; a closure with no arguments can be `|| { }`.
|
||||
" Last, because the & in && isn't a sigil
|
||||
syn match rustOperator display "&&\|||"
|
||||
" This is rustArrowCharacter rather than rustArrow for the sake of matchparen,
|
||||
" so it skips the ->; see http://stackoverflow.com/a/30309949 for details.
|
||||
syn match rustArrowCharacter display "->"
|
||||
syn match rustQuestionMark display "?\([a-zA-Z]\+\)\@!"
|
||||
|
||||
syn match rustMacro '\w\(\w\)*!' contains=rustAssert,rustPanic
|
||||
syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic
|
||||
|
||||
syn match rustEscapeError display contained /\\./
|
||||
syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/
|
||||
syn match rustEscapeUnicode display contained /\\u{\x\{1,6}}/
|
||||
syn match rustStringContinuation display contained /\\\n\s*/
|
||||
syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation
|
||||
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
|
||||
syn region rustString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
|
||||
|
||||
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDerive,rustCommentLine,rustCommentBlock,rustCommentLineDocError,rustCommentBlockDocError
|
||||
syn region rustDerive start="derive(" end=")" contained contains=rustDeriveTrait
|
||||
" This list comes from src/libsyntax/ext/deriving/mod.rs
|
||||
" Some are deprecated (Encodable, Decodable) or to be removed after a new snapshot (Show).
|
||||
syn keyword rustDeriveTrait contained Clone Hash RustcEncodable RustcDecodable Encodable Decodable PartialEq Eq PartialOrd Ord Rand Show Debug Default FromPrimitive Send Sync Copy
|
||||
|
||||
" Number literals
|
||||
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
|
||||
" Special case for numbers of the form "1." which are float literals, unless followed by
|
||||
" an identifier, which makes them integer literals with a method call or field access,
|
||||
" or by another ".", which makes them integer literals followed by the ".." token.
|
||||
" (This must go first so the others take precedence.)
|
||||
syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\|\.\)\@!"
|
||||
" To mark a number as a normal float, it must have at least one of the three things integral values don't have:
|
||||
" a decimal point and more numbers; an exponent; and a type suffix.
|
||||
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)\="
|
||||
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\(f32\|f64\)\="
|
||||
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)"
|
||||
|
||||
" For the benefit of delimitMate
|
||||
syn region rustLifetimeCandidate display start=/&'\%(\([^'\\]\|\\\(['nrt0\\\"]\|x\x\{2}\|u{\x\{1,6}}\)\)'\)\@!/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime
|
||||
syn region rustGenericRegion display start=/<\%('\|[^[cntrl:][:space:][:punct:]]\)\@=')\S\@=/ end=/>/ contains=rustGenericLifetimeCandidate
|
||||
syn region rustGenericLifetimeCandidate display start=/\%(<\|,\s*\)\@<='/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime
|
||||
|
||||
"rustLifetime must appear before rustCharacter, or chars will get the lifetime highlighting
|
||||
syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
|
||||
syn match rustLabel display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*:"
|
||||
syn match rustCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
|
||||
" The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII).
|
||||
syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
|
||||
syn match rustCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode
|
||||
syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u{\x\{1,6}}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid
|
||||
|
||||
syn match rustShebang /\%^#![^[].*/
|
||||
syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell
|
||||
syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell
|
||||
syn region rustCommentLineDocError start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell contained
|
||||
syn region rustCommentBlock matchgroup=rustCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell
|
||||
syn region rustCommentBlockDoc matchgroup=rustCommentBlockDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNest,@Spell
|
||||
syn region rustCommentBlockDocError matchgroup=rustCommentBlockDocError start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNestError,@Spell contained
|
||||
syn region rustCommentBlockNest matchgroup=rustCommentBlock start="/\*" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell contained transparent
|
||||
syn region rustCommentBlockDocNest matchgroup=rustCommentBlockDoc start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNest,@Spell contained transparent
|
||||
syn region rustCommentBlockDocNestError matchgroup=rustCommentBlockDocError start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNestError,@Spell contained transparent
|
||||
" FIXME: this is a really ugly and not fully correct implementation. Most
|
||||
" importantly, a case like ``/* */*`` should have the final ``*`` not being in
|
||||
" a comment, but in practice at present it leaves comments open two levels
|
||||
" deep. But as long as you stay away from that particular case, I *believe*
|
||||
" the highlighting is correct. Due to the way Vim's syntax engine works
|
||||
" (greedy for start matches, unlike Rust's tokeniser which is searching for
|
||||
" the earliest-starting match, start or end), I believe this cannot be solved.
|
||||
" Oh you who would fix it, don't bother with things like duplicating the Block
|
||||
" rules and putting ``\*\@<!`` at the start of them; it makes it worse, as
|
||||
" then you must deal with cases like ``/*/**/*/``. And don't try making it
|
||||
" worse with ``\%(/\@<!\*\)\@<!``, either...
|
||||
|
||||
syn keyword rustTodo contained TODO FIXME XXX NB NOTE
|
||||
|
||||
" Folding rules {{{2
|
||||
" Trivial folding rules to begin with.
|
||||
" FIXME: use the AST to make really good folding
|
||||
syn region rustFoldBraces start="{" end="}" transparent fold
|
||||
|
||||
" Default highlighting {{{1
|
||||
hi def link rustDecNumber rustNumber
|
||||
hi def link rustHexNumber rustNumber
|
||||
hi def link rustOctNumber rustNumber
|
||||
hi def link rustBinNumber rustNumber
|
||||
hi def link rustIdentifierPrime rustIdentifier
|
||||
hi def link rustTrait rustType
|
||||
hi def link rustDeriveTrait rustTrait
|
||||
|
||||
hi def link rustMacroRepeatCount rustMacroRepeatDelimiters
|
||||
hi def link rustMacroRepeatDelimiters Macro
|
||||
hi def link rustMacroVariable Define
|
||||
hi def link rustSigil StorageClass
|
||||
hi def link rustEscape Special
|
||||
hi def link rustEscapeUnicode rustEscape
|
||||
hi def link rustEscapeError Error
|
||||
hi def link rustStringContinuation Special
|
||||
hi def link rustString String
|
||||
hi def link rustCharacterInvalid Error
|
||||
hi def link rustCharacterInvalidUnicode rustCharacterInvalid
|
||||
hi def link rustCharacter Character
|
||||
hi def link rustNumber Number
|
||||
hi def link rustBoolean Boolean
|
||||
hi def link rustEnum rustType
|
||||
hi def link rustEnumVariant rustConstant
|
||||
hi def link rustConstant Constant
|
||||
hi def link rustSelf Constant
|
||||
hi def link rustFloat Float
|
||||
hi def link rustArrowCharacter rustOperator
|
||||
hi def link rustOperator Operator
|
||||
hi def link rustKeyword Keyword
|
||||
hi def link rustTypedef Keyword " More precise is Typedef, but it doesn't feel right for Rust
|
||||
hi def link rustStructure Keyword " More precise is Structure
|
||||
hi def link rustUnion rustStructure
|
||||
hi def link rustPubScopeDelim Delimiter
|
||||
hi def link rustPubScopeCrate rustKeyword
|
||||
hi def link rustSuper rustKeyword
|
||||
hi def link rustReservedKeyword Error
|
||||
hi def link rustRepeat Conditional
|
||||
hi def link rustConditional Conditional
|
||||
hi def link rustIdentifier Identifier
|
||||
hi def link rustCapsIdent rustIdentifier
|
||||
hi def link rustModPath Include
|
||||
hi def link rustModPathSep Delimiter
|
||||
hi def link rustFunction Function
|
||||
hi def link rustFuncName Function
|
||||
hi def link rustFuncCall Function
|
||||
hi def link rustShebang Comment
|
||||
hi def link rustCommentLine Comment
|
||||
hi def link rustCommentLineDoc SpecialComment
|
||||
hi def link rustCommentLineDocError Error
|
||||
hi def link rustCommentBlock rustCommentLine
|
||||
hi def link rustCommentBlockDoc rustCommentLineDoc
|
||||
hi def link rustCommentBlockDocError Error
|
||||
hi def link rustAssert PreCondit
|
||||
hi def link rustPanic PreCondit
|
||||
hi def link rustMacro Macro
|
||||
hi def link rustType Type
|
||||
hi def link rustTodo Todo
|
||||
hi def link rustAttribute PreProc
|
||||
hi def link rustDerive PreProc
|
||||
hi def link rustDefault StorageClass
|
||||
hi def link rustStorage StorageClass
|
||||
hi def link rustObsoleteStorage Error
|
||||
hi def link rustLifetime Special
|
||||
hi def link rustLabel Label
|
||||
hi def link rustInvalidBareKeyword Error
|
||||
hi def link rustExternCrate rustKeyword
|
||||
hi def link rustObsoleteExternMod Error
|
||||
hi def link rustBoxPlacementParens Delimiter
|
||||
hi def link rustQuestionMark Special
|
||||
|
||||
" Other Suggestions:
|
||||
" hi rustAttribute ctermfg=cyan
|
||||
" hi rustDerive ctermfg=cyan
|
||||
" hi rustAssert ctermfg=yellow
|
||||
" hi rustPanic ctermfg=red
|
||||
" hi rustMacro ctermfg=magenta
|
||||
|
||||
syn sync minlines=200
|
||||
syn sync maxlines=500
|
||||
|
||||
let b:current_syntax = "rust"
|
||||
BIN
tree/.config/qBittorrent/breeze-dark.qbtheme
Normal file
@ -19,20 +19,20 @@ format = "[$hostname]($style) in "
|
||||
disabled = true
|
||||
{% end %}
|
||||
|
||||
[custom.stl]
|
||||
description = "time logger"
|
||||
when = "stl stat -f /home/hulthe/.stld" # touch the file, but don't create it
|
||||
command = "cat /home/hulthe/.stld"
|
||||
symbol = "🕑"
|
||||
style = "italic bright-purple"
|
||||
format = "[$symbol ($output )]($style)"
|
||||
#[custom.stl]
|
||||
#description = "time logger"
|
||||
#when = "stl stat -f /home/hulthe/.stld" # touch the file, but don't create it
|
||||
#command = "cat /home/hulthe/.stld"
|
||||
#symbol = "🕑"
|
||||
#style = "italic bright-purple"
|
||||
#format = "[$symbol ($output )]($style)"
|
||||
{% if demo %}
|
||||
disabled = true
|
||||
#disabled = true
|
||||
{% end %}
|
||||
|
||||
|
||||
# hide all persondata while in demo mode
|
||||
{% if demo %}
|
||||
# hide all persondata while in demo mode
|
||||
[directory]
|
||||
truncation_length = 1
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.6 MiB |
@ -9,24 +9,44 @@
|
||||
# Logo key. Use Mod1 for Alt.
|
||||
set $mod Alt
|
||||
# Home row direction keys, like vim
|
||||
{% if hostname == "sputnik" %}
|
||||
set $left h
|
||||
set $down t
|
||||
set $up n
|
||||
set $right s
|
||||
{% else %}
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
{% end %}
|
||||
# Your preferred terminal emulator
|
||||
set $term alacritty
|
||||
# Your preferred application launcher
|
||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
||||
# on the original workspace that the command was run on.
|
||||
set $menu wofi --show run -c ~/.config/wofi/config -s ~/.config/wofi/style.css
|
||||
set $menu trigger-findex
|
||||
|
||||
# Enable XWayland
|
||||
xwayland enable
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
output * bg ~/.config/sway/background.png fill
|
||||
# Example configuration:
|
||||
#
|
||||
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
||||
#
|
||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||
{% if hostname == "vostok" %}
|
||||
output eDP-1 scale 1.5
|
||||
output DP-1 scale 1.5
|
||||
{% elif hostname == "buran" %}
|
||||
output eDP-1 scale 2.0
|
||||
output DP-1 scale 1.5
|
||||
{% elif hostname == "sputnik" %}
|
||||
output DP-1 mode 3440x1440@144Hz
|
||||
{% end %}
|
||||
output * bg ~/.config/wallpapers/2560x1440/rocket.jpg fill
|
||||
|
||||
# Window decoration
|
||||
# class border backgr. text indicator child_border
|
||||
@ -36,22 +56,21 @@ client.unfocused #56636e #56636e #e0c1c1 #7c818c #56636e
|
||||
client.urgent #7c818c #bf616a #ffffff #900000 #56636e
|
||||
client.placeholder #000000 #0c0c0c #ffffff #000000 #56636e
|
||||
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
||||
#
|
||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||
output eDP-1 scale 1.5
|
||||
|
||||
# Notifications
|
||||
exec mako
|
||||
### Autostart
|
||||
exec nextcloud
|
||||
|
||||
# notifications
|
||||
exec dunst
|
||||
|
||||
# application launcher
|
||||
exec findex-daemon
|
||||
|
||||
### Idle configuration
|
||||
exec swayidle -w \
|
||||
timeout 300 'swaylock-cool -fFe' \
|
||||
timeout 300 'screenlock -fFe' \
|
||||
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep 'swaylock-cool -fFe'
|
||||
before-sleep 'screenlock -fFe'
|
||||
|
||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||
# your displays after another 300 seconds, and turn your screens back on when
|
||||
@ -70,9 +89,20 @@ exec swayidle -w \
|
||||
#
|
||||
# You can get the names of your inputs by running: swaymsg -t get_inputs
|
||||
# Read `man 5 sway-input` for more information about this section.
|
||||
|
||||
input * {
|
||||
xkb_layout "se"
|
||||
xkb_options "caps:swapescape"
|
||||
xkb_options "caps:escape"
|
||||
|
||||
{% if hostname == "sputnik" %}
|
||||
xkb_variant "svdvorak"
|
||||
{% end %}
|
||||
}
|
||||
|
||||
input "45067:4949:Tux_Tangentbord1" {
|
||||
xkb_variant "basic"
|
||||
xkb_layout "us"
|
||||
xkb_options "compose:menu"
|
||||
}
|
||||
|
||||
### Key bindings
|
||||
@ -82,14 +112,22 @@ input * {
|
||||
# Start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
{% if hostname == "sputnik" %}
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+aring kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+e exec $menu
|
||||
{% else %}
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
{% end %}
|
||||
|
||||
# Lock the screen
|
||||
bindsym $mod+Shift+Plus exec "swaylock-cool -fFe"
|
||||
bindsym $mod+Shift+Plus exec "screenlock -fFe"
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
@ -98,11 +136,19 @@ input * {
|
||||
# mouse button for dragging.
|
||||
floating_modifier $mod normal
|
||||
|
||||
{% if hostname == "sputnik" %}
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+j reload
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
bindsym $mod+Shift+period exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
||||
{% else %}
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
||||
{% end %}
|
||||
#
|
||||
# Volume & Brightness
|
||||
#
|
||||
@ -112,8 +158,8 @@ input * {
|
||||
bindsym XF86AudioLowerVolume exec voldown
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl set 10%-
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl set +10%
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl --min-value=10 set 10%-
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl --min-value=10 set +10%
|
||||
bindsym XF86AudioPlay exec playerctl play-pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
@ -171,6 +217,21 @@ input * {
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
{% if hostname == "sputnik" %}
|
||||
# You can "split" the current object of your focus with
|
||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||
# respectively.
|
||||
bindsym $mod+x splith
|
||||
bindsym $mod+k splitv
|
||||
|
||||
# Switch the current container between different layout styles
|
||||
bindsym $mod+o layout stacking
|
||||
bindsym $mod+comma layout tabbed
|
||||
bindsym $mod+period layout toggle split
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+u fullscreen
|
||||
{% else %}
|
||||
# You can "split" the current object of your focus with
|
||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||
# respectively.
|
||||
@ -184,7 +245,7 @@ input * {
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
{% end %}
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
@ -213,16 +274,16 @@ mode "resize" {
|
||||
# right will grow the containers width
|
||||
# up will shrink the containers height
|
||||
# down will grow the containers height
|
||||
bindsym $left resize shrink width 10px
|
||||
bindsym $down resize grow height 10px
|
||||
bindsym $up resize shrink height 10px
|
||||
bindsym $right resize grow width 10px
|
||||
bindsym $left resize shrink width 50px
|
||||
bindsym $down resize grow height 50px
|
||||
bindsym $up resize shrink height 50px
|
||||
bindsym $right resize grow width 50px
|
||||
|
||||
# Ditto, with arrow keys
|
||||
bindsym Left resize shrink width 10px
|
||||
bindsym Down resize grow height 10px
|
||||
bindsym Up resize shrink height 10px
|
||||
bindsym Right resize grow width 10px
|
||||
bindsym Left resize shrink width 50px
|
||||
bindsym Down resize grow height 50px
|
||||
bindsym Up resize shrink height 50px
|
||||
bindsym Right resize grow width 50px
|
||||
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
@ -230,9 +291,7 @@ mode "resize" {
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
#
|
||||
# ScreenCap:
|
||||
#
|
||||
bindsym Print exec scap
|
||||
|
||||
#
|
||||
@ -256,11 +315,24 @@ bar {
|
||||
|
||||
|
||||
# Window settings
|
||||
for_window [app_id=".*"] border pixel 2
|
||||
#for_window [title="^volume_indicator$"] border pixel 0; floating enable; move down 600; move right 600
|
||||
for_window [app_id="^volume_indicator$"] border pixel 0; floating enable; resize set 300 80; position center
|
||||
#for_window [title="^Volume$"] border pixel 0; floating enable; position center
|
||||
#for_window [title="^Volume$"] floating enable; position center; resize set 300 80
|
||||
for_window [app_id="zoom"] floating enable
|
||||
# use `swaymsg -t get_tree | grep "app_id"` to list window ids. can also grep for "name"
|
||||
for_window {
|
||||
[app_id=".*"] border pixel 2
|
||||
[app_id="^volume_indicator$"] border pixel 0; floating enable; resize set 300 80; position center
|
||||
[app_id="file_picker"] floating enable
|
||||
[app_id="zoom"] floating enable
|
||||
[title="Firefox - Delningsindikator"] floating enable
|
||||
[app_id="com.nextcloud.desktopclient.nextcloud"] floating enable
|
||||
[app_id="bisq.desktop.app.BisqApp"] floating enable
|
||||
[class="Steam"] floating enable; max_render_time off
|
||||
[app_id="org.keepassxc.KeePassXC"] move to scratchpad, scratchpad show
|
||||
[window_role="pop-up"] floating enable
|
||||
[window_role="bubble"] floating enable
|
||||
[window_role="dialog"] floating enable
|
||||
[window_type="dialog"] floating enable
|
||||
}
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
|
||||
exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
@ -1,7 +1,8 @@
|
||||
ignore-empty-password
|
||||
font=Ubuntu
|
||||
|
||||
indicator-idle-visible
|
||||
# this option causes flickering
|
||||
#indicator-idle-visible
|
||||
|
||||
indicator-radius=255
|
||||
indicator-thickness=48
|
||||
indicator-caps-lock
|
||||
|
||||
18
tree/.config/swayidle/config.tpl
Normal file
@ -0,0 +1,18 @@
|
||||
{% if hostname == "sputnik" %}
|
||||
lock '$HOME/.local/bin/screenlock'
|
||||
{% else %}
|
||||
lock '$HOME/.local/bin/screenlock'
|
||||
{% end %}
|
||||
before-sleep 'loginctl lock-session'
|
||||
|
||||
{% if hostname == "sputnik" %}
|
||||
timeout 1770 'notify-send "Locking in 30s"'
|
||||
timeout 1800 'loginctl lock-session'
|
||||
{% else %}
|
||||
timeout 530 'notify-send "Locking in 30s"'
|
||||
timeout 600 'loginctl lock-session'
|
||||
{% end %}
|
||||
|
||||
{% if hostname == "buran" %}
|
||||
timeout 660 'niri msg action power-off-monitors'
|
||||
{% end %}
|
||||
99
tree/.config/swaync/config.json
Normal file
@ -0,0 +1,99 @@
|
||||
{
|
||||
"$schema": "/etc/xdg/swaync/configSchema.json",
|
||||
"positionX": "right",
|
||||
"positionY": "top",
|
||||
"control-center-margin-top": 10,
|
||||
"control-center-margin-bottom": 10,
|
||||
"control-center-margin-left": 10,
|
||||
"notification-icon-size": 64,
|
||||
"notification-body-image-height": 100,
|
||||
"notification-body-image-width": 200,
|
||||
"timeout": 10,
|
||||
"timeout-low": 5,
|
||||
"timeout-critical": 0,
|
||||
"fit-to-screen": false,
|
||||
"control-center-width": 500,
|
||||
"control-center-height": 1033,
|
||||
"notification-window-width": 500,
|
||||
"keyboard-shortcuts": true,
|
||||
"image-visibility": "when-available",
|
||||
"transition-time": 200,
|
||||
"hide-on-clear": false,
|
||||
"hide-on-action": true,
|
||||
"script-fail-notify": true,
|
||||
"widgets": [
|
||||
"buttons-grid",
|
||||
"volume",
|
||||
"backlight"
|
||||
],
|
||||
"widget-config": {
|
||||
"title": {
|
||||
"text": "Notification Center",
|
||||
"clear-all-button": true,
|
||||
"button-text": " Clear"
|
||||
},
|
||||
"dnd": {
|
||||
"text": "Do Not Disturb"
|
||||
},
|
||||
"label": {
|
||||
"max-lines": 1,
|
||||
"text": "Notification Center"
|
||||
},
|
||||
"mpris": {
|
||||
"image-size": 50,
|
||||
"image-radius": 5
|
||||
},
|
||||
"volume": {
|
||||
"label": ""
|
||||
},
|
||||
"backlight": {
|
||||
"label": ""
|
||||
},
|
||||
"buttons-grid": {
|
||||
"actions": [
|
||||
{
|
||||
"label": "",
|
||||
"command": "systemctl poweroff"
|
||||
},
|
||||
{
|
||||
"label": "",
|
||||
"command": "systemctl reboot"
|
||||
},
|
||||
{
|
||||
"label": "",
|
||||
"command": "swaylock-corrupter"
|
||||
},
|
||||
{
|
||||
"label": "",
|
||||
"command": "swaymsg exit"
|
||||
},
|
||||
{
|
||||
"label": "",
|
||||
"command": "swaync-client -C"
|
||||
},
|
||||
{
|
||||
"label": "",
|
||||
"command": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
|
||||
"type": "toggle"
|
||||
},
|
||||
{
|
||||
"label": "",
|
||||
"command": "pactl set-source-mute @DEFAULT_SOURCE@ toggle",
|
||||
"type": "toggle"
|
||||
},
|
||||
{
|
||||
"label": "",
|
||||
"command": "iwgtk"
|
||||
},
|
||||
{
|
||||
"label": "",
|
||||
"command": "blueman-manager"
|
||||
},
|
||||
{
|
||||
"label": "",
|
||||
"command": "kooha"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
307
tree/.config/swaync/style.css
Normal file
@ -0,0 +1,307 @@
|
||||
|
||||
@define-color cc-bg rgba(26, 27, 38, 1);
|
||||
/* @define-color noti-border-color rgba(255, 255, 255, 0.15); */
|
||||
@define-color noti-border-color #f65d76;
|
||||
@define-color noti-bg rgb(17, 17, 27);
|
||||
@define-color noti-bg-darker rgb(43, 43, 57);
|
||||
@define-color noti-bg-hover rgb(27, 27, 43);
|
||||
@define-color noti-bg-focus rgba(27, 27, 27, 0.6);
|
||||
@define-color noti-close-bg rgba(255, 255, 255, 0.1);
|
||||
@define-color noti-close-bg-hover rgba(255, 255, 255, 0.15);
|
||||
@define-color text-color rgba(169, 177, 214, 1);
|
||||
@define-color text-color-disabled rgb(150, 150, 150);
|
||||
@define-color bg-selected rgb(0, 128, 255);
|
||||
|
||||
* {
|
||||
font-family: JetBrainsMono NFM SemiBold;
|
||||
}
|
||||
|
||||
.control-center .notification-row:focus,
|
||||
.control-center .notification-row:hover {
|
||||
opacity: 1;
|
||||
background: @noti-bg-darker;
|
||||
}
|
||||
|
||||
.notification-row {
|
||||
outline: none;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.notification {
|
||||
background: @cc-bg;
|
||||
border: 2px solid @noti-border-color;
|
||||
border-radius: 12px;
|
||||
margin: 6px 8px 0px 0px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.notification-content {
|
||||
background: @cc-bg;
|
||||
}
|
||||
|
||||
.notification-default-action {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
background: #f7768e;
|
||||
color: @cc-bg;
|
||||
text-shadow: none;
|
||||
padding: 0px;
|
||||
border-radius: 0px;
|
||||
margin-top: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.close-button:hover {
|
||||
box-shadow: none;
|
||||
background: #f7768e;
|
||||
transition: all 0.15s ease-in-out;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.notification-action {
|
||||
border: 2px solid #34548a;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.notification-default-action:hover,
|
||||
.notification-action:hover {
|
||||
color: #7aa2f7;
|
||||
background: @cc-bg;
|
||||
}
|
||||
|
||||
.notification-default-action:not(:only-child) {
|
||||
border-bottom-left-radius: 7px;
|
||||
border-bottom-right-radius: 7px;
|
||||
}
|
||||
|
||||
.notification-action:first-child {
|
||||
border-bottom-left-radius: 10px;
|
||||
background: #1b1b2b;
|
||||
}
|
||||
|
||||
.notification-action:last-child {
|
||||
border-bottom-right-radius: 10px;
|
||||
background: #1b1b2b;
|
||||
}
|
||||
|
||||
.inline-reply {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.inline-reply-entry {
|
||||
background: @noti-bg-darker;
|
||||
color: @text-color;
|
||||
caret-color: @text-color;
|
||||
border: 1px solid @noti-border-color;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.inline-reply-button {
|
||||
margin-left: 4px;
|
||||
background: @noti-bg;
|
||||
border: 1px solid @noti-border-color;
|
||||
border-radius: 5px;
|
||||
color: @text-color;
|
||||
}
|
||||
|
||||
.inline-reply-button:disabled {
|
||||
background: initial;
|
||||
color: @text-color-disabled;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.inline-reply-button:hover {
|
||||
background: @noti-bg-hover;
|
||||
}
|
||||
|
||||
.image {
|
||||
border-radius: 0px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.summary {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
background: transparent;
|
||||
color: rgba(158, 206, 106, 1);
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
background: transparent;
|
||||
color: @text-color;
|
||||
text-shadow: none;
|
||||
margin-right: 18px;
|
||||
}
|
||||
|
||||
.body {
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
background: transparent;
|
||||
color: @text-color;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.control-center {
|
||||
background: @cc-bg;
|
||||
border: 2px solid #34548a;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.control-center-list {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.control-center-list-placeholder {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.floating-notifications {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.blank-window {
|
||||
background: alpha(black, 0.1);
|
||||
}
|
||||
|
||||
.widget-title {
|
||||
color: #7aa2f7;
|
||||
background: @noti-bg-darker;
|
||||
padding: 5px 10px;
|
||||
margin: 10px 10px 5px 10px;
|
||||
font-size: 1.5rem;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.widget-title > button {
|
||||
font-size: 1rem;
|
||||
color: @text-color;
|
||||
text-shadow: none;
|
||||
background: @noti-bg;
|
||||
box-shadow: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.widget-title > button:hover {
|
||||
background: #f7768e;
|
||||
color: @cc-bg;
|
||||
}
|
||||
|
||||
.widget-dnd {
|
||||
background: @noti-bg-darker;
|
||||
padding: 5px 10px;
|
||||
margin: 5px 10px;
|
||||
border-radius: 5px;
|
||||
font-size: large;
|
||||
color: #7aa2f7;
|
||||
}
|
||||
|
||||
.widget-dnd > switch {
|
||||
border-radius: 5px;
|
||||
background: #7aa2f7;
|
||||
}
|
||||
|
||||
.widget-dnd > switch:checked {
|
||||
background: #f7768e;
|
||||
border: 1px solid #f7768e;
|
||||
}
|
||||
|
||||
.widget-dnd > switch slider,
|
||||
.widget-dnd > switch:checked slider {
|
||||
background: @cc-bg;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.widget-label {
|
||||
margin: 10px 10px 5px 10px;
|
||||
}
|
||||
|
||||
.widget-label > label {
|
||||
font-size: 1rem;
|
||||
color: @text-color;
|
||||
}
|
||||
|
||||
.widget-mpris {
|
||||
color: @text-color;
|
||||
background: @noti-bg-darker;
|
||||
padding: 5px 10px;
|
||||
margin: 5px 10px 5px 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.widget-mpris > box > button {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.widget-mpris-player {
|
||||
padding: 5px 10px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.widget-mpris-title {
|
||||
font-weight: 700;
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.widget-mpris-subtitle {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.widget-buttons-grid {
|
||||
font-size: x-large;
|
||||
padding: 5px;
|
||||
margin: 10px 10px 5px 10px;
|
||||
border-radius: 0px;
|
||||
background: @noti-bg-darker;
|
||||
}
|
||||
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button {
|
||||
margin: 3px;
|
||||
background: @cc-bg;
|
||||
border-radius: 0px;
|
||||
color: @text-color;
|
||||
}
|
||||
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button:hover {
|
||||
background: rgba(122, 162, 247, 1);
|
||||
color: @cc-bg;
|
||||
}
|
||||
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button:checked {
|
||||
background: rgb(158, 206, 106);
|
||||
color: @cc-bg;
|
||||
}
|
||||
|
||||
.widget-menubar > box > .menu-button-bar > button {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.topbar-buttons > button {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.widget-volume {
|
||||
background: @noti-bg-darker;
|
||||
padding: 5px;
|
||||
margin: 5px 10px;
|
||||
border-radius: 0px;
|
||||
font-size: 2rem;
|
||||
color: #7aa2f7;
|
||||
}
|
||||
|
||||
.widget-backlight {
|
||||
background: @noti-bg-darker;
|
||||
padding: 5px;
|
||||
margin: 5px 10px;
|
||||
border-radius: 0px;
|
||||
font-size: 2rem;
|
||||
color: #7aa2f7;
|
||||
}
|
||||
BIN
tree/.config/wallpapers/2560x1440/rocket.jpg
Normal file
|
After Width: | Height: | Size: 540 KiB |
BIN
tree/.config/wallpapers/2880x1800/taipei.jpg
Normal file
|
After Width: | Height: | Size: 418 KiB |
BIN
tree/.config/wallpapers/3440x1440/dark_planet.jpg
Normal file
|
After Width: | Height: | Size: 112 KiB |
BIN
tree/.config/wallpapers/3440x1440/hilly_river.jpg
Normal file
|
After Width: | Height: | Size: 548 KiB |
BIN
tree/.config/wallpapers/3440x1440/hilly_swamp.jpg
Normal file
|
After Width: | Height: | Size: 690 KiB |
BIN
tree/.config/wallpapers/3440x1440/hilly_villiages.jpg
Normal file
|
After Width: | Height: | Size: 3.6 MiB |
BIN
tree/.config/wallpapers/3440x1440/lake_sunset.jpg
Normal file
|
After Width: | Height: | Size: 346 KiB |
BIN
tree/.config/wallpapers/3440x1440/nebula.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
tree/.config/wallpapers/3440x1440/neon_hills.jpg
Normal file
|
After Width: | Height: | Size: 301 KiB |
|
Before Width: | Height: | Size: 540 KiB After Width: | Height: | Size: 540 KiB |
BIN
tree/.config/wallpapers/3440x1440/road_to_mountain.jpg
Normal file
|
After Width: | Height: | Size: 636 KiB |
BIN
tree/.config/wallpapers/3440x1440/space_sunrise.webp
Normal file
|
After Width: | Height: | Size: 203 KiB |
BIN
tree/.config/wallpapers/3440x1440/witcher_forest_road.jpg
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
tree/.config/wallpapers/3440x1440/witcher_ruins.jpg
Normal file
|
After Width: | Height: | Size: 839 KiB |
BIN
tree/.config/wallpapers/3840x2160/bladerunner.jpg
Normal file
|
After Width: | Height: | Size: 315 KiB |
BIN
tree/.config/wallpapers/6000x3376/akira.jpg
Normal file
|
After Width: | Height: | Size: 975 KiB |
@ -1,11 +1,11 @@
|
||||
{
|
||||
// "layer": "top", // Waybar at top layer
|
||||
"layer": "top", // Waybar at top layer
|
||||
"position": "bottom", // Waybar position (top|bottom|left|right)
|
||||
"height": 26, // Waybar height (to be removed for auto height)
|
||||
// "width": 1280, // Waybar width
|
||||
// Choose the order of the modules
|
||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
||||
"modules-center": ["sway/window"],
|
||||
"modules-left": ["sway/workspaces", "sway/mode", "hyprland/workspaces"],
|
||||
"modules-center": ["sway/window", "hyprland/window"],
|
||||
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "custom/mullvad", "cpu", "memory", "temperature", "backlight", "sway/language", "battery", "battery#bat2", "clock", "tray"],
|
||||
// Modules configuration
|
||||
// "sway/workspaces": {
|
||||
|
||||
@ -51,12 +51,20 @@ window#waybar.chromium {
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
/* active workspace, sway */
|
||||
#workspaces button.focused {
|
||||
background-color: #f5deb3;
|
||||
color: #696969;
|
||||
box-shadow: inset 0 -3px #4b4437;
|
||||
}
|
||||
|
||||
/* active workspace, hyprland */
|
||||
#workspaces button.active {
|
||||
background-color: #f5deb3;
|
||||
color: #696969;
|
||||
box-shadow: inset 0 -3px #4b4437;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
44
tree/.face
Normal file
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="120"
|
||||
height="120"
|
||||
viewBox="0 0 31.75 31.75"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:#ffffff;stroke-width:0.177246"
|
||||
d="m 13.134179,31.651166 c -1.367874,-0.18043 -3.4872278,-0.85238 -4.780367,-1.51563 -1.871747,-0.96002 -4.179215,-3.22966 -5.0074297,-4.92534 -1.5914865,-3.25839 -1.6801158,-7.72336 -0.2278948,-11.48085 1.0247424,-2.65144 2.7098602,-4.5706201 5.4768881,-6.2376401 4.4640374,-2.6894 6.9208324,-4.59636 8.5218534,-6.61464 0.435944,-0.54955 0.851411,-0.9404 0.923263,-0.86855 0.34663,0.34663 0.709996,2.45556 0.596276,3.46071 l -0.118698,1.04918 0.543199,-0.3868 c 0.298763,-0.21273 0.754695,-0.66407 1.013185,-1.00297 0.258491,-0.3389 0.531184,-0.55268 0.605988,-0.47507 0.277608,0.28804 0.872923,2.3693 0.872923,3.05181 0,0.78189 -0.07309,0.70941 2.140938,2.12277 3.360595,2.14527 5.28622,5.2741001 5.845846,9.4985401 0.238089,1.79727 0.119928,4.12317 -0.289284,5.69424 -0.438918,1.68512 -1.295306,3.20011 -2.596637,4.59356 -2.715779,2.90803 -6.119638,4.1954 -10.928887,4.13338 -1.132683,-0.0146 -2.298705,-0.0581 -2.591161,-0.0967 z m 5.683631,-1.1265 c 5.074026,-0.89873 8.492767,-3.70496 9.49005,-7.7898 0.358508,-1.46844 0.317005,-5.28368 -0.07569,-6.95754 -0.594746,-2.53514 -2.005266,-4.78931 -3.64922,-5.8318801 -1.428352,-0.90583 -1.561881,-0.82384 -2.840659,1.7442101 -0.615739,1.23654 -1.777129,3.21756 -2.580868,4.40229 l -1.461342,2.15404 0.927607,0.3153 c 1.188141,0.40386 2.476979,1.20634 2.848748,1.77373 0.272049,0.4152 0.269021,0.4806 -0.04735,1.02231 -0.778356,1.33273 -2.272203,1.79512 -5.849412,1.81056 l -2.340153,0.0101 -2.489801,2.46697 c -2.6276133,2.60352 -2.8788341,3.03045 -2.0880964,3.54856 1.8126654,1.18771 7.0732674,1.8772 10.1561944,1.33115 z m 3.183004,-13.17071 c -0.205126,-0.14999 -0.329285,-0.4602 -0.329285,-0.8227 0,-0.96498 1.087198,-1.43355 1.715448,-0.73934 0.872429,0.96402 -0.338235,2.3283 -1.386163,1.56204 z m -3.186586,4.78402 c 1.133944,-0.30198 1.619925,-0.56299 1.85054,-0.9939 0.246861,-0.46126 -0.269147,-0.94676 -1.770094,-1.66543 -1.062457,-0.50872 -1.296906,-0.55176 -3.013183,-0.55311 -1.794444,-0.001 -1.910137,0.0225 -3.231141,0.66815 -1.860639,0.90936 -2.118197,1.48499 -0.948717,2.12031 1.182601,0.64245 5.357705,0.89133 7.112595,0.42398 z m -5.26747,-0.96936 c -1.113796,-0.13246 -1.303724,-0.23853 -1.149022,-0.64168 0.08921,-0.23246 0.582443,-0.27351 3.286452,-0.27351 1.749822,0 3.307658,0.0484 3.461858,0.10758 0.350902,0.13466 0.365077,0.53097 0.02367,0.66198 -0.432127,0.16582 -4.555272,0.2726 -5.622968,0.14563 z m -3.7845902,-3.81466 c 0.7343882,-0.537 0.2478022,-1.88618 -0.6802563,-1.88618 -0.5030742,0 -0.9992445,0.51278 -0.9992445,1.03268 0,0.90987 0.9453857,1.39029 1.6795008,0.8535 z"
|
||||
id="path865" />
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 7.5967544,-6.2400058 c 0,0 -0.041418,0.1031026 -0.02862,0.2093299 0.012798,0.1062273 0.084435,0.1741091 0.084435,0.1741091 l -0.083147,0.088222 c 0,0 -0.1053512,-0.138166 -0.073877,-0.2774823 0.031474,-0.1393166 0.1012092,-0.1941783 0.101209,-0.1941787 z"
|
||||
id="path1039" />
|
||||
</g>
|
||||
<g
|
||||
id="layer2"
|
||||
style="display:none" />
|
||||
<g
|
||||
id="layer3"
|
||||
style="display:none" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@ -1,7 +1,9 @@
|
||||
[user]
|
||||
email = joakim@hulthe.net
|
||||
name = Joakim Hulthe
|
||||
{% if hostname != "buran" %}
|
||||
email = joakim@hulthe.net
|
||||
signingkey = joakim@hulthe.net
|
||||
{% end %}
|
||||
|
||||
[commit]
|
||||
gpgSign = true
|
||||
@ -10,7 +12,7 @@
|
||||
rebase = true
|
||||
|
||||
[core]
|
||||
editor = nvim
|
||||
editor = helix
|
||||
|
||||
[init]
|
||||
defaultBranch = master
|
||||
@ -26,3 +28,6 @@
|
||||
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
|
||||
[log]
|
||||
showSignature = true
|
||||
@ -1 +1 @@
|
||||
pinentry-program /usr/bin/pinentry-curses
|
||||
pinentry-program /usr/bin/pinentry-gnome3
|
||||
|
||||
86
tree/.local/bin/arch-firstinstall
Executable file
@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$(id -u)" -eq 0 ]; then echo "Do not run as root." >&2; exit 1; fi
|
||||
|
||||
sudo pacman -Syu
|
||||
sudo pacman --needed -S \
|
||||
alacritty \
|
||||
base-devel \
|
||||
bat \
|
||||
bluez \
|
||||
bluez-utils \
|
||||
brightnessctl \
|
||||
curl \
|
||||
difftastic \
|
||||
dust \
|
||||
ddcutil \
|
||||
exa \
|
||||
fd \
|
||||
fish \
|
||||
fuzzel \
|
||||
git \
|
||||
git-delta \
|
||||
gnome \
|
||||
grim \
|
||||
htop \
|
||||
hyprland \
|
||||
hyprpaper \
|
||||
i2c-tools \
|
||||
lazygit \
|
||||
luarocks \
|
||||
man-db man-pages \
|
||||
neovim \
|
||||
nerd-fonts \
|
||||
niri \
|
||||
noto-fonts \
|
||||
noto-fonts-emoji \
|
||||
noto-fonts-extra \
|
||||
nushell \
|
||||
openbsd-netcat \
|
||||
pamixer \
|
||||
qt5ct \
|
||||
qt5-wayland \
|
||||
qt6-wayland \
|
||||
ripgrep \
|
||||
rustup \
|
||||
sad \
|
||||
starship \
|
||||
swayidle \
|
||||
swaylock \
|
||||
swaync \
|
||||
tig \
|
||||
tree-sitter tree-sitter-cli \
|
||||
vim \
|
||||
vivid \
|
||||
waybar \
|
||||
wget \
|
||||
wl-clipboard \
|
||||
xdg-desktop-portal-gtk \
|
||||
zathura \
|
||||
zoxide
|
||||
|
||||
rustup default stable
|
||||
|
||||
if ! command -v paru &> /dev/null; then
|
||||
echo "`paru` not found, installing..."
|
||||
sleep 1
|
||||
|
||||
cd "$(mktemp -d)"
|
||||
git clone https://aur.archlinux.org/paru.git
|
||||
cd paru
|
||||
makepkg -si
|
||||
fi
|
||||
|
||||
paru -S wdisplays eww
|
||||
|
||||
cargo install --locked --git https://git.nubo.sh/hulthe/wmutils.git
|
||||
cargo install --locked --git https://git.nubo.sh/hulthe/lockscreen-blur.git
|
||||
cargo install --locked --git https://git.nubo.sh/hulthe/volume_indicator.git
|
||||
|
||||
# cargo binstall
|
||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
|
||||
cargo binstall cargo-watch
|
||||
cargo binstall cargo-get
|
||||
10
tree/.local/bin/eww-workspaces
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
let active = (hyprctl activeworkspace -j | from json | get id)
|
||||
|
||||
hyprctl workspaces -j |
|
||||
from json |
|
||||
sort-by id |
|
||||
each {|w| {$w.id: {monitor: $w.monitorID active: ($w.id == $active) }}} |
|
||||
reduce {|a, b| $a | merge $b } |
|
||||
to json
|
||||
7
tree/.local/bin/get-color-scheme.tpl
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
{% if light %}
|
||||
echo light
|
||||
{% else %}
|
||||
echo dark
|
||||
{% end %}
|
||||
@ -1,5 +1,26 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
set MY_LATEST_COMMIT (git log --author "joakim@hulthe.net" --pretty=format:%H | head -n 1)
|
||||
if set -q argv[1]
|
||||
set N $argv[1]
|
||||
else
|
||||
set N 1
|
||||
end
|
||||
|
||||
git diff $MY_LATEST_COMMIT
|
||||
function nth_commit -a n
|
||||
git log --author "joakim@hulthe.net" --pretty=format:%H \
|
||||
| head -n $n \
|
||||
| tail -n 1
|
||||
end
|
||||
|
||||
set DIFF_FROM (nth_commit $N)
|
||||
set DIFF_TO "HEAD"
|
||||
|
||||
if test $N -gt 1
|
||||
set DIFF_TO (nth_commit (math $N - 1))"~1"
|
||||
end
|
||||
|
||||
#echo "git diff"
|
||||
#echo " $DIFF_FROM"
|
||||
#echo " $DIFF_TO"
|
||||
|
||||
git diff $DIFF_FROM $DIFF_TO
|
||||
|
||||
12
tree/.local/bin/högtalare
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
notify-send "Connecting to Högtalare"
|
||||
|
||||
bluetoothctl power on
|
||||
if bluetoothctl connect E8:26:CF:33:2D:BA; then
|
||||
notify-send "Connected"
|
||||
else
|
||||
notify-send "Failed to connect to Högtalare"
|
||||
fi
|
||||
@ -1,31 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
# check if i3lock is running
|
||||
if ps -e | grep " i3lock$"; then
|
||||
echo "i3lock is already running!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OPTIONAL_CMDS="scrot lockscreen-blur"
|
||||
|
||||
for CMD in $OPTIONAL_CMDS; do
|
||||
echo "checking $CMD"
|
||||
if ! command -v "$CMD" &> /dev/null
|
||||
then
|
||||
echo "$CMD could not be found, falling back to basic mode."
|
||||
|
||||
i3lock -c 302f3b "$@"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
TMP_IMG="/tmp/lock.png"
|
||||
|
||||
scrot - | lockscreen-blur -o "$TMP_IMG" -b 20 --stamp ~/.config/sway/ferris-stamp.png
|
||||
|
||||
i3lock -nef --image="$TMP_IMG" "$@"
|
||||
|
||||
rm "$TMP_IMG"
|
||||
@ -2,5 +2,11 @@
|
||||
|
||||
set -x
|
||||
|
||||
notify-send "Connecting to Lurar"
|
||||
|
||||
bluetoothctl power on
|
||||
bluetoothctl connect 94:DB:56:41:C0:38
|
||||
if bluetoothctl connect 94:DB:56:41:C0:38; then
|
||||
notify-send "Connected"
|
||||
else
|
||||
notify-send "Failed to connect to Lurar"
|
||||
fi
|
||||
|
||||
53
tree/.local/bin/mullpod
Executable file
@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
# Extend the container in mullvadvpn-app with some useful dev tools and run it.
|
||||
|
||||
cd $HOME/proj/mullvadvpn-app
|
||||
|
||||
set base_tag (cat building/android-container-image.txt)
|
||||
set custom_tag "$base_tag-extra"
|
||||
|
||||
# check if image exists
|
||||
if not podman image inspect $custom_tag >/dev/null
|
||||
echo "Building custom image"
|
||||
set tmp_dockerfile (mktemp)
|
||||
echo "
|
||||
FROM $base_tag
|
||||
|
||||
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y \
|
||||
fish \
|
||||
procps
|
||||
|
||||
# cargo-binstall
|
||||
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
|
||||
RUN cargo binstall bacon cargo-watch zoxide starship exa
|
||||
|
||||
|
||||
RUN curl -L --proto '=https' -sSf https://git.nubo.sh/hulthe/df/raw/branch/master/manager/setup.sh | bash
|
||||
|
||||
RUN tee /entrypoint.sh <<EOF
|
||||
#!/bin/bash
|
||||
(cd ~/.config/dotfiles && git pull && dotfiles)
|
||||
|
||||
exec \"\\\$@\"
|
||||
EOF
|
||||
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT [\"/entrypoint.sh\"]
|
||||
|
||||
" > $tmp_dockerfile
|
||||
|
||||
|
||||
podman build -f $tmp_dockerfile -t $custom_tag || exit 1
|
||||
rm $tmp_dockerfile
|
||||
end
|
||||
|
||||
podman run --rm -it \
|
||||
--hostname mullpod \
|
||||
-v .:/build \
|
||||
-v cargo-target:/cargo-target:Z \
|
||||
-v cargo-registry:/root/.cargo/registry:Z \
|
||||
-v gradle-cache:/root/.gradle:Z \
|
||||
$custom_tag mold -run fish
|
||||
41
tree/.local/bin/mullvad-status
Executable file
@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ! which mullvad &> /dev/null
|
||||
then
|
||||
echo "ERROR: command 'mullvad' does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
STATUS="$(mullvad status)"
|
||||
|
||||
CONNECTING="Connecting"
|
||||
CONNECTED="Connected"
|
||||
DISCONNECTED="Disconnected"
|
||||
|
||||
check_status() {
|
||||
STRING="$1"
|
||||
echo "$STATUS" | grep -iq "$STRING"
|
||||
}
|
||||
|
||||
TOOLTIP="$STATUS"
|
||||
ICON=""
|
||||
ON_CLICK=""
|
||||
|
||||
|
||||
if check_status "$DISCONNECTED"; then
|
||||
CLASS="disconnected"
|
||||
ON_CLICK="mullvad connect"
|
||||
elif check_status "$CONNECTED"; then
|
||||
CLASS=""
|
||||
ICON=""
|
||||
ON_CLICK="mullvad disconnect"
|
||||
elif check_status "$CONNECTING"; then
|
||||
CLASS="connecting"
|
||||
ON_CLICK="mullvad disconnect"
|
||||
else
|
||||
CLASS="disconnected"
|
||||
ON_CLICK="mullvad connect"
|
||||
fi
|
||||
|
||||
echo '{"icon":"'$ICON'", "tooltip":"'$TOOLTIP'", "class":"'$CLASS'", "on_click": "'$ON_CLICK'"}'
|
||||
|
||||
@ -8,9 +8,9 @@ fi
|
||||
|
||||
STATUS="$(mullvad status)"
|
||||
|
||||
CONNECTING="Tunnel status: Connecting"
|
||||
CONNECTED="Tunnel status: Connected"
|
||||
DISCONNECTED="Tunnel status: Disconnected"
|
||||
CONNECTING="Connecting"
|
||||
CONNECTED="Connected"
|
||||
DISCONNECTED="Disconnected"
|
||||
|
||||
check_status() {
|
||||
STRING="$1"
|
||||
@ -22,13 +22,13 @@ TOOLTIP="$STATUS"
|
||||
TEXT="VPN 🔓"
|
||||
|
||||
|
||||
if check_status "$CONNECTED"; then
|
||||
if check_status "$DISCONNECTED"; then
|
||||
ON_CLICK="mullvad connect"
|
||||
CLASS="disconnected"
|
||||
elif check_status "$CONNECTED"; then
|
||||
ON_CLICK="mullvad disconnect"
|
||||
CLASS=""
|
||||
TEXT="VPN 🔒"
|
||||
elif check_status "$DISCONNECTED"; then
|
||||
ON_CLICK="mullvad connect"
|
||||
CLASS="disconnected"
|
||||
elif check_status "$CONNECTING"; then
|
||||
ON_CLICK="mullvad disconnect"
|
||||
CLASS="connecting"
|
||||
|
||||
16
tree/.local/bin/notify-set
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Send a notification using notify-send, but also give it a name to make it easily replaceable.
|
||||
|
||||
ID="$1"
|
||||
DIR="/tmp/notify-ids/$(whoami)"
|
||||
ID_PATH="$DIR/$ID"
|
||||
|
||||
mkdir -p "$DIR"
|
||||
|
||||
REPLACE_ID="$(cat "$ID_PATH" 2>/dev/null)";
|
||||
if [ -n "$REPLACE_ID" ]; then
|
||||
REPLACE_ID="--replace-id=$REPLACE_ID"
|
||||
fi
|
||||
|
||||
notify-send $REPLACE_ID --print-id "${@:2}" > "$ID_PATH"
|
||||
3
tree/.local/bin/random-file-of
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
fd -d1 . $@ | sort -R | head -n 1
|
||||
@ -5,6 +5,11 @@ if [ "$XDG_SESSION_TYPE" != "wayland" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ps -e | grep "slurp"; then
|
||||
echo "slurp is already running"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIMS="$(slurp)"
|
||||
|
||||
grim -g "$DIMS" - | pbc
|
||||
|
||||
12
tree/.local/bin/screenlock
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/fish
|
||||
|
||||
# configured for wayland
|
||||
set LOCKPROG hyprlock
|
||||
|
||||
# check if lock program is running
|
||||
if ps -e | grep " $LOCKPROG\$"
|
||||
echo "$LOCKPROG is already running"
|
||||
exit 1
|
||||
end
|
||||
|
||||
ba $LOCKPROG $argv
|
||||
26
tree/.local/bin/screenlock-video
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/fish
|
||||
|
||||
# Run hyprlock and spawn fullscreen video windows to be shown behind the lockscreen
|
||||
|
||||
set LOCKPROG hyprlock
|
||||
|
||||
set video ~/hämtningar/video-screensavers/4k/comp_GMT329_117NC_401C_1037_IRELAND_TO_ASIA_v48_SDR_PS_FINAL_20180725_F0F6300_SDR_4K_HEVC.mov
|
||||
|
||||
|
||||
# check if lock program is running
|
||||
if ps -e | grep " $LOCKPROG\$"
|
||||
echo "$LOCKPROG is already running"
|
||||
exit 1
|
||||
end
|
||||
|
||||
# Spawn an mpv instance for each monitor
|
||||
for workspace in (hyprctl -j monitors | jq '.[] | .activeWorkspace.id')
|
||||
# Thi "WORKSPACE n" title is read by hyprland to position the window correctly
|
||||
mpv --fs --loop-file=inf --panscan=1.0 --title="WORKSPACE $workspace" $video &
|
||||
end
|
||||
|
||||
$LOCKPROG
|
||||
|
||||
for pid in (jobs -p | tail -n +1)
|
||||
kill $pid
|
||||
end
|
||||
21
tree/.local/bin/set-color-scheme
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/env fish
|
||||
|
||||
switch $argv[1]
|
||||
case 'light'
|
||||
# configure terminal stuff with light theme
|
||||
dotfiles light
|
||||
|
||||
# change gtk theme
|
||||
gsettings set org.gnome.desktop.interface color-scheme prefer-light
|
||||
|
||||
case 'dark'
|
||||
# configure terminal stuff with dark theme
|
||||
dotfiles
|
||||
|
||||
# change gtk theme
|
||||
gsettings set org.gnome.desktop.interface color-scheme prefer-dark
|
||||
|
||||
case '*'
|
||||
echo "usage: set-color-scheme <dark|light>"
|
||||
exit 1
|
||||
end
|
||||
11
tree/.local/bin/start-wallpaper.tpl
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
{% if hostname == "sputnik" %}
|
||||
|
||||
feh --bg-scale $(random-file-of ~/.config/wallpapers/3440x1440)
|
||||
|
||||
{% else %}
|
||||
echo "Wallpaper not configured for this system"
|
||||
exit 1
|
||||
{% end %}
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# check if swaylock is running
|
||||
if ps -e | grep " swaylock$"; then
|
||||
echo "swaylock is already running!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OPTIONAL_CMDS=("convert" "python3" "grim", "lockscreen-blur")
|
||||
|
||||
for CMD in $OPTIONAL_CMDS; do
|
||||
if ! command -v "$CMD" &> /dev/null
|
||||
then
|
||||
echo "$CMD could not be found, falling back to basic mode."
|
||||
|
||||
swaylock --config ~/.config/sway/swaylock.config --color 302f3b "$@"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
TMP_IMG="/tmp/lock.png"
|
||||
|
||||
grim -t ppm - | lockscreen-blur -o "$TMP_IMG" -b 40 --stamp ~/.config/sway/ferris-stamp.png
|
||||
|
||||
swaylock --config ~/.config/sway/swaylock.config --image "$TMP_IMG" "$@"
|
||||
|
||||
rm "$TMP_IMG"
|
||||
2
tree/.local/bin/trigger-findex
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo 1 > ~/.config/findex/toggle_file
|
||||
4
tree/.local/bin/voldown
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
volshow
|
||||
16
tree/.local/bin/volshow
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# Pops up a window showing the current volume
|
||||
|
||||
SOCKET="/tmp/volume_indicator"
|
||||
|
||||
# If theres an existing volume_indicator running, prod the socket
|
||||
# Otherwise, start a new volume_indicator instance.
|
||||
nc -U "$SOCKET" 2>/dev/null || \
|
||||
ba alacritty -T "Volume Indicator" \
|
||||
--class "volume_indicator" \
|
||||
--config-file "$HOME/.config/alacritty/silent.toml" \
|
||||
--command volume_indicator \
|
||||
--cols 30 \
|
||||
--rows 3 \
|
||||
--socket "$SOCKET" \
|
||||
--timeout 2000
|
||||
4
tree/.local/bin/volup
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
volshow
|
||||
6
tree/.local/nu/cargo.nu
Normal file
@ -0,0 +1,6 @@
|
||||
# Resolve path to the cargo target dir, including an optional subpath
|
||||
def ctd [
|
||||
path?: string
|
||||
] {
|
||||
$"($env.CARGO_TARGET_DIR)/($path)"
|
||||
}
|
||||