mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-21 23:54:22 +01:00
Compare commits
410 commits
dfed19f455
...
2ee4958bdb
Author | SHA1 | Date | |
---|---|---|---|
2ee4958bdb | |||
d7c2cfa959 | |||
843047ea40 | |||
683b6bc332 | |||
d2aa9c45a5 | |||
4d4fea63c4 | |||
1fbdca74bc | |||
f111b87b14 | |||
53e7c51b94 | |||
97d1ff5896 | |||
82774bc978 | |||
574447e7f4 | |||
ba6c660326 | |||
fc4193729c | |||
212bfc8c60 | |||
36e69c18ed | |||
9e9f243218 | |||
f026c3e26f | |||
a32af93084 | |||
baace089a5 | |||
ff7e1058b3 | |||
d4568a6ead | |||
a0478c79aa | |||
39d36d5457 | |||
a0f42d9227 | |||
51bb2f95fe | |||
89167c684e | |||
97ea6ffe4a | |||
9413748603 | |||
69eb47c2a1 | |||
e9f0b6b896 | |||
6331357b45 | |||
b68fb6bf5a | |||
04d61eb94a | |||
e01811711e | |||
3a2e719b9c | |||
5bab4071fd | |||
09408d0ef4 | |||
680004abdf | |||
ffed2f4fd0 | |||
2aca36c8fd | |||
843357e9ab | |||
1d39c23d0b | |||
c4539602e0 | |||
cfcb6735b1 | |||
e7abad7a14 | |||
ad6a5f6784 | |||
e8100d690e | |||
e4e40ee7bc | |||
ce5726bbdd | |||
84e1924f78 | |||
b284c90451 | |||
89afaf89c1 | |||
e4dd1f4184 | |||
0ca5e9e4aa | |||
1ee9ad4862 | |||
15908ba927 | |||
52faaea7ac | |||
67740ac3f8 | |||
1955d32b7c | |||
d0f6f2df4f | |||
b6df5483bd | |||
8cb85d620f | |||
8ce425fc8a | |||
9ad6239c56 | |||
40d9dd12e2 | |||
7398a811ca | |||
c038c2c569 | |||
da18df1f55 | |||
0808b5d6f7 | |||
e3312566ba | |||
57087a3400 | |||
2ca3b3f6d1 | |||
6ef8a0dc3f | |||
d59e96181b | |||
a92d44383d | |||
50ebadd844 | |||
3fc53def4d | |||
magic_rb | 55287115dc | ||
magic_rb | 708149b84c | ||
magic_rb | 82369662a4 | ||
magic_rb | 0d37adfb9b | ||
magic_rb | eba5c967ca | ||
magic_rb | 106c224fad | ||
magic_rb | 28eb8fb140 | ||
magic_rb | 0109e7cd49 | ||
magic_rb | 705eeea37d | ||
magic_rb | 37af8fca1e | ||
magic_rb | 2ff3846baf | ||
magic_rb | 4775b1544f | ||
magic_rb | 26b1be45a2 | ||
magic_rb | f6b626caec | ||
magic_rb | 1eca042e3f | ||
magic_rb | f3ab75b6f9 | ||
magic_rb | 52fe4c9364 | ||
a62e03f81b | |||
52bdfd2bf1 | |||
8ebc3a65ba | |||
01421acf78 | |||
915e1544ee | |||
f7d3a75044 | |||
a447b73f50 | |||
be6024d662 | |||
c36dcd4442 | |||
7a425e82e9 | |||
9a87e44944 | |||
1944e3ba3a | |||
08bce19cc4 | |||
fed6d34efc | |||
e7f90c4a87 | |||
45511fabf2 | |||
e8a2007a29 | |||
0c1ea5f96f | |||
434da7529a | |||
c54d257319 | |||
366e2c34a3 | |||
fd97d611f6 | |||
99005cd768 | |||
729e68b80e | |||
352c876fbc | |||
7792c69d95 | |||
45b22801c8 | |||
magic_rb | 83a038f961 | ||
magic_rb | 616ed24698 | ||
magic_rb | c321f20424 | ||
magic_rb | dcace988fc | ||
magic_rb | 8f98538aa9 | ||
magic_rb | 3512a0c075 | ||
magic_rb | 39c7d06663 | ||
magic_rb | c5457193d1 | ||
magic_rb | 2b11913dc9 | ||
magic_rb | 8f052ce05f | ||
magic_rb | e39e2ff7b8 | ||
magic_rb | ac36a08bf2 | ||
magic_rb | c9db1e39b5 | ||
magic_rb | 4a47ce1e8c | ||
magic_rb | 86f0aa3508 | ||
magic_rb | 436b790e9e | ||
magic_rb | 7e631202ca | ||
magic_rb | 916fb9d897 | ||
magic_rb | aca3815c62 | ||
magic_rb | 34b331e87b | ||
magic_rb | 473777560f | ||
magic_rb | 7d489de077 | ||
magic_rb | da76d251f0 | ||
magic_rb | 671aff30e4 | ||
magic_rb | 3ad614d4a5 | ||
magic_rb | 0443c69a77 | ||
magic_rb | e59817b20f | ||
magic_rb | 880ffeec87 | ||
magic_rb | 7968f1a15c | ||
magic_rb | 9e9c65dd59 | ||
magic_rb | 1b3d44bd76 | ||
magic_rb | 801b59a8cf | ||
magic_rb | 310b9456ec | ||
magic_rb | 23c7002368 | ||
magic_rb | c7b774931d | ||
magic_rb | 8a45acefa6 | ||
magic_rb | 42c6068f6c | ||
magic_rb | 60622f12cc | ||
magic_rb | 52684b1723 | ||
magic_rb | 0ca6ec76c4 | ||
magic_rb | 40766d249e | ||
magic_rb | 9ad9dcc2c1 | ||
magic_rb | 6ea71ebde7 | ||
magic_rb | fded269e70 | ||
magic_rb | 9e3c0ff11f | ||
magic_rb | 25f3730f4c | ||
magic_rb | 49323853ab | ||
magic_rb | ec32e1c1a9 | ||
magic_rb | cf4e2472cd | ||
magic_rb | 9549ef1003 | ||
magic_rb | 05cf178c7a | ||
magic_rb | c16147f323 | ||
magic_rb | 6175d518ce | ||
magic_rb | 52d2b22844 | ||
magic_rb | ca4775b49e | ||
magic_rb | 985d7ea696 | ||
magic_rb | c469f66ea0 | ||
magic_rb | f59ae5dc71 | ||
magic_rb | 52a6d7d312 | ||
magic_rb | 85db381a7e | ||
magic_rb | 706d3bb1b1 | ||
magic_rb | a4156b2309 | ||
magic_rb | 935575707f | ||
magic_rb | df46401662 | ||
magic_rb | e49ef5e713 | ||
magic_rb | efeb5579db | ||
magic_rb | 0f5f1a02ec | ||
magic_rb | 25272c0dcf | ||
magic_rb | 09f2f000cb | ||
magic_rb | b56681fbab | ||
magic_rb | 8109dc3abc | ||
magic_rb | 66bc26a113 | ||
magic_rb | f4b366c6f4 | ||
magic_rb | a95fc0007d | ||
magic_rb | 8db1c182ef | ||
magic_rb | b8f01a4d15 | ||
magic_rb | 40245f35ca | ||
MagicRB | cb2f0f93a0 | ||
MagicRB | 689faa22e5 | ||
MagicRB | 6230949667 | ||
MagicRB | a50edd6a99 | ||
MagicRB | 4b5e9a6371 | ||
MagicRB | 5490245849 | ||
MagicRB | 9ed801aecf | ||
MagicRB | d9161d3b7d | ||
MagicRB | 245e6d891b | ||
MagicRB | c21340b577 | ||
MagicRB | 8cebc0b293 | ||
MagicRB | 26d8b6dac3 | ||
MagicRB | a8388bb09c | ||
MagicRB | 18014da092 | ||
MagicRB | 260a917558 | ||
MagicRB | 05d186d304 | ||
580fec0979 | |||
eefce2a8dd | |||
34bb23c67f | |||
20c8f05224 | |||
e26b8b9cf5 | |||
974177b3fc | |||
7e0ec8153b | |||
56e3bafd57 | |||
ed8afe1e86 | |||
95e8416a55 | |||
dd7ae8366c | |||
531b8cd5e6 | |||
72fa1c7bfd | |||
1fa6a14528 | |||
f8fa60b534 | |||
8e9f6e6334 | |||
931b5aa764 | |||
dd3de246a8 | |||
07ffaccb58 | |||
ca4d125b23 | |||
0e24d304dd | |||
2c047660fa | |||
2ed6b1fc6e | |||
640de3fb86 | |||
6a36890077 | |||
61bab3a8bf | |||
9d390511eb | |||
a29694effc | |||
3cdcf52b72 | |||
dfd63ff1f1 | |||
bdf4915191 | |||
0c4f7b971f | |||
9b371b8662 | |||
1838896561 | |||
66518d18c3 | |||
410b6c0838 | |||
055a8b3224 | |||
5f9b37a2ca | |||
36120abf6b | |||
7856c2db34 | |||
6f6129ab89 | |||
ddcc51702e | |||
0a9cd4bd38 | |||
43959436a6 | |||
6a2b872bd7 | |||
fd2ce42d15 | |||
0fef19e47e | |||
b7cdd44967 | |||
9268fe52af | |||
6bb313137b | |||
16d3d01c23 | |||
c6923afe7a | |||
fabd23d92d | |||
62713f7d0b | |||
c521570498 | |||
21b894bed1 | |||
c949d4638a | |||
c76c746dce | |||
3dd66e0a9b | |||
6a4cbd9e81 | |||
023be90378 | |||
6099b301cd | |||
262a2fba32 | |||
3aa375c48e | |||
f79b6fea76 | |||
e2fc3e885e | |||
bd556bcc11 | |||
369b6ddadf | |||
d27a09b0ab | |||
5d516e080b | |||
74d928eb7e | |||
0f0ebf822a | |||
c763d66183 | |||
86461c73b8 | |||
686582722c | |||
361e6b2065 | |||
cbc32aef09 | |||
3376c063fb | |||
a297913039 | |||
0d272474e9 | |||
2c857cadfb | |||
236e87461b | |||
449e73fdba | |||
f0cf4e1a54 | |||
a5075271b4 | |||
2d92a13070 | |||
afcdff1b47 | |||
8411477669 | |||
1e5e4bc061 | |||
247abc7a1b | |||
58641c2cc4 | |||
c177ed0be9 | |||
29c9a13842 | |||
9bc92124ed | |||
de00d86dc4 | |||
365fd41adc | |||
0328687755 | |||
13abb232d4 | |||
26e7c040f8 | |||
e9993d139c | |||
a9c3b31b2c | |||
1e1cf196ec | |||
13b14f7025 | |||
64f95150e1 | |||
158ffab7c5 | |||
0d4698ab78 | |||
878b4f0d95 | |||
005cfe5eb1 | |||
a64b46e61a | |||
68b2b3b07d | |||
06d8b381c4 | |||
eb1dc094f1 | |||
39742dc4a2 | |||
e73ff8a96a | |||
8cfde06cdd | |||
004cfb039b | |||
8b2321dde4 | |||
a96f79171a | |||
b0eaa7929d | |||
090684d8f5 | |||
8fb752ae01 | |||
cb22a44b9d | |||
558f2b656c | |||
990b3ee8a2 | |||
f1844942fa | |||
9a6a7c7141 | |||
b1cafd8f81 | |||
6df4022d4d | |||
134082a1da | |||
5d51efa88c | |||
9c0c892050 | |||
85f9dc5c9d | |||
913b738563 | |||
3bb6cd9d77 | |||
033bdd1210 | |||
32dc6e4464 | |||
101524ebe2 | |||
973616a29c | |||
c38b7e1918 | |||
880c3c6f2e | |||
ca2f480255 | |||
8cd278f26a | |||
ef62e6cc67 | |||
637dc2877f | |||
de385c1d60 | |||
8a43af9076 | |||
ae5615f659 | |||
3e0350ffb6 | |||
64db0229c0 | |||
3b5a09f9cb | |||
734e9ab6a4 | |||
04c43d9ed5 | |||
d53e3072f0 | |||
6189356d7c | |||
86d13b4f40 | |||
85d06f4c71 | |||
52705b08ee | |||
8ab965a374 | |||
c09fea6f75 | |||
084c85e436 | |||
87d5a87067 | |||
32a9ea4f78 | |||
a13865213f | |||
4b6ca6f4c0 | |||
1e67b634a6 | |||
9b1c305c3b | |||
fd68d0e485 | |||
44b7736952 | |||
29bfcf131e | |||
53ec369b90 | |||
468ca35a58 | |||
e60deab017 | |||
10feb2f598 | |||
47ad385ca2 | |||
4d7624a951 | |||
7815dfcd46 | |||
a2c85e365f | |||
c1a727a699 | |||
b513a10c77 | |||
099d4133d3 | |||
a0b302d906 | |||
2ef9634a33 | |||
62d4c68f62 | |||
d9b1925c57 | |||
67bbe8551c | |||
c51eb2acb0 | |||
40a264ecd5 | |||
fed32ecfca | |||
558a6e4168 | |||
bd9c1faee1 | |||
dd559bfcf0 | |||
04ac85ae0a | |||
8116fc9940 | |||
519d7b3841 | |||
b673fb12c1 |
4
.envrc
4
.envrc
|
@ -1,5 +1 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
use flake
|
||||
|
|
16
.gitignore
vendored
16
.gitignore
vendored
|
@ -1,10 +1,14 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
# Emacs
|
||||
*~
|
||||
\#*\#
|
||||
.\#*
|
||||
|
||||
# Nix
|
||||
result
|
||||
result-*
|
||||
.direnv/
|
||||
|
||||
.terraform
|
||||
.terraform.lock.hcl
|
||||
/.terraform/
|
||||
|
||||
.direnv
|
||||
|
||||
secret
|
||||
|
|
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -1,6 +0,0 @@
|
|||
[submodule "org"]
|
||||
path = org
|
||||
url = https://gitea.redalder.org/Magic_RB/org
|
||||
[submodule "secret"]
|
||||
path = secret
|
||||
url = git@github:MagicRB/dotfiles-secret
|
44
.terraform.lock.hcl
Normal file
44
.terraform.lock.hcl
Normal file
|
@ -0,0 +1,44 @@
|
|||
# This file is maintained automatically by "terraform init".
|
||||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "registry.terraform.io/hashicorp/consul" {
|
||||
version = "2.19.0"
|
||||
hashes = [
|
||||
"h1:FIGa5SJEYirUiCzwrLKKsR6i90yfaxRkEnX8iZrgX6E=",
|
||||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/hashicorp/nomad" {
|
||||
version = "2.0.0"
|
||||
hashes = [
|
||||
"h1:fpoN2ysp7Mx4ZrSPfaeCfCzSwYoh8EYE0YQ20+El9V4=",
|
||||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/hashicorp/null" {
|
||||
version = "3.2.1"
|
||||
hashes = [
|
||||
"h1:tAeLfJ72Kd+SzAQV45NYz3DRDXg/v3A2qYdhKiL8n7Q=",
|
||||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/hashicorp/random" {
|
||||
version = "3.5.1"
|
||||
hashes = [
|
||||
"h1:apZgHUoMPG1MLgRdhaDiIx6eEIVCATm6INUVPCx0KiA=",
|
||||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/hashicorp/vault" {
|
||||
version = "3.22.0"
|
||||
hashes = [
|
||||
"h1:D3ktGa9Fb9G1P+e8tee/9i5Tk1LXPBRaSU/YcnbHZtA=",
|
||||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/hetznercloud/hcloud" {
|
||||
version = "1.44.1"
|
||||
hashes = [
|
||||
"h1:+iNbaz1lQaShHKi1mrJ+QJICOyTaURiikCHem5t0+2Q=",
|
||||
]
|
||||
}
|
674
COPYING
674
COPYING
|
@ -1,674 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
165
COPYING.LESSER
165
COPYING.LESSER
|
@ -1,165 +0,0 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
|
@ -1,304 +0,0 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license document.
|
||||
|
||||
4. Combined Works.
|
||||
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
“This License” refers to version 3 of the GNU General Public License.
|
||||
|
||||
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
|
||||
|
||||
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
|
||||
|
||||
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
|
||||
|
||||
A “covered work” means either the unmodified Program or a work based on the Program.
|
||||
|
||||
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
|
||||
|
||||
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
|
||||
|
||||
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
|
||||
|
||||
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
|
||||
|
||||
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
|
||||
|
||||
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
|
||||
|
||||
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
|
||||
|
||||
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
|
||||
|
||||
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
|
||||
|
||||
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
25
README.md
25
README.md
|
@ -1,25 +0,0 @@
|
|||
This repo contains my dotfiles, you'll find the NixOS configurations for all my machines that are running NixOS and home-manager configs for those that are not. Next you'll find my Emacs configuration and the Hashicorp stack. Lastly there are a few random thingies that aren't big enough to mention, but still cool if you're interested in them.
|
||||
|
||||
|
||||
# Structure
|
||||
|
||||
- [nixos/](nixos) - configuration files related to [NixOS](https://nixos.org/) itself
|
||||
- [hardware/](nixos/hardware) - configuration files specific to the hardware of my physical machines
|
||||
- [modules/](nixos/modules/) - reusable [NixOS](https://nixos.org/) modules of varying quality
|
||||
- [profiles/](nixos/profiles) - machine profiles, like `vps` or `workstation`, they apply settings to a group of machines
|
||||
- [secret-lib/](nixos/secret-lib) - a library bridging the gap between my public and public configuration
|
||||
- [systems/](nixos/systems) - the actual system configurations
|
||||
- [nix/](nix) - legacy junk I need to clean up
|
||||
- [home-manager/](home-manager) - configration files related to [home-manager](https://github.com/nix-community/home-manager)
|
||||
- [modules/](home-manager/modules) - reusable [home-manager](https://github.com/nix-community/home-manager) modules of varying quality
|
||||
- [modules/](modules) - [flake-parts](https://github.com/hercules-ci/flake-parts) modules that drive this flake
|
||||
- [overlays/](overlays) - [nixpkgs](https://github.com/NixOS/nixpkgs) overlays, some are just imports and slight modifications of externals overlays
|
||||
- [org/](org) - once again legacy junk I need to clean up
|
||||
- [secret/](secret) - submodule containing the secret parts of my dotfiles
|
||||
- [terraform/](terraform) - the [Terraform](https://www.terraform.io/) configuration driving the mostly [HashiCorp](https://www.hashicorp.com/) infrastructure in my configuration
|
||||
|
||||
|
||||
# License
|
||||
|
||||
This project follows [REUSE](https://reuse.software/) so all files have their own specific license. But as of writing this, the only license in use is `LGPLv3.0`. The project root contains a [COPYING](COPYING) and [COPYING.LESSER](COPYING.LESSER) as required for the proper use of the LGPL license.
|
||||
|
26
README.org
26
README.org
|
@ -1,26 +0,0 @@
|
|||
# -*- eval: (add-hook 'after-save-hook (lambda () (org-md-export-to-markdown nil)) nil t)-*-
|
||||
#+OPTIONS: toc:nil ^:{}
|
||||
#+TITLE: magic_rb's dotfiles
|
||||
|
||||
|
||||
This repo contains my dotfiles, you'll find the NixOS configurations for all my machines that are running NixOS and home-manager configs for those that are not. Next you'll find my Emacs configuration and the Hashicorp stack. Lastly there are a few random thingies that aren't big enough to mention, but still cool if you're interested in them.
|
||||
|
||||
* Structure
|
||||
- [[file:nixos][nixos/]] - configuration files related to [[https://nixos.org/][NixOS]] itself
|
||||
+ [[file:nixos/hardware][hardware/]] - configuration files specific to the hardware of my physical machines
|
||||
+ [[file:nixos/modules/][modules/]] - reusable [[https://nixos.org/][NixOS]] modules of varying quality
|
||||
+ [[file:nixos/profiles][profiles/]] - machine profiles, like ~vps~ or ~workstation~, they apply settings to a group of machines
|
||||
+ [[file:nixos/secret-lib][secret-lib/]] - a library bridging the gap between my public and public configuration
|
||||
+ [[file:nixos/systems][systems/]] - the actual system configurations
|
||||
- [[file:nix][nix/]] - legacy junk I need to clean up
|
||||
- [[file:home-manager][home-manager/]] - configration files related to [[https://github.com/nix-community/home-manager][home-manager]]
|
||||
+ [[file:home-manager/modules][modules/]] - reusable [[https://github.com/nix-community/home-manager][home-manager]] modules of varying quality
|
||||
- [[file:modules][modules/]] - [[https://github.com/hercules-ci/flake-parts][flake-parts]] modules that drive this flake
|
||||
- [[file:overlays][overlays/]] - [[https://github.com/NixOS/nixpkgs][nixpkgs]] overlays, some are just imports and slight modifications of externals overlays
|
||||
- [[file:org][org/]] - once again legacy junk I need to clean up
|
||||
- [[file:secret][secret/]] - submodule containing the secret parts of my dotfiles
|
||||
- [[file:terraform][terraform/]] - the [[https://www.terraform.io/][Terraform]] configuration driving the mostly [[https://www.hashicorp.com/][HashiCorp]] infrastructure in my configuration
|
||||
|
||||
* License
|
||||
This project follows [[https://reuse.software/][REUSE]] so all files have their own specific license. But as of writing this, the only license in use is ~LGPLv3.0~. The project root contains a [[file:COPYING][COPYING]] and [[file:COPYING.LESSER][COPYING.LESSER]] as required for the proper use of the LGPL license.
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
(import (
|
||||
fetchTarball {
|
||||
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
|
||||
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
|
||||
}
|
||||
) {
|
||||
src = ./.;
|
||||
})
|
||||
.defaultNix
|
|
@ -78,7 +78,6 @@ Hook ~cape~ onto both ~text-mode~ and ~prog-mode~.
|
|||
|
||||
(defun cape-setup-capf-text ()
|
||||
"Setup cape completions for text-mode"
|
||||
(add-hook 'completion-at-point-functions #'cape-ispell)
|
||||
(cape-setup-capf))
|
||||
|
||||
(defun cape-setup-capf ()
|
||||
|
|
|
@ -38,26 +38,68 @@ Also enable ~fd~ support, as that ignores paths listed in .gitignore unlike ~fin
|
|||
:after (consult)
|
||||
:init
|
||||
(defvar consult--fd-command "fd")
|
||||
(defun consult--fd-builder (input)
|
||||
(unless consult--fd-command
|
||||
(setq consult--fd-command
|
||||
(if (eq 0 (call-process-shell-command "fdfind"))
|
||||
"fdfind"
|
||||
"fd")))
|
||||
(pcase-let* ((`(,arg . ,opts) (consult--command-split input))
|
||||
(`(,re . ,hl) (funcall consult--regexp-compiler
|
||||
arg 'extended t)))
|
||||
(when re
|
||||
(list :command (append
|
||||
(list consult--fd-command
|
||||
"--color=never" "--full-path"
|
||||
(consult--join-regexps re 'extended))
|
||||
opts)
|
||||
:highlight hl))))
|
||||
|
||||
(defun consult-fd (&optional dir initial)
|
||||
(interactive "P")
|
||||
(let* ((prompt-dir (consult--directory-prompt "Fd" dir))
|
||||
(default-directory (cdr prompt-dir)))
|
||||
(find-file (consult--find (car prompt-dir) #'consult--fd-builder initial)))))
|
||||
(defun list-interject (list separator)
|
||||
(let ((next list))
|
||||
(dotimes (_ (length (cdr list)))
|
||||
(setcdr next (cons separator (cdr next)))
|
||||
(setq next (cddr next)))))
|
||||
|
||||
(defmacro uncons (car-name cdr-name cell)
|
||||
`(progn
|
||||
(setq ,car-name (car ,cell))
|
||||
(setq ,cdr-name (cdr ,cell))
|
||||
nil))
|
||||
|
||||
(defmacro let-uncons-1 (car-name cdr-name cell &rest body)
|
||||
`(let ((--let-uncons-1-- ,cell) ,car-name ,cdr-name)
|
||||
(uncons ,car-name ,cdr-name --let-uncons-1--)
|
||||
,@body))
|
||||
|
||||
(defmacro let-uncons (uncons-list &rest body)
|
||||
(let* ((forms (list 'unused)) (next-form nil) (last-form forms))
|
||||
(while uncons-list
|
||||
(let-unpack-1 (car-name cdr-name cell) uncons-list
|
||||
(setq next-form `(let-uncons-1 ,car-name ,cdr-name ,cell))
|
||||
(setcdr (last last-form) (list next-form))
|
||||
(setq last-form next-form))
|
||||
(setq uncons-list (cdddr uncons-list)))
|
||||
(setcdr (last last-form) body)
|
||||
(cadr forms)))
|
||||
(defmacro unpack (names list)
|
||||
`(let ((--unpack-- ,list))
|
||||
(dolist (name ',names)
|
||||
(eval (list 'setq name '(car --unpack--)))
|
||||
(setq --unpack-- (cdr --unpack--)))))
|
||||
|
||||
(defmacro let-unpack-1 (names list &rest body)
|
||||
`(let ((--let-unpack-1-- ,list) ,@names)
|
||||
(unpack ,names --let-unpack-1--)
|
||||
,@body))
|
||||
(defmacro let-unpack (unpack-list &rest body)
|
||||
(let* ((forms (list 'unused)) (next-form nil) (last-form forms))
|
||||
(while unpack-list
|
||||
(let-unpack-1 (names list) unpack-list
|
||||
(setq next-form `(let-unpack-1 ,names ,list))
|
||||
(setcdr (last last-form) (list next-form))
|
||||
(setq last-form next-form))
|
||||
(setq unpack-list (cddr unpack-list)))
|
||||
(setcdr (last last-form) body)
|
||||
(cadr forms)))
|
||||
(defun consult-fd (&optional directory initial-query) (interactive "P")
|
||||
(let-unpack ((prompt paths directory)
|
||||
(consult--directory-prompt "Fd" directory))
|
||||
(let* ((default-directory directory)
|
||||
(file (consult--find
|
||||
prompt 'consult--fd-builder initial-query)))
|
||||
(find-file file))))
|
||||
(defun consult--fd-builder (query)
|
||||
(let-uncons (patterns options (consult--command-split query)
|
||||
patterns highlight-function (funcall
|
||||
consult--regexp-compiler patterns 'extended t))
|
||||
(when patterns
|
||||
(list-interject patterns "--and")
|
||||
(cons
|
||||
`(,consult--fd-command "--color=never" "--full-path" ,@patterns ,@options)
|
||||
highlight-function)))))
|
||||
#+end_src
|
||||
|
|
|
@ -8,8 +8,138 @@
|
|||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
First install [[https://github.com/alexluigit/dirvish][dirvish]], a improved version of dired.
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(use-package dirvish
|
||||
:straight t)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp :noweb yes :exports none
|
||||
(use-package dirvish
|
||||
:straight t; (dirvish :type git :host nil :repo "https://github.com/alexluigit/dirvish")
|
||||
:init
|
||||
(dirvish-override-dired-mode)
|
||||
:custom
|
||||
<<dirvish-quick-access-entries>>
|
||||
:config
|
||||
;; (dirvish-peek-mode) ; Preview files in minibuffer
|
||||
;; (dirvish-side-follow-mode) ; similar to `treemacs-follow-mode'
|
||||
(setq dirvish-mode-line-format
|
||||
'(:left (sort symlink) :right (omit yank index)))
|
||||
<<dirvish-attributes>>
|
||||
(setq delete-by-moving-to-trash t)
|
||||
(setq dired-listing-switches
|
||||
"-l --all --human-readable --group-directories-first --no-group")
|
||||
<<dirvish-side-obey-display-actions-fix>>
|
||||
:bind ; Bind `dirvish|dirvish-side|dirvish-dwim' as you see fit
|
||||
<<dirvish-bindings>>)
|
||||
#+end_src
|
||||
|
||||
Add frequently visited diretories, they're accessible from the ~dirvish-mode-map~ under the prefix ~a~.
|
||||
|
||||
#+name: dirvish-quick-access-entries
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(dirvish-quick-access-entries ; It's a custom option, `setq' won't work
|
||||
'(("h" "~/" "Home")
|
||||
("d" "~/Downloads/" "Downloads")
|
||||
("m" "/mnt/" "Drives")
|
||||
("t" "~/.local/share/Trash/files/" "TrashCan")
|
||||
("r" "~/roam/")
|
||||
("s" "~/sync")))
|
||||
#+end_src
|
||||
|
||||
Enable more attributes in dirvish buffers.
|
||||
|
||||
#+name: dirvish-attributes
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(setq dirvish-attributes
|
||||
'(nerd-icons file-time file-size collapse subtree-state vc-state git-msg))
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun dirvish-fd-projectile ()
|
||||
(interactive)
|
||||
(funcall-interactively #'dirvish-fd (projectile-project-root) nil))
|
||||
#+end_src
|
||||
|
||||
Next fill up the ~dirvish-mode-map~ and make dirvish reachable under the ~C-c d~ prefix.
|
||||
|
||||
#+name: dirvish-bindings
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(("C-c d f" . dirvish-fd-projectile)
|
||||
("C-c d s" . dirvish-side)
|
||||
:map dirvish-mode-map ; Dirvish inherits `dired-mode-map'
|
||||
("a" . dirvish-quick-access)
|
||||
("f" . dirvish-file-info-menu)
|
||||
("y" . dirvish-yank-menu)
|
||||
("N" . dirvish-narrow)
|
||||
("^" . dirvish-history-last)
|
||||
("h" . dirvish-history-jump) ; remapped `describe-mode'
|
||||
("s" . dirvish-quicksort) ; remapped `dired-sort-toggle-or-edit'
|
||||
("v" . dirvish-vc-menu) ; remapped `dired-view-file'
|
||||
("w" . dirvish-apply-wallpaper)
|
||||
("TAB" . dirvish-subtree-toggle)
|
||||
("M-f" . dirvish-history-go-forward)
|
||||
("M-b" . dirvish-history-go-backward)
|
||||
("M-l" . dirvish-ls-switches-menu)
|
||||
("M-m" . dirvish-mark-menu)
|
||||
("M-t" . dirvish-layout-toggle)
|
||||
("M-s" . dirvish-setup-menu)
|
||||
("M-e" . dirvish-emerge-menu)
|
||||
("M-j" . dirvish-fd-jump))
|
||||
#+end_src
|
||||
|
||||
Dirvish has an issue with ~switch-to-buffer-obey-display-actions~, so advise ~switch-to-buffer~ and force override ~switch-to-buffer-obey-display-actions~ to ~nil~ when dealing with a Dirvish side buffer.
|
||||
|
||||
#+name: dirvish-side-obey-display-actions-fix
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(defun dirvish-side-buffer-p (buffer-or-name)
|
||||
"Return t if BUFFER-OR-NAME is a dirvish buffer and a side buffer."
|
||||
(when (get-buffer buffer-or-name)
|
||||
(with-current-buffer buffer-or-name
|
||||
(let ((dv (dirvish-curr)))
|
||||
(if (and dv (member 'side (dv-type dv)))
|
||||
t
|
||||
nil)))))
|
||||
|
||||
(defun dirvish-ignore-display-buffer (original-function buffer-or-name &rest original-arguments)
|
||||
(let ((switch-to-buffer-obey-display-actions (not (dirvish-side-buffer-p buffer-or-name))))
|
||||
(apply original-function buffer-or-name original-arguments)))
|
||||
(advice-add 'switch-to-buffer :around #'dirvish-ignore-display-buffer)
|
||||
#+end_src
|
||||
|
||||
In sideview Dirvish buffers, I want the ~listing-switches~ to exclude ~--all~ and instead use ~--almost-all~, that causes ~..~ and ~.~ to be omitted.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun dirvish-side-disable-listing-all (&rest args)
|
||||
(with-selected-window (dv-root-window dirvish--this)
|
||||
(setq dired-actual-switches (string-replace "--all" "--almost-all" dired-actual-switches))
|
||||
(revert-buffer)))
|
||||
(advice-add 'dirvish-side--new :after #'dirvish-side-disable-listing-all)
|
||||
#+end_src
|
||||
|
||||
In sideview Dirvish buffers, I don't want ~RET~ to narrow to a directory, it makes no sense in my opinion.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun dirvish-side-disable-open-folder (original-function &optional entry)
|
||||
(let ((entry (or entry (dired-get-filename nil t))))
|
||||
(if (dirvish-side-buffer-p (current-buffer))
|
||||
(unless (and entry (file-directory-p entry))
|
||||
(funcall original-function entry))
|
||||
(funcall original-function entry))))
|
||||
(advice-add 'dirvish-find-entry-a :around #'dirvish-side-disable-open-folder)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun dirvish-apply-wallpaper ()
|
||||
(interactive)
|
||||
(let ((filename (or (dired-get-filename) (completing-read))))
|
||||
(async-shell-command (format "ln -sf %s /nix/persist/home/main/.config/wallpaper && systemctl restart --user wallpaper" filename))))
|
||||
|
||||
(defun dirvish-side-obey-display-actions (original-function &rest original-arguments)
|
||||
(let ((switch-to-buffer-obey-display-actions nil))
|
||||
(apply original-function original-arguments)))
|
||||
(advice-add 'dirvish-side :around #'dirvish-side-obey-display-actions)
|
||||
#+end_src
|
||||
|
||||
|
|
|
@ -34,11 +34,30 @@ on the eyes.
|
|||
:no-require t
|
||||
:init
|
||||
(setq modus-vivendi-theme-override-colors-alist
|
||||
'(("bg-main" . "#111519")))
|
||||
:config
|
||||
(load-theme 'modus-vivendi t))
|
||||
'(("bg-main" . "#111519"))))
|
||||
#+END_SRC
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ef-themes
|
||||
:straight t)
|
||||
#+end_src
|
||||
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package themes
|
||||
:no-require t
|
||||
:after (ef-themes)
|
||||
:config
|
||||
(load-theme 'modus-vivendi t t)
|
||||
(load-theme 'modus-operandi t t)
|
||||
(load-theme 'ef-winter t t)
|
||||
(load-theme 'ef-autumn t t)
|
||||
(enable-theme 'ef-winter))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: t
|
||||
|
||||
Enable ~doom-modeline~, much better than the default and unlike ~powerline~ it's usable with TRAMP, so that's great.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
|
21
emacs-lisp/dockerfile.org
Normal file
21
emacs-lisp/dockerfile.org
Normal file
|
@ -0,0 +1,21 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: efaf9e11-dfee-4176-b6e2-4e900e524f51
|
||||
:END:
|
||||
#+title: Dockerfile
|
||||
#+filetags: emacs-load
|
||||
|
||||
Install ~dockerfile-mode~.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :noweb yes
|
||||
(use-package dockerfile-mode
|
||||
:straight t
|
||||
:mode <<mode-hooks>>)
|
||||
#+END_SRC
|
||||
|
||||
Hook ~dockerfile-mode~ on common files.
|
||||
|
||||
#+name: mode-hooks
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
("Dockerfile\\'" . dockerfile-mode)
|
||||
#+end_src
|
|
@ -7,38 +7,43 @@
|
|||
It is possible to make a fake rofi, from emacs ~completing-read~. This file facilitates that. First we define some LISP functions.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun completing-read-frame-popup-file (prompt file width height &rest args)
|
||||
(defun completing-read-frame-popup-file (prompt file display width height &rest args)
|
||||
""
|
||||
(with-temp-buffer
|
||||
(insert-file-contents file)
|
||||
(message "%s" (string-lines (buffer-string)))
|
||||
(apply #'completing-read-frame-popup prompt (string-lines (substring-no-properties (buffer-string))) args)))
|
||||
(apply #'auxmenu-popup-frame prompt (string-lines (substring-no-properties (buffer-string))) display width height args)))
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defvar completing-read-frame nil)
|
||||
(defvar auxmenu-frame-alist nil)
|
||||
|
||||
(defun completing-read-frame-popup (prompt collection &rest args)
|
||||
(defun auxmenu-popup-frame (prompt collection display width height &rest args)
|
||||
""
|
||||
(unless completing-read-frame
|
||||
(setq completing-read-frame
|
||||
(make-frame `((minibuffer . only)
|
||||
(let ((frame (alist-get display auxmenu-frame-alist)))
|
||||
(when (equal frame nil)
|
||||
(when (equal display nil)
|
||||
(error "Must specify display"))
|
||||
|
||||
(push `(,display . ,(make-frame
|
||||
`((minibuffer . only)
|
||||
(name . "emacs-completing-read-float")
|
||||
(unsplittable . t)
|
||||
(no-other-frame . t)
|
||||
(width . ,width)
|
||||
(height . ,height)
|
||||
(display . ,display)
|
||||
(left . 0.5)
|
||||
(top . 0.5))))
|
||||
(make-frame-invisible completing-read-frame))
|
||||
(make-frame-visible completing-read-frame)
|
||||
(raise-frame completing-read-frame)
|
||||
(with-selected-frame completing-read-frame
|
||||
auxmenu-frame-alist)
|
||||
(setq frame (alist-get display auxmenu-frame-alist)))
|
||||
(make-frame-visible frame)
|
||||
(raise-frame frame)
|
||||
(with-selected-frame frame
|
||||
(unwind-protect
|
||||
(let ((selection (apply #'completing-read prompt collection args)))
|
||||
(make-frame-invisible completing-read-frame)
|
||||
(make-frame-invisible frame)
|
||||
selection)
|
||||
(make-frame-invisible completing-read-frame))))
|
||||
(make-frame-invisible frame)))))
|
||||
#+end_src
|
||||
|
||||
Next a bash helper is needed.
|
||||
|
@ -48,7 +53,7 @@ Next a bash helper is needed.
|
|||
{
|
||||
tmp=$(mktemp)
|
||||
tee > $tmp
|
||||
emacs -Q --batch --eval $"(progn (require 'server) (princ (format \"%s\\n\" (server-eval-at \"server\" '(completing-read-frame-popup-file \"$1\" \"$tmp\" $2 $3)))))"
|
||||
emacs -Q --batch --eval $"(progn (require 'server) (princ (format \"%s\\n\" (server-eval-at \"server\" '(completing-read-frame-popup-file \"$1\" \"$tmp\" \"$DISPLAY\" $2 $3)))))"
|
||||
rm $tmp
|
||||
}
|
||||
#+end_src
|
||||
|
|
|
@ -28,11 +28,7 @@ Email is a complicated beast, I decided to use *mu4e* and *mbsync*.
|
|||
:END:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :results none
|
||||
(let*
|
||||
((mu-path
|
||||
(file-name-directory (directory-file-name (file-name-directory (executable-find "mu")))))
|
||||
(mu-load-path (concat mu-path "share/emacs/site-lisp/mu4e/")))
|
||||
(add-to-list 'load-path mu-load-path))
|
||||
(add-to-list 'load-path (concat user-emacs-directory "profile/share/emacs/site-lisp/mu4e"))
|
||||
(require 'mu4e)
|
||||
|
||||
(setq auth-sources '((:source "~/.password-store/.authinfo.gpg")))
|
||||
|
|
|
@ -13,11 +13,15 @@
|
|||
(with-current-buffer " *ement-pass*"
|
||||
(ement-connect
|
||||
:uri-prefix "http://localhost:8008"
|
||||
:password (string-trim (substring-no-properties (buffer-string)))
|
||||
:password (let ((password (string-trim (substring-no-properties (buffer-string)))))
|
||||
(if (not (equal (process-exit-status process) 0))
|
||||
(read-passwd "Ement password: ")
|
||||
password))
|
||||
:user-id "@magic_rb:matrix.redalder.org")
|
||||
(kill-buffer))))
|
||||
|
||||
(defun after-init-ement-connect ()
|
||||
(interactive)
|
||||
(set-process-sentinel (start-process "ement-pass" " *ement-pass*" "pass" "Matrix/@magic_rb:matrix.redalder.org") #'ement-connect-sentinel))
|
||||
|
||||
(use-package ement
|
||||
|
@ -27,7 +31,7 @@
|
|||
(ement-save-sessions t)
|
||||
:config
|
||||
(remove-hook 'ement-after-initial-sync-hook #'ement-room-list--after-initial-sync)
|
||||
(add-hook 'after-init-hook #'after-init-ement-connect))
|
||||
(setf ement-sessions (ement--read-sessions)))
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
|
19
emacs-lisp/format_all.org
Normal file
19
emacs-lisp/format_all.org
Normal file
|
@ -0,0 +1,19 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: bb6cd4f4-5245-40a1-a140-89703067ad5c
|
||||
:END:
|
||||
#+title: Format All
|
||||
#+filetags: emacs-load
|
||||
#+begin_src emacs-lisp
|
||||
(use-package apheleia
|
||||
:straight t
|
||||
:config
|
||||
(push '(alejandra . ("alejandra"))
|
||||
apheleia-formatters)
|
||||
(push '(fourmolu . ("fourmolu" "--stdin-input-file" filepath))
|
||||
apheleia-formatters)
|
||||
(push '(nix-mode . alejandra)
|
||||
apheleia-mode-alist)
|
||||
(apheleia-global-mode +1))
|
||||
#+end_src
|
||||
|
13
emacs-lisp/hashicorp_configuration_language.org
Normal file
13
emacs-lisp/hashicorp_configuration_language.org
Normal file
|
@ -0,0 +1,13 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: 9591c993-560d-4306-918a-eb0b07461b14
|
||||
:END:
|
||||
#+title: Hashicorp Configuration Language
|
||||
#+filetags: emacs-load
|
||||
|
||||
Install ~hcl-mode~.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package hcl-mode
|
||||
:straight t)
|
||||
#+END_SRC
|
45
emacs-lisp/hledger.org
Normal file
45
emacs-lisp/hledger.org
Normal file
|
@ -0,0 +1,45 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: 2f95ff8f-b030-4c90-8296-29c1cc8b2b0c
|
||||
:END:
|
||||
#+title: HLedger
|
||||
#+filetags: emacs-load
|
||||
|
||||
For hledger, it's possible to use =ledger-mode= instead of =hledger-mode=. We'll see how it goes. It does require some convincing though.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ledger-mode
|
||||
:straight t
|
||||
:config
|
||||
(setq ledger-binary-path "ledger-hledger")
|
||||
(setq ledger-default-date-format ledger-iso-date-format)
|
||||
(setq ledger-report-links-in-register nil)
|
||||
(setq ledger-report-native-highlighting-arguments '("--color=always"))
|
||||
(setq ledger-report-auto-width nil)
|
||||
(setq ledger-reconcile-default-commodity "EUR")
|
||||
(setq ledger-report-use-header-line t)
|
||||
(setq ledger-report-use-native-highlighting t)
|
||||
(setq ledger-report-auto-refresh-sticky-cursor t)
|
||||
(setq ledger-report-use-strict t)
|
||||
(setq ledger-highlight-xact-under-point t)
|
||||
(setq ledger-copy-transaction-insert-blank-line-after t)
|
||||
(add-to-list 'auto-mode-alist '("\\.\\(h?ledger\\|journal\\|j\\)$" . ledger-mode))
|
||||
(setq ledger-report-balance
|
||||
(list "bal" (concat ledger-binary-path " --strict -f %(ledger-file) bal")))
|
||||
|
||||
(setq ledger-report-reg
|
||||
(list "reg" (concat ledger-binary-path " --strict -f %(ledger-file) reg")))
|
||||
|
||||
(setq ledger-report-payee
|
||||
(list "payee" (concat ledger-binary-path " --strict -f %(ledger-file) reg @%(payee)")))
|
||||
|
||||
(setq ledger-report-account
|
||||
(list "account" (concat ledger-binary-path " --strict -f %(ledger-file) reg %(account)")))
|
||||
|
||||
(setq ledger-reports
|
||||
(list ledger-report-balance
|
||||
ledger-report-reg
|
||||
ledger-report-payee
|
||||
ledger-report-account)))
|
||||
#+end_src
|
||||
|
44
emacs-lisp/indent_bars.org
Normal file
44
emacs-lisp/indent_bars.org
Normal file
|
@ -0,0 +1,44 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: 044ab3bc-7911-4bd3-b762-d7556695a027
|
||||
:END:
|
||||
#+title: Indent Bars
|
||||
#+filetags: emacs-load
|
||||
|
||||
Load indent bars.
|
||||
|
||||
#+begin_src emacs-lisp :noweb yes
|
||||
(use-package indent-bars
|
||||
:straight
|
||||
(:package "package"
|
||||
:host github :type git
|
||||
:repo "jdtsmith/indent-bars")
|
||||
:hook
|
||||
<<indent-bars-hooks>>
|
||||
:config
|
||||
<<indent-bars-visual>>)
|
||||
#+end_src
|
||||
|
||||
Customize the visual of the bars to minimal style, based on the example shown on GitHub.
|
||||
|
||||
#+name: indent-bars-visual
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(setq
|
||||
indent-bars-color '("#ffffff" :face-bg t :blend 0.3)
|
||||
indent-bars-pattern "."
|
||||
indent-bars-width-frac 0.1
|
||||
indent-bars-pad-frac 0.1
|
||||
indent-bars-zigzag nil
|
||||
indent-bars-color-by-depth nil
|
||||
indent-bars-highlight-current-depth nil
|
||||
indent-bars-display-on-blank-lines nil)
|
||||
#+end_src
|
||||
|
||||
|
||||
Hook ~indent-bars-mode~ onto language major modes.
|
||||
|
||||
#+name: indent-bars-hooks
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(nix-mode . (lambda () (setq indent-bars-display-on-blank-lines t indent-bars-spacing-override 2) (indent-bars-mode)))
|
||||
#+end_src
|
||||
|
|
@ -66,9 +66,12 @@ Then we hook our minor mode on ~meow-mode-hook~, but only after ~meow-mode~ is l
|
|||
"l l" 'lsp
|
||||
"l r" 'lsp-workspace-restart
|
||||
"l e" 'lsp-execute-code-action
|
||||
"l d" 'lsp-ui-doc-glance
|
||||
|
||||
"e l" 'ement-list-rooms
|
||||
"e v" 'ement-view-room
|
||||
"e n" 'ement-notify-switch-to-notifications-buffer
|
||||
"e m" 'ement-notify-switch-to-mentions-buffer
|
||||
|
||||
"M-c" 'tempel-insert
|
||||
:keymaps '(special-mode-map)
|
||||
|
|
54
emacs-lisp/nov_el.org
Normal file
54
emacs-lisp/nov_el.org
Normal file
|
@ -0,0 +1,54 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: e0db184f-a0a6-483f-bfea-6b98209491f9
|
||||
:END:
|
||||
#+title: Nov.el
|
||||
#+filetags: emacs-load
|
||||
Load ~nov.el~ and it's undeclared dependency ~esxml~.
|
||||
|
||||
#+begin_src emacs-lisp :noweb yes
|
||||
(use-package esxml
|
||||
:straight t
|
||||
:after visual-fill-column
|
||||
:init
|
||||
<<define-center-hook>>
|
||||
<<hook-epub>>
|
||||
:hook
|
||||
<<hook-visual-fill-column>>
|
||||
<<hook-nov-mode-center>>
|
||||
:config
|
||||
<<disable-text-filling>>)
|
||||
|
||||
(use-package nov
|
||||
:straight t)
|
||||
#+end_src
|
||||
|
||||
#+name: hook-epub
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
:mode ("\\.py\\'" . nov-mode)
|
||||
#+end_src
|
||||
|
||||
#+name: hook-visual-fill-column
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(nov-mode . visual-fill-column-mode)
|
||||
(nov-mode . visual-line-mode)
|
||||
#+end_src
|
||||
|
||||
#+name: disable-text-filling
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(setq nov-text-width t)
|
||||
#+end_src
|
||||
|
||||
#+name: hook-nov-mode-center
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(nov-mode . nov-mode-center)
|
||||
#+end_src
|
||||
|
||||
#+name: define-center-hook
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(defun nov-mode-center ()
|
||||
(setq visual-fill-column-center-text t))
|
||||
#+end_src
|
||||
|
||||
|
||||
|
11
emacs-lisp/org_download.org
Normal file
11
emacs-lisp/org_download.org
Normal file
|
@ -0,0 +1,11 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: 71c15d92-b77f-437d-93b1-d7856e8765b8
|
||||
:END:
|
||||
#+title: Org Download
|
||||
#+filetags: emacs-load
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-download
|
||||
:straight t)
|
||||
#+end_src
|
||||
|
|
@ -47,25 +47,78 @@ So the process for capturing is to trigger the capture with ~C-c o c~ and then q
|
|||
"${body}")
|
||||
:target (file+olp "inbox.org" ("Shopping list")))))
|
||||
|
||||
(defun org-roam-tempel-recipe ()
|
||||
"."
|
||||
(setq-local org-roam-node org-roam-capture--node)
|
||||
(org-entry-delete nil "ID")
|
||||
(tempel-insert
|
||||
'(":PROPERTIES:" n
|
||||
":CREATED: " (org-capture-fill-template "%U")
|
||||
":ID: " (org-roam-node-id org-roam-node) n
|
||||
":servings: " p n
|
||||
":prep-time: " (s prep-time) " m" n
|
||||
":cook-time: " (s cook-time) " m" n
|
||||
":ready-in: " (when-let ((prep (and prep-time (string-to-number prep-time)))
|
||||
(cook (and cook-time (string-to-number cook-time))))
|
||||
(number-to-string (+ prep cook))) " m" n
|
||||
":END:" n
|
||||
"#+title: " (org-roam-node-title org-roam-node) n
|
||||
"#+filetags: :recipe:" n
|
||||
"* Ingredients" n
|
||||
" - " r n
|
||||
"* Directions" n
|
||||
" - " n)))
|
||||
|
||||
(defun org-roam-tempel-web-resource ()
|
||||
"."
|
||||
(setq-local org-roam-node org-roam-capture--node)
|
||||
(org-entry-delete nil "ID")
|
||||
(tempel-insert
|
||||
'(":PROPERTIES:" n
|
||||
":CREATED: " (org-capture-fill-template "%U") n
|
||||
":ID: " (org-roam-node-id org-roam-node) n
|
||||
":ROAM_REFS: " (completing-read \"URL for resource: \" nil nil nil nil nil (or (substring-no-properties (car kill-ring)) nil)) n
|
||||
":END:" n
|
||||
"#+title: " (org-roam-node-title org-roam-node) n
|
||||
"#+filetags: :resource:" n n)))
|
||||
|
||||
(defun org-roam-tempel-node (standalone)
|
||||
"."
|
||||
(setq-local org-roam-node org-roam-capture--node)
|
||||
(org-entry-delete nil "ID")
|
||||
(tempel-insert
|
||||
`(,@(unless standalone '("* ${title} :inbox:" n))
|
||||
":PROPERTIES:" n
|
||||
":ID: " (org-roam-node-id org-roam-node) n
|
||||
":CREATED: " (org-capture-fill-template "%U")
|
||||
":END:" n
|
||||
"#+setupfile: ~/roam/emacs-lisp/setupfiles/latex-base.org" n
|
||||
,@(when standalone '("#+title: " (org-roam-node-title org-roam-node) n)) n
|
||||
)))
|
||||
|
||||
(defun org-roam-tempel-task ()
|
||||
"."
|
||||
(setq-local org-roam-node org-roam-capture--node)
|
||||
(setf (org-roam-node-id org-roam-node) (org-id-uuid))
|
||||
(tempel-insert
|
||||
`(":PROPERTIES:" n
|
||||
":CREATED: " (org-capture-fill-template "%U")
|
||||
":ID: " (org-roam-node-id org-roam-node) n
|
||||
":Effort: " p n
|
||||
":END:" n
|
||||
)))
|
||||
|
||||
(setq org-roam-capture-templates
|
||||
`(("i" "Inbox" entry
|
||||
,(concat "* ${title} :inbox:\n"
|
||||
":PROPERTIES:\n"
|
||||
":CREATED: %U\n"
|
||||
":ID: %(org-id-uuid)\n"
|
||||
":END:\n"
|
||||
"#+setupfile: ~/roam/emacs-lisp/setupfiles/latex-base.org\n\n"
|
||||
"%?")
|
||||
:target (file+olp "inbox.org" ("Shopping list")))
|
||||
("f" "File" plain "%?"
|
||||
:target (file+head "${slug}.org"
|
||||
,(concat ":PROPERTIES:\n"
|
||||
":CREATED: %U\n"
|
||||
":ID: %(org-id-uuid)\n"
|
||||
":END:\n"
|
||||
"#+setupfile: ~/roam/emacs-lisp/setupfiles/latex-base.org\n\n"
|
||||
"#+title: ${title}\n"
|
||||
"")))
|
||||
"%?"
|
||||
:target (file+olp "inbox.org" ("Shopping list"))
|
||||
:hook (lambda () (org-roam-tempel-node nil)))
|
||||
|
||||
("f" "File" plain
|
||||
"%?"
|
||||
:target (file "${slug}.org")
|
||||
:hook (lambda () (org-roam-tempel-node t)))
|
||||
|
||||
("@" "Inbox [mu4e]" entry
|
||||
,(concat "* Process \"%a\" %? :inbox:\n"
|
||||
":PROPERTIES:\n"
|
||||
|
@ -74,23 +127,26 @@ So the process for capturing is to trigger the capture with ~C-c o c~ and then q
|
|||
":END:\n\n"
|
||||
"%?")
|
||||
:target (file+olp "inbox.org" ("All")))
|
||||
("t" "TODO" entry
|
||||
,(concat "* TODO ${title} :inbox:\n"
|
||||
":PROPERTIES:\n"
|
||||
":CREATED: %U\n"
|
||||
":ID: %(org-id-uuid)\n"
|
||||
":END:\n\n"
|
||||
|
||||
("t" "Task" entry
|
||||
,(concat "* TODO ${title}\n"
|
||||
"%?")
|
||||
:target (file+olp "inbox.org" ("Todo")))
|
||||
:target (file "tasks.org")
|
||||
:empty-lines 1
|
||||
:hook org-roam-tempel-task)
|
||||
|
||||
("r" "Resource")
|
||||
("rw" "Web resource" entry
|
||||
,(concat "* ${title} :resource:inbox:\n"
|
||||
":PROPERTIES:\n"
|
||||
":CREATED: %U\n"
|
||||
":ROAM_REFS: %(completing-read \"URL for resource: \" nil nil nil nil nil (or (substring-no-properties (car kill-ring)) nil))\n"
|
||||
":ID: %(org-id-uuid)\n"
|
||||
":END:\n\n")
|
||||
:target (file+olp "inbox.org" ("Resources" "Web")))
|
||||
|
||||
("rw" "Web resource" plain
|
||||
"%?"
|
||||
:target (file "web-${slug}.org")
|
||||
:hook org-roam-tempel-web-resource)
|
||||
|
||||
("rr" "Recipe" plain
|
||||
"%?"
|
||||
:target (file "recipe-${slug}.org")
|
||||
:hook org-roam-tempel-recipe)
|
||||
|
||||
("E" "Event" entry
|
||||
,(concat "* ${title} :event:inbox:\n"
|
||||
":PROPERTIES:\n"
|
||||
|
@ -237,37 +293,23 @@ Now the fun part. I only define one unified agenda view for now. It allows
|
|||
|
||||
(setq org-agenda-custom-commands
|
||||
'(("g" "Get Things Done (GTD)"
|
||||
((agenda ""
|
||||
((org-agenda-skip-function
|
||||
'(org-agenda-skip-entry-if 'deadline))
|
||||
(org-deadline-warning-days 0)))
|
||||
(todo "INPROGRESS"
|
||||
((org-agenda-skip-function
|
||||
'(org-agenda-skip-entry-if 'deadline))
|
||||
(org-agenda-prefix-format " %i %-12:c [%e] ")
|
||||
(org-agenda-overriding-header "\nTasks started\n")))
|
||||
(todo "NEXT"
|
||||
((org-agenda-skip-function
|
||||
'(org-agenda-skip-entry-if 'deadline))
|
||||
(org-agenda-prefix-format " %i %-12:c [%e] ")
|
||||
(org-agenda-overriding-header "\nTasks planned\n")))
|
||||
(agenda nil
|
||||
((org-agenda-entry-types '(:deadline))
|
||||
(org-agenda-format-date "")
|
||||
(org-deadline-warning-days 21)
|
||||
(org-agenda-skip-function
|
||||
'(org-agenda-skip-entry-if 'notregexp "\\* NEXT"))
|
||||
(org-agenda-overriding-header "\nDeadlines")))
|
||||
(todo "TODO"
|
||||
((org-agenda-prefix-format " %?-12t% s")
|
||||
(org-agenda-skip-function
|
||||
'(my/org-agenda-skip-without-match "-inbox"))
|
||||
(org-agenda-overriding-header "\nTo be done\n")))
|
||||
(tags "inbox"
|
||||
((org-agenda-prefix-format " %?-12t% s")
|
||||
(org-agenda-overriding-header "\nInbox\n")))
|
||||
(tags "CLOSED>=\"<today>\""
|
||||
((org-agenda-overriding-header "\nCompleted today\n")))))))
|
||||
((agenda "")
|
||||
(org-ql-block '(and (todo "INPROGRESS")
|
||||
(not (deadline)))
|
||||
((org-ql-block-header "Tasks Started")))
|
||||
(org-ql-block '(and (todo "NEXT")
|
||||
(not (deadline)))
|
||||
((org-ql-block-header "Tasks Planned")))
|
||||
(org-ql-block '(and (deadline "21d")
|
||||
(not (or (todo "NEXT") (todo "CANCELLED") (todo "DONE"))))
|
||||
((org-ql-block-header "Deadlines")))
|
||||
(org-ql-block '(and (todo "TODO")
|
||||
(not (deadline)))
|
||||
((org-ql-block-header "To be Done")))
|
||||
(org-ql-block '(and (tags "inbox"))
|
||||
((org-ql-block-header "Inbox")))
|
||||
(org-ql-block '(and (or (todo "CANCELLED") (todo "DONE")) (closed :on today))
|
||||
((org-ql-block-header "Completed today")))))))
|
||||
#+END_SRC
|
||||
|
||||
** Keybindings
|
||||
|
@ -292,3 +334,11 @@ Now the fun part. I only define one unified agenda view for now. It allows
|
|||
:keymaps '(mu4e-headers-mode-map mu4e-view-mode-map)
|
||||
"C-c i" 'org-capture-mail)
|
||||
#+end_src
|
||||
|
||||
** Org QL
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-ql
|
||||
:straight (org-ql :fetcher github :repo "alphapapa/org-ql"
|
||||
:files (:defaults (:exclude "helm-org-ql.el"))))
|
||||
#+end_src
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
:PROPERTIES:
|
||||
:ID: 986ca7a5-d225-49bb-9e35-f2dffafe8aee
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:END:
|
||||
#+title: Org Mode
|
||||
#+filetags: emacs-load
|
||||
|
@ -107,7 +108,7 @@ Adjust size of LaTeX previews.
|
|||
#+BEGIN_SRC emacs-lisp :results none
|
||||
(pcase (system-name)
|
||||
("heater" (setq org-format-latex-options (plist-put org-format-latex-options :scale 1.75)))
|
||||
("omen" (setq org-format-latex-options (plist-put org-format-latex-options :scale 0.8))))
|
||||
("omen" (setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5))))
|
||||
#+END_SRC
|
||||
|
||||
To support non-breakable whitespace, create a new ~org-entity~.
|
||||
|
@ -123,6 +124,21 @@ Enable fontification for inline LaTeX blocks which convieniently also makes in f
|
|||
(setq org-highlight-latex-and-related '(native entities))
|
||||
#+end_src
|
||||
|
||||
Org Mode by default considers ~.aux~ files as log files and deletes them. Which among other things breaks ~tikzmark~ and ~babel~...
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'ox-latex)
|
||||
(setq org-latex-logfiles-extensions (remove "aux" org-latex-logfiles-extensions))
|
||||
#+end_src
|
||||
|
||||
Don't delete other windows when exporting, it is very distracting, just use popper.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun org-export--dispatch-ui/popper (fun &rest r)
|
||||
(flet ((delete-other-windows (&rest r) (ignore)))
|
||||
(apply fun r)))
|
||||
(advice-add 'org-export--dispatch-ui :around 'org-export--dispatch-ui/popper)
|
||||
#+end_src
|
||||
|
||||
** Sliced Previews
|
||||
|
||||
|
@ -209,3 +225,18 @@ Normally a LaTeX preview is just one huge image which makes Emacs really jumpy a
|
|||
#+end_src
|
||||
|
||||
|
||||
|
||||
* Visual Fill Column
|
||||
I figured out eventually that having columns filled at a consistent width and having the text centered is really nice for prose. So enable it.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun magic_rb/org-mode-visual-fill-column-mode-conf ()
|
||||
""
|
||||
(setq visual-fill-column-center-text t))
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'org-mode-hook #'visual-fill-column-mode)
|
||||
(add-hook 'org-mode-hook #'magic_rb/org-mode-visual-fill-column-mode-conf)
|
||||
#+end_src
|
||||
|
||||
|
|
|
@ -15,6 +15,9 @@ Enable ~popper~, a better version of ~popwin~, which might actually work. It gro
|
|||
(use-package popper
|
||||
:straight (popper :type git :host github :repo "karthink/popper")
|
||||
:config
|
||||
(setq popper--reference-names nil
|
||||
popper--reference-modes nil
|
||||
popper--reference-predicates nil)
|
||||
(setq popper-reference-buffers
|
||||
'("\\*Messages\\*"
|
||||
"\\*Warnings\\*"
|
||||
|
@ -23,11 +26,13 @@ Enable ~popper~, a better version of ~popwin~, which might actually work. It gro
|
|||
"\\*HS-Error\\*"
|
||||
"\\*lsp-help\\*"
|
||||
"^\\*Ement compose.*\\*$"
|
||||
"^\\*Org Export Dispatcher\\*$"
|
||||
"^\\*Org Select\\*$"
|
||||
"^\\*R:[^\\*]+\\*$"
|
||||
haskell-interactive-mode
|
||||
help-mode
|
||||
compilation-mode
|
||||
rustic-compilation-mode
|
||||
tex-shell))
|
||||
rustic-compilation-mode))
|
||||
(popper-mode +1))
|
||||
#+END_SRC
|
||||
|
||||
|
|
17
emacs-lisp/scala.org
Normal file
17
emacs-lisp/scala.org
Normal file
|
@ -0,0 +1,17 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: c4129243-bc07-439b-845c-57115dbdd3de
|
||||
:END:
|
||||
#+title: Scala
|
||||
#+filetags: emacs-load
|
||||
#+begin_src emacs-lisp
|
||||
(use-package scala-mode
|
||||
:straight t)
|
||||
|
||||
(use-package lsp-metals
|
||||
:straight t
|
||||
:custom
|
||||
(lsp-metals-enable-semantic-highlighting t)
|
||||
:hook (scala-mode . lsp))
|
||||
#+end_src
|
||||
|
20
emacs-lisp/setupfiles/beamer-metropolis.org
Normal file
20
emacs-lisp/setupfiles/beamer-metropolis.org
Normal file
|
@ -0,0 +1,20 @@
|
|||
#+OPTIONS: H:2 num:t toc:t \n:nil ::t |:t ^:t -:t f:t *:t tex:t d:(HIDE) tags:not-in-toc <:t
|
||||
#+OPTIONS: d:nil todo:t pri:nil
|
||||
#+property: header-args :eval yes
|
||||
#+latex_compiler: xelatex
|
||||
#+startup: beamer
|
||||
#+latex_class: beamer
|
||||
#+latex_class_options: [bigger, xcolor={svgnames,table}]
|
||||
#+beamer_theme: metropolis [numbering=counter,progressbar=foot]
|
||||
#+setupfile: ~/roam/emacs-lisp/setupfiles/latex-base.org
|
||||
# #+options: ':nil *:t -:t ::t <:t H:2 \n:nil ^:t arch:headline author:t broken-links:nil c:nil creator:nil
|
||||
# #+options: d:(not "LOGBOOK") date:t e:t email:nil f:t inline:t num:t p:nil pri:nil prop:nil stat:t tags:t tasks:t tex:t tags:not-in-toc
|
||||
# #+options: timestamp:t title:t toc:t todo:t |:t
|
||||
#+columns: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args) %4BEAMER_col(Col) %10BEAMER_extra(Extra)
|
||||
#+language: en
|
||||
#+select_tags: export
|
||||
#+exclude_tags: noexport
|
||||
#+cite_export:
|
||||
#+latex_header: \usepackage{varwidth}
|
||||
#+latex_header: \usepackage{tabularx, colortbl}
|
||||
#+startup: nolatexpreview
|
|
@ -1,16 +1,27 @@
|
|||
#+options: ^:{}
|
||||
#+latex_header: \usepackage{xcolor}
|
||||
#+latex_header: \usepackage{algorithm2e}
|
||||
#+latex_header: \SetKwProg{Fn}{Function}{:}{end}
|
||||
#+latex_header: \usepackage{cmbright}
|
||||
#+latex_header: \usepackage{textcomp}
|
||||
#+latex_header: \usepackage{tikz}
|
||||
#+latex_header: \usetikzlibrary{shapes.geometric}
|
||||
#+latex_header: \usepackage{mathtools}
|
||||
#+latex_header: \usepackage{circuitikz}
|
||||
#+latex_header: \usetikzlibrary{shapes.geometric, shapes.misc}
|
||||
#+latex_header: \usetikzlibrary{fit, tikzmark, calc}
|
||||
#+latex_header: \usepackage{mathtools}
|
||||
#+latex_header: \usepackage{fancyvrb}
|
||||
#+latex_header: \usepackage{blkarray}
|
||||
#+latex_header: \usepackage{ifthen}
|
||||
#+latex_header: \usepackage{array}
|
||||
#+latex_header: \newenvironment*{dummyenv}{}{}
|
||||
#+latex_header: \newcommand{\BlankLineEm}{\vskip 1em}
|
||||
#+latex_header: \usepackage{placeins}
|
||||
|
||||
#+latex_header: \let\Oldsection\section
|
||||
#+latex_header: \renewcommand{\section}{\FloatBarrier\Oldsection}
|
||||
|
||||
#+latex_header: \let\Oldsubsection\subsection
|
||||
#+latex_header: \renewcommand{\subsection}{\FloatBarrier\Oldsubsection}
|
||||
|
||||
#+latex_header: \let\Oldsubsubsection\subsubsection
|
||||
#+latex_header: \renewcommand{\subsubsection}{\FloatBarrier\Oldsubsubsection}
|
||||
#+startup: latexpreview
|
||||
|
|
2
emacs-lisp/setupfiles/latex-orgmode.org
Normal file
2
emacs-lisp/setupfiles/latex-orgmode.org
Normal file
|
@ -0,0 +1,2 @@
|
|||
#+latex_header: \usepackage{cmbright}
|
||||
#+setupfile: ~/roam/emacs-lisp/setupfiles/latex-base.org
|
|
@ -183,9 +183,9 @@
|
|||
" " n
|
||||
" }" n
|
||||
" \\end{algorithm}" n
|
||||
"\\end{dummyenv}" n
|
||||
"\\end{dummyenv}" q n
|
||||
(tempel-retpoint-here)
|
||||
:post (tempel-post-edit-latex t -4))
|
||||
:post (tempel-post-edit-latex t -3))
|
||||
|
||||
org-mode :condition (org-inside-LaTeX-fragment-p)
|
||||
|
||||
|
@ -222,4 +222,6 @@
|
|||
(s fname) " " (p "pattern") " = " (p "undefined"))
|
||||
; guarded fn
|
||||
(<- (p "x") " <- " (p "undefined"))
|
||||
(aeson "instance A.ToJSON " (p "" type) " where" n
|
||||
"instance A.FromJSON " type " where" q)
|
||||
#+END_SRC
|
||||
|
|
|
@ -137,9 +137,9 @@ org-mode
|
|||
" " n
|
||||
" }" n
|
||||
" \\end{algorithm}" n
|
||||
"\\end{dummyenv}" n
|
||||
"\\end{dummyenv}" q n
|
||||
(tempel-retpoint-here)
|
||||
:post (tempel-post-edit-latex t -4))
|
||||
:post (tempel-post-edit-latex t -3))
|
||||
|
||||
org-mode :condition (org-inside-LaTeX-fragment-p)
|
||||
|
||||
|
@ -172,3 +172,5 @@ haskell-mode
|
|||
(s fname) " " (p "pattern") " = " (p "undefined"))
|
||||
; guarded fn
|
||||
(<- (p "x") " <- " (p "undefined"))
|
||||
(aeson "instance A.ToJSON " (p "" type) " where" n
|
||||
"instance A.FromJSON " type " where" q)
|
||||
|
|
13
emacs-lisp/terraform_configuration_language.org
Normal file
13
emacs-lisp/terraform_configuration_language.org
Normal file
|
@ -0,0 +1,13 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: 02e18c7d-80bf-47a1-8cc3-83448e31b1a0
|
||||
:END:
|
||||
#+title: Terraform Configuration Language
|
||||
#+filetags: emacs-load
|
||||
|
||||
Install ~terraform-mode~.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package terraform-mode
|
||||
:straight t)
|
||||
#+end_src
|
15
emacs-lisp/visual_fill_column.org
Normal file
15
emacs-lisp/visual_fill_column.org
Normal file
|
@ -0,0 +1,15 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: 3d52b0b7-2d91-48b4-88b6-a497b1471617
|
||||
:END:
|
||||
#+title: Visual Fill Column
|
||||
#+filetags: emacs-load
|
||||
#+begin_src emacs-lisp
|
||||
(use-package visual-fill-column
|
||||
:straight t
|
||||
:config
|
||||
(advice-add 'text-scale-adjust :after #'visual-fill-column-adjust)
|
||||
(advice-add 'text-scale-decrease :after #'visual-fill-column-adjust)
|
||||
(advice-add 'text-scale-increase :after #'visual-fill-column-adjust))
|
||||
#+end_src
|
||||
|
48
emacs-lisp/windows_and_frames.org
Normal file
48
emacs-lisp/windows_and_frames.org
Normal file
|
@ -0,0 +1,48 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: 940c2ee1-96ef-4c91-abef-c53787ea1c05
|
||||
:END:
|
||||
#+title: Windows and Frames
|
||||
#+filetags: emacs-load
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 80))
|
||||
#+end_src
|
||||
|
||||
Disable window changing using the mouse, it saves me from accidental switches.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun cv/mouse-set-point (fun event &optional promote)
|
||||
(let ((window (posn-window (event-start event))))
|
||||
(when (equal window (selected-window))
|
||||
(funcall fun event promote))))
|
||||
(advice-add 'mouse-set-point :around 'cv/mouse-set-point)
|
||||
|
||||
(defun cv/mouse-drag-region (fun event)
|
||||
(let ((window-end (posn-window (event-end event))))
|
||||
(when (equal window-end (selected-window))
|
||||
(funcall fun event))))
|
||||
(advice-add 'mouse-drag-region :around 'cv/mouse-drag-region)
|
||||
|
||||
(defun cv/mouse-set-region (fun event)
|
||||
(let ((window (posn-window (event-start event))))
|
||||
(when (equal window (selected-window))
|
||||
(funcall fun event))))
|
||||
(advice-add 'mouse-set-region :around 'cv/mouse-set-region)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun maybe-delete-frame-buffer (frame)
|
||||
"When a dedicated FRAME is deleted, also kill its buffer.
|
||||
A dedicated frame contains a single window whose buffer is not
|
||||
displayed anywhere else."
|
||||
(let ((windows (window-list frame)))
|
||||
(when (eq 1 (length windows))
|
||||
(let ((buffer (window-buffer (car windows))))
|
||||
(when (eq 1 (length (get-buffer-window-list buffer nil t)))
|
||||
(when (frame-parameter frame 'unsplittable)
|
||||
(with-current-buffer buffer
|
||||
(when (equal major-mode #'vterm-mode) (kill-process (get-buffer-process buffer)))
|
||||
(kill-buffer buffer))))))))
|
||||
(add-to-list 'delete-frame-functions #'maybe-delete-frame-buffer)
|
||||
#+end_src
|
24
emacs-lisp/yaml.org
Normal file
24
emacs-lisp/yaml.org
Normal file
|
@ -0,0 +1,24 @@
|
|||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :comments link :results none
|
||||
:ID: 09190c4d-da4c-46e5-a57c-7e88c1a85ed8
|
||||
:END:
|
||||
#+title: Yaml
|
||||
#+filetags: emacs-load
|
||||
|
||||
Install ~yaml-mode~.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :noweb yes
|
||||
(use-package yaml-mode
|
||||
:straight t
|
||||
:mode
|
||||
<<mode-hooks>>)
|
||||
#+END_SRC
|
||||
|
||||
Enable ~yaml-mode~ for multiple file extensions.
|
||||
|
||||
#+name: mode-hooks
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(("\\.yml\\'" . yaml-mode)
|
||||
("\\.yaml\\'" . yaml-mode))
|
||||
#+end_src
|
||||
|
2474
flake-secret.lock
Normal file
2474
flake-secret.lock
Normal file
File diff suppressed because it is too large
Load diff
2226
flake.lock
2226
flake.lock
File diff suppressed because it is too large
Load diff
497
flake.nix
497
flake.nix
|
@ -3,92 +3,35 @@
|
|||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs?ref=nixos-22.11";
|
||||
nixpkgs.url = "sourcehut:~magic_rb/nixpkgs";
|
||||
nixpkgs-master.url = "github:NixOS/nixpkgs?ref=master";
|
||||
nixpkgs-hashicorp.url = "sourcehut:~magic_rb/nixpkgs?ref=nixos-unstable";
|
||||
nixpkgs-firefox.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
||||
nixpkgs-discord.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
||||
|
||||
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs?ref=nixos-23.05";
|
||||
nixpkgs-hashicorp.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
||||
nixinate.url = "github:MagicRB/nixinate";
|
||||
nixinate.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager?ref=master";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.inputs.utils.follows = "flake-utils";
|
||||
|
||||
nixng.url = "github:nix-community/NixNG";
|
||||
nixng.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
poetry2nix.url = "github:nix-community/poetry2nix";
|
||||
poetry2nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
poetry2nix.inputs.flake-utils.follows = "flake-utils";
|
||||
|
||||
nix.url = "github:NixOS/nix";
|
||||
nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
deploy-rs.inputs.utils.follows = "flake-utils";
|
||||
deploy-rs.inputs.flake-compat.follows = "flake-compat";
|
||||
|
||||
nomad-driver-containerd-nix.url = "github:MagicRB/nomad-driver-containerd-nix"; # "git+https://gitea.redalder.org/Magic_RB/nomad-driver-containerd-nix";
|
||||
nomad-driver-containerd-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||
nix-gaming.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||
emacs-overlay.inputs.flake-utils.follows = "flake-utils";
|
||||
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
dream2nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
dream2nix.inputs.alejandra.follows = "alejandra";
|
||||
dream2nix.inputs.pre-commit-hooks.follows = "pre-commit-hooks";
|
||||
dream2nix.inputs.flake-utils-pre-commit.follows = "flake-utils";
|
||||
|
||||
alejandra.url = "github:kamadorueda/alejandra";
|
||||
alejandra.inputs.nixpkgs.follows = "nixpkgs";
|
||||
alejandra.inputs.fenix.follows = "fenix";
|
||||
alejandra.inputs.flakeCompat.follows = "flake-compat";
|
||||
|
||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
||||
pre-commit-hooks.inputs.flake-utils.follows = "flake-utils";
|
||||
|
||||
nil.url = "github:oxalica/nil";
|
||||
nil.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nil.inputs.flake-utils.follows = "flake-utils";
|
||||
uterranix.url = "sourcehut:~magic_rb/uterranix";
|
||||
dwarffs.url = "github:edolstra/dwarffs";
|
||||
haskell-nix.url = "github:input-output-hk/haskell.nix";
|
||||
serokell-nix.url = "github:magicrb/serokell.nix";
|
||||
serokell-nix.inputs.haskell-nix.follows = "haskell-nix";
|
||||
website.url = "sourcehut:~magic_rb/website";
|
||||
microvm.url = "github:astro/microvm.nix";
|
||||
notnft.url = "github:chayleaf/notnft";
|
||||
impermenance.url = "github:MagicRB/impermanence";
|
||||
numen-nix.url = "github:anpandey/numen-nix";
|
||||
hydra.url = "github:NixOS/hydra";
|
||||
nix.url = "github:NixOS/nix";
|
||||
|
||||
serokell-nix.url = "github:serokell/serokell.nix?ref=magicrb-allow-wildcards-with-no-main";
|
||||
serokell-nix.inputs.flake-compat.follows = "flake-compat";
|
||||
serokell-nix.inputs.gitignore-nix.follows = "gitignore-nix";
|
||||
disko.url = "github:nix-community/disko";
|
||||
nixos-anywhere.url = "github:numtide/nixos-anywhere";
|
||||
|
||||
webcord.url = "github:SpacingBat3/WebCord";
|
||||
webcord.flake = false;
|
||||
tuxedo-rs.url = "github:AaronErhardt/tuxedo-rs";
|
||||
tuxedo-rs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
fenix.url = "github:nix-community/fenix";
|
||||
fenix.flake = false;
|
||||
|
||||
devshell.url = "github:numtide/devshell";
|
||||
devshell.flake = false;
|
||||
|
||||
gomod2nix.url = "github:tweag/gomod2nix";
|
||||
gomod2nix.flake = false;
|
||||
|
||||
mach-nix.url = "github:DavHau/mach-nix";
|
||||
mach-nix.flake = false;
|
||||
|
||||
crane.url = "github:ipetkov/crane";
|
||||
crane.flake = false;
|
||||
|
||||
flake-compat.url = "github:edolstra/flake-compat";
|
||||
flake-compat.flake = false;
|
||||
tuxedo-nixos.url = "github:blitz/tuxedo-nixos";
|
||||
tuxedo-nixos.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
emacs.url = "sourcehut:~magic_rb/emacs";
|
||||
emacs.flake = false;
|
||||
|
@ -96,118 +39,332 @@
|
|||
vtermModule.url = "github:akermu/emacs-libvterm";
|
||||
vtermModule.flake = false;
|
||||
|
||||
secret.url = "path:///var/empty";
|
||||
secret.url = "path:///home/main/dotfiles/secret";
|
||||
secret.flake = false;
|
||||
|
||||
qmk.url = "https://github.com/qmk/qmk_firmware";
|
||||
qmk.flake = false;
|
||||
qmk.type = "git";
|
||||
qmk.ref = "master";
|
||||
qmk.submodules = true;
|
||||
|
||||
bootloadHID.url = "github:whiteneon/bootloadHID";
|
||||
bootloadHID.flake = false;
|
||||
|
||||
hidapitester.url = "github:todbot/hidapitester";
|
||||
hidapitester.flake = false;
|
||||
|
||||
yusdacra-dotfiles.url = "github:yusdacra/nixos-config";
|
||||
yusdacra-dotfiles.flake = false;
|
||||
|
||||
fufexan-dotfiles.url = "github:fufexan/dotfiles";
|
||||
fufexan-dotfiles.flake = false;
|
||||
|
||||
ical2org.url = "git+https://git.sr.ht/~magic_rb/ical2orgpy";
|
||||
ical2org.flake = false;
|
||||
|
||||
udp-over-tcp.url = "github:mullvad/udp-over-tcp";
|
||||
udp-over-tcp.flake = false;
|
||||
|
||||
gitignore-nix.url = "github:hercules-ci/gitignore.nix";
|
||||
gitignore-nix.flake = false;
|
||||
|
||||
uterranix.url = "path:///home/main/uterranix";
|
||||
uterranix.inputs.flake-parts.follows = "flake-parts";
|
||||
uterranix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs@{
|
||||
self,
|
||||
flake-parts,
|
||||
nixpkgs,
|
||||
nixinate,
|
||||
...
|
||||
}:
|
||||
let
|
||||
systems = ["x86_64-linux" "aarch64-linux"];
|
||||
flake =
|
||||
flake-parts.lib.mkFlake
|
||||
{
|
||||
inherit inputs;
|
||||
specialArgs = {
|
||||
roots.nixos = ./. + "/nixos";
|
||||
roots.flake = ./.;
|
||||
roots.home-manager = ./. + "/home-manager";
|
||||
};
|
||||
}
|
||||
{
|
||||
inherit systems;
|
||||
|
||||
outputs = inputs@{ flake-parts, self, secret, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } ({ config, lib', ... }: {
|
||||
imports = [
|
||||
modules/nixngConfigurations.nix
|
||||
modules/lib_overlays.nix
|
||||
lib/load_secrets.nix
|
||||
|
||||
nixos/systems/omen
|
||||
nixos/systems/heater
|
||||
nixos/systems/toothpick
|
||||
nixos/systems/liveusb
|
||||
nixos/systems/blowhole
|
||||
nixos/systems/altra
|
||||
nixos/systems/gooseberry
|
||||
|
||||
nixng/containers/ingress-blowhole
|
||||
nixng/containers/ingress-toothpick
|
||||
nixng/containers/matrix/mautrix-signal
|
||||
nixng/containers/matrix/mautrix-discord
|
||||
nixng/containers/matrix/mautrix-slack
|
||||
nixng/containers/matrix/mautrix-facebook
|
||||
nixng/containers/matrix/heisenbridge
|
||||
nixng/containers/matrix/synapse
|
||||
nixng/containers/website
|
||||
nixng/containers/home-assistant
|
||||
nixng/containers/email/getmail
|
||||
nixng/containers/email/dovecot.nix
|
||||
nixng/containers/email/postfix
|
||||
nixng/containers/gitea
|
||||
nixng/containers/hydra
|
||||
nixng/containers/syncthing
|
||||
# nixng/containers/minecraft/vanilla
|
||||
# nixng/containers/minecraft/ftb-infinity
|
||||
# nixng/containers/minecraft/ftb-integrations
|
||||
|
||||
overlays/udp-over-tcp.nix
|
||||
overlays/emacsclient-remote
|
||||
overlays/magic-screenshot
|
||||
overlays/emacs-rofi
|
||||
overlays/tree-sitter-grammars.nix
|
||||
overlays/emacs-master-nativecomp
|
||||
overlays/zfs-relmount
|
||||
overlays/mautrix-discord.nix
|
||||
overlays/mautrix-slack.nix
|
||||
overlays/getmail6
|
||||
overlays/maildrop
|
||||
overlays/courier-unicode.nix
|
||||
overlays/ds3os.nix
|
||||
overlays/terraform-provider-vault.nix
|
||||
overlays/terraform-provider-influxdb-v2.nix
|
||||
overlays/bootloadHID.nix
|
||||
overlays/itp
|
||||
overlays/virtiofsd-zfs
|
||||
overlays/show-files-to-be-deleted
|
||||
overlays/rolling_datasets
|
||||
overlays/ledger-compat
|
||||
overlays/ifstate
|
||||
|
||||
inputs.uterranix.flakeModule
|
||||
./modules
|
||||
];
|
||||
|
||||
uterranix.config = ./terranix/default.nix;
|
||||
_module.args.lib' =
|
||||
let
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
inherit (inputs.nixpkgs.lib)
|
||||
extend;
|
||||
in
|
||||
lib.foldl (acc: x: acc.extend x) lib (with config.flake.libOverlays; [
|
||||
loadSecrets
|
||||
]);
|
||||
|
||||
flake.hydraJobs =
|
||||
let
|
||||
inherit (lib')
|
||||
mapAttrs;
|
||||
in
|
||||
{
|
||||
nixng = mapAttrs (_: v: v.config.system.build.toplevel) config.flake.nixngConfigurations;
|
||||
nixos = mapAttrs (_: v: v.config.system.build.toplevel) config.flake.nixosConfigurations;
|
||||
packages = mapAttrs (_: v: v.config.system.build.toplevel) config.flake.nixosConfigurations;
|
||||
};
|
||||
|
||||
uterranix.config = [
|
||||
./terranix/default.nix
|
||||
{
|
||||
_module.args.secret = lib'.loadSecrets secret;
|
||||
_module.args.vars = {
|
||||
flake_rev = self.rev or (lib'.warn "No flake revision available, do not deploy containers!" "");
|
||||
flake_sha = self.narHash or (lib'.warn "No flake nar hash available, do not deploy containers!" "");
|
||||
flake_ref = "master";
|
||||
flake_host = "git+https://git.sr.ht/~magic_rb/dotfiles-2.0";
|
||||
};
|
||||
_module.args.config' = config;
|
||||
}
|
||||
];
|
||||
|
||||
uterranix.terraform = pkgs:
|
||||
let
|
||||
hpkgs = inputs.nixpkgs-hashicorp.legacyPackages.${pkgs.stdenv.system};
|
||||
in
|
||||
hpkgs.terraform.withPlugins (p:
|
||||
[
|
||||
p.consul
|
||||
((p.nomad.override {
|
||||
hash = "sha256-oHY+jM4JQgLlE1wd+/H9H8H2g0e9ZuxI6OMlz3Izfjg=";
|
||||
vendorHash = "sha256-zVU7zhKfWmFLdhsK9oQkSxCW7B7ctzD/B0DvzU+Wnyg=";
|
||||
mkProviderGoModule =
|
||||
(args:
|
||||
hpkgs.buildGoModule (args // {
|
||||
overrideModAttrs = old: {
|
||||
preBuild = ''
|
||||
go get github.com/hashicorp/nomad
|
||||
go get github.com/hashicorp/nomad/api
|
||||
'';
|
||||
postInstall = ''
|
||||
cp go.mod go.sum $out/
|
||||
'';
|
||||
hpkgs = import inputs.nixpkgs {
|
||||
inherit (pkgs.stdenv) system;
|
||||
overlays = with self.overlays; [
|
||||
terraform-provider-vault
|
||||
terraform-provider-influxdb-v2
|
||||
];
|
||||
config.allowUnfreePredicate = lib'.traceVal (pkgs: builtins.elem (lib'.getName pkgs) [
|
||||
"terraform"
|
||||
]);
|
||||
};
|
||||
}));
|
||||
}).overrideAttrs (old: {
|
||||
postConfigure = ''
|
||||
cp vendor/{go.mod,go.sum} .
|
||||
'';
|
||||
}))
|
||||
in
|
||||
hpkgs.terraform.withPlugins (p: [
|
||||
p.consul
|
||||
p.nomad
|
||||
p.local
|
||||
(p.vault.overrideAttrs (old: { patches = [ ./0001-Allow-null-in-authMountTuneSchema.patch ]; }))
|
||||
p.vault
|
||||
p.random
|
||||
p.null
|
||||
(hpkgs.terraform.plugins.mkProvider {
|
||||
owner = "MagicRB";
|
||||
repo = "terraform-provider-influxdb-v2";
|
||||
rev = "4f10e465f9526b47d1ef97a8f2e109aa85a7d647";
|
||||
version = "0.4.6";
|
||||
hash = "sha256-/IQoA1CwYIafHbHKSZq7pZKFxefgd09fm0lnBW3r11Q=";
|
||||
vendorHash = "sha256-g7Njs7psHFFSWk44CiV+blLrzpnB+L9HgMTx3lLMA8Q=";
|
||||
provider-source-address = "registry.terraform.io/MagicRB/influxdb-v2";
|
||||
})
|
||||
]
|
||||
);
|
||||
p.influxdb-v2
|
||||
p.hcloud
|
||||
] );
|
||||
|
||||
flake.nixosModules = {
|
||||
hashicorp = nixos/modules/hashicorp.nix;
|
||||
hashicorp-envoy = nixos/modules/hashicorp-envoy.nix;
|
||||
telegraf = nixos/modules/telegraf.nix;
|
||||
grafana = nixos/modules/grafana.nix;
|
||||
influx-provisioning = nixos/modules/influx-provisioning.nix;
|
||||
microvm-extras = nixos/modules/microvm-extras.nix;
|
||||
microvm-extras-host = nixos/modules/microvm-extras-host.nix;
|
||||
notnft = nixos/modules/notnft.nix;
|
||||
};
|
||||
|
||||
flake.apps = inputs.nixpkgs.lib.genAttrs config.systems (system: {
|
||||
nixos-anywhere.program = (inputs.nixos-anywhere.packages.${system}.nixos-anywhere);
|
||||
nixos-anywhere.type = "app";
|
||||
});
|
||||
|
||||
perSystem = { system, pkgs, ... }:
|
||||
{
|
||||
packages =
|
||||
let
|
||||
inherit (lib')
|
||||
attrValues;
|
||||
pkgs' = pkgs.appendOverlays (attrValues config.flake.overlays ++ [
|
||||
inputs.nixng.overlays.default
|
||||
inputs.nix-matlab.overlay
|
||||
]);
|
||||
in
|
||||
flake // {
|
||||
apps = nixpkgs.lib.genAttrs systems (system:
|
||||
(nixinate.nixinate.${system} self)
|
||||
// flake.apps.${system}
|
||||
);
|
||||
{
|
||||
terraform-provider-influxdb-v2 = pkgs'.terraform-providers.influxdb-v2;
|
||||
terraform-provider-vault = pkgs'.terraform-providers.vault;
|
||||
inherit (pkgs')
|
||||
emacsclient-remote
|
||||
emacs-master-nativecomp
|
||||
emacs-rofi
|
||||
getmail6
|
||||
magic-screenshot
|
||||
maildrop
|
||||
zfs-relmount
|
||||
bootloadHID
|
||||
tree-sitter-grammars
|
||||
udp-over-tcp
|
||||
itp
|
||||
rolling_datasets
|
||||
ifstate;
|
||||
# ds3os;
|
||||
};
|
||||
|
||||
devShells.default =
|
||||
let
|
||||
unpackSrc = package: pkgs.stdenv.mkDerivation {
|
||||
pname = package.pname;
|
||||
version = package.version;
|
||||
|
||||
src = package.src;
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -r . $out
|
||||
'';
|
||||
};
|
||||
prepareDeps = pkgs.writeShellScript "prepare-deps.sh" ''
|
||||
cd "$(git rev-parse --show-toplevel)/home-manager/modules/xmonad"
|
||||
mkdir -p .packages
|
||||
|
||||
_rsync_args=("--no-perms" "--no-owner" "--no-group" "--del" "--exclude=.stack-work" "--chmod=ugo=rwX" "-crvP")
|
||||
rsync "''${_rsync_args[@]}" ${unpackSrc pkgs.haskell.packages.ghc946.xmonad}/. .packages/xmonad >/dev/null 2>&1
|
||||
rsync "''${_rsync_args[@]}" ${unpackSrc pkgs.haskell.packages.ghc946.xmonad-contrib}/. .packages/xmonad-contrib >/dev/null 2>&1
|
||||
rsync "''${_rsync_args[@]}" ${unpackSrc pkgs.haskell.packages.ghc946.xmobar}/. .packages/xmobar >/dev/null 2>&1
|
||||
'';
|
||||
stack-wrapped = pkgs.symlinkJoin {
|
||||
name = "stack"; # will be available as the usual `stack` in terminal
|
||||
paths = [ pkgs.stack ];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/stack \
|
||||
--run "${prepareDeps}"\
|
||||
--add-flags "\
|
||||
--no-nix \
|
||||
--system-ghc \
|
||||
--no-install-ghc \
|
||||
"
|
||||
'';
|
||||
};
|
||||
|
||||
nix-wrapped = pkgs.writeShellScriptBin "nix" ''
|
||||
if ! [ -z $NIX_GET_COMPLETIONS ] ; then
|
||||
exec .nix-unwrapped "$@"
|
||||
fi
|
||||
|
||||
pre_lock_hash="$(sha256sum flake-secret.lock | cut -f1 -d' ')"
|
||||
new_args=()
|
||||
i="0"
|
||||
|
||||
flake=0
|
||||
immutable=0
|
||||
|
||||
for arg in "$@" ; do
|
||||
if [[ "$arg" =~ ^git\+file://.*$ ]] ; then
|
||||
immutable=1
|
||||
fi
|
||||
done
|
||||
|
||||
for arg in "$@" ; do
|
||||
case "$arg" in
|
||||
build|eval|run)
|
||||
new_args[$i]="$arg"
|
||||
new_args[$(($i + 1))]="--reference-lock-file"
|
||||
new_args[$(($i + 2))]="flake-secret.lock"
|
||||
if [[ "$immutable" == 0 ]] ; then
|
||||
new_args[$(($i + 3))]="--output-lock-file"
|
||||
new_args[$(($i + 4))]="flake-secret.lock"
|
||||
i="$(($i + 2))"
|
||||
fi
|
||||
i="$(($i + 3))"
|
||||
;;
|
||||
flake)
|
||||
new_args[$i]="$arg"
|
||||
i="$(($i + 1))"
|
||||
flake=1
|
||||
;;
|
||||
--*|-*)
|
||||
new_args[$i]="$arg"
|
||||
i="$(($i + 1))"
|
||||
;;
|
||||
*)
|
||||
if [[ "$flake" == "1" ]] ; then
|
||||
new_args[$i]="$arg"
|
||||
new_args[$(($i + 1))]="--reference-lock-file"
|
||||
new_args[$(($i + 2))]="flake-secret.lock"
|
||||
new_args[$(($i + 3))]="--output-lock-file"
|
||||
new_args[$(($i + 4))]="flake-secret.lock"
|
||||
flake=0
|
||||
i="$(($i + 5))"
|
||||
else
|
||||
new_args[$i]="$arg"
|
||||
i="$(($i + 1))"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
( exec -a $0 .nix-unwrapped "''${new_args[@]}" )
|
||||
ret_code=$?
|
||||
|
||||
post_lock_hash="$(sha256sum flake-secret.lock | cut -f1 -d' ')"
|
||||
|
||||
if ! [[ "$pre_lock_hash" == "$post_lock_hash" ]] ; then
|
||||
cp flake-secret.lock flake.lock
|
||||
.nix-unwrapped flake lock --override-input secret path:///var/empty
|
||||
fi
|
||||
exit $ret_code
|
||||
'';
|
||||
nix-with-wrapper = pkgs.symlinkJoin {
|
||||
name = "nix";
|
||||
paths = [ pkgs.nixUnstable ];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
mv $out/bin/nix $out/bin/.nix-unwrapped
|
||||
cp ${nix-wrapped}/bin/nix $out/bin/nix
|
||||
'';
|
||||
};
|
||||
nixos-rebuild = pkgs.nixos-rebuild.override { nix = nix-with-wrapper; };
|
||||
in
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
(pkgs.writeShellScriptBin "update-secret" ''
|
||||
nix flake lock --update-input secret
|
||||
'')
|
||||
nil nix-with-wrapper nixos-rebuild
|
||||
nomad consul vault
|
||||
|
||||
haskell.compiler.ghc946
|
||||
stack-wrapped
|
||||
pkg-config
|
||||
haskell.packages.ghc946.haskell-language-server
|
||||
jq
|
||||
alejandra
|
||||
] ++ (lib.foldl (acc: x: acc ++ x) [] (map (x: pkgs.haskell.packages.ghc946.${x}.buildInputs) [ "gi-pangocairo" "X11" "cairo" "glib" ]));
|
||||
};
|
||||
};
|
||||
|
||||
flake.patches = {
|
||||
hashicorp-nomad.revert-change-consul-si-tokens-to-be-local = patches/0001-Revert-Change-consul-SI-tokens-to-be-local.patch;
|
||||
hashicorp-nomad.add-nix-integration = patches/0001-Add-Nix-integration.patch;
|
||||
hostapd.intel_lar-and-noscan = patches/0001-intel_lar-and-noscan.patch;
|
||||
hostapd.hostapd-2_10-lar = patches/999-hostapd-2.10-lar.patch;
|
||||
hostapd.hostapd-2_10-lar-2 = patches/hostapd-2.10-lar.patch;
|
||||
terraform-provider-nomad.allow-null-in-authMountTuneSchema = patches/vault-provider-Allow-null-in-authMountTuneSchema.patch;
|
||||
};
|
||||
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"armv8-linux"
|
||||
"riscv64-linux"
|
||||
];
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.packageCollections."3dPrinting";
|
||||
in {
|
||||
options.magic_rb.packageCollections."3dPrinting" = {
|
||||
enable =
|
||||
mkEnableOption
|
||||
''
|
||||
Enable 3D printing package collection, contains Prusa Slicer,
|
||||
Cura, OpenSCAD, and inkscape."
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
openscad
|
||||
cura
|
||||
inkscape
|
||||
super-slicer
|
||||
freecad
|
||||
];
|
||||
|
||||
home.file.".local/share/OpenSCAD/libraries/BOSL2".source =
|
||||
pkgs.fetchFromGitHub {
|
||||
owner = "revarbat";
|
||||
repo = "BOSL2";
|
||||
rev = "85e6dcd4835d019c8b582c03cf6e41bf83199cd1";
|
||||
sha256 = "sha256-fuOBp8231ODF4mRzilBfb/JePG+8ANdxkiHbA6a4wts=";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.programs.alacritty;
|
||||
in {
|
||||
options.magic_rb.programs.alacritty = {
|
||||
enable = mkEnableOption "Enable the alacritty terminal emulator";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
alacritty
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".config/alacritty/alacritty.yaml".source = ./alacritty.yaml;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -16,10 +16,6 @@
|
|||
## Enable color on grep
|
||||
alias grep='grep --color=auto'
|
||||
|
||||
## Replace ls and cat with exa and bat respectively
|
||||
alias ls='@exa@/bin/exa'
|
||||
alias cat='@bat@/bin/bat'
|
||||
|
||||
if [ -z "${SHLVL_INIT+x}" ]; then
|
||||
export SHLVL_INIT=1 SHLVL=1
|
||||
fi
|
||||
|
@ -88,7 +84,7 @@ alias E='emacsclient -s'
|
|||
## Set prompt
|
||||
|
||||
export EDITOR="emacsclient"
|
||||
export BROWSER="firefox-nightly"
|
||||
export BROWSER="librewolf"
|
||||
|
||||
## Clear scrollback for vterm
|
||||
if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
|
||||
|
@ -104,10 +100,7 @@ if [[ "$INSIDE_EMACS" = 'vterm' ]] \
|
|||
source ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh
|
||||
fi
|
||||
|
||||
if [[ "@direnvEnabled@" == "true" ]] ; then
|
||||
eval "$(direnv hook bash)"
|
||||
fi
|
||||
|
||||
|
||||
alias zlist="zfs list -r -o name,used,avail,refer,compression,compressratio,recordsize,snapdir,sharenfs,mountpoint"
|
||||
|
||||
|
@ -122,7 +115,8 @@ function loadenv()
|
|||
$(passhead Infrastructure/Nomad) \
|
||||
$(passhead Infrastructure/Vault) \
|
||||
$(passhead Infrastructure/Consul) \
|
||||
$(passhead Infrastructure/Influx)
|
||||
$(passhead Infrastructure/Influx) \
|
||||
$(passhead Infrastructure/HCloud)
|
||||
}
|
||||
|
||||
function yaml2nix()
|
||||
|
@ -139,3 +133,19 @@ function yaml2nix()
|
|||
|
||||
nixfmt "${output_file}"
|
||||
}
|
||||
|
||||
function zpool_warning()
|
||||
{
|
||||
if ! ( echo "$@" | grep -v create ) ; then
|
||||
if [[ "$ZFS_I_REMEMBERED_TO_DISABLE_BLOCK_CLONING" == "1" ]] ; then
|
||||
echo "I trust you, carry on! But be careful to disable block cloning..."
|
||||
env zpool "$@"
|
||||
else
|
||||
echo "Disable block cloning or you will have a very bad time!"
|
||||
fi
|
||||
else
|
||||
env zpool "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
alias zpool="zpool_warning"
|
||||
|
|
|
@ -1,53 +1,8 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.programs.bash;
|
||||
in {
|
||||
options.magic_rb.programs.bash = {
|
||||
enable = mkEnableOption "Enable bash, the shell";
|
||||
emacsclient-remote = mkOption {
|
||||
description = "Enable emacsclient-remote and associated aliases";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
programs.direnv.enable = true;
|
||||
programs.direnv.nix-direnv.enable = true;
|
||||
|
||||
enableDirenv = mkEnableOption "Enable direnv";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = mkMerge [
|
||||
(mkIf cfg.emacsclient-remote [
|
||||
pkgs.magic_rb.emacsclient-remote
|
||||
])
|
||||
(mkIf cfg.enableDirenv [
|
||||
pkgs.direnv
|
||||
])
|
||||
];
|
||||
|
||||
programs.direnv.enable = mkIf cfg.enableDirenv true;
|
||||
programs.direnv.nix-direnv.enable = mkIf cfg.enableDirenv true;
|
||||
|
||||
home.file = {
|
||||
".bash_profile".source = ./bash_profile;
|
||||
".bashrc".source = pkgs.writeSubstitutedFile {
|
||||
name = ".bashrc";
|
||||
file = ./bashrc;
|
||||
substitutes = {
|
||||
"exa" = "${pkgs.exa}";
|
||||
"bat" = "${pkgs.bat}";
|
||||
"direnvEnabled" =
|
||||
if cfg.enableDirenv
|
||||
then "true"
|
||||
else "false";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
home.file.".bash_profile".source = ./bash_profile;
|
||||
home.file.".bashrc".source = ./bashrc;
|
||||
}
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.packageCollections.cmdline;
|
||||
|
||||
ffmpegSpecial =
|
||||
pkgs.ffmpeg_5-full.override
|
||||
{
|
||||
svt-av1 =
|
||||
pkgs.svt-av1.overrideAttrs
|
||||
(old: rec
|
||||
{
|
||||
version = "1.1.0";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "AOMediaCodec";
|
||||
repo = "SVT-AV1";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-A8PVrPQcsCx+cY0DKuvQ5g//1Iqk9+1Uvz6cN+Jc2E8=";
|
||||
};
|
||||
});
|
||||
# ffmpeg = pkgs.ffmpeg_5.overrideAttrs
|
||||
# (old: rec
|
||||
# { version = "5.1.0";
|
||||
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "FFmpeg";
|
||||
# repo = "FFmpeg";
|
||||
# rev = "9222965fdd9594ff9e921d4ad25beac4eefa2373";
|
||||
# sha256 = "sha256-MVCRynpG03pTDfSw7vhCxjDErSh84a7V5iM+zqr7P94=";
|
||||
# };
|
||||
# });
|
||||
};
|
||||
in {
|
||||
options.magic_rb.packageCollections.cmdline = {
|
||||
enable =
|
||||
mkEnableOption
|
||||
''
|
||||
A package collection containing command line programs, specifically zip, unzip, unrar (unfree), git, and htop.
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
obs-studio
|
||||
zip
|
||||
unzip
|
||||
unrar
|
||||
git
|
||||
htop
|
||||
# ffmpegSpecial
|
||||
lm_sensors
|
||||
cryptsetup
|
||||
emacs-rofi
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,22 +1,4 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{roots, ...}: {
|
||||
imports = [
|
||||
./alacritty
|
||||
./bash
|
||||
./ssh
|
||||
./emacs
|
||||
./xmonad
|
||||
./3d-printing.nix
|
||||
./cmdline-utils.nix
|
||||
./gpg.nix
|
||||
./graphical-programs.nix
|
||||
./multimc.nix
|
||||
./optimisation.nix
|
||||
./pantalaimon.nix
|
||||
./webdev.nix
|
||||
./wine.nix
|
||||
(roots.flake + "/nixos/secret-lib")
|
||||
];
|
||||
{ ... }:
|
||||
{
|
||||
|
||||
}
|
||||
|
|
20
home-manager/modules/dunst/default.nix
Normal file
20
home-manager/modules/dunst/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".config/dunstrc".source = ./dunstrc;
|
||||
|
||||
systemd.user.services.dunst = {
|
||||
Unit = {
|
||||
Description = "Dunst notification daemon";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "dbus";
|
||||
BusName = "org.freedesktop.Notifications";
|
||||
ExecStart = "${pkgs.dunst}/bin/dunst -config ~/.config/dunstrc";
|
||||
};
|
||||
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
};
|
||||
}
|
|
@ -128,7 +128,7 @@
|
|||
|
||||
### Text ###
|
||||
|
||||
font = Fixed 8
|
||||
font = Fixed 10
|
||||
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
|
@ -45,6 +45,9 @@
|
|||
|
||||
(add-to-list 'load-path "~/.emacs.d/lisp/")
|
||||
(add-to-list 'load-path "~/.emacs.d/lisp/org-task-dump")
|
||||
(add-to-list 'load-path "~/.emacs.d/vterm-module/lib")
|
||||
(add-to-list 'exec-path (concat (expand-file-name "~") "/.emacs.d/profile/bin"))
|
||||
(setenv "PATH" (concat (expand-file-name "~") "/.emacs.d/profile/bin:" (getenv "PATH")))
|
||||
|
||||
(straight-use-package 'use-package)
|
||||
(straight-thaw-versions)
|
||||
|
|
36
home-manager/modules/emacs/.emacs.d/lisp/auxmenu.el
Normal file
36
home-manager/modules/emacs/.emacs.d/lisp/auxmenu.el
Normal file
|
@ -0,0 +1,36 @@
|
|||
;;; package --- Summary:
|
||||
;;; Commentary:
|
||||
;;; Code:
|
||||
|
||||
(defvar auxmenu-frame-alist nil)
|
||||
|
||||
(defun auxmenu-popup-frame (prompt collection display width height &rest args)
|
||||
""
|
||||
(let ((frame (alist-get display auxmenu-frame-alist)))
|
||||
(when (equal frame nil)
|
||||
(when (equal display nil)
|
||||
(error "Must specify display"))
|
||||
|
||||
(push `(,display . ,(make-frame
|
||||
`((minibuffer . only)
|
||||
(name . "emacs-completing-read-float")
|
||||
(unsplittable . t)
|
||||
(no-other-frame . t)
|
||||
(width . ,width)
|
||||
(height . ,height)
|
||||
(display . ,display)
|
||||
(left . 0.5)
|
||||
(top . 0.5))))
|
||||
auxmenu-frame-alist)
|
||||
(setq frame (alist-get display auxmenu-frame-alist)))
|
||||
(make-frame-visible frame)
|
||||
(raise-frame frame)
|
||||
(with-selected-frame frame
|
||||
(unwind-protect
|
||||
(let ((selection (apply #'completing-read prompt collection args)))
|
||||
(make-frame-invisible frame)
|
||||
selection)
|
||||
(make-frame-invisible frame)))))
|
||||
|
||||
(provide 'auxmenu)
|
||||
;;; auxmenu.el ends here
|
|
@ -52,58 +52,6 @@ Fetch the ~SSH_AUTH_PATH~ from ~.profile~.
|
|||
#+END_SRC
|
||||
|
||||
* Language
|
||||
** Nix Expression Language
|
||||
|
||||
Enable ~nix-mode~.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package lsp-nix
|
||||
:no-require t
|
||||
:after (lsp-mode)
|
||||
:custom
|
||||
(lsp-nix-nil-formatter ["nixpkgs-fmt"]))
|
||||
|
||||
(use-package nix-mode
|
||||
:hook (nix-mode . lsp-deferred)
|
||||
:ensure t)
|
||||
#+end_src
|
||||
|
||||
** HashiCorp
|
||||
*** HashiCorp Configuration Language
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package hcl-mode
|
||||
:straight t)
|
||||
#+END_SRC
|
||||
|
||||
*** Terraform Configuration Language
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package terraform-mode
|
||||
:straight t)
|
||||
#+END_SRC
|
||||
|
||||
** YAML Configuration Language
|
||||
|
||||
Enable ~yaml-mode~.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package yaml-mode
|
||||
:straight t
|
||||
:mode ("\\.yml\\'" . yaml-mode)
|
||||
:mode ("\\.yaml\\'" . yaml-mode))
|
||||
#+END_SRC
|
||||
|
||||
** Dockerfile Configuration Language
|
||||
|
||||
Enable ~dockerfile-mode~
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package dockerfile-mode
|
||||
:straight t
|
||||
:mode ("Dockerfile\\'" . dockerfile-mode))
|
||||
#+END_SRC
|
||||
|
||||
** SCAD Programming Language
|
||||
|
||||
Enable ~scad-mode~
|
||||
|
@ -267,35 +215,6 @@ and work with it.
|
|||
:hook (lsp-after-open-hook lsp-origami-try-enable))
|
||||
#+END_SRC
|
||||
|
||||
* hledger
|
||||
|
||||
For hledger, it's possible to use =ledger-mode= instead of =hledger-mode=. We'll see how it goes. It does require some convincing though.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package ledger-mode
|
||||
:straight t
|
||||
:config
|
||||
(setq ledger-binary-path "hledger")
|
||||
(setq ledger-mode-should-check-version nil)
|
||||
(add-to-list 'auto-mode-alist '("\\.\\(h?ledger\\|journal\\|j\\)$" . ledger-mode))
|
||||
(setq ledger-report-balance
|
||||
(list "bal" (concat ledger-binary-path " --strict -f %(ledger-file) bal")))
|
||||
|
||||
(setq ledger-report-reg
|
||||
(list "reg" (concat ledger-binary-path " --strict -f %(ledger-file) reg")))
|
||||
|
||||
(setq ledger-report-payee
|
||||
(list "payee" (concat ledger-binary-path " --strict -f %(ledger-file) reg @%(payee)")))
|
||||
|
||||
(setq ledger-report-account
|
||||
(list "account" (concat ledger-binary-path " --strict -f %(ledger-file) reg %(account)")))
|
||||
|
||||
(setq ledger-reports
|
||||
(list ledger-report-balance
|
||||
ledger-report-reg
|
||||
ledger-report-payee
|
||||
ledger-report-account)))
|
||||
#+END_SRC
|
||||
|
||||
* Projectile
|
||||
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
* EmacsWebkit
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
(straight-use-package
|
||||
'(webkit :type git :host github :repo "akirakyle/emacs-webkit" :branch "main"
|
||||
:files (:defaults "*.js" "*.css" "*.h" "*.c" "Makefile")
|
||||
:build (("nix-shell" "-p" "gtk3" "gcc" "glib" "pkg-config" "webkit" "--command" "'make debug'"))))
|
||||
|
||||
(use-package webkit
|
||||
:straight t
|
||||
:bind ("s-b" . 'webkit) ;; Bind to whatever global key binding you want if you want
|
||||
:init
|
||||
(setq webkit-search-prefix "https://duckduckgo.com/search?q=")
|
||||
; (setq webkit-ace-chars "aoeuidhtns") ;; More convienent if you use dvorak
|
||||
;; (setq webkit-history-filename "~/path/to/webkit-history") ;; If you want history saved in a different place
|
||||
;; (setq webkit-history-filename nil) ;; If you don't want history saved to file (will stay in memory)
|
||||
;; (setq webkit-own-window t) ;; See above explination; must be set before webkit.el is loaded
|
||||
;; (setq browse-url-browser-function 'webkit-browse-url) ; Set as the default browse-url browser
|
||||
;; (setq webkit-browse-url-force-new t) ; Always open a new session instead of reusing a current one
|
||||
:config
|
||||
(setq webkit-own-window nil)
|
||||
;; (add-hook 'webkit-new-hook #'webkit-enable-javascript)
|
||||
)
|
||||
#+END_SRC
|
||||
** Evil integration
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package evil-collection-webkit
|
||||
:straight t
|
||||
:disabled t
|
||||
:config
|
||||
(evil-collection-xwidget-setup))
|
||||
#+END_SRC
|
|
@ -1,77 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
* EXVM
|
||||
** Moving workspace
|
||||
Theoretically it's possible to move workspace N to monitor M, by binding \s-C-[0-9], like many people do in i3. All that needs to be done is that a suitable plist needs to be build:
|
||||
|
||||
#+NAME: workspace-plist
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
(setq exwm-randr-workspace-output-plist `(1 "HDMI-0" 2 "HDMI-1" 3 "HDMI-1"))
|
||||
#+END_SRC
|
||||
|
||||
And then this function must be called for EXWM to pick up any changes made
|
||||
|
||||
#+NAME:
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
(exwm-randr-refresh)
|
||||
#+END_SRC
|
||||
|
||||
** Autostart
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
(call-interactively '(lambda (command)
|
||||
(interactive (list (read-shell-command "$ ")))
|
||||
(message "%s" command)
|
||||
(apply 'start-process (nth 0 command) nil (nth 0 command) '(nthcdr 1 command))))
|
||||
#+END_SRC
|
||||
|
||||
#+NAME: exwm
|
||||
#+BEGIN_SRC emacs-lisp :noweb yes
|
||||
(if (string= (getenv "EXWM") "1")
|
||||
(use-package exwm
|
||||
:straight t
|
||||
:after hydra
|
||||
:init
|
||||
(require 'exwm-config)
|
||||
(exwm-config-default)
|
||||
(require 'exwm-randr)
|
||||
(setq exwm-randr-workspace-output-plist '(0 "HDMI-0" 1 "HDMI-0" 2 "HDMI-1"))
|
||||
(add-hook 'exwm-randr-screen-change-hook
|
||||
(lambda ()
|
||||
(start-process-shell-command
|
||||
"xrandr" nil "xrandr --output HDMI-1 --right-of HDMI-0 --auto")))
|
||||
|
||||
(setq exwm-input-global-keys
|
||||
`(([?\s-r] . exwm-reset)
|
||||
([?\s-w] . exwm-workspace-switch)
|
||||
,@(mapcar (lambda (i)
|
||||
`(,(kbd (format "s-%d" i)) .
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(exwm-workspace-switch-create ,i))))
|
||||
(number-sequence 0 9))
|
||||
([?\s-\)] . (lambda () (nteractive) (exwm-workspace-move-window 0)))
|
||||
([?\s-!] . (lambda () (interactive) (exwm-workspace-move-window 1)))
|
||||
([?\s-@] . (lambda () (interactive) (exwm-workspace-move-window 2)))
|
||||
([?\s-#] . (lambda () (interactive) (exwm-workspace-move-window 3)))
|
||||
([?\s-$] . (lambda () (interactive) (exwm-workspace-move-window 4)))
|
||||
([?\s-%] . (lambda () (interactive) (exwm-workspace-move-window 5)))
|
||||
([?\s-^] . (lambda () (interactive) (exwm-workspace-move-window 6)))
|
||||
([?\s-&] . (lambda () (interactive) (exwm-workspace-move-window 7)))
|
||||
([?\s-8] . (lambda () (interactive) (exwm-workspace-move-window 8)))
|
||||
([?\s-*] . (lambda () (interactive) (exwm-workspace-move-window 9)))
|
||||
([<print>] . (call-process-shell-command "screenshot select &" nil 0))
|
||||
([?\s-d] . (lambda (command)
|
||||
(interactive (list (read-shell-command "$ ")))
|
||||
(message "%s" command)
|
||||
(start-process-shell-command command nil command)))))
|
||||
;; Make focus follow mouse
|
||||
;;(setq mouse-autoselect-window t
|
||||
;; focus-follows-mouse t)
|
||||
|
||||
(setq exwm-workspace-number 3)
|
||||
|
||||
(exwm-randr-enable)
|
||||
))
|
||||
#+END_SRC
|
|
@ -1,26 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
* Treemacs
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
#+end_src
|
||||
|
||||
#+NAME: treemacs
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
(use-package treemacs
|
||||
:straight t
|
||||
:config
|
||||
(setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
|
||||
(doom-themes-treemacs-config)
|
||||
(treemacs-load-theme 'doom-colors))
|
||||
(use-package treemacs-evil
|
||||
:after (treemacs evil)
|
||||
:straight t)
|
||||
(use-package lsp-treemacs
|
||||
:straight t
|
||||
:after (lsp-mode treemacs)
|
||||
:config
|
||||
(lsp-treemacs-sync-mode 1))
|
||||
#+END_SRC
|
|
@ -1,6 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# key: /box
|
||||
# --
|
||||
${1:$(format "┌-%s-┐" (make-string (length yas-text) ?-))}
|
||||
| $1 |
|
||||
${1:$(format "└-%s-┘" (make-string (length yas-text) ?-))}
|
|
@ -1,4 +0,0 @@
|
|||
# -*- mode: snipper -*-
|
||||
# key: cb
|
||||
# --
|
||||
^3 $0
|
|
@ -1,6 +0,0 @@
|
|||
# -*- mode: snipper -*-
|
||||
# key: dm
|
||||
# --
|
||||
\[
|
||||
$1
|
||||
.\] $0
|
|
@ -1,4 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# key: mk
|
||||
# --
|
||||
$$1$${2:$(unless (string-match-p "\\\\`[,\\\\.? \\\\-].*" yas-text) " ")}$2 $0
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# key: cbr
|
||||
# --
|
||||
#+BEGIN_SRC R :file r-img/$1.png :result file graphics
|
||||
$2
|
||||
#+END_SRC
|
||||
$0
|
|
@ -1,4 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# key: sr
|
||||
# --
|
||||
^2 $0
|
|
@ -1,72 +1,6 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{ pkgs, config, lib, secret, inputs', ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
secret,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.programs.emacs;
|
||||
in {
|
||||
options.magic_rb.programs.emacs = {
|
||||
enable = mkEnableOption "Enable emacs with my config";
|
||||
enableMu4e = mkEnableOption "Enable mu4e in emacs. WARNING: requires secrets";
|
||||
package = mkOption {
|
||||
description = "Which emacs package to use.";
|
||||
type = types.package;
|
||||
default = let
|
||||
# gensymb is not here, dont add
|
||||
tex = with pkgs;
|
||||
texlive.combine
|
||||
{
|
||||
inherit
|
||||
(texlive)
|
||||
scheme-full
|
||||
;
|
||||
};
|
||||
r = with pkgs;
|
||||
rWrapper.override
|
||||
{packages = with rPackages; [ggplot2];};
|
||||
in
|
||||
(pkgs.emacs-magicrb.override
|
||||
{
|
||||
pkgs.emacs = pkgs.emacs.overrideAttrs
|
||||
(old:
|
||||
{
|
||||
# patches = [ ./native-comp-driver-options.patch ];
|
||||
});
|
||||
march = config.magic_rb.optimisation.march;
|
||||
hunspell.enable = true;
|
||||
hunspell.dictionaries = with pkgs.hunspellDicts; [en_US];
|
||||
environment = {
|
||||
MU4E_CONTEXTS = mkIf cfg.enableMu4e secret.emacs.mu4eContexts;
|
||||
};
|
||||
additionalPackages =
|
||||
[
|
||||
tex
|
||||
r
|
||||
]
|
||||
++ (with pkgs; [
|
||||
krita
|
||||
ripgrep
|
||||
mu
|
||||
isync
|
||||
exa
|
||||
fd
|
||||
nil
|
||||
graphviz
|
||||
]);
|
||||
})
|
||||
.bundle;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
cfg.package
|
||||
(makeDesktopItem {
|
||||
name = "Org-Protocol";
|
||||
exec = "emacsclient %u";
|
||||
|
@ -75,53 +9,31 @@ in {
|
|||
type = "Application";
|
||||
mimeTypes = ["x-scheme-handler/org-protocol"];
|
||||
})
|
||||
|
||||
fira-code
|
||||
emacs-master-nativecomp
|
||||
(iosevka-bin.override {variant = "aile";})
|
||||
(iosevka-bin.override {variant = "etoile";})
|
||||
(iosevka-bin.override {variant = "";})
|
||||
emacs-all-the-icons-fonts
|
||||
(nerdfonts.override { fonts = ["NerdFontsSymbolsOnly"]; })
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.activation.emacsStraightVerions =
|
||||
config.lib.dag.entryAfter
|
||||
["writeBoundary"] ''
|
||||
mkdir -p ~/.emacs.d/straight/versions
|
||||
ln -sfn ~/dotfiles/home-manager/modules/emacs/straight-versions.el ~/.emacs.d/straight/versions/default.el
|
||||
'';
|
||||
|
||||
systemd.user.services.emacs = {
|
||||
Unit = {
|
||||
After = "graphical-session.target";
|
||||
PartOf = "graphical-session.target";
|
||||
X-RestartIfChanged = false;
|
||||
Description = "Emacs, the extensible editor";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "notify";
|
||||
ExecStart = ''${pkgs.runtimeShell} -l -c "${lib.getExe cfg.package} --fg-daemon"'';
|
||||
|
||||
# Emacs will exit with status 15 after having received SIGTERM, which
|
||||
# is the default "KillSignal" value systemd uses to stop services.
|
||||
SuccessExitStatus = 15;
|
||||
|
||||
Restart = "on-failure";
|
||||
Type = "simple";
|
||||
ExecStart = ''/bin/sh -l -c "emacs --fg-daemon"'';
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [
|
||||
"graphical-session.target"
|
||||
];
|
||||
};
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".emacs".source = ./.emacs;
|
||||
".mbsyncrc" = mkIf cfg.enableMu4e {
|
||||
source = secret.emacs.mbsyncrc;
|
||||
};
|
||||
".mbsyncrc".source = secret.emacs.mbsyncrc or ./.;
|
||||
".emacs.d/org" = {
|
||||
source = ./.emacs.d/org;
|
||||
recursive = true;
|
||||
|
@ -130,26 +42,45 @@ in {
|
|||
source = ./.emacs.d/lisp;
|
||||
recursive = true;
|
||||
};
|
||||
".emacs.d/mu4e-contexts" = mkIf cfg.enableMu4e {
|
||||
source = secret.emacs.mu4eContexts;
|
||||
};
|
||||
".emacs.d/tree-sitter" = {
|
||||
source =
|
||||
pkgs.linkFarm "grammars"
|
||||
(map
|
||||
(drv:
|
||||
let
|
||||
name = lib.strings.getName drv;
|
||||
in
|
||||
{
|
||||
name = "lib" +
|
||||
(lib.strings.removeSuffix "-grammar" name)
|
||||
+ ".so";
|
||||
path = "${drv}/parser";
|
||||
}
|
||||
)
|
||||
(builtins.attrValues pkgs.tree-sitter.builtGrammars));
|
||||
".emacs.d/mu4e-contexts".source = secret.emacs.mu4eContexts or ./.;
|
||||
".emacs.d/tree-sitter".source = pkgs.tree-sitter-grammars;
|
||||
".emacs.d/vterm-module".source = pkgs.stdenv.mkDerivation {
|
||||
name = "vterm-emacs";
|
||||
src = inputs'.vtermModule;
|
||||
buildInputs = with pkgs; [cmake libtool glib.dev libvterm-neovim];
|
||||
cmakeFlags = [
|
||||
"-DEMACS_SOURCE=${inputs'.emacs}"
|
||||
"-DUSE_SYSTEM_LIBVTERM=ON"
|
||||
];
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
install ../vterm-module.so $out/lib
|
||||
'';
|
||||
};
|
||||
".emacs.d/profile".source = pkgs.buildEnv {
|
||||
name = "emacs-env";
|
||||
paths = with pkgs; [
|
||||
cmake
|
||||
ninja
|
||||
gnumake
|
||||
gcc
|
||||
mu
|
||||
mu.mu4e
|
||||
ripgrep
|
||||
fd
|
||||
isync
|
||||
imagemagick
|
||||
texlive.combined.scheme-full
|
||||
(hunspellWithDicts (with hunspellDicts; [
|
||||
sk-sk
|
||||
en-us
|
||||
]))
|
||||
ledger-compat
|
||||
python311Packages.pygments
|
||||
hledger
|
||||
(rWrapper.override{ packages = with rPackages; [ ggplot2 ascii car ]; })
|
||||
xclip
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,104 +1,123 @@
|
|||
(("ace-window" . "77115afc1b0b9f633084cf7479c767988106c196")
|
||||
("alert" . "c762380ff71c429faf47552a83605b2578656380")
|
||||
("all-the-icons.el" . "f75c1130b72c718bfaf18b56c445c4b58efc714f")
|
||||
("all-the-icons.el" . "be9d5dcda9c892e8ca1535e288620eec075eb0be")
|
||||
("apheleia" . "efb9992c00e63b72f0474b19440be4666e95ebd1")
|
||||
("avy" . "be612110cb116a38b8603df367942e2bb3d9bdbe")
|
||||
("cape" . "db3059af52718c7f55485ef183bdad3e40f58df9")
|
||||
("bui.el" . "f3a137628e112a91910fd33c0cff0948fa58d470")
|
||||
("cape" . "1558f8b1dea46fcd9c8c04739656ed0b8027c38a")
|
||||
("cfrs" . "f3a21f237b2a54e6b9f8a420a9da42b4f0a63121")
|
||||
("clang-format" . "e48ff8ae18dc7ab6118c1f6752deb48cb1fc83ac")
|
||||
("compat" . "b3b18044f9ca99a53ade91794226d71968b3e14f")
|
||||
("consult" . "aadb912e126a143c60e6ece92b163a7356bd4730")
|
||||
("corfu" . "2e066448df9cc8b16e75f3bc22e6fb5a8d1c065d")
|
||||
("dash.el" . "96eaba028ac069ea0e5cc70de15b0229126a054a")
|
||||
("dirvish" . "4b63cd2e5ba994f8e674388db7035de1a8f0343f")
|
||||
("clang-format" . "bce0bb4ca17ecb6e6927074920945cef2a78f5b6")
|
||||
("compat" . "605f224633eb28efbe62252605515ce3d557e19f")
|
||||
("consult" . "823eb17c4e3e039a7c4dc88138b547516829b98b")
|
||||
("corfu" . "f658ae627508ba8104b640b4242a2a99716c58ea")
|
||||
("dap-mode" . "755845ae053bbfdd3f7b3dca13efa4be480370b5")
|
||||
("dash.el" . "6db80c711ce947f6c6fa11e5c2257fff2c79d139")
|
||||
("dirvish" . "119f9f59a618bb7b476c93e9ab1d7542c5c1df41")
|
||||
("dockerfile-mode" . "52c6c00da1d31c0b6c29c74335b3af63ed6bf06c")
|
||||
("doom-modeline" . "3612082bc5cba712c07860ce37865f938beb9002")
|
||||
("el-get" . "22c83206bab10100fdee03cb2d5b97c8c24eff0e")
|
||||
("doom-modeline" . "e521d32c2d670dc664424857e3fc18a37f0728f6")
|
||||
("ef-themes" . "e86f26f0a0f589735729ed0ecf1d4fa2ecc9f5a9")
|
||||
("el-get" . "a5ba5852648a90ee0cde9fb5d72e69497d260eec")
|
||||
("el-secretario" . "93f9b1bd2e381354a6ae799fed3e4a8313f24e11")
|
||||
("eldoc" . "a56ae5b1fe1d51c454ce439304c64082284c078e")
|
||||
("elisp" . "3497ffd763cadcc1f507aae88c3c7a84007ccfbd")
|
||||
("emacs-elixir" . "7641373f0563cab67cc5459c34534a8176b5e676")
|
||||
("emacs-hcl-mode" . "751b79247f326ab52e00032e805775c37ad9f080")
|
||||
("emacs-async" . "af62573547904045a155c481ed61c093381722dd")
|
||||
("emacs-elixir" . "00d6580a040a750e019218f9392cf9a4c2dac23a")
|
||||
("emacs-kv" . "721148475bce38a70e0b678ba8aa923652e8900e")
|
||||
("emacs-libvterm" . "94e2b0b2b4a750e7907dacd5b4c0584900846dd1")
|
||||
("emacs-which-key" . "bd34ede7bf77ad3988330b37207f3978e7342c79")
|
||||
("emacsmirror-mirror" . "606c3dcfc57ee47a9969b4d9f3d87408f14ebffb")
|
||||
("emacsql" . "64012261f65fcdd7ea137d1973ef051af1dced42")
|
||||
("embark" . "10ac6b7260c82e3a59a33ea93e7027692b228e5f")
|
||||
("ement.el" . "5be1e0700288fea0762b4fc9311e0b05d6c78cc0")
|
||||
("envrc" . "15af96080772af415a56b680acdd7d2010a68ffa")
|
||||
("emacs-scad-mode" . "e1af74735ad6113448c99b3ab128a665e6adaaca")
|
||||
("emacs-scala-mode" . "5d7cf21c37e345c49f921fe5111a49fd54efd1e0")
|
||||
("emacs-which-key" . "4d20bc852545a2e602f59084a630f888542052b1")
|
||||
("emacsmirror-mirror" . "49cd2c405b5c40a0bc0db64acd384010fdaa6b0b")
|
||||
("emacsql" . "59de83a1276a5fbcf8a682b64bbdcf5e00c6ce8b")
|
||||
("embark" . "b9f2b3b9a5b9c72cf1416097b9941c4f275dae94")
|
||||
("ement.el" . "e509dc958ca90e239b060d8ca31ed240beb0871d")
|
||||
("envrc" . "1385e72a730924664697a0961d43516a47a977d7")
|
||||
("epl" . "78ab7a85c08222cd15582a298a364774e3282ce6")
|
||||
("f.el" . "af7d37c619010b576fd22b50c62c71ff33093f3c")
|
||||
("flycheck" . "5f2ef177cb21ae8b73714575802beef04abd0f5e")
|
||||
("esxml" . "225693096a587492d76bf696d1f0c25c61f7d531")
|
||||
("f.el" . "17eefb9973922235f9a3bea5a8aac722efe75ec9")
|
||||
("flycheck" . "e56e30d8c66ffc9776d07740658d3b542c1a8e21")
|
||||
("flycheck-posframe" . "19896b922c76a0f460bf3fe8d8ebc2f9ac9028d8")
|
||||
("general.el" . "7ce8db297e3de258ec43802269438ac7f1918707")
|
||||
("general.el" . "833dea2c4a60e06fcd552b653dfc8960935c9fb4")
|
||||
("gntp.el" . "767571135e2c0985944017dc59b0be79af222ef5")
|
||||
("gnu-elpa-mirror" . "eda4c968f0400750e17a013bb80832088dab12d1")
|
||||
("go-mode.el" . "166dfb1e090233c4609a50c2ec9f57f113c1da72")
|
||||
("haskell-mode" . "20d4e2300302a9af673e82d0185d3f489bfb0f59")
|
||||
("gnu-elpa-mirror" . "801d4646475ceeb1212b4f9adc8f02c63c224662")
|
||||
("go-mode.el" . "8dce1e3ba1cdc34a856ad53c8421413cfe33660e")
|
||||
("haskell-mode" . "79eaf444a72109f93f552abb53f834cc63bbf9f2")
|
||||
("hcl-mode" . "751b79247f326ab52e00032e805775c37ad9f080")
|
||||
("hercules" . "557da39878d0637395fdded91243b340c37eff7b")
|
||||
("ht.el" . "3c1677f1bf2ded2ab07edffb7d17def5d2b5b6f6")
|
||||
("ht.el" . "1c49aad1c820c86f7ee35bf9fff8429502f60fef")
|
||||
("hydra" . "317e1de33086637579a7aeb60f77ed0405bf359b")
|
||||
("inheritenv" . "2102ed2d105a5c9f366cb6503d04794600985598")
|
||||
("js2-mode" . "7d928272bc311b1dd6f38d3f6365c18153e28636")
|
||||
("ledger-mode" . "7bed9b468bf7d2cd4dafa30b067bb576263f8e0c")
|
||||
("let-alist" . "021fc10df2e44faba4728d849ee767cf890aa51a")
|
||||
("indent-bars" . "9cf88e14030cd6c95a7192269cf2a224e6f19763")
|
||||
("inheritenv" . "bac62ca6324828623cf8ce5a3d6aee0fcb65d620")
|
||||
("js2-mode" . "79bc78d77db0d2e8e43dc0f9e0504ad90bcbc26d")
|
||||
("ledger-mode" . "2164789d6a1ea7c3b42684dd01b99cc30e9079fb")
|
||||
("let-alist" . "0c968ff216a2c91080d79272e85132fef6f14988")
|
||||
("log4e" . "737d275eac28dbdfb0b26d28e99da148bfce9d16")
|
||||
("lsp-haskell" . "3249cde75fb411f95fe173c222b848182fd0b752")
|
||||
("lsp-mode" . "cf30718ed5128753565452f476385dac1f7821d6")
|
||||
("lsp-origami" . "7df9c91a309aa4229bec41f109920b37c4197618")
|
||||
("lsp-pyright" . "54a2acddfdd7c3d31cb804a042305a3c6e60cf81")
|
||||
("lsp-python-ms" . "f8e7c4bcaefbc3fd96e1ca53d17589be0403b828")
|
||||
("lsp-ui" . "295d8984da06a745b0a36c56e28ce915bc389adb")
|
||||
("magit" . "6067f92c0195616707b25e23c2d4c0dd81928fd8")
|
||||
("map" . "a0e501aede34f183a8baa5d3d41610a3ffa1728e")
|
||||
("marginalia" . "3ddd2b7fa09e1e84112749ffbdcb6bd8900bfc26")
|
||||
("markdown-mode" . "5d98592fe516748034d8baf92d7c0ba045e1f87a")
|
||||
("melpa" . "86ca8d06599c8d7d9067ce92ae5dde3b122f6796")
|
||||
("meow" . "07ccf112fc1a56ddd96cfc39967957be7dc8dd5f")
|
||||
("mu4e-alert" . "3c9af8c7994df0a1a4f0703552ea3beffb485ace")
|
||||
("nongnu-elpa" . "0120f3dfe80cffe0c3016080d9205d12be3b741d")
|
||||
("openscad" . "31670fc8bbde97f47f050f1837de093ecee89e1e")
|
||||
("orderless" . "e6784026717a8a6a7dcd0bf31fd3414f148c542e")
|
||||
("org" . "080710797ad25e76c4556d2b03cc0aa5313cd187")
|
||||
("org-ql" . "2c098540cab6a0ee7d82abe2327d524a171edd1e")
|
||||
("lsp-docker" . "60e1103ac7c8e30d036ea65fad489210682d6259")
|
||||
("lsp-haskell" . "89d16370434e9a247e95b8b701f524f5abfc884b")
|
||||
("lsp-metals" . "da7e54ed65f4e153c94b9c54689908dce142ef37")
|
||||
("lsp-mode" . "01bd566c0508993202b08071ed7037c9fc4e3329")
|
||||
("lsp-origami" . "86aa06517910141c3d5054eea5f7723461fce6a6")
|
||||
("lsp-pyright" . "2f2631ae242d5770dbe6cb924e44c1ee5671789d")
|
||||
("lsp-python-ms" . "7bda327bec7b219d140c34dab4b1e1fbd41bc516")
|
||||
("lsp-treemacs" . "e66ae2196503d4e84334519e56b4388feffa5060")
|
||||
("lsp-ui" . "0dd39900c8ed8145d207985cb2f65cedd1ffb410")
|
||||
("magit" . "eac5c51fe002d8d1415b8ad97cb5b543c2051b15")
|
||||
("map" . "941b1e5fa39acce026b287565cb1a95c57d611ed")
|
||||
("marginalia" . "27ccfd2213bb9432883427cf058c63af10196aa6")
|
||||
("markdown-mode" . "141f9a05d121f60fe5e411c0ad114e3d3216c9ad")
|
||||
("melpa" . "cbf0664a035ab6419cd78634ca583339c3bd1599")
|
||||
("meow" . "f885c02e1c72da722dfc681af30476096528dc5a")
|
||||
("mu4e-alert" . "6beda20fc69771f2778f507c4a9e069dbaf1b628")
|
||||
("nerd-icons.el" . "b29ef760e92f36f47720f6c58435854129ee7163")
|
||||
("nongnu-elpa" . "b299b0d074a4762e99474ba443d37263f87ace1d")
|
||||
("nov.el" . "cc31ce0356226c3a2128119b08de6107e38fdd17")
|
||||
("orderless" . "b24748093b00b37c3a572c4909f61c08fa27504f")
|
||||
("org-download" . "19e166f0a8c539b4144cfbc614309d47a9b2a9b7")
|
||||
("org-ql" . "4f62ba3bd6d639b021ee9f159357b2a80d7a2f92")
|
||||
("org" . "8ef6205a560cd3a92f8c5f8fe34953b80121c2cb")
|
||||
("org-roam" . "5c06471c3a11348342719fd9011486455adeb701")
|
||||
("org-super-agenda" . "f4f528985397c833c870967884b013cf91a1da4a")
|
||||
("org-super-agenda" . "ee3379ae92b90c084717fb2a7614060ce12283cb")
|
||||
("origami.el" . "e558710a975e8511b9386edc81cd6bdd0a5bda74")
|
||||
("ov" . "c5b9aa4e1b00d702eb2caedd61c69a22a5fa1fab")
|
||||
("password-store" . "28cec11f1dbe6c4273d30370af45b69c9f408386")
|
||||
("pdf-tools" . "7ff6293a25baaae65651b3e1c54b61208279a7ef")
|
||||
("peg" . "5d4ed356ca89acdf52a3e7e7f8e2408b808552c4")
|
||||
("persist" . "c10835478d9f916534a07fad0174d497adf85729")
|
||||
("ov" . "e2971ad986b6ac441e9849031d34c56c980cf40b")
|
||||
("password-store" . "b5e965a838bb68c1227caa2cdd874ba496f10149")
|
||||
("pdf-tools" . "c69e7656a4678fe25afbd29f3503dd19ee7f9896")
|
||||
("peg" . "ee4a6a766c5f19bb196e7b2487ffff3ca892eea3")
|
||||
("persist" . "92964dd24a13d2482a6ef7389da28b4ad7b4c6e3")
|
||||
("pfuture" . "19b53aebbc0f2da31de6326c495038901bffb73c")
|
||||
("pkg-info" . "76ba7415480687d05a4353b27fea2ae02b8d9d61")
|
||||
("plz" . "205e8284340ff10bc7a8468f8af0c50eb0e97c60")
|
||||
("popper" . "e3991202234e4dc10dbfae8e13b27c590dd52fb5")
|
||||
("posframe" . "3b97dc180b03498103cfcc7f44e64150df440bf0")
|
||||
("project" . "33511939473551b5cfa42de9a12d606b3d60a2cf")
|
||||
("projectile" . "271007c6611fcb08ddd326d7de9727c2ad5ef265")
|
||||
("racket-mode" . "c2fe266c18bb6e55a13c7ba795b0a5f7372b6c13")
|
||||
("plz" . "545ed3c5179dc2432ba25ea06a402a083c0f871b")
|
||||
("popper" . "570b0820f884a9c0e3d9cb07e7f7f523b39b836f")
|
||||
("posframe" . "017deece88360c7297265680d78a0bb316470716")
|
||||
("project" . "c5ce3c402e11f2966c53f5f23ff05bccb79d402a")
|
||||
("projectile" . "e0fc464d1e41c8d7267636ea2b7330491087c19d")
|
||||
("racket-mode" . "6c141166ef6b3aba48f975530d6e7a7500f771e2")
|
||||
("rjsx-mode" . "b697fe4d92cc84fa99a7bcb476f815935ea0d919")
|
||||
("rust-mode" . "e443ccf2884028d3b6cc550ff20e7c92dadccb68")
|
||||
("rust-mode" . "9c26dc1195ec05309ee15c014631fb9abd6cf5d2")
|
||||
("rustic" . "39423d1cf4fa054c36bf9577356451f4c06ee148")
|
||||
("s.el" . "dda84d38fffdaf0c9b12837b504b402af910d01d")
|
||||
("seq" . "4355cde01767911660f761cf874edb412d06bd7a")
|
||||
("shackle" . "f1467db75a8fa5d51c676181fb308ccbf7b05e6f")
|
||||
("shrink-path.el" . "c14882c8599aec79a6e8ef2d06454254bb3e1e41")
|
||||
("spinner" . "634529bb3173e09b37499f636de70abf29d9fa8a")
|
||||
("straight.el" . "039e5c9a9b5c00749602afb41341e9e77ba09429")
|
||||
("svg-lib" . "31085bbf247f0467e2f6af948085610248fce6c5")
|
||||
("tablist" . "faab7a035ef2258cc4ea2182f67e3aedab7e2af9")
|
||||
("taxy" . "b222226f9e1057490150c1a8a98e8b471df88302")
|
||||
("taxy-magit-section" . "00e1e41341cbc71fcc8f4d4c98b2cc5c371c4f54")
|
||||
("tempel" . "94afb9b916a711c56f23183da93a103338e9f84e")
|
||||
("terraform-mode" . "56f19abae95afb7e13e48ec3e6aeba3820d31307")
|
||||
("transient" . "af7fe42bd46e24ca7852e73bd1691015c5bd2151")
|
||||
("treemacs" . "983ea5a66801a5c1f6e32e3d515bd48761677ac6")
|
||||
("spinner" . "67681b8f1580a7cd7a1aa49d78eaa30d11f7c178")
|
||||
("straight.el" . "b3760f5829dba37e855add7323304561eb57a3d4")
|
||||
("svg-lib" . "718d0f76d842919c8bf7fb23dd9cceca69ce9500")
|
||||
("tablist" . "fcd37147121fabdf003a70279cf86fbe08cfac6f")
|
||||
("taxy" . "43a5f3139a33a574882a97ccab58dffa4b8dbf2a")
|
||||
("taxy-magit-section" . "7e4ba4ecd0464ee45e7e16dae0272e6f790a40e6")
|
||||
("tempel" . "38dad1f85104c7c734ad9245f3a85b49562332d0")
|
||||
("terraform-mode" . "e8b57df8c2a3d3171f3768f60eb84067f553289c")
|
||||
("transient" . "eb6e903b6a1271bdf713dae52c7718a874dec1e2")
|
||||
("treemacs" . "529876dcc0d2c30667f1697c4eb7a5f137da4c3e")
|
||||
("ts.el" . "552936017cfdec89f7fc20c254ae6b37c3f22c5b")
|
||||
("typescript.el" . "4fcb4594819caf472ae42ea068a1c7795cf07f46")
|
||||
("use-package" . "a6e856418d2ebd053b34e0ab2fda328abeba731c")
|
||||
("vertico" . "dd8eb3aa3d0d048cc0e1bc455f42a12a4162f5bb")
|
||||
("vulpea" . "f4d3448b6ccdb314c5fe3defea66e750e1371a10")
|
||||
("web-mode" . "57856ba64b9382811b35df0d9ab0a24aede0c1f0")
|
||||
("with-editor" . "df74385b455cd7687232ad189acfea16cb44dd04")
|
||||
("xref" . "420511e20187d0c6c8680c0e63ae8810f84dee00")
|
||||
("vertico" . "e8edac107df5883f2fa8690356a8d8deee1a83de")
|
||||
("visual-fill-column" . "db7c7c236555c9c684e1294a277efefdc25fa5c4")
|
||||
("vulpea" . "e1ea8480daf3e480effdd7ba3799126295a4a59a")
|
||||
("web-mode" . "df57cd0beea9c6bdc64259bd11bde0c076a64cc9")
|
||||
("with-editor" . "121e87e6c38c45b9c529453b065b0e45a45e25b2")
|
||||
("xref" . "adeb5cfcc69feebd5a71a24b381ca61e0e6f3396")
|
||||
("xterm-color" . "2ad407c651e90fff2ea85d17bf074cee2c022912")
|
||||
("yaml-mode" . "b153150e0e77b4ec462d741cdb16956c6ae270d6"))
|
||||
("yaml-mode" . "5b58248ab255dff6cfa4c4057a191bc4446ee5b6")
|
||||
("yaml.el" . "70c4fcead97e9bd6594e418c922ae769818f4245"))
|
||||
:gamma
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.programs.gpg;
|
||||
in {
|
||||
options.magic_rb.programs.gpg = {
|
||||
enable =
|
||||
mkEnableOption
|
||||
''
|
||||
Enable gpg and gpg-key.
|
||||
'';
|
||||
pinentryFlavor = mkOption {
|
||||
description = "Which pinentry flavor should be used.";
|
||||
type = types.enum [
|
||||
"curses"
|
||||
"emacs"
|
||||
"mac"
|
||||
"gtk2"
|
||||
"qt"
|
||||
"gnome"
|
||||
];
|
||||
default = "gtk2";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
gpg-key-rb
|
||||
gnupg
|
||||
pass
|
||||
yubikey-manager
|
||||
];
|
||||
|
||||
home.file.".gpg-agent.conf".text = ''
|
||||
enable-ssh-support
|
||||
pinentry-program ${pkgs.pinentry.${cfg.pinentryFlavor}}/bin/pinentry
|
||||
'';
|
||||
|
||||
home.file.".profile".text = ''
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
'';
|
||||
|
||||
home.activation.gnupghome = config.lib.dag.entryAfter ["writeBoundary"] ''
|
||||
if [[ ! -e ~/.gnupg/gpg-agent.conf ]] && [[ -d /mnt/key/gnupg ]]
|
||||
then
|
||||
ln -sf ~/.gpg-agent.conf /mnt/key/gnupg/gpg-agent.conf
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.packageCollections.graphical;
|
||||
in {
|
||||
options.magic_rb.packageCollections.graphical = {
|
||||
enable =
|
||||
mkEnableOption
|
||||
''
|
||||
Enable graphical package collection, contains GIMP, Firefox, mpv, and Discord.
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"webgl.disabled" = false;
|
||||
};
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
gimp
|
||||
mpv
|
||||
slack
|
||||
|
||||
schildichat-desktop
|
||||
inputs.nixpkgs-discord.legacyPackages.${stdenv.system}.armcord
|
||||
pavucontrol
|
||||
];
|
||||
};
|
||||
}
|
20
home-manager/modules/keynav/default.nix
Normal file
20
home-manager/modules/keynav/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".keynavrc".source = ./keynavrc;
|
||||
|
||||
systemd.user.services.keynav = {
|
||||
Unit = {
|
||||
Description = "keynav";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.keynav}/bin/keynav";
|
||||
RestartSec = 3;
|
||||
Restart = "always";
|
||||
};
|
||||
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.programs.multimc;
|
||||
in {
|
||||
options.magic_rb.programs.multimc = {
|
||||
enable = mkEnableOption "Enable MultiMC Minecraft launcher.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
pkgs.prismlauncher
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
../../nixos/modules/optimisation.nix
|
|
@ -1,34 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{ inputs', pkgs, ... }:
|
||||
{
|
||||
services.pantalaimon =
|
||||
{
|
||||
# enable = true;
|
||||
package = (pkgs.pantalaimon.override (old: {
|
||||
matrix-nio = old.matrix-nio.overridePythonAttrs (old: {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "codemonium";
|
||||
repo = "matrix-nio";
|
||||
rev = "1ba34112ca221adf0ed1d9e5028d5a7f3a4a72ca";
|
||||
hash = "sha256-T8wFJlUMQVwJHNzIZiQ4M/uImTvIqW5PGJoWV0kbHkA=";
|
||||
};
|
||||
|
||||
disabledTests = old.disabledTests ++ [
|
||||
"test_room_invite"
|
||||
"test_account_loading"
|
||||
"test_olm_session_load"
|
||||
"test_store_versioning"
|
||||
];
|
||||
});
|
||||
})).overridePythonAttrs
|
||||
(old:
|
||||
{
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "codemonium";
|
||||
repo = "pantalaimon";
|
||||
rev = "25d415fac4ad653da1e427bc05beed2d21bc169f";
|
||||
hash = "sha256-U+dSlfYx2ADin+zbEPNIHkjytMUmZ6QkklU0bCyt/Pg=";
|
||||
};
|
||||
});
|
||||
services.pantalaimon = {
|
||||
enable = true;
|
||||
# TODO switch to unstable when PR263669 is merged
|
||||
package = inputs'.nixpkgs-stable.legacyPackages.${pkgs.stdenv.system}.pantalaimon;
|
||||
settings =
|
||||
{
|
||||
Default =
|
||||
|
|
18
home-manager/modules/picom/default.nix
Normal file
18
home-manager/modules/picom/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
home.file.".config/picom.conf".source = ./picom.conf;
|
||||
systemd.user.services.picom = {
|
||||
Unit = {
|
||||
Description = "Picom compositor";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = ''/bin/sh -l -c "${lib.getExe pkgs.picom} --config ~/.config/picom.conf"'';
|
||||
};
|
||||
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
};
|
||||
}
|
|
@ -195,7 +195,7 @@ dbe = false;
|
|||
|
||||
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
|
||||
# Known to cause flickering when redirecting/unredirecting windows.
|
||||
unredir-if-possible = false;
|
||||
unredir-if-possible = true;
|
||||
|
||||
# Specify a list of conditions of windows that should always be considered focused.
|
||||
focus-exclude = [ ];
|
|
@ -17,7 +17,8 @@ env:
|
|||
# TERM: rxvt-unicode-256color
|
||||
TERM: xterm-256color
|
||||
|
||||
#window:
|
||||
window:
|
||||
opacity: 0.8
|
||||
# Window dimensions (changes require restart)
|
||||
#
|
||||
# Specified in number of columns/lines, not pixels.
|
||||
|
@ -102,7 +103,7 @@ font:
|
|||
# - (macOS) Menlo
|
||||
# - (Linux/BSD) monospace
|
||||
# - (Windows) Consolas
|
||||
family: SourceCodePro
|
||||
family: Iosevka Term Extended
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
style: Regular
|
||||
|
@ -113,7 +114,7 @@ font:
|
|||
#
|
||||
# If the bold family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
family: SourceCodePro
|
||||
family: Iosevka Term Extended
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
style: Bold
|
||||
|
@ -124,7 +125,7 @@ font:
|
|||
#
|
||||
# If the italic family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
family: SourceCodePro
|
||||
family: Iosevka Term Extended
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
style: Italic
|
||||
|
@ -135,13 +136,13 @@ font:
|
|||
#
|
||||
# If the bold italic family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
family: SourceCodePro
|
||||
family: Iosevka Term Extended
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
style: Bold Italic
|
||||
|
||||
# Point size
|
||||
size: 10.0
|
||||
size: 6
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought of
|
||||
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
|
||||
|
@ -175,59 +176,35 @@ font:
|
|||
# If `true`, bold text is drawn using the bright color variants.
|
||||
#draw_bold_text_with_bright_colors: false
|
||||
|
||||
# Colors (Tomorrow Night Bright)
|
||||
# Colors Ef-Winter
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
background: '#171717'
|
||||
foreground: '#aaaaaa'
|
||||
|
||||
# Bright and dim foreground colors
|
||||
#
|
||||
# The dimmed foreground color is calculated automatically if it is not present.
|
||||
# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
|
||||
# is `false`, the normal foreground color will be used.
|
||||
#dim_foreground: '#9a9a9a'
|
||||
#bright_foreground: '#ffffff'
|
||||
|
||||
# Cursor colors
|
||||
#
|
||||
# Colors which should be used to draw the terminal cursor. If these are unset,
|
||||
# the cursor color will be the inverse of the cell color.
|
||||
cursor:
|
||||
# text: '#000000'
|
||||
cursor: '#cccccc'
|
||||
|
||||
# Selection colors
|
||||
#
|
||||
# Colors which should be used to draw the selection area. If selection
|
||||
# background is unset, selection color will be the inverse of the cell colors.
|
||||
# If only text is unset the cell text color will remain the same.
|
||||
#selection:
|
||||
# text: '#eaeaea'
|
||||
# background: '#404040'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '#282a2e'
|
||||
red: '#c53030'
|
||||
green: '#b7c52c'
|
||||
yellow: '#e17a33'
|
||||
blue: '#4292d4'
|
||||
magenta: '#aa4aca'
|
||||
cyan: '#50cebe'
|
||||
white: '#cccccc'
|
||||
|
||||
# Bright colors
|
||||
black: '#1d202f'
|
||||
red: '#f47359'
|
||||
green: '#29a444'
|
||||
yellow: '#b58a52'
|
||||
blue: '#3f95f6'
|
||||
magenta: '#d369af'
|
||||
cyan: '#4fbaef'
|
||||
white: '#b8c6d5'
|
||||
bright:
|
||||
black: '#373b41'
|
||||
red: '#d14e4e'
|
||||
green: '#b8c34f'
|
||||
yellow: '#f4bc4e'
|
||||
blue: '#6e9cc2'
|
||||
magenta: '#b37ec3'
|
||||
cyan: '#72c1b6'
|
||||
white: '#aaaaaa'
|
||||
black: '#4a4f62'
|
||||
red: '#ff6a7a'
|
||||
green: '#00a392'
|
||||
yellow: '#df9080'
|
||||
blue: '#029fff'
|
||||
magenta: '#af85ea'
|
||||
cyan: '#35afbf'
|
||||
white: '#807c9f'
|
||||
cursor:
|
||||
cursor: '#ff6ff0'
|
||||
text: '#0f0b15'
|
||||
primary:
|
||||
background: '#0f0b15'
|
||||
foreground: '#b8c6d5'
|
||||
selection:
|
||||
background: '#342464'
|
||||
text: '#b8c6d5'
|
||||
|
||||
# Dim colors
|
||||
#
|
||||
|
@ -281,9 +258,6 @@ colors:
|
|||
|
||||
# Background opacity
|
||||
#
|
||||
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||
background_opacity: 0.9
|
||||
|
||||
#selection:
|
||||
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
15
home-manager/modules/profiles/server.nix
Normal file
15
home-manager/modules/profiles/server.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
git-annex
|
||||
file
|
||||
];
|
||||
|
||||
imports = [
|
||||
../bash
|
||||
];
|
||||
}
|
132
home-manager/modules/profiles/workstation.nix
Normal file
132
home-manager/modules/profiles/workstation.nix
Normal file
|
@ -0,0 +1,132 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs',
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
concatStringsSep
|
||||
getExe
|
||||
flip
|
||||
singleton
|
||||
;
|
||||
|
||||
combineWines = wines:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "wine-combined";
|
||||
version = "unknown";
|
||||
|
||||
dontFetch = true;
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
''
|
||||
+ (concatStringsSep "\n"
|
||||
(
|
||||
flip map wines
|
||||
(wine: ''
|
||||
ln -s ${getExe wine} $out/bin/${wine.pname}
|
||||
'')
|
||||
));
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
../picom
|
||||
../dunst
|
||||
../keynav
|
||||
../bash
|
||||
../emacs
|
||||
../xmonad
|
||||
../pantalaimon.nix
|
||||
../ssh.nix
|
||||
../wallpaper
|
||||
../screenlocker
|
||||
];
|
||||
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"webgl.disabled" = false;
|
||||
};
|
||||
};
|
||||
|
||||
xsession.enable = true;
|
||||
home.keyboard = null;
|
||||
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
dawnTime = "6:00-6:05";
|
||||
duskTime = "21:00-21:05";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(prismlauncher.override {
|
||||
jdks = with pkgs; [
|
||||
jdk8
|
||||
jdk11
|
||||
jdk17
|
||||
];
|
||||
})
|
||||
|
||||
dejavu_fonts
|
||||
alacritty
|
||||
gimp
|
||||
obs-studio
|
||||
mpv
|
||||
slack
|
||||
schildichat-desktop
|
||||
blender
|
||||
godot_4
|
||||
|
||||
# armcord
|
||||
pavucontrol
|
||||
|
||||
# GPG
|
||||
gnupg
|
||||
pass
|
||||
yubikey-manager
|
||||
|
||||
# wine
|
||||
winetricks
|
||||
(combineWines [wineWowPackages.staging])
|
||||
|
||||
# 3d printing
|
||||
openscad
|
||||
freecad
|
||||
|
||||
cura
|
||||
super-slicer
|
||||
|
||||
inkscape
|
||||
|
||||
# command line programs
|
||||
emacsclient-remote
|
||||
zip
|
||||
unzip
|
||||
unrar
|
||||
git
|
||||
htop
|
||||
lm_sensors
|
||||
cryptsetup
|
||||
|
||||
magic-screenshot
|
||||
emacs-rofi
|
||||
libnotify
|
||||
playerctl
|
||||
git-annex
|
||||
file
|
||||
ncdu
|
||||
lsof
|
||||
];
|
||||
|
||||
home.file.".config/alacritty/alacritty.yml".source = ./alacritty.yaml;
|
||||
home.file.".gpg-agent.conf".text = ''
|
||||
enable-ssh-support
|
||||
pinentry-program ${pkgs.pinentry.gtk2}/bin/pinentry
|
||||
'';
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
default-sample-format = float32le
|
||||
default-sample-rate = 48000
|
||||
alternate-sample-rate = 44100
|
||||
default-sample-channels = 2
|
||||
default-channel-map = front-left,front-right
|
||||
default-fragments = 2
|
||||
default-fragment-size-msec = 125
|
||||
resample-method = soxr-vhq
|
||||
enable-lfe-remixing = no
|
||||
high-priority = yes
|
||||
nice-level = -11
|
||||
realtime-scheduling = yes
|
||||
realtime-priority = 9
|
||||
rlimit-rtprio = 9
|
||||
daemonize = no
|
|
@ -1,13 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
throw "Disabled needs rework!!!!"
|
||||
# {
|
||||
# home.file.".config/pulse/daemon.conf".source = ./daemon.conf;
|
||||
# }
|
||||
|
54
home-manager/modules/screenlocker/default.nix
Normal file
54
home-manager/modules/screenlocker/default.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
singleton
|
||||
getExe
|
||||
makeBinPath;
|
||||
|
||||
locker = pkgs.writeShellScript "i3lock-dynamic-image" ''
|
||||
export PATH=${makeBinPath (with pkgs; [ xorg.xrandr gnugrep coreutils imagemagick i3lock ])}:$PATH
|
||||
|
||||
WALLPAPER_CACHE="$HOME/.local/tmp/wallpaper_cache"
|
||||
|
||||
mkdir -p $WALLPAPER_CACHE
|
||||
|
||||
SCREEN_RESOLUTION="$(xrandr --current | grep '*' | uniq | tr -s ' ' | cut -f2 -d' ' | sort -nr | head -n 1)"
|
||||
IMAGEFILE="$WALLPAPER_CACHE/$(sha256sum $HOME/.config/wallpaper | tr -s ' ' | cut -f 1 -d' ').png"
|
||||
I3LOCK="i3lock -t -d -c 000000 -i $IMAGEFILE"
|
||||
|
||||
if ! [[ -e "$IMAGEFILE" ]]
|
||||
then
|
||||
convert "$HOME/.config/wallpaper" -gravity Center -background "#000000" -resize "$SCREEN_RESOLUTION^" -extent "$SCREEN_RESOLUTION" "$IMAGEFILE"
|
||||
fi
|
||||
|
||||
if [[ -e /dev/fd/''${XSS_SLEEP_LOCK_FD:--1} ]]; then
|
||||
kill_i3lock() {
|
||||
pkill -xu $EUID "$@" i3lock
|
||||
}
|
||||
|
||||
trap kill_i3lock TERM INT
|
||||
|
||||
$I3LOCK {XSS_SLEEP_LOCK_FD}<&-
|
||||
|
||||
exec {XSS_SLEEP_LOCK_FD}<&-
|
||||
|
||||
while kill_i3lock -0; do
|
||||
sleep 0.5
|
||||
done
|
||||
else
|
||||
trap 'kill %%' TERM INT
|
||||
$I3LOCK
|
||||
wait
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
services.screen-locker = {
|
||||
enable = true;
|
||||
inactiveInterval = 5;
|
||||
|
||||
xss-lock.extraOptions = singleton "--transfer-sleep-lock";
|
||||
|
||||
lockCmd = toString locker;
|
||||
};
|
||||
}
|
26
home-manager/modules/ssh.nix
Normal file
26
home-manager/modules/ssh.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
controlMaster = "auto";
|
||||
controlPath = "~/.ssh/controlmasters/%r@%h:%p";
|
||||
controlPersist = "300s";
|
||||
serverAliveInterval = 30;
|
||||
matchBlocks = {
|
||||
"Host *redalder.org 10.64.1.* 10.64.0.*".extraOptions = {
|
||||
ExitOnForwardFailure = "yes";
|
||||
SendEnv = "INSIDE_EMACS";
|
||||
RemoteForward = "/home/main/.ssh/emacs-server /run/user/1000/emacs/server";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.activation."ssh-controlmasters" = config.lib.dag.entryAfter ["writeBoundary"] ''
|
||||
mkdir -p ~/.ssh/controlmasters
|
||||
'';
|
||||
|
||||
home.file.".profile".text = ''
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
'';
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
Host *
|
||||
ControlMaster auto
|
||||
ControlPath ~/.ssh/controlmasters/%r@%h:%p
|
||||
ControlPersist 300s
|
||||
ServerAliveInterval 30
|
||||
|
||||
Host 192.168.0.250
|
||||
Port 2222
|
||||
|
||||
Host *redalder.org 10.64.1.* 10.64.0.*
|
||||
ExitOnForwardFailure yes
|
||||
SendEnv INSIDE_EMACS
|
||||
RemoteForward /home/main/.ssh/emacs-server /run/user/1000/emacs/server
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.programs.ssh;
|
||||
in {
|
||||
options.magic_rb.programs.ssh = {
|
||||
enable = mkEnableOption "Enable ssh_config";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
controlMaster = "auto";
|
||||
controlPath = "~/.ssh/controlmasters/%r@%h:%p";
|
||||
controlPersist = "300s";
|
||||
serverAliveInterval = 30;
|
||||
matchBlocks = {
|
||||
"Host *redalder.org 10.64.1.* 10.64.0.*".extraOptions = {
|
||||
ExitOnForwardFailure = "yes";
|
||||
SendEnv = "INSIDE_EMACS";
|
||||
RemoteForward = "/home/main/.ssh/emacs-server /run/user/1000/emacs/server";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.activation."ssh-controlmasters" = config.lib.dag.entryAfter ["writeBoundary"] ''
|
||||
mkdir -p ~/.ssh/controlmasters
|
||||
'';
|
||||
};
|
||||
}
|
29
home-manager/modules/wallpaper/default.nix
Normal file
29
home-manager/modules/wallpaper/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
singleton
|
||||
getExe;
|
||||
in
|
||||
{
|
||||
systemd.user.services.wallpaper = {
|
||||
Unit = {
|
||||
Description = "Applies wallpaper";
|
||||
After = singleton "graphical-session-pre.target";
|
||||
PartOf = singleton "graphical-session.target";
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = pkgs.writeShellScript "apply-wallpaper" ''
|
||||
if [[ -f "$HOME/.config/wallpaper" ]]
|
||||
then
|
||||
${getExe pkgs.feh} --no-fehbg --bg-fill "$HOME/.config/wallpaper"
|
||||
else
|
||||
${getExe pkgs.feh} --no-fehbg --bg-fill ${./default.png}
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
Install.WantedBy = singleton "graphical-session.target";
|
||||
};
|
||||
}
|
BIN
home-manager/modules/wallpaper/default.png
Normal file
BIN
home-manager/modules/wallpaper/default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
|
@ -1,27 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.packageCollections.webdev;
|
||||
in {
|
||||
options.magic_rb.packageCollections.webdev = {
|
||||
enable =
|
||||
mkEnableOption
|
||||
''
|
||||
Enable webdev package collection, contains yarn and wasm-pack.
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
yarn
|
||||
wasm-pack
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.packageCollections.wine;
|
||||
|
||||
combineWines = wines:
|
||||
map (
|
||||
wine:
|
||||
pkgs.writeShellScriptBin wine.name
|
||||
''
|
||||
${wine}/bin/wine "$@"
|
||||
''
|
||||
)
|
||||
wines;
|
||||
in {
|
||||
options.magic_rb.packageCollections.wine = {
|
||||
enable = mkEnableOption "Enable wine package collection, contains wine-staging and winetricks";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
winetricks
|
||||
]
|
||||
++ combineWines (with pkgs; [
|
||||
wineWowPackages.staging
|
||||
]);
|
||||
};
|
||||
}
|
2
home-manager/modules/xmonad/.gitignore
vendored
Normal file
2
home-manager/modules/xmonad/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.packages
|
||||
.stack-work
|
2
home-manager/modules/xmonad/Setup.hs
Normal file
2
home-manager/modules/xmonad/Setup.hs
Normal file
|
@ -0,0 +1,2 @@
|
|||
import Distribution.Simple
|
||||
main = defaultMain
|
486
home-manager/modules/xmonad/app/Main.hs
Normal file
486
home-manager/modules/xmonad/app/Main.hs
Normal file
|
@ -0,0 +1,486 @@
|
|||
-- SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
--
|
||||
-- SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
--
|
||||
-- xmonad example config file.
|
||||
--
|
||||
-- A template showing all available configuration hooks,
|
||||
-- and how to override the defaults in your own xmonad.hs conf file.
|
||||
--
|
||||
-- Normally, you'd only override those defaults you care about.
|
||||
--
|
||||
|
||||
{-# LANGUAGE BlockArguments
|
||||
#-}
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
|
||||
import XMonad
|
||||
import Data.Monoid
|
||||
import Data.List (delete)
|
||||
import Data.Maybe
|
||||
import Data.Function
|
||||
import Data.Functor
|
||||
import System.Exit
|
||||
import System.Environment
|
||||
import XMonad.Util.EZConfig
|
||||
import XMonad.Util.SpawnOnce
|
||||
import XMonad.Util.WindowProperties
|
||||
import XMonad.Hooks.ManageDocks
|
||||
import XMonad.Hooks.EwmhDesktops
|
||||
|
||||
import XMonad.Layout.BinarySpacePartition
|
||||
import XMonad.Layout.Tabbed
|
||||
import XMonad.Layout.NoBorders
|
||||
import XMonad.Layout.IndependentScreens
|
||||
import XMonad.Util.WorkspaceCompare
|
||||
import XMonad.Hooks.DynamicLog
|
||||
import XMonad.Hooks.StatusBar
|
||||
import XMonad.Actions.UpdatePointer
|
||||
import XMonad.Actions.FloatKeys
|
||||
import XMonad.Actions.Warp
|
||||
import XMonad.Actions.CopyWindow
|
||||
import XMonad.StackSet (Workspace, integrate', stack)
|
||||
import Foreign.C.String (peekCString)
|
||||
|
||||
import Control.Monad
|
||||
|
||||
import qualified XMonad.StackSet as W
|
||||
import qualified Data.Map as M
|
||||
import XMonad.Actions.Navigation2D
|
||||
import XMonad.Layout.Cross (simpleCross)
|
||||
import Data.IORef
|
||||
import GHC.IO.Unsafe (unsafePerformIO)
|
||||
|
||||
|
||||
myTerminal = "xterm"
|
||||
myFocusFollowsMouse = True
|
||||
myClickJustFocuses = False
|
||||
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
|
||||
myWorkspaces = withScreens 2 $ map show ([1..9] ++ [0])
|
||||
|
||||
toggleFloat :: Window -> X ()
|
||||
toggleFloat window = do
|
||||
{ floats <- gets (W.floating . windowset);
|
||||
if window `M.member` floats
|
||||
then withFocused $ windows . W.sink
|
||||
else float window }
|
||||
|
||||
toggleFullscreen :: Display -> Window -> X ()
|
||||
toggleFullscreen dpy window = do
|
||||
wmstate <- getAtom "_NET_WM_STATE"
|
||||
fullsc <- getAtom "_NET_WM_STATE_FULLSCREEN"
|
||||
wstate <- fromMaybe [] `fmap` getProp32 wmstate window
|
||||
|
||||
let
|
||||
ptype = 4
|
||||
chWstate f = io $ changeProperty32 dpy window wmstate ptype propModeReplace (f wstate)
|
||||
isFull = fromIntegral fullsc `elem` wstate
|
||||
|
||||
unless isFull $ do
|
||||
chWstate (fromIntegral fullsc:)
|
||||
windows $ W.float window $ W.RationalRect 0 0 1 1
|
||||
when isFull $ do
|
||||
chWstate $ delete (fromIntegral fullsc)
|
||||
windows $ W.sink window
|
||||
|
||||
centerMouse :: X ()
|
||||
centerMouse = warpToWindow 0.5 0.5
|
||||
|
||||
getCurrentLayout :: X String
|
||||
getCurrentLayout =
|
||||
gets windowset <&> description . W.layout . W.workspace . W.current
|
||||
|
||||
workspacesGrouped :: X [(WorkspaceId, Window, String)]
|
||||
workspacesGrouped = withDisplay \dpy -> do
|
||||
ws <- gets windowset
|
||||
let x = map W.workspace (W.current ws : W.visible ws)
|
||||
let y = W.hidden ws
|
||||
mapM (\v -> do
|
||||
let windows = getWorkspaceWindows v
|
||||
mapM (\win -> getWindowTitle win dpy <&> \title -> (W.tag v, win, title)) windows) (x ++ y) <&> concat
|
||||
|
||||
getWorkspaceWindows :: Workspace i l Window -> [Window]
|
||||
getWorkspaceWindows w = integrate' $ stack w
|
||||
|
||||
getWindowTitle :: Window -> Display -> X String
|
||||
getWindowTitle w d = liftIO $ getTextProperty d w wM_NAME >>= (peekCString . tp_value)
|
||||
|
||||
modm :: KeyMask
|
||||
modm = mod4Mask
|
||||
|
||||
skipFloating :: Ord a => W.StackSet i l a s sd -> (W.StackSet i l a s sd -> W.StackSet i l a s sd) -> W.StackSet i l a s sd
|
||||
skipFloating stacks f
|
||||
| isNothing curr = stacks -- short circuit if there is no currently focused window
|
||||
| otherwise = skipFloatingR stacks curr f
|
||||
where curr = W.peek stacks
|
||||
|
||||
skipFloatingR :: Ord a => W.StackSet i l a s sd -> (Maybe a) -> (W.StackSet i l a s sd -> W.StackSet i l a s sd) -> W.StackSet i l a s sd
|
||||
skipFloatingR stacks startWindow f
|
||||
| isNothing nextWindow = stacks -- next window is nothing return current stack set
|
||||
| nextWindow == startWindow = newStacks -- if next window is the starting window then return the new stack set
|
||||
| M.notMember (fromJust nextWindow) (W.floating stacks) = newStacks -- if next window is not a floating window return the new stack set
|
||||
| otherwise = skipFloatingR newStacks startWindow f -- the next window is a floating window so keep recursing (looking)
|
||||
where newStacks = f stacks
|
||||
nextWindow = W.peek newStacks
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Key bindings. Add, modify or remove key bindings here.
|
||||
--
|
||||
myKeymap c =
|
||||
[
|
||||
-- launch dmenu
|
||||
("M-e", spawn "dmenu_run")
|
||||
|
||||
-- close focused window
|
||||
, ("M-S-q", io exitSuccess)
|
||||
|
||||
-- Rotate through the available layout algorithms
|
||||
, ("M-<Space>", sendMessage NextLayout)
|
||||
|
||||
-- Reset the layouts on the current workspace to default
|
||||
-- , ("M-S-Space", setLayout $ XMonad.layoutHook c)
|
||||
|
||||
-- Resize viewed windows to the correct size
|
||||
, ("M-b", refresh)
|
||||
|
||||
-- Push window back into tiling
|
||||
, ("M-y", withFocused toggleFloat)
|
||||
|
||||
-- warp to middle of window
|
||||
, ("M-d", centerMouse)
|
||||
|
||||
-- , ("M-b", spawn ("pkill xmobar && " ++ xmobarCmd))
|
||||
, ("<Print>", spawn "sleep 0.1 ; screenshot select")
|
||||
, ("S-<Print>", spawn "screenshot screen && sleep 0.1 && notify -t 5000 \"snap\"")
|
||||
, ("C-S-<Print>", spawn "screenshot focused && sleep 0.1 && notify -t 5000 \"snap\"")
|
||||
|
||||
-- Kill focused window
|
||||
, ("M-S-k", kill1)
|
||||
-- Kill all instances of focused window
|
||||
, ("M-S-C-k", kill)
|
||||
|
||||
-- Restart xmonad
|
||||
, ("M-k", spawn "reload")
|
||||
|
||||
-- float keys
|
||||
, ("M-g", sendMessage $ ExpandTowards L)
|
||||
, ("M-c", sendMessage $ ExpandTowards U)
|
||||
, ("M-l", sendMessage $ ExpandTowards D)
|
||||
, ("M-ß", sendMessage $ ExpandTowards R)
|
||||
, ("M-S-g", sendMessage $ ShrinkFrom L)
|
||||
, ("M-S-c", sendMessage $ ShrinkFrom U)
|
||||
, ("M-S-l", sendMessage $ ShrinkFrom D)
|
||||
, ("M-S-ẞ", sendMessage $ ShrinkFrom R)
|
||||
|
||||
, ("M-t", windowGo L False >> centerMouse)
|
||||
, ("M-r", getCurrentLayout >>= \case
|
||||
"Tabbed Simplest" -> windows (`skipFloating` W.focusUp)
|
||||
_ -> windowGo U False >> centerMouse)
|
||||
, ("M-n", getCurrentLayout >>= \case
|
||||
"Tabbed Simplest" -> windows (`skipFloating` W.focusDown)
|
||||
_ -> windowGo D False >> centerMouse)
|
||||
, ("M-s", windowGo R False >> centerMouse)
|
||||
|
||||
, ("M-S-t", windowSwap L False >> centerMouse)
|
||||
, ("M-S-r", windowSwap U False >> centerMouse)
|
||||
, ("M-S-n", windowSwap D False >> centerMouse)
|
||||
, ("M-S-s", windowSwap R False >> centerMouse)
|
||||
|
||||
, ("M-C-g", sendMessage Rotate)
|
||||
, ("M-C-c", sendMessage Swap)
|
||||
, ("M-C-l", sendMessage FocusParent)
|
||||
, ("M-C-ß", sendMessage SelectNode)
|
||||
|
||||
, ("M-C-t", sendMessage Balance >> centerMouse >> (liftIO . print . description $ smartBorders simpleTabbed))
|
||||
, ("M-C-r", sendMessage Equalize >> centerMouse >> (liftIO . print . description $ smartBorders simpleTabbed))
|
||||
, ("M-C-n", sendMessage $ SplitShift Prev)
|
||||
, ("M-C-s", sendMessage $ SplitShift Next)
|
||||
|
||||
, ("M-z", spawn "loginctl lock-session")
|
||||
|
||||
, ("<XF86AudioMute>" , spawn "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle")
|
||||
, ("<XF86AudioRaiseVolume>" , spawn "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+")
|
||||
, ("<XF86AudioLowerVolume>" , spawn "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-")
|
||||
, ("<XF86MonBrightnessUp>" , spawn "brightnessctl set +5%")
|
||||
, ("<XF86MonBrightnessDown>" , spawn "brightnessctl set 5%-")
|
||||
|
||||
, ("<XF86AudioPlay>" , spawn "notify-send -t 5000 \"Music: Play\"" >> spawn "playerctl play-pause")
|
||||
, ("<XF86AudioStop>" , spawn "notify-send -t 5000 \"Music: Stop\"" >> spawn "playerctl stop")
|
||||
, ("<XF86AudioPrev>" , spawn "notify-send -t 5000 \"Music: Prev\"" >> spawn "playerctl previous")
|
||||
, ("<XF86AudioNext>" , spawn "notify-send -t 5000 \"Music: Next\"" >> spawn "playerctl next")
|
||||
|
||||
, ("<XF86TouchpadToggle>" , spawn "toggle-touchpad")
|
||||
|
||||
, ("M-<F1>", spawn "auxmenu")
|
||||
, ("M-<F2>", spawn "emacsclient -cn")
|
||||
, ("M-S-<Return>", spawn "emacs-vterm")
|
||||
, ("M-<Return>", spawn "alacritty")
|
||||
|
||||
, ("M-<F11>", withDisplay $ \dpy -> withFocused $ \window -> toggleFullscreen dpy window)
|
||||
, ("M-<F9>", (workspacesGrouped >>= \ws -> (liftIO . print $ ws)))
|
||||
]
|
||||
++
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
-- mod-[1..9], Switch to workspace N
|
||||
-- mod-[1..9], Switch to workspace N
|
||||
-- mod-[1..9], Switch to workspace N
|
||||
-- mod-[1..9], Switch to workspace N
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
|
||||
--
|
||||
|
||||
--
|
||||
-- mod-[1..9], Switch to workspace N
|
||||
-- mod-[1..9], Switch to workspace N
|
||||
--
|
||||
--
|
||||
|
||||
--
|
||||
--
|
||||
-- mod-[1..9], Switch to workspace N
|
||||
-- mod-[1..9], Switch to workspace N
|
||||
--
|
||||
--
|
||||
|
||||
--
|
||||
-- mod-[1..9], Switch to workspace N
|
||||
--
|
||||
[("M-" ++ m ++ [k], windows $ onCurrentScreen f i)
|
||||
| (i, k) <- zip (workspaces' c) "1234567890"
|
||||
, (f, m) <- [(W.greedyView, ""), (W.shift, "S-"), (copy, "S-C-")]]
|
||||
++
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
|
||||
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
|
||||
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
|
||||
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
|
||||
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
|
||||
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
|
||||
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
|
||||
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
[("M-"++m++[key], screenWorkspace sc >>= flip whenJust (windows . f))
|
||||
| (key, sc) <- zip ".o," [0..]
|
||||
, (f, m) <- [(W.view, ""), (W.shift, "S-")]]
|
||||
where
|
||||
xMoveWindow
|
||||
:: (Position, Position)
|
||||
-> Window
|
||||
-> X ()
|
||||
xMoveWindow (x, y) w = withDisplay (\d -> do
|
||||
(_, ox, oy, _, _, _, _) <- io $ getGeometry d w
|
||||
io $ moveWindow d w (ox + x) (oy + y))
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Mouse bindings: default actions bound to mouse events
|
||||
--
|
||||
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||
|
||||
-- mod-button1, Set the window to floating mode and move by dragging
|
||||
[ ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
|
||||
|
||||
-- mod-button3, Set the window to floating mode and resize by dragging
|
||||
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
|
||||
>> windows W.shiftMaster))
|
||||
|
||||
-- you may also bind events to the mouse scroll wheel (button4 and button5)
|
||||
]
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Layouts:
|
||||
|
||||
-- You can specify and transform your layouts by modifying these values.
|
||||
-- If you change layout bindings be sure to use 'mod-shift-space' after
|
||||
-- restarting (with 'mod-q') to reset your layout state to the new
|
||||
-- defaults, as xmonad preserves your old layout settings by default.
|
||||
--
|
||||
-- The available layouts. Note that each layout is separated by |||,
|
||||
-- which denotes layout choice.
|
||||
--
|
||||
myLayout = smartBorders simpleTabbed ||| smartBorders emptyBSP
|
||||
where
|
||||
-- default tiling algorithm partitions the screen into two panes
|
||||
tiled = Tall nmaster delta ratio
|
||||
|
||||
-- The default number of windows in the master pane
|
||||
nmaster = 1
|
||||
|
||||
-- Default proportion of screen occupied by master pane
|
||||
ratio = 1/2
|
||||
|
||||
-- Percent of screen to increment by when resizing panes
|
||||
delta = 3/100
|
||||
|
||||
myPP = def
|
||||
{ ppLayout = const "" -- Don't show the layout name
|
||||
, ppSort = getSortByXineramaRule -- Sort left/right screens on the left, non-empty workspaces after those
|
||||
, ppTitle = const "" -- Don't show the focused window's title
|
||||
, ppTitleSanitize = const "" -- Also about window's title
|
||||
, ppVisible = wrap "(" ")" -- Non-focused (but still visible) screen
|
||||
}
|
||||
|
||||
spawnBar :: ScreenId -> IO StatusBarConfig
|
||||
spawnBar screen = pure $ statusBarPropTo ("_XMONAD_LOG_" <> screenString ) ("polybar-mm " <> screenString) (pure myPP)
|
||||
where screenString = show (fromIntegral screen :: Int)
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Now run xmonad with all the defaults we set up.
|
||||
|
||||
-- Run xmonad with the settings you specify. No need to modify this.
|
||||
--
|
||||
-- main = xmonad $ ewmh $ docks $ defaults
|
||||
main = do
|
||||
getEnv "PATH" >>= \path -> setEnv "PATH" (path <> ":/home/main/.xmonad/runenv/bin")
|
||||
print (description (smartBorders simpleTabbed))
|
||||
|
||||
let
|
||||
nav2dConfig
|
||||
= def
|
||||
-- doesn't work with tabbed at all
|
||||
-- { unmappedWindowRect = [("Tabbed Simplest", fullScreenRect)]}
|
||||
|
||||
defaults & xmonad . docks . dynamicSBs spawnBar . withNavigation2DConfig nav2dConfig
|
||||
|
||||
getNetWMState :: Window -> X [Atom]
|
||||
getNetWMState w = do
|
||||
atom <- getAtom "_NET_WM_STATE"
|
||||
map fromIntegral . fromMaybe [] <$> getProp32 atom w
|
||||
|
||||
|
||||
hasNetWMState :: String -> Query Bool
|
||||
hasNetWMState state = do
|
||||
window <- ask
|
||||
wmstate <- liftX $ getNetWMState window
|
||||
atom <- liftX $ getAtom state
|
||||
return $ elem atom wmstate
|
||||
|
||||
ewwWindows :: IORef [Window]
|
||||
{-# NOINLINE ewwWindows #-}
|
||||
ewwWindows = unsafePerformIO $ newIORef []
|
||||
|
||||
-- A structure containing your configuration settings, overriding
|
||||
-- fields in the default config. Any you don't override, will
|
||||
-- use the defaults defined in xmonad/XMonad/Config.hs
|
||||
--
|
||||
-- No need to modify this.
|
||||
--
|
||||
defaults = let
|
||||
c = def {
|
||||
-- simple stuff
|
||||
terminal = myTerminal,
|
||||
focusFollowsMouse = myFocusFollowsMouse,
|
||||
clickJustFocuses = myClickJustFocuses,
|
||||
modMask = modm,
|
||||
workspaces = myWorkspaces,
|
||||
|
||||
-- key bindings
|
||||
-- keys = myKeys,
|
||||
mouseBindings = myMouseBindings,
|
||||
|
||||
-- hooks, layouts
|
||||
layoutHook = avoidStruts $ myLayout,
|
||||
|
||||
-- To find the property name associated with a program, use
|
||||
-- > xprop | grep WM_CLASS
|
||||
-- and click on the client you're interested in.
|
||||
--
|
||||
-- To match on the WM_NAME, you can use 'title' in the same way that
|
||||
-- 'className' and 'resource' are used below.
|
||||
manageHook = manageDocks <+> composeAll
|
||||
[ title =? "emacs-completing-read-float" --> doFloat
|
||||
, hasNetWMState "_NET_WM_STATE_ABOVE" --> doFloat
|
||||
, hasNetWMState "_NET_WM_STATE_STICKY" --> doF copyToAll
|
||||
, className =? "Eww" --> (do
|
||||
liftIO $ print "eww"
|
||||
window <- ask
|
||||
oldSet <- liftIO $ readIORef ewwWindows
|
||||
liftIO $ writeIORef ewwWindows (window : oldSet)
|
||||
doF id)
|
||||
, className =? "xmessage" --> doFloat
|
||||
-- , resource =? "desktop_window" --> doIgnore
|
||||
-- , resource =? "kdesktop" --> doIgnore
|
||||
],
|
||||
|
||||
logHook = do
|
||||
updatePointer (0.5, 0.5) (1, 1)
|
||||
set <- liftIO $ readIORef ewwWindows
|
||||
liftIO $ print set
|
||||
pure (),
|
||||
|
||||
-- XMonad.Layout.PerWorkspace
|
||||
-- startupHook = void,
|
||||
|
||||
-- Looks
|
||||
focusedBorderColor = "#5c5c5c",
|
||||
normalBorderColor = "#222222",
|
||||
borderWidth = 4
|
||||
}
|
||||
in additionalKeysP c (myKeymap c)
|
||||
& flip additionalKeys [ ((mod1Mask, xK_v), return ()) ]
|
||||
& ewmh
|
||||
|
||||
-- | Finally, a copy of the default bindings in simple textual tabular format.
|
||||
help :: String
|
||||
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
|
||||
"",
|
||||
"-- launching and killing programs",
|
||||
"mod-Shift-Enter Launch xterminal",
|
||||
"mod-p Launch dmenu",
|
||||
"mod-Shift-p Launch gmrun",
|
||||
"mod-Shift-c Close/kill the focused window",
|
||||
"mod-Space Rotate through the available layout algorithms",
|
||||
"mod-Shift-Space Reset the layouts on the current workSpace to default",
|
||||
"mod-n Resize/refresh viewed windows to the correct size",
|
||||
"",
|
||||
"-- move focus up or down the window stack",
|
||||
"mod-Tab Move focus to the next window",
|
||||
"mod-Shift-Tab Move focus to the previous window",
|
||||
"mod-j Move focus to the next window",
|
||||
"mod-k Move focus to the previous window",
|
||||
"mod-m Move focus to the master window",
|
||||
"",
|
||||
"-- modifying the window order",
|
||||
"mod-Return Swap the focused window and the master window",
|
||||
"mod-Shift-j Swap the focused window with the next window",
|
||||
"mod-Shift-k Swap the focused window with the previous window",
|
||||
"",
|
||||
"-- resizing the master/slave ratio",
|
||||
"mod-h Shrink the master area",
|
||||
"mod-l Expand the master area",
|
||||
"",
|
||||
"-- floating layer support",
|
||||
"mod-t Push window back into tiling; unfloat and re-tile it",
|
||||
"",
|
||||
"-- increase or decrease number of windows in the master area",
|
||||
"mod-comma (mod-,) Increment the number of windows in the master area",
|
||||
"mod-period (mod-.) Deincrement the number of windows in the master area",
|
||||
"",
|
||||
"-- quit, or restart",
|
||||
"mod-Shift-q Quit xmonad",
|
||||
"mod-q Restart xmonad",
|
||||
"mod-[1..9] Switch to workSpace N",
|
||||
"",
|
||||
"-- Workspaces & screens",
|
||||
"mod-Shift-[1..9] Move client to workspace N",
|
||||
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3",
|
||||
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3",
|
||||
"",
|
||||
"-- Mouse bindings: default actions bound to mouse events",
|
||||
"mod-button1 Set the window to floating mode and move by dragging",
|
||||
"mod-button2 Raise the window to the top of the stack",
|
||||
"mod-button3 Set the window to floating mode and resize by dragging"]
|
|
@ -1,147 +1,57 @@
|
|||
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs',
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.magic_rb.programs.xmonad;
|
||||
in {
|
||||
options.magic_rb.programs.xmonad = {
|
||||
enable = mkEnableOption "Enable xmonad config";
|
||||
}: {
|
||||
home.file.".xmonad/build".executable = true;
|
||||
home.file.".xmonad/build".text = ''
|
||||
#!/usr/bin/env bash
|
||||
cd ~/dotfiles/home-manager/modules/xmonad
|
||||
eval "$(direnv export bash)"
|
||||
stack build
|
||||
rm "$1"
|
||||
cp "$(stack path --local-install-root)/bin/xmonad-exe" "$1"
|
||||
'';
|
||||
|
||||
enableDunst = mkOption {
|
||||
description = "Enable dunst";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
home.file.".xmonad/buildenv".source = pkgs.buildEnv {
|
||||
name = "xmonad-buildenv";
|
||||
ignoreCollisions = true;
|
||||
paths = inputs'.self.devShells.${pkgs.stdenv.system}.default.nativeBuildInputs;
|
||||
};
|
||||
|
||||
enablePicom = mkOption {
|
||||
description = "Enable picom";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
enableKeynav = mkOption {
|
||||
description = "Enable keynav";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
picomExperimentalBackends = mkOption {
|
||||
description = "Enable experimental backends in picom";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
powerline-fonts
|
||||
font-awesome
|
||||
dejavu_fonts
|
||||
home.file.".xmonad/runenv".source = let
|
||||
polybar-mm =
|
||||
pkgs.writeShellScriptBin "polybar-mm"
|
||||
(builtins.readFile ./scripts/polybar-mm.sh);
|
||||
reload =
|
||||
pkgs.writeShellScriptBin "xmonad-reload"
|
||||
(builtins.readFile ./scripts/polybar-mm.sh);
|
||||
toggle-touchpad =
|
||||
pkgs.writeShellScriptBin "toggle-touchpad"
|
||||
(builtins.readFile ./scripts/toggle-touchpad.sh);
|
||||
auxmenu =
|
||||
pkgs.writeShellScriptBin "auxmenu"
|
||||
(builtins.readFile ./scripts/auxmenu.sh);
|
||||
emacs-vterm =
|
||||
pkgs.writeShellScriptBin "emacs-vterm"
|
||||
(builtins.readFile ./scripts/emacs-vterm.sh);
|
||||
in
|
||||
pkgs.buildEnv {
|
||||
name = "xmonad-runenv";
|
||||
paths = with pkgs; [
|
||||
brightnessctl
|
||||
playerctl
|
||||
dmenu
|
||||
polybar-mm
|
||||
polybarFull
|
||||
reload
|
||||
toggle-touchpad
|
||||
auxmenu
|
||||
wirelesstools
|
||||
emacs-vterm
|
||||
libnotify
|
||||
x11_ssh_askpass
|
||||
];
|
||||
|
||||
home.file.".keynavrc".source = ./keynavrc;
|
||||
|
||||
home.file.".xmonad/xmonad.hs".source = pkgs.writeSubstitutedFile {
|
||||
name = "xmonad.hs";
|
||||
file = ./xmonad.hs;
|
||||
substitutes = {
|
||||
"screenshot" = lib.getExe pkgs.magic_rb.screenshot;
|
||||
"emacs-rofi" = lib.getExe pkgs.emacs-rofi;
|
||||
"notify" = lib.getExe pkgs.libnotify;
|
||||
"playerctl" = lib.getExe pkgs.playerctl;
|
||||
"reload" = pkgs.writeShellScript "xmonad-reload"
|
||||
''
|
||||
${lib.getExe pkgs.libnotify} -t 5000 "recompiling xmonad"
|
||||
|
||||
if xmonad --recompile
|
||||
then
|
||||
${lib.getExe pkgs.libnotify} -t 5000 "compilation succeeded"
|
||||
xmonad --restart
|
||||
else
|
||||
${lib.getExe pkgs.libnotify} -t 5000 "compilation failed"
|
||||
fi
|
||||
'';
|
||||
"auxmenu" = pkgs.writeShellScript "auxmenu"
|
||||
''
|
||||
export SUDO_ASKPASS=${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass
|
||||
|
||||
_options="toggle-mic\ntoggle-radio\nscreenshot-all\nscreenshot-select\nscreenshot-focused\nsuspend\nreboot\nkexec\npoweroff\nlogout\nnmtui"
|
||||
|
||||
_option="$(echo -e $_options | emacs-rofi "command: " 90 30 | awk '{print $1}' | tr -d '\r\n')"
|
||||
if [ ''${#_option} -gt 0 ]
|
||||
then
|
||||
case $_option in
|
||||
toggle-mic)
|
||||
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
;;
|
||||
toggle-radio)
|
||||
if [ "$(nmcli radio wifi)" = "enabled" ]
|
||||
then
|
||||
nmcli radio wifi off
|
||||
else
|
||||
nmcli radio wifi on
|
||||
fi
|
||||
;;
|
||||
screenshot-all)
|
||||
${lib.getExe pkgs.magic_rb.screenshot} screen
|
||||
;;
|
||||
screenshot-select)
|
||||
${lib.getExe pkgs.magic_rb.screenshot} select
|
||||
;;
|
||||
screenshot-focused)
|
||||
${lib.getExe pkgs.magic_rb.screenshot} focused
|
||||
;;
|
||||
suspend)
|
||||
systemctl suspend
|
||||
;;
|
||||
reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
poweroff)
|
||||
systemctl poweroff
|
||||
;;
|
||||
kexec)
|
||||
sudo -A kexec -l /run/current-system/kernel --initrd=/run/current-system/initrd --reuse-cmdline
|
||||
systemctl kexec
|
||||
;;
|
||||
logout)
|
||||
loginctl terminate-session $XDG_SESSION_ID
|
||||
;;
|
||||
nmtui)
|
||||
alacritty -e nmtui
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
'';
|
||||
"dmenu_run" = "${pkgs.dmenu}/bin/dmenu_run";
|
||||
"polybar" = pkgs.writeShellScript "polybar"
|
||||
''
|
||||
monitors=$(polybar --list-monitors | cut -f 1 -d':')
|
||||
MONITOR=''${monitors[$1]} ${lib.getExe pkgs.polybarFull} -c ${./polybar.ini} top
|
||||
'';
|
||||
"dunst" = lib.getExe pkgs.dunst;
|
||||
"dunstConfig" = ./dunstrc;
|
||||
|
||||
"picom" = lib.getExe pkgs.picom;
|
||||
"picomConfig" = ./picom.conf;
|
||||
"picomArgs" =
|
||||
if cfg.picomExperimentalBackends
|
||||
then "--experimental-backends"
|
||||
else "";
|
||||
|
||||
"keynav" = lib.getExe pkgs.keynav;
|
||||
"lightLocker" = lib.getExe pkgs.lightlocker;
|
||||
"lightLockerCommand" = "${pkgs.lightlocker}/bin/light-locker-command";
|
||||
"brightnessctl" = lib.getExe pkgs.brightnessctl;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
10
home-manager/modules/xmonad/hie.yaml
Normal file
10
home-manager/modules/xmonad/hie.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
cradle:
|
||||
stack:
|
||||
- path: "./src"
|
||||
component: "xmonad-config:lib"
|
||||
|
||||
- path: "./app/Main.hs"
|
||||
component: "xmonad-config:exe:xmonad-exe"
|
||||
|
||||
- path: "./test"
|
||||
component: "xmonad-config:test:xmonad-test"
|
64
home-manager/modules/xmonad/package.yaml
Normal file
64
home-manager/modules/xmonad/package.yaml
Normal file
|
@ -0,0 +1,64 @@
|
|||
name: xmonad-config
|
||||
version: 0.1.0.0
|
||||
github: "githubuser/xmonad"
|
||||
license: BSD-3-Clause
|
||||
author: "Author name here"
|
||||
maintainer: "example@example.com"
|
||||
copyright: "2023 Author name here"
|
||||
|
||||
extra-source-files:
|
||||
- README.md
|
||||
- CHANGELOG.md
|
||||
|
||||
# Metadata used when publishing your package
|
||||
# synopsis: Short description of your package
|
||||
# category: Web
|
||||
|
||||
# To avoid duplicated efforts in documentation and dealing with the
|
||||
# complications of embedding Haddock markup inside cabal files, it is
|
||||
# common to point users to the README.md file.
|
||||
description: Please see the README on GitHub at <https://github.com/githubuser/xmonad#readme>
|
||||
|
||||
dependencies:
|
||||
- base >= 4.7 && < 5
|
||||
- containers
|
||||
- text
|
||||
- xmobar
|
||||
- xmonad
|
||||
- xmonad-contrib
|
||||
|
||||
ghc-options:
|
||||
- -Wall
|
||||
- -Wcompat
|
||||
- -Widentities
|
||||
- -Wincomplete-record-updates
|
||||
- -Wincomplete-uni-patterns
|
||||
- -Wmissing-export-lists
|
||||
- -Wmissing-home-modules
|
||||
- -Wpartial-fields
|
||||
- -Wredundant-constraints
|
||||
|
||||
library:
|
||||
source-dirs: src
|
||||
|
||||
executables:
|
||||
xmonad-exe:
|
||||
main: Main.hs
|
||||
source-dirs: app
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
dependencies:
|
||||
- xmonad-config
|
||||
|
||||
tests:
|
||||
xmonad-test:
|
||||
main: Spec.hs
|
||||
source-dirs: test
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
dependencies:
|
||||
- xmonad
|
74
home-manager/modules/xmonad/scripts/auxmenu.sh
Normal file
74
home-manager/modules/xmonad/scripts/auxmenu.sh
Normal file
|
@ -0,0 +1,74 @@
|
|||
export SUDO_ASKPASS=/home/main/.xmonad/runenv/libexec/x11-ssh-askpass
|
||||
|
||||
_options="toggle-mic\ntoggle-wifi\ntoggle-bluetooth\nscreenshot-all\nscreenshot-select\nscreenshot-focused\nsuspend\nreboot\nkexec\npoweroff\nlogout\nnmtui\ntoggle-disable-while-typing"
|
||||
|
||||
_option="$(echo -e $_options | emacs-rofi "command: " 90 30 | awk '{print $1}' | tr -d '\r\n')"
|
||||
if [ ''${#_option} -gt 0 ]
|
||||
then
|
||||
case $_option in
|
||||
toggle-mic)
|
||||
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
;;
|
||||
toggle-wifi)
|
||||
function get_wifi_state() {
|
||||
interface="$1"
|
||||
|
||||
iwlist "$interface" power | sed 's/wlan0//' | awk '{$1=$1};1' | tr -s ' ' | grep "Current mode" | cut -d ':' -f 2
|
||||
}
|
||||
if [ "$(get_wifi_state "wlan0")" = "on" ]
|
||||
then
|
||||
iwctl adapter phy0 set-property Powered off
|
||||
else
|
||||
iwctl adapter phy0 set-property Powered on
|
||||
fi
|
||||
;;
|
||||
toggle-bluetooth)
|
||||
if [ "$(bluetoothctl show | grep -i powered | tr '\t' ' ' | cut -f 3 -d ' ')" = "yes" ]
|
||||
then
|
||||
bluetoothctl power off
|
||||
else
|
||||
bluetoothctl power on
|
||||
fi
|
||||
;;
|
||||
screenshot-all)
|
||||
screenshot screen
|
||||
;;
|
||||
screenshot-select)
|
||||
screenshot select
|
||||
;;
|
||||
screenshot-focused)
|
||||
screenshot focused
|
||||
;;
|
||||
suspend)
|
||||
systemctl suspend
|
||||
;;
|
||||
reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
poweroff)
|
||||
systemctl poweroff
|
||||
;;
|
||||
kexec)
|
||||
sudo -A kexec -l /run/current-system/kernel --initrd=/run/current-system/initrd --reuse-cmdline
|
||||
systemctl kexec
|
||||
;;
|
||||
logout)
|
||||
loginctl terminate-session $XDG_SESSION_ID
|
||||
;;
|
||||
nmtui)
|
||||
alacritty -e nmtui
|
||||
;;
|
||||
toggle-disable-while-typing)
|
||||
ID=$(xinput list|grep touch -i|sed -nr 's/.*id=([0-9]*).*/\1/p')
|
||||
IN_TAP=$(xinput list-props $ID|grep "Disable While"|grep -v "Default" |sed -nr 's/.*\(([0-9][0-9][0-9])\).*/\1/p')
|
||||
CURRENT=$(xinput list-props 12 | grep "Disable While" | grep -v "Default" | sed -nr 's/.*([0-9]+)$/\1/p')
|
||||
if [ "$CURRENT" == "1" ] ; then
|
||||
xinput set-prop $ID $IN_TAP 0
|
||||
else
|
||||
xinput set-prop $ID $IN_TAP 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
1
home-manager/modules/xmonad/scripts/emacs-vterm.sh
Normal file
1
home-manager/modules/xmonad/scripts/emacs-vterm.sh
Normal file
|
@ -0,0 +1 @@
|
|||
emacsclient -cn --eval "(progn (vterm t) (set-frame-parameter nil 'unsplittable t) (set-window-dedicated-p (selected-window) t))"
|
3
home-manager/modules/xmonad/scripts/polybar-mm.sh
Normal file
3
home-manager/modules/xmonad/scripts/polybar-mm.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
monitors=$(polybar --list-monitors | cut -f 1 -d':' | tr '\n' ' ')
|
||||
monitors=($monitors)
|
||||
MONITOR=''${monitors[$1]} polybar -c /home/main/dotfiles/home-manager/modules/xmonad/polybar.ini top
|
8
home-manager/modules/xmonad/scripts/toggle-touchpad.sh
Normal file
8
home-manager/modules/xmonad/scripts/toggle-touchpad.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
read TPdevice <<< $( xinput | sed -nre '/TouchPad|Touchpad/s/.*id=([0-9]*).*/\1/p' )
|
||||
state=$( xinput list-props "$TPdevice" | grep "Device Enabled" | grep -o "[01]$" )
|
||||
|
||||
if [ "$state" -eq '1' ];then
|
||||
xinput --disable "$TPdevice" && notify-send -i emblem-nowrite "Touchpad" "Disabled"
|
||||
else
|
||||
xinput --enable "$TPdevice" && notify-send -i emblem-nowrite "Touchpad" "Enabled"
|
||||
fi
|
9
home-manager/modules/xmonad/scripts/xmonad-reload.sh
Normal file
9
home-manager/modules/xmonad/scripts/xmonad-reload.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
notify-send -t 5000 "recompiling xmonad"
|
||||
|
||||
if xmonad --recompile
|
||||
then
|
||||
notify-send -t 5000 "compilation succeeded"
|
||||
xmonad --restart
|
||||
else
|
||||
notify-send -t 5000 "compilation failed"
|
||||
fi
|
6
home-manager/modules/xmonad/src/Lib.hs
Normal file
6
home-manager/modules/xmonad/src/Lib.hs
Normal file
|
@ -0,0 +1,6 @@
|
|||
module Lib
|
||||
( someFunc
|
||||
) where
|
||||
|
||||
someFunc :: IO ()
|
||||
someFunc = putStrLn "someFunc"
|
69
home-manager/modules/xmonad/stack.yaml
Normal file
69
home-manager/modules/xmonad/stack.yaml
Normal file
|
@ -0,0 +1,69 @@
|
|||
# This file was automatically generated by 'stack init'
|
||||
#
|
||||
# Some commonly used options have been documented as comments in this file.
|
||||
# For advanced use and comprehensive documentation of the format, please see:
|
||||
# https://docs.haskellstack.org/en/stable/yaml_configuration/
|
||||
|
||||
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
|
||||
# A snapshot resolver dictates the compiler version and the set of packages
|
||||
# to be used for project dependencies. For example:
|
||||
#
|
||||
# resolver: lts-3.5
|
||||
# resolver: nightly-2015-09-21
|
||||
# resolver: ghc-7.10.2
|
||||
#
|
||||
# The location of a snapshot can be provided as a file or url. Stack assumes
|
||||
# a snapshot provided as a file might change, whereas a url resource does not.
|
||||
#
|
||||
# resolver: ./custom-snapshot.yaml
|
||||
# resolver: https://example.com/snapshots/2018-01-01.yaml
|
||||
resolver: lts-21.11
|
||||
|
||||
# User packages to be built.
|
||||
# Various formats can be used as shown in the example below.
|
||||
#
|
||||
# packages:
|
||||
# - some-directory
|
||||
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
|
||||
# subdirs:
|
||||
# - auto-update
|
||||
# - wai
|
||||
packages:
|
||||
- .
|
||||
# Dependency packages to be pulled from upstream that are not in the resolver.
|
||||
# These entries can reference officially published versions as well as
|
||||
# forks / in-progress versions pinned to a git hash. For example:
|
||||
#
|
||||
extra-deps:
|
||||
- .packages/xmobar
|
||||
- .packages/xmonad-contrib
|
||||
- .packages/xmonad
|
||||
#
|
||||
# extra-deps: []
|
||||
|
||||
# Override default flag values for local packages and extra-deps
|
||||
flags:
|
||||
# xmobar:
|
||||
# all_extensions: true
|
||||
|
||||
# Extra package databases containing global packages
|
||||
# extra-package-dbs: []
|
||||
|
||||
# Control whether we use the GHC we find on the path
|
||||
# system-ghc: true
|
||||
#
|
||||
# Require a specific version of Stack, using version ranges
|
||||
# require-stack-version: -any # Default
|
||||
# require-stack-version: ">=2.11"
|
||||
#
|
||||
# Override the architecture used by Stack, especially useful on Windows
|
||||
# arch: i386
|
||||
# arch: x86_64
|
||||
#
|
||||
# Extra directories used by Stack for building
|
||||
# extra-include-dirs: [/path/to/dir]
|
||||
# extra-lib-dirs: [/path/to/dir]
|
||||
#
|
||||
# Allow a newer minor version of GHC than the snapshot specifies
|
||||
# compiler-check: newer-minor
|
||||
allow-newer: true
|
12
home-manager/modules/xmonad/stack.yaml.lock
Normal file
12
home-manager/modules/xmonad/stack.yaml.lock
Normal file
|
@ -0,0 +1,12 @@
|
|||
# This file was autogenerated by Stack.
|
||||
# You should not edit this file by hand.
|
||||
# For more information, please see the documentation at:
|
||||
# https://docs.haskellstack.org/en/stable/lock_files
|
||||
|
||||
packages: []
|
||||
snapshots:
|
||||
- completed:
|
||||
sha256: 64d66303f927e87ffe6b8ccf736229bf608731e80d7afdf62bdd63c59f857740
|
||||
size: 640037
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/11.yaml
|
||||
original: lts-21.11
|
2
home-manager/modules/xmonad/test/Spec.hs
Normal file
2
home-manager/modules/xmonad/test/Spec.hs
Normal file
|
@ -0,0 +1,2 @@
|
|||
main :: IO ()
|
||||
main = putStrLn "Test suite not yet implemented"
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue