Compare commits

...

230 commits

Author SHA1 Message Date
f2381e0978 20250416.1744836110 2025-04-16 22:41:50 +02:00
4ac6476247 20250416.1744835958 2025-04-16 22:39:18 +02:00
c1dadb1266 20250416.1744835323 2025-04-16 22:28:43 +02:00
285a4b58c1 20250416.1744835274 2025-04-16 22:27:54 +02:00
2ab53d7a93 20250408.1744116663 2025-04-08 14:51:03 +02:00
582a9f1380 20250407.1744046757 2025-04-07 19:25:57 +02:00
cfec3861e2 20250405.1743842810 2025-04-05 10:46:50 +02:00
491c833040 20250405.1743842637 2025-04-05 10:43:57 +02:00
9216ed84a5 20250325.1742930102 2025-03-25 20:15:02 +01:00
0610187aa5 20250325.1742929679 2025-03-25 20:07:59 +01:00
cd8cf52814 20250322.1742674833 2025-03-22 21:20:33 +01:00
06fe5a1390 20250319.1742409012 2025-03-19 19:30:12 +01:00
db3becd9f0 20250319.1742378234 2025-03-19 10:57:14 +01:00
b5e2a46ab1 20250318.1742336578 2025-03-18 23:22:58 +01:00
fa8765d3ab 20250318.1742300386 2025-03-18 13:19:46 +01:00
35aa22421c 20250317.1742200339 2025-03-17 09:32:19 +01:00
9e7a87d056 gnome 2025-03-16 22:33:04 +01:00
86ed1d5480 20250225.1740494840 2025-02-25 15:47:20 +01:00
cf5a3b213e 20250222.1740215563 2025-02-22 10:12:43 +01:00
e0ab62fb11 20250222.1740211692 2025-02-22 09:08:12 +01:00
91da352530 20250217.1739782560 2025-02-17 09:56:00 +01:00
9cd550241a 20250216.1739703209 2025-02-16 11:53:29 +01:00
da74ddbaf1 20250214.1739539902 2025-02-14 14:31:42 +01:00
be6708340a 20250212.1739395134 2025-02-12 22:18:54 +01:00
ee4f2d7fe9 20250212.1739357862 2025-02-12 11:57:42 +01:00
2fd8180211 20250212.1739354009 2025-02-12 10:53:29 +01:00
7010641ed8 20250211.1739298558 2025-02-11 19:29:18 +01:00
9ee2590395 20250211.1739265359 2025-02-11 10:15:59 +01:00
de2cba38a6 20250208.1739006942 2025-02-08 10:29:02 +01:00
e8d8007700 20250206.1738834827 diary doctor speed imporoved 2025-02-06 10:40:27 +01:00
8024771933 20250206.1738834765 diary doctor speed imporoved 2025-02-06 10:39:25 +01:00
0c7242d138 20250204.1738691035 2025-02-04 18:43:55 +01:00
9c73d13cea 20250131.1738334466 2025-01-31 15:41:06 +01:00
c8974711bf 20250129.1738175405 2025-01-29 19:30:05 +01:00
0e436455c4 20250128.1738075562 2025-01-28 15:46:02 +01:00
64532eb1b6 20250128.1738075081 2025-01-28 15:38:01 +01:00
5a0ffd895a 20250126.1737921969 2025-01-26 21:06:09 +01:00
9968632e62 20250124.1737754115 2025-01-24 22:28:35 +01:00
c9e005ba47 20250123.1737668288 2025-01-23 22:38:08 +01:00
2a80a6530b 20250123.1737641720 2025-01-23 15:15:20 +01:00
30cff1322d 20250122.1737561982 2025-01-22 17:06:22 +01:00
c8fe20e163 20250121.1737481241 2025-01-21 18:40:41 +01:00
3e873b033b 20250121.1737480823 2025-01-21 18:33:43 +01:00
8081afdec9 20250121.1737480707 2025-01-21 18:31:47 +01:00
412cec3135 20250119.1737319328 2025-01-19 21:42:08 +01:00
4294736372 20250119.1737302954 2025-01-19 17:09:14 +01:00
177ed7f0f1 20250119.1737294734 2025-01-19 14:52:14 +01:00
8c4e07134c 20250118.1737214138 2025-01-18 16:28:58 +01:00
da6c370616 20250118.1737211152 2025-01-18 15:39:12 +01:00
4093bc4581 20250118.1737209075 2025-01-18 15:04:35 +01:00
ed1f856b78 20250118.1737193804 2025-01-18 10:50:04 +01:00
ba81851219 20250117.1737145183 2025-01-17 21:19:43 +01:00
df2469e105 20250117.1737144422 2025-01-17 21:07:02 +01:00
6c2f5819e8 20250117.1737137987 2025-01-17 19:19:47 +01:00
0de118b032 20250117.1737136826 2025-01-17 19:00:26 +01:00
0fb210e8cb 20250117.1737135266 2025-01-17 18:34:26 +01:00
d1aecddaad 20250117.1737117012 2025-01-17 13:30:12 +01:00
1e1510ee9e 20250116.1737043288 2025-01-16 17:01:28 +01:00
bc93e6684e 20250116.1737043027 2025-01-16 16:57:07 +01:00
b605c728ee 20250115.1736964880 2025-01-15 19:14:40 +01:00
d19e1afc8c 20250113.1736802902 2025-01-13 22:15:02 +01:00
ba47a5917e 20250113.1736787084 2025-01-13 17:51:24 +01:00
cfce6c21e1 20250112.1736693199 2025-01-12 15:46:39 +01:00
d6dbebc9f8 20250108.1736331439 2025-01-08 11:17:19 +01:00
4f80048066 20250106.1736195231 2025-01-06 21:27:11 +01:00
82d85f1fcb 20250105.1736080155 2025-01-05 13:29:15 +01:00
8b0fe5cfc1 20250105.1736079067 2025-01-05 13:11:07 +01:00
0412ac3626 20250103.1735924258 2025-01-03 18:10:58 +01:00
64309677b7 202501021735818025 2025-01-02 12:40:25 +01:00
30b8c239bb 202501011735764831 2025-01-01 21:53:51 +01:00
a621173e51 202501011735751756 2025-01-01 18:15:56 +01:00
470502d938 202501011735747623 2025-01-01 17:07:03 +01:00
85e99bfcdc 202412311735666392 HAPPY NEW YEAR 2024-12-31 18:33:12 +01:00
88f64bd174 202412301735591356 HAPPY NEW YEAR 2024-12-30 21:42:36 +01:00
65240b8408 202412301735586432 HAPPY NEW YEAR 2024-12-30 20:20:32 +01:00
9789a3db29 202412301735554539 2024-12-30 11:28:59 +01:00
05c0992aaa 202412301735554458 2024-12-30 11:27:38 +01:00
681f02385c 202412291735476965 2024-12-29 13:56:05 +01:00
a1cb7d1575 202412291735469967 2024-12-29 11:59:27 +01:00
d06308dc87 202412291735469867 2024-12-29 11:57:47 +01:00
f79ba355c4 202412231734942458 2024-12-23 09:27:38 +01:00
49797f54ce 202412211734803879 2024-12-21 18:57:59 +01:00
55f8c30eab 20241220-1 2024-12-20 12:12:30 +01:00
5a1293b765 20241220 2024-12-20 10:27:06 +01:00
f9295887f2 20241219 2024-12-19 21:40:35 +01:00
c0e73aa4cf 20241214 2024-12-14 22:33:46 +01:00
8cff3739ad 20241214 2024-12-14 15:30:56 +01:00
e4a5818b39 20241212 2024-12-12 03:03:05 +01:00
ab8752cbac 20241208 2024-12-08 15:52:58 +01:00
d2bc5b7115 20241203 2024-12-03 22:43:50 +01:00
e60f96b03c 20241201 2024-12-01 15:02:36 +01:00
128dd01f22 20241129 2024-11-29 18:36:01 +01:00
16907ab35b 20241128-1 2024-11-28 16:34:48 +01:00
6629c85f02 20241128 2024-11-28 14:54:14 +01:00
76a27e4750 20241127 2024-11-27 19:25:56 +01:00
5dcaeaa961 20241125 2024-11-25 15:58:26 +01:00
1e64a7d670 20241124 2024-11-24 18:47:52 +01:00
b7591e4663 20241118-12 2024-11-18 21:17:32 +01:00
0cf25b291e 20241118-1 2024-11-18 18:13:38 +01:00
01150ca2fa 20241118 2024-11-18 18:11:06 +01:00
7aee7348cf 20241115 2024-11-15 11:25:55 +01:00
d95e42494e 20241111 2024-11-11 11:09:19 +01:00
9a26e1370c 20241109 2024-11-09 16:38:27 +01:00
c4d3a5d9a6 20241108-4 2024-11-08 16:34:15 +01:00
2f36f3350a 20241108-3 2024-11-08 14:44:45 +00:00
26d79efc29 20241108-2 2024-11-08 14:38:40 +00:00
1028c62c0b 20241108-1 2024-11-08 14:37:34 +00:00
275ea9cc13 20241108 2024-11-08 12:06:06 +00:00
be8c893713 20241107-2 2024-11-07 23:37:38 +00:00
6a454fe4f7 20241107-1 2024-11-07 23:28:37 +00:00
2386104331 2024-11-07 2024-11-07 19:58:25 +00:00
7d9e95fafa 2024-11-06 2024-11-06 21:28:27 +00:00
dfd3191ee9 20241028-1 2024-10-28 21:03:27 +01:00
ea1e4bafba 20241028 2024-10-28 20:54:56 +01:00
15aee3e3fb 20241012 2024-10-12 20:07:18 +02:00
f4a62d0f92 07102024 2024-10-07 22:17:00 +02:00
1969606806 05102024 2024-10-05 20:59:13 +02:00
341f231742 29092024 2024-09-29 20:33:29 +02:00
dff4d40b46 29092024 2024-09-29 16:08:33 +02:00
9de3a488a7 28092024 2024-09-28 21:44:09 +02:00
91ff389a40 24092024-1 2024-09-24 19:53:09 +02:00
beda89a241 24092024 2024-09-24 13:42:47 +02:00
7405cb860a 22092024-1 2024-09-22 21:07:52 +02:00
9e03e300d2 22092024 2024-09-22 20:55:44 +02:00
b0a10e28ac 22092024 2024-09-22 20:53:22 +02:00
4bec6a7ce2 21092024 2024-09-21 15:12:00 +02:00
b386e670ca 21092024 2024-09-21 15:11:46 +02:00
8b83153632 20092024 2024-09-20 18:19:11 +02:00
857c9f537b 18092024 2024-09-18 17:18:02 +02:00
72da4e7cd2 18092024 2024-09-18 17:16:56 +02:00
15464e5135 20240916 2024-09-16 16:15:00 +02:00
5e6226f6d3 20240915 2024-09-15 13:17:11 +02:00
082fbb76af 12092024 2024-09-12 19:52:01 +02:00
foozzi
5b872ccdcd 20240908-5 2024-09-08 23:05:47 +02:00
foozzi
30145ea4eb 20240908-4 2024-09-08 20:49:24 +02:00
foozzi
2ab6b49ed7 20240908-3 2024-09-08 19:25:52 +02:00
foozzi
d49478dd61 20240908 2024-09-08 15:25:37 +02:00
foozzi
470f518160 20240908-1 2024-09-08 00:27:55 +02:00
foozzi
2b02e87acd 20240908 2024-09-08 00:26:36 +02:00
foozzi
8f8430f181 20240907 2024-09-07 12:46:51 +02:00
foozzi
b8f5e6e64e 20240907 2024-09-07 12:46:11 +02:00
foozzi
54d04ae856 20240907 2024-09-07 11:13:28 +02:00
foozzi
e33f5ce558 20240902-1 2024-09-02 14:21:21 +02:00
foozzi
bb6d5bd0c7 20240902 2024-09-02 13:29:36 +02:00
foozzi
ee7d6de066 20240831 2024-08-31 23:37:49 +02:00
foozzi
2e038a7559 20240821 2024-08-21 17:07:25 +02:00
foozzi
020a1bcbf6 20240820 2024-08-20 19:04:43 +02:00
foozzi
f5a78d3b59 20240818-1 2024-08-18 17:09:30 +02:00
foozzi
bbf6f65419 20240818 2024-08-18 16:57:33 +02:00
foozzi
4396724c36 20240807 2024-08-07 17:32:00 +02:00
foozzi
0b3e9c6d4b 28072024-1 2024-07-28 18:06:27 +02:00
foozzi
6e16a81d2c 28072024 2024-07-28 17:48:16 +02:00
foozzi
3364fcbd57 27072024-2 2024-07-27 23:16:29 +02:00
foozzi
a80d26fbfb 27072024-1 2024-07-27 23:06:56 +02:00
foozzi
617754dfd4 27072024 2024-07-27 21:50:41 +02:00
foozzi
827576fe91 01072024 2024-07-01 20:21:14 +02:00
foozzi
5d2e4ff91f 26062024-1 2024-06-26 14:05:17 +02:00
foozzi
e2f8029d09 26062024 2024-06-26 14:01:45 +02:00
foozzi
ae4f261290 16062024-2 2024-06-16 19:25:38 +02:00
foozzi
f17c511e7f 16062024-1 2024-06-16 19:00:02 +02:00
foozzi
2d63b0fdba 16062024 2024-06-16 18:59:04 +02:00
foozzi
459eb0a498 11062024 2024-06-11 18:51:37 +02:00
foozzi
184ecde6c5 09062024 2024-06-09 15:44:43 +02:00
foozzi
bfc74df202 23052024 2024-05-23 23:05:40 -04:00
foozzi
4ad757fc3f 23052024 2024-05-23 23:04:31 -04:00
foozzi
982e9c644a 22052024 2024-05-22 22:36:10 -04:00
foozzi
40a5a2e158 21052024-1 2024-05-21 11:21:13 -04:00
foozzi
d4cd83058e 21052024 2024-05-21 11:17:34 -04:00
foozzi
cee692ab2b 20052024 2024-05-20 22:37:52 -04:00
foozzi
7083eba3a9 06052024-1 2024-05-06 21:52:23 -04:00
foozzi
ed480c8445 06052024 2024-05-06 21:47:37 -04:00
foozzi
0c209480a9 21042024 2024-04-21 11:25:04 -04:00
foozzi
289fa44c37 07042024 2024-04-07 21:06:47 -04:00
foozzi
e9400dcdcb 24032024 2024-03-24 14:12:51 -04:00
foozzi
daddaad915 21032024-1 2024-03-21 11:39:06 -04:00
foozzi
adc2dd4618 21032024 2024-03-21 11:36:09 -04:00
foozzi
f3f42a4c2b 16032024-4 2024-03-16 21:09:48 -04:00
foozzi
5b8e3e4cf0 16032024-3 2024-03-16 20:57:21 -04:00
foozzi
e562b085a9 16032024-2 2024-03-16 17:05:20 -04:00
foozzi
239862224c 16032024-1 2024-03-16 17:01:05 -04:00
foozzi
6a7ff44c36 16032024 2024-03-16 16:58:17 -04:00
fz0x1
addcf4ebe7 Update README.md 2024-03-16 11:31:23 -04:00
foozzi
c17d90c5ee 16032024 2024-03-16 11:21:28 -04:00
foozzi
69217115a3 15032024 2024-03-15 13:49:07 -04:00
foozzi
41d0ec3b74 14032024 2024-03-14 22:21:07 -04:00
foozzi
1b1e21e742 13032024 2024-03-13 14:31:00 -04:00
foozzi
3e66ac3e83 12032024 2024-03-12 23:02:19 -04:00
foozzi
14cedae718 12032024 2024-03-12 11:44:35 -04:00
foozzi
663f358e99 Merge branch 'master' of github.com:foozzi/.dotfiles 2024-03-10 19:39:05 -04:00
foozzi
b6b6212d6f 10032024 2024-03-10 19:39:02 -04:00
foozzi
f0abd19df5 05032024 2024-03-05 09:47:11 -05:00
foozzi
094b18441f Merge branch 'master' of github.com:foozzi/.dotfiles 2024-03-04 18:13:29 -05:00
foozzi
0c4dc059b0 04032024-2 2024-03-04 18:13:12 -05:00
foozzi
3fb4cbb91b 04032024-1 2024-03-04 10:05:46 -05:00
foozzi
765e3391a1 04032024 2024-03-04 10:01:11 -05:00
foozzi
878d5475c9 02032024 2024-03-02 09:21:33 -05:00
foozzi
6432b026bd 01032024 2024-03-01 21:50:59 -05:00
foozzi
d6cd57da19 01032024 2024-03-01 21:50:43 -05:00
foozzi
8b695c8f54 28022024 2024-02-28 19:45:12 -05:00
foozzi
288955c4cf 27022024-2 2024-02-27 22:43:38 -05:00
foozzi
e172c1bd99 27022024-1 2024-02-27 17:25:13 -05:00
foozzi
8cad76be8e 27022024 2024-02-27 17:14:57 -05:00
foozzi
b71f36ce03 25022024-1 2024-02-25 21:26:54 -05:00
foozzi
7e02730791 25022024 2024-02-25 01:24:55 -05:00
foozzi
7aefca713e 24022024-2 2024-02-24 12:30:18 -05:00
foozzi
14091e7897 24022024-1 2024-02-24 12:19:14 -05:00
foozzi
722c90257f 24022024 2024-02-24 12:17:24 -05:00
foozzi
dab7bd09bc 23022024-5 2024-02-23 21:54:45 -05:00
foozzi
06e5331c46 23022024-4 2024-02-23 21:53:50 -05:00
foozzi
8930c5b7df 23022024-3 2024-02-23 15:20:44 -05:00
foozzi
ce6875c6ed 23022024-2 2024-02-23 15:15:15 -05:00
foozzi
b095a667c9 23022024-1 2024-02-23 12:40:54 -05:00
foozzi
601428c3b3 23022024 2024-02-23 00:03:37 -05:00
foozzi
2c6c55cbe7 22022024-1 2024-02-22 22:39:09 -05:00
foozzi
6d5a3deaf3 22022024 2024-02-22 12:29:23 -05:00
foozzi
a6d4b3136a 21022024-1 2024-02-21 20:15:34 -05:00
foozzi
eae668f321 21022024 2024-02-21 19:57:54 -05:00
foozzi
e0c18d410a Merge branch 'master' of github.com:foozzi/.dotfiles 2024-02-21 19:54:44 -05:00
foozzi
de61c8af3e 21022024 2024-02-21 19:52:31 -05:00
foozzi
a1c77cf500 20022024 2024-02-20 09:59:14 -05:00
foozzi
1a235476c4 14022024 2024-02-14 11:43:39 -05:00
foozzi
115361bc62 07022024-4 2024-02-09 18:29:52 -05:00
foozzi
b7ff3c6f6a 07022024-3 2024-02-09 18:27:55 -05:00
foozzi
dc1fb17135 09022024-2 2024-02-09 18:14:06 -05:00
foozzi
26f79633a9 09022024-1 2024-02-09 17:36:16 -05:00
foozzi
cdb4925d3f 09022024 2024-02-09 17:32:47 -05:00
foozzi
ea5ed11807 07022024-1 2024-02-07 21:00:04 -05:00
foozzi
283354847b 04022024 2024-02-04 17:53:55 -05:00
foozzi
46ad5bb028 03022024 2024-02-03 19:11:24 -05:00
fz0x1
4eb9d08861 Update README.md 2024-02-02 17:03:02 -05:00
132 changed files with 36092 additions and 1362 deletions

12
.gitattributes vendored
View file

@ -1,3 +1,13 @@
global/.ssh/config filter=git-crypt diff=git-crypt
global/.config/mutt/settings filter=git-crypt diff=git-crypt
linux/.ssh/specific_config filter=git-crypt diff=git-crypt
macos/.ssh/specific_config filter=git-crypt diff=git-crypt
global/.config/mutt/posteo_isync.gpg filter=git-crypt diff=git-crypt
global/.config/mutt/gmail_isync.gpg filter=git-crypt diff=git-crypt
linux/.gnupg/gpg-agent.conf filter=git-crypt diff=git-crypt
global/scripts/vimwiki_diary_template filter=git-crypt diff=git-crypt
global/.zshrc-secrets filter=git-crypt diff=git-crypt
global/.borgmatic/sensitive.yaml filter=git-crypt diff=git-crypt
global/.borgmatic/pass.gpg filter=git-crypt diff=git-crypt
global/.newsboat/miniflux filter=git-crypt diff=git-crypt
global/.linkding_env filter=git-crypt diff=git-crypt

6
.github/README.md vendored
View file

@ -1,6 +1,10 @@
...
### Install
```bash
# linux
stow --no-folding global
stow --no-folding linux
# macOS
stow --no-folding global
stow --no-folding macos
```

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
global/.config/nvim/lazy-lock.json

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "global/.config/mutt/gruvbox"]
path = global/.config/mutt/gruvbox
url = https://git.sthu.org/repos/mutt-gruvbox.git

View file

@ -0,0 +1 @@
{"borgmatic_version": "1.8.14", "config_paths": ["/Users/fz0x1/.borgmatic/sensitive.yaml"]}

BIN
global/.borgmatic/pass.gpg Normal file

Binary file not shown.

Binary file not shown.

View file

@ -1,8 +1,3 @@
import = [
"~/.config/alacritty/themes/dracula.toml",
"~/.config/alacritty/keybindings.toml"
]
live_config_reload = true
[cursor]
unfocused_hollow = true
@ -13,9 +8,6 @@ shape = "Block"
[env]
TERM = "xterm-256color"
[font]
size = 11
[font.bold]
family = "JetBrainsMono NF"
style = "Bold"
@ -41,16 +33,28 @@ multiplier = 3
save_to_clipboard = false
semantic_escape_chars = ",│`|:\"' ()[]{}<>\t"
[shell]
[terminal.shell]
args = ["-l", "-c", "tmux attach || tmux"]
program = "/bin/zsh"
[window]
decorations = "full"
decorations = "Buttonless"
dynamic_padding = false
dynamic_title = true
startup_mode = "Maximized"
# opacity = 1
# blur = false
[window.padding]
x = 2
y = 2
[general]
live_config_reload = true
import = [
"~/.config/alacritty/themes/gruvbox.toml",
"~/.config/alacritty/keybindings.toml",
"~/.config/alacritty/font.toml"
]
[terminal]

View file

@ -1,50 +0,0 @@
colors:
primary:
background: "#282a36"
foreground: "#f8f8f2"
bright_foreground: "#ffffff"
cursor:
text: "#282a36"
cursor: "#f8f8f2"
vi_mode_cursor:
text: CellBackground
cursor: CellForeground
selection:
text: CellForeground
background: "#44475a"
normal:
black: "#21222c"
red: "#ff5555"
green: "#50fa7b"
yellow: "#f1fa8c"
blue: "#bd93f9"
magenta: "#ff79c6"
cyan: "#8be9fd"
white: "#f8f8f2"
bright:
black: "#6272a4"
red: "#ff6e6e"
green: "#69ff94"
yellow: "#ffffa5"
blue: "#d6acff"
magenta: "#ff92df"
cyan: "#a4ffff"
white: "#ffffff"
search:
matches:
foreground: "#44475a"
background: "#50fa7b"
focused_match:
foreground: "#44475a"
background: "#ffb86c"
footer_bar:
background: "#282a36"
foreground: "#f8f8f2"
hints:
start:
foreground: "#282a36"
background: "#f1fa8c"
end:
foreground: "#f1fa8c"
background: "#282a36"

View file

@ -1,56 +0,0 @@
[colors.bright]
black = "#6272a4"
blue = "#d6acff"
cyan = "#a4ffff"
green = "#69ff94"
magenta = "#ff92df"
red = "#ff6e6e"
white = "#ffffff"
yellow = "#ffffa5"
[colors.cursor]
cursor = "#f8f8f2"
text = "#282a36"
[colors.footer_bar]
background = "#282a36"
foreground = "#f8f8f2"
[colors.hints.end]
background = "#282a36"
foreground = "#f1fa8c"
[colors.hints.start]
background = "#f1fa8c"
foreground = "#282a36"
[colors.normal]
black = "#21222c"
blue = "#bd93f9"
cyan = "#8be9fd"
green = "#50fa7b"
magenta = "#ff79c6"
red = "#ff5555"
white = "#f8f8f2"
yellow = "#f1fa8c"
[colors.primary]
background = "#282a36"
bright_foreground = "#ffffff"
foreground = "#f8f8f2"
[colors.search.focused_match]
background = "#ffb86c"
foreground = "#44475a"
[colors.search.matches]
background = "#50fa7b"
foreground = "#44475a"
[colors.selection]
background = "#44475a"
text = "CellForeground"
[colors.vi_mode_cursor]
cursor = "CellForeground"
text = "CellBackground"

View file

@ -0,0 +1 @@
../../../.dotfiles/global/.config/alacritty/themes/dracula.toml

View file

@ -0,0 +1,30 @@
# Colors (Gruvbox dark)
# Default colors
[colors.primary]
# hard contrast background = = '#1d2021'
background = '#282828'
# soft contrast background = = '#32302f'
foreground = '#ebdbb2'
# Normal colors
[colors.normal]
black = '#282828'
red = '#cc241d'
green = '#98971a'
yellow = '#d79921'
blue = '#458588'
magenta = '#b16286'
cyan = '#689d6a'
white = '#a89984'
# Bright colors
[colors.bright]
black = '#928374'
red = '#fb4934'
green = '#b8bb26'
yellow = '#fabd2f'
blue = '#83a598'
magenta = '#d3869b'
cyan = '#8ec07c'
white = '#ebdbb2'

View file

@ -0,0 +1,474 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. It is optional.
;; (setq user-full-name "John Doe"
;; user-mail-address "john@doe.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-symbol-font' -- for symbols
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 12.0))
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-one)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
;; (setq org-startup-with-inline-images t)
;; (add-hook 'org-mode-hook 'org-display-inline-images)
(setq ispell-program-name "hunspell")
(setq ispell-dictionary "en_US,ru_RU")
(after! ispell
(ispell-set-spellchecker-params)
(ispell-hunspell-add-multi-dic "en_US,ru_RU"))
(defun transform-square-brackets-to-round-ones(string-to-transform)
"Transforms [ into ( and ] into ), other chars left unchanged."
(concat
(mapcar #'(lambda (c) (if (equal c ?\[) ?\( (if (equal c ?\]) ?\) c))) string-to-transform)))
;; (defun get-current-layout ()
;; "Получить текущую раскладку клавиатуры для текущего окна с помощью xkb-switch."
;; (string-trim (shell-command-to-string "xkb-switch")))
;;
;; (defun set-layout (layout)
;; "Установить раскладку клавиатуры для текущего окна с помощью xkb-switch."
;; (shell-command (concat "xkb-switch -s " layout)))
;;
;; (defvar prev-lang "us"
;; "Хранит текущую раскладку перед переключением в insert mode.")
;;
;; (add-hook 'evil-insert-state-entry-hook
;; (lambda ()
;; (setq prev-lang (get-current-layout))
;; (set-layout "us"))) ;; Переключаем на английский в insert mode
;;
;; (add-hook 'evil-insert-state-exit-hook
;; (lambda ()
;; (set-layout prev-lang))) ;; Восстанавливаем предыдущую раскладку
(setq org-attach-method 'cp) ;; copy file to an attachments dir.
(setq org-attach-id-dir "~/org/attachments/")
(setq org-adapt-indentation t)
(setq org-startup-indented t)
(setq org-indent-mode t)
(setq org-archive-location "~/org/archive/%s_archive::")
(add-hook 'org-mode-hook
(lambda ()
(visual-line-mode 1)))
;;
(setq org-agenda-files '("~/org/inbox.org" "~/org/life.org" "~/org/braindump.org"))
(setq org-refile-targets '((org-agenda-files :maxlevel . 3)))
(setq org-refile-use-cache t)
(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)
(setq org-log-into-drawer t)
(use-package! org-habit
:after org
:config
(setq org-habit-following-days 7
org-habit-preceding-days 35
org-habit-show-habits t) )
;; clear cache every 5 minutes
(run-with-idle-timer 300 t (lambda ()
(org-refile-cache-clear)
(org-refile-get-targets)))
(use-package! org
:commands org-refile-cache-clear)
(use-package! anki-editor)
;; To open files with .journal extension in hledger-mode
(add-to-list 'auto-mode-alist '("\\.journal\\'" . hledger-mode))
;; Provide the path to you journal file.
;; The default location is too opinionated.
(setq hledger-jfile "~/.hledger/2025/all.journal")
(setq hledger-currency-string " ")
;;; Auto-completion for account names
;; For company-mode users,
;; (add-to-list 'company-backends 'hledger-company)
(use-package! org-roam
;; :ensure nil
:custom
(org-roam-directory "~/org/roam/")
(org-roam-capture-templates
'(("d" "default" plain
"%?\n\n\n* Key Features\n* Problems\n* Impact\n* Related:\n\n* References:\n"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+filetags:\n#+date: %U\n"))))
(custom-set-faces
'((org-roam-link org-roam-link-current)
:foreground "#e24888" :underline t))
:config
;; (org-roam-db-autosync-mode)
(setq org-roam-completion-everywhere t)
(setq org-roam-database-connector 'sqlite-builtin)
(setq org-roam-db-node-include-function
(lambda ()
(not (member "ATTACH" (org-get-tags)))))
)
(setq org-default-priority ?D)
(use-package! org-super-links
:bind (("C-c s s" . org-super-links-link)
("C-c s l" . org-super-links-store-link)
("C-c s C-l" . org-super-links-insert-link)))
(map! :leader
:desc "life" "e l" #'(lambda () (interactive) (find-file "~/org/life.org"))
:desc "braindump" "e d" #'(lambda () (interactive) (find-file "~/org/braindump.org"))
:desc "inbox" "e i" #'(lambda () (interactive) (find-file "~/org/inbox.org"))
:desc "articles" "e a" #'(lambda () (interactive) (find-file "~/org/articles.org"))
:desc "notes" "e n" #'(lambda () (interactive) (find-file "~/org/notes.org")))
(setq org-capture-templates
'(
("g" "Private"
entry (file+headline "~/org/private.org.gpg" "Private")
"* %?"
:empty-lines 0)
("d" "Braindump"
entry
(file+headline "~/org/inbox.org" "Inbox")
"* [%<%Y-%m-%d>] %?\n:PROPERTIES:\n:ID: %(org-id-new)\n:END:\n"
:empty-lines 0)
("p" "Project"
entry
(file+headline "~/org/life.org" "Projects")
"* %?\n:PROPERTIES:\n:ID: %(org-id-new)\n:CREATED: %t\n:END:\n\n** Tasks:\n** Notes:\n** Links:\n"
:empty-lines 0)
("n" "Note"
entry
(file+headline "~/org/notes.org" "2025")
"* %?\n:PROPERTIES:\n:ID: %(org-id-new)\n:DATE: %U\n:END:\n"
:empty-lines 0)
("j" "Journal Entry"
entry (file+datetree "~/org/journal.org")
"* Event: %?\n\n %i\n\n From: %a"
:empty-lines 1)
("t" "Todo"
entry (file+headline "~/org/inbox.org" "Todo")
"* TODO [#C] %?\n:PROPERTIES:\n:Created: %T\n:END:\n "
:empty-lines 0)
("m" "Meeting"
entry (file+datetree "~/org/life.org" "Areas" "Meetings")
"* TODO [#A] %? :meeting:%^g\nSCHEDULED: %^T\n"
:tree-type week
:empty-lines 0)
;; create a flashcard with the content of the Xorg clipboard
("W" "Word"
entry (file+headline "~/org/english.org" "Words")
"* %x\n** Front\n%x\n** Back\n%^{PROMPT}"
:empty-lines 0)
("w" "Selected web capture"
entry
(file+headline "~/org/inbox.org" "Selected web capture")
"* [%<%Y-%m-%d>] [[%:link][%(transform-square-brackets-to-round-ones \"%:description\")]]\n:PROPERTIES:\n:ID: %(org-id-new)\n:END:\n Source: %:link\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n%?"
:empty-lines 0)
("L" "Unselected web capture"
entry
(file+headline "~/org/inbox.org" "Web links")
"* [%<%Y-%m-%d>] [[%:link][%(transform-square-brackets-to-round-ones \"%:description\")]] \n:PROPERTIES:\n:ID: %(org-id-new)\n:END:\n%?"
:empty-lines 0)))
(setq org-todo-keywords
'((sequence "TODO(t)" "STRT(i@/!)" "HOLD(b@)" "CRIT(q@)" "|" "DONE(d!)" "CNCL(c@/!)" )
))
(setq org-todo-keyword-faces
'(
("TODO" . (:foreground "GoldenRod" :weight bold))
("STRT" . (:foreground "Cyan" :weight bold))
("HOLD" . (:foreground "Red" :weight bold))
("DONE" . (:foreground "LimeGreen" :weight bold))
("CRIT" . (:foreground "DarkRed" :weight bold))
("CNCL" . (:foreground "DimGray" :weight bold))
))
;; Tags
(setq org-tag-alist '
(
;; context
(:startgroup)
("@shop" . ?s)
("@home" . ?h)
("@outdoor" . ?o)
("@any" . ?a)
("@meeting" . ?m)
(:endgroup)
;; basic tags
(:startgroup)
("chores" . ?C)
("meeting" . ?M)
("finance" . ?F)
("sport" . ?S)
("code" . ?O)
("social" . ?I)
("productivity" . ?P)
("study" . ?U)
("privacy" . ?R)
("family" . ?A)
("travel" . ?T)
("life" . ?L)
("health" . ?H)
("friends" . ?E)
("hobby" . ?B)
("research" . ?G)
("article" . ?I)
("job" . ?J)
(:endgroup)
;; Special tags
("CRITICAL" . ?X)
;; other tags
("backend")
("broken_code")
("frontend")
("hike")
("cycle")
("pkm")
("pentest")
("immigration")
("devops")
("pet")
("accomplishment")
("music")
("youtube")
("trash")
("devsecops")
("book")
("movie")
("inbox")
))
;; Tag colors
(setq org-tag-faces
'(
("@home" . (:foreground "medium MediumPurple" :weight bold))
("@outdoor" . (:foreground "royalblue1" :weight bold))
("@shop" . (:foreground "forest green" :weight bold))
("QA" . (:foreground "sienna" :weight bold))
("chores" . (:foreground "yellow1" :weight bold))
("sport" . (:foreground "green yellow" :weight bold))
("finance" . (:foreground "tomato" :weight bold))
("privacy" . (:foreground "dark olive green" :weight bold))
("study" . (:foreground "aquamarine" :weight bold))
("productivity" . (:foreground "violet" :weight bold))
("family" . (:foreground "medium violet red" :weight bold))
("health" . (:foreground "DarkOrange1" :weight bold))
("code" . (:foreground "snow3" :weight bold))
("travel" . (:foreground "salmon4" :weight bold))
("life" . (:foreground "goldenrod1" :weight bold))
("friends" . (:foreground "plum4" :weight bold))
("hobby" . (:foreground "SeaGreen1" :weight bold))
("social" . (:foreground "RoyalBlue1" :weight bold))
("research" . (:foreground "deep sky blue" :weight bold))
("meeting" . (:foreground "magenta" :weight bold))
("CRITICAL" . (:foreground "red1" :weight bold))
("job" . (:foreground "medium spring green" :weight bold))
)
)
;; Agenda View "d"
(defun air-org-skip-subtree-if-priority (priority)
"Skip an agenda subtree if it has a priority of PRIORITY.
PRIORITY may be one of the characters ?A, ?B, or ?C."
(let ((subtree-end (save-excursion (org-end-of-subtree t)))
(pri-value (* 1000 (- org-lowest-priority priority)))
(pri-current (org-get-priority (thing-at-point 'line t))))
(if (= pri-value pri-current)
subtree-end
nil)))
(defun air-org-skip-subtree-if-no-priority ()
"Skip an entry if it has no priority."
(let ((priority (org-entry-get (point) "PRIORITY")))
(if (not priority)
(save-excursion (org-end-of-subtree t)))))
(setq org-agenda-skip-deadline-if-done t)
(setq org-agenda-skip-timestamp-if-done t)
(setq org-agenda-tag-filter-preset '("-movies" "-book"))
(setq org-agenda-skip-function-global
'(org-agenda-skip-entry-if 'todo '("CNCL")))
(setq org-agenda-custom-commands
'(
;; Daily Agenda & TODOs
("d" "Daily agenda and all TODOs"
;; View 7 days in the calendar view
((agenda "" ((org-agenda-span 7)))
;; Display items with priority A
(tags "PRIORITY=\"A\""
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
(org-agenda-overriding-header "High-priority unfinished tasks:")))
;; Display items with priority B (really it is view all items minus A & C)
(tags "PRIORITY=\"B\""
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
(org-agenda-overriding-header "ALL normal priority tasks:")))
;; Display items with pirority C
(tags "PRIORITY=\"C\""
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
(org-agenda-overriding-header "Low-priority Unfinished tasks:")))
)
;; Don't compress things (change to suite your tastes)
((org-agenda-compact-blocks nil)))
;; My Super View
("j" "My Super View"
(
(agenda ""
(
(org-agenda-remove-tags t)
(org-agenda-span 7)
(org-agenda-skip-function
'(org-agenda-skip-entry-if 'todo 'done))
)
)
(alltodo ""
(
;; Remove tags to make the view cleaner
(org-agenda-remove-tags t)
(org-agenda-prefix-format " %t %s")
(org-agenda-overriding-header "CURRENT STATUS")
;; Define the super agenda groups (sorts by order)
(org-super-agenda-groups
'(
;; Filter where tag is CRITICAL
(:name "Critical Tasks"
:tag "CRIT"
:order 0
)
;; Filter where TODO state is IN-PROGRESS
(:name "Currently Working"
:todo "STRT"
:order 1
)
;; Filter where TODO state is BLOCKED or where the tag is obstacle
(:name "Problems & Blockers"
:todo "HOLD"
:order 3
)
;; Filter where tag is meeting and priority is A (only want TODOs from meetings)
(:name "Meeting Action Items"
:and (:tag "meeting" :priority "A")
:order 6
)
;; Filter where state is TODO and the priority is A and the tag is not meeting
(:name "Other Important Items"
:and (:todo "TODO" :priority "A" :not (:tag "meeting"))
:order 7
)
;; Filter where state is TODO and priority is B
(:name "General Backlog"
:and (:todo "TODO" :priority "B")
:order 8
)
;; Filter where the priority is C or less (supports future lower priorities)
(:name "Non Critical"
:priority<= "C"
:order 9
)
)
)
)
)
))
))
;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;;
;; (after! PACKAGE
;; (setq x y))
;;
;; The exceptions to this rule:
;;
;; - Setting file/directory variables (like `org-directory')
;; - Setting variables which explicitly tell you to set them before their
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
;; - Setting doom variables (which start with 'doom-' or '+').
;;
;; Here are some additional functions/macros that will help you configure Doom.
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; This will open documentation for it, including demos of how they are used.
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
;; etc).
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.

195
global/.config/doom/init.el Normal file
View file

@ -0,0 +1,195 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(setq doom-disable-lazy-load t)
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
;; company ; the ultimate code completion backend
(corfu +orderless) ; complete with cap(f), cape and a flying feather!
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
(vc-gutter +pretty) ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
;;workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;eww ; the internet is gross
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
;;vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
(spell +hunspell +everywhere +flyspell) ; tasing you for misspelling misspelling
grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
lookup ; navigate your code and its documentation
;;lsp ; M-x vscode
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
;;(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
;;json ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org +roam2 +pretty +habits +journal) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;graphviz ; diagrams for confusing yourself even more
;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
;;yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
:config
;;literate
(default +bindings +smartparens))

View file

@ -0,0 +1,57 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;; (package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/radian-software/straight.el#the-recipe-format
;; (package! another-package
;; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;; (package! this-package
;; :recipe (:host github :repo "username/repo"
;; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;; (package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;; (package! builtin-package :recipe (:nonrecursive t))
;; (package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see radian-software/straight.el#279)
;; (package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;; (package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;; (unpin! pinned-package)
;; ...or multiple packages
;; (unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;; (unpin! t)
;; (package! denote)
;; (package! citar)
;; (package! citar-denote)
(package! anki-editor
:recipe (:host github :repo "anki-editor/anki-editor"))
(package! org-super-links
:recipe (:host github :repo "toshism/org-super-links"))
(package! hledger-mode)

View file

@ -0,0 +1,25 @@
colors:
body: none
date: black
tags: yellow
title: cyan
default_hour: 9
default_minute: 0
editor: nvim
encrypt: true
highlight: true
indent_character: '|'
journals:
default:
display_format: markdown
encrypt: false
journal: /home/fz0x1/.diary/diary.jrnl
test:
display_format: markdown
encrypt: false
journal: /home/fz0x1/test.jrnl
linewrap: 80
tagsymbols: '@'
template: false
timeformat: '%F %r'
version: v4.2.1

View file

@ -0,0 +1,11 @@
set from = "foozzione@gmail.com"
set realname = "Tkachenko Ihor"
set mbox_type = Maildir
set folder = "$HOME/.local/share/email/foozzione_gmail"
set spoolfile = "+INBOX"
set postponed = "+[Gmail].Drafts"
set record = "+[Gmail].Sent Mail"
set trash = "+[Gmail].Trash"
mailboxes =INBOX ='[Gmail].All Mail' =[Gmail].Important =[Gmail].Sent\ Mail =[Gmail].Drafts =[Gmail].Trash =[Gmail].Spam

View file

@ -0,0 +1,11 @@
set from = "fz0x1@posteo.net"
set realname = "fz0x1"
set mbox_type = Maildir
set folder = "$HOME/.local/share/email/fz0x1_posteo"
set spoolfile = "+INBOX"
set postponed = "+Drafts"
set record = "+Sent"
set trash = "+Trash"
mailboxes =INBOX =Sent =Umka =Service =Hosting =Service =Backup =Notes =Keys =Drafts =Trash ='Receiving guarantee notifications' =Spam

View file

@ -0,0 +1,69 @@
# vim: filetype=neomuttrc
# Default index colors:
# Thanks to https://github.com/SeniorMars
# https://github.com/SeniorMars/dotfiles/blob/main/.config/mutt/colors.muttrc
color index yellow default '.*'
color index_author red default '.*'
color index_number blue default
color index_subject cyan default '.*'
# For new mail:
color index brightyellow black "~N"
color index_author brightred black "~N"
color index_subject brightcyan black "~N"
# Header colors:
color header blue default ".*"
color header brightmagenta default "^(From)"
color header brightcyan default "^(Subject)"
color header brightwhite default "^(CC|BCC)"
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
color normal default default
color indicator brightblack white
color sidebar_highlight red default
color sidebar_divider brightblack black
color sidebar_flagged red black
color sidebar_new green black
color normal brightyellow default
color error red default
color tilde black default
color message cyan default
color markers red white
color attachment white default
color search brightmagenta default
color status brightyellow black
color hdrdefault brightgreen default
color quoted green default
color quoted1 blue default
color quoted2 cyan default
color quoted3 yellow default
color quoted4 red default
color quoted5 brightred default
color signature brightgreen default
color bold black default
color underline black default
color normal default default
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
color body green default "\`[^\`]*\`" # Green text between ` and `
color body brightblue default "^# \.*" # Headings as bold blue
color body brightcyan default "^## \.*" # Subheadings as bold cyan
color body brightgreen default "^### \.*" # Subsubheadings as bold green
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
color body brightcyan default "[;:][-o][)/(|]" # emoticons
color body brightcyan default "[;:][)(|]" # emoticons
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
color body red default "(BAD signature)"
color body cyan default "(Good signature)"
color body brightblack default "^gpg: Good signature .*"
color body brightyellow default "^gpg: "
color body brightyellow red "^gpg: BAD signature from.*"
mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*"
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"

Binary file not shown.

View file

@ -1,35 +0,0 @@
# A gruvbox color scheme for mutt and neomutt
## Description
[Gruvbox](https://github.com/morhetz/gruvbox) is a well designed, popular
colorscheme for vim. This is a port to mutt and neomutt, in which vim can act
as mail composer.
This is a replication of the repository
[here](https://git.sthu.org/?p=mutt-gruvbox.git;a=summary). The
[website](https://www.sthu.org/code/codesnippets/mutt-gruvbox.html) gives
further details and a screenshot, like this:
![screenshot](https://www.sthu.org/code/codesnippets/img/mutt-gruvbox.png)
## Usage
Download the files or clone the repo, e.g.
cd ~/.mutt
git clone https://git.sthu.org/repos/mutt-gruvbox.git gruvbox
Then source them in your `~/.mutt/muttrc`, e.g.
source ~/.mutt/gruvbox/colors-gruvbox-shuber.muttrc
# For neomutt also add this line:
# source ~/.mutt/gruvbox/colors-gruvbox-shuber-extended.muttrc
The colorscheme is split into two files, where the latter also defines colors
for neomutt.
## License
GNU Lesser General Public License v3.

View file

@ -1 +0,0 @@
color sidebar_unread color108 color234

View file

@ -1,121 +0,0 @@
# gruvbox dark (contrast dark):
# bg0 = 234
# bg1 = 237
# bg2 = 239
# bg3 = 241
# bg4 = 243
#
# gray = 245
#
# fg0 = 229
# fg1 = 223
# fg2 = 250
# fg3 = 248
# fg4 = 246
#
# red = 167
# green = 142
# yellow = 214
# blue = 109
# purple = 175
# aqua = 108
# orange = 208
# See http://www.mutt.org/doc/manual/#color
color attachment color109 color234
color bold color229 color234
color error color167 color234
color hdrdefault color246 color234
color indicator color223 color237
color markers color243 color234
color normal color223 color234
color quoted color250 color234
color quoted1 color108 color234
color quoted2 color250 color234
color quoted3 color108 color234
color quoted4 color250 color234
color quoted5 color108 color234
color search color234 color208
color signature color108 color234
color status color234 color250
color tilde color243 color234
color tree color142 color234
color underline color223 color239
color sidebar_divider color250 color234
color sidebar_new color142 color234
color index color142 color234 ~N
color index color108 color234 ~O
color index color109 color234 ~P
color index color214 color234 ~F
color index color175 color234 ~Q
color index color167 color234 ~=
color index color234 color223 ~T
color index color234 color167 ~D
color header color214 color234 "^(To:|From:)"
color header color142 color234 "^Subject:"
color header color108 color234 "^X-Spam-Status:"
color header color108 color234 "^Received:"
# Regex magic for URLs and hostnames
#
# Attention: BSD's regex has RE_DUP_MAX set to 255.
#
# Examples:
# http://some-service.example.com
# example.com
# a.example.com
# some-service.example.com
# example.com/
# example.com/datenschutz
# file:///tmp/foo
#
# Non-examples:
# 1.1.1900
# 14.02.2022/24:00
# 23.59
# w.l.o.g
# team.its
color body color142 color234 "[a-z]{3,255}://[[:graph:]]*"
color body color142 color234 "([-[:alnum:]]+\\.)+([0-9]{1,3}|[-[:alpha:]]+)/[[:graph:]]*"
color body color142 color234 "([-[:alnum:]]+\\.){2,255}[-[:alpha:]]{2,10}"
# IPv4 and IPv6 stolen from https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
color body color142 color234 "((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
color body color142 color234 "(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))"
# Mail addresses and mailto URLs
color body color208 color234 "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
color body color208 color234 "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
# some simleys and stuff
color body color234 color214 "[;:]-*[)>(<lt;|]"
color body color229 color234 "\\*[- A-Za-z]+\\*"
color body color214 color234 "^-.*PGP.*-*"
color body color142 color234 "^gpg: Good signature from"
color body color167 color234 "^gpg: Can't.*$"
color body color214 color234 "^gpg: WARNING:.*$"
color body color167 color234 "^gpg: BAD signature from"
color body color167 color234 "^gpg: Note: This key has expired!"
color body color214 color234 "^gpg: There is no indication that the signature belongs to the owner."
color body color214 color234 "^gpg: can't handle these multiple signatures"
color body color214 color234 "^gpg: signature verification suppressed"
color body color214 color234 "^gpg: invalid node with packet of type"
color body color142 color234 "^Good signature from:"
color body color167 color234 "^.?BAD.? signature from:"
color body color142 color234 "^Verification successful"
color body color167 color234 "^Verification [^s][^[:space:]]*$"
color compose header color223 color234
color compose security_encrypt color175 color234
color compose security_sign color109 color234
color compose security_both color142 color234
color compose security_none color208 color234

View file

@ -1,4 +1,4 @@
text/html; firefox %s; test=test -n "$display"; needsterminal;
text/html; librewolf %s; test=test -n "$display"; needsterminal;
text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput;
text/plain; cat %s; copiousoutput
application/pdf; firefox %s; test=test -n "$display"; needsterminal;
application/pdf; librewolf %s; test=test -n "$display"; needsterminal;

View file

@ -1,5 +1,30 @@
source ./settings
source ./paths
# set debug_level = 5
# set debug_file = "~/neomutt_debug.log"
# default account
source "$HOME/.config/mutt/accounts/account.com.foozzione_gmail"
folder-hook 'account.com.foozzione_gmail' 'source $HOME/.config/mutt/accounts/account.com.foozzione_gmail'
folder-hook 'account.com.fz0x1_posteo' 'source $HOME/.config/mutt/accounts/account.com.fz0x1_posteo'
# Macros to switch accounts
macro index Q "<enter-command>unmailboxes *<enter><enter-command>source $HOME/.config/mutt/accounts/account.com.foozzione_gmail<enter><sync-mailbox><change-folder>!<enter>"
macro index P "<enter-command>unmailboxes *<enter><enter-command>source $HOME/.config/mutt/accounts/account.com.fz0x1_posteo<enter><sync-mailbox><change-folder>!<enter>"
set sendmail = "msmtp -a gmail"
# Use my key for signing and encrypting
# default key is for posteo
set pgp_default_key = B2A6D86C6EB94D40A9031FFADDCA1A115D6D2284
# Установка отправителя по умолчанию
set from = "foozzione@gmail.com"
set realname = "Tkachenko Ihor"
# Определите отправителя в зависимости от текущего ящика
send-hook '~f foozzione@gmail.com' 'set sendmail="msmtp -a gmail"; set pgp_default_key="B79569222C920EB7515FEEE08B46C44BFBF5849F"'
send-hook '~f fz0x1@posteo.net' 'set sendmail="msmtp -a posteo"; set from="fz0x1@posteo.net"; set realname=""'
# Ensure TLS is enforced
set ssl_starttls = yes
@ -8,6 +33,7 @@ set ssl_force_tls = yes
unset record
# settings
set beep_new = yes
set pager_index_lines = 10
set pager_context = 3 # show 3 lines of context
set pager_stop # stop at end of message
@ -17,7 +43,7 @@ set move=no # don't move messages when marking as read
set mail_check = 30 # check for new mail every 30 seconds
set imap_keepalive = 900 # 15 minutes
set sleep_time = 0 # don't sleep when idle
set wait_key = no # mutt won't ask "press key to continue"
set wait_key = no # mutt won't ask "press key to continue"
set envelope_from # which from?
set edit_headers # show headers when composing
set fast_reply # skip to compose when replying
@ -46,6 +72,23 @@ set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
set send_charset = "utf-8:iso-8859-1:us-ascii" # send in utf-8
# Use GPGME
set crypt_use_gpgme = yes
# Automatically sign all out-going email
set crypt_autosign = yes
# Sign replies to signed emails
set crypt_replysign = yes
# Encrypt replies to encrypted emails
set crypt_replyencrypt = yes
# Encrypt and sign replies to encrypted and signed email
set crypt_replysignencrypted = yes
# Attempt to verify signatures automatically
set crypt_verify_sig = yes
# Attempt to encrypt automatically
set crypt_opportunistic_encrypt = no
# So you can view encrypted emails automatically
auto_view application/pgp-encrypted
#sidebar
set sidebar_visible # comment to disable sidebar by default
set sidebar_short_path
@ -57,7 +100,7 @@ bind index,pager \CN sidebar-next
bind index,pager \CE sidebar-open
bind index,pager B sidebar-toggle-visible
set editor = "vim"
set editor = "nvim"
# bindings
macro index A \
@ -85,5 +128,4 @@ macro index,pager \cb "<pipe-message> urlscan<Enter>" "call urlscan to extract U
macro attach,compose \cb "<pipe-entry> urlscan<Enter>" "call urlscan to extract URLs out of a message"
#theme
source ~/.config/mutt/gruvbox/colors-gruvbox-shuber.muttrc
source ~/.config/mutt/gruvbox/colors-gruvbox-shuber-extended.muttrc
source ~/.config/mutt/colors.muttrc

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,33 @@
" setlocal syntax=markdown
setlocal textwidth=80
setlocal spell
syntax match jtag "@.\{-}\w\+"
syntax match jyear /\[\d\{4}-\d\d-\d\d \d\d:\d\d:\d\{2\}\( [aApP][mM]\)\?\]/
syntax region entryLine start=/\d\{4}-\d\d-\d\d \d\d:\d\d/ end=/$/ contains=jyear
highlight def link jtag Constant
highlight def link jyear Identifier
highlight def entryLine ctermfg=250 guifg=Gray
setlocal foldmethod=expr
setlocal foldexpr=JrnlFoldExpr()
function! JrnlFoldExpr()
let line = getline(v:lnum)
" Если строка начинается с даты [YYYY-MM-DD HH:MM:SS AM/PM]
if line =~ '^\[\d\{4}-\d\d-\d\d \d\d:\d\d:\d\{2\}\( [aApP][mM]\)\?\]'
return ">1" " Открываем новую свёртку (уровень 1)
endif
" Если строка - это Weather, Geo, или другие элементы
if line =~ '^-\s\+\w\+:'
return "1" " Оставляем эти строки внутри текущей свёртки
endif
" Все остальные строки не участвуют в свёртке
return "="
endfunction

View file

@ -0,0 +1,7 @@
-- formattig a markdown table
vim.api.nvim_set_keymap("n", "<leader>ftt", ":TableFormat<CR>", { silent = true, noremap = true })
vim.opt_local.textwidth = 80
vim.opt_local.colorcolumn = "80"
-- vim.opt_local.wrap = true
-- vim.cmd([[set briopt+=list:-1]])

View file

@ -1,43 +0,0 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
"bufferline.nvim": { "branch": "main", "commit": "d6cb9b7cac52887bcac65f8698e67479553c0748" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "d99b75b4aedf0e912f41c5740a7267de739cddac" },
"friendly-snippets": { "branch": "main", "commit": "aced40b66b7bae9bc2c37fd7b11841d54727a7b0" },
"hardtime.nvim": { "branch": "main", "commit": "4ba3be553fa0b713c7b817f6d201b07d282accf3" },
"indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" },
"lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" },
"leap.nvim": { "branch": "main", "commit": "14eda5bb233354933baa99b6d40bef3a40dbeaae" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "c129311f4867675a52551b0a7ef12186308be00b" },
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "b9084b1f42f790d6230dc66dbcb6bcc35b148552" },
"mason.nvim": { "branch": "main", "commit": "dcd0ea30ccfc7d47e879878d1270d6847a519181" },
"neodev.nvim": { "branch": "main", "commit": "64b2a51b02c6f2ae177c745e4d8bc801a339fe09" },
"neoscroll.nvim": { "branch": "master", "commit": "be4ebf855a52f71ca4338694a5696675d807eff9" },
"nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" },
"nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
"nvim-lint": { "branch": "master", "commit": "8e5920f9ce9f24c283a2e64be5fe58d1d37d1744" },
"nvim-lspconfig": { "branch": "master", "commit": "8917d2c830e04bf944a699b8c41f097621283828" },
"nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" },
"nvim-tree.lua": { "branch": "master", "commit": "7bdb220d0fe604a77361e92cdbc7af1b8a412126" },
"nvim-treesitter": { "branch": "master", "commit": "ed82d82b77e4fa3bd4593eda8fc4c4ff95a5eb25" },
"nvim-treesitter-context": { "branch": "master", "commit": "9c06b115abc57c99cf0aa81dc29490f5001f57a1" },
"nvim-ts-autotag": { "branch": "main", "commit": "a65b202cfd08e0e69e531eab737205ff5bc082a4" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" },
"nvim-web-devicons": { "branch": "master", "commit": "b427ac5f9dff494f839e81441fb3f04a58cbcfbc" },
"obsidian.nvim": { "branch": "main", "commit": "b101ad8988eb1452dabb6138763877a1794a1966" },
"plenary.nvim": { "branch": "master", "commit": "663246936325062427597964d81d30eaa42ab1e4" },
"tagbar": { "branch": "master", "commit": "12edcb59449b335555652898f82dd6d5c59d519a" },
"telescope.nvim": { "branch": "master", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" },
"toggleterm.nvim": { "branch": "main", "commit": "b49df5cdce67a8964d1b027dae94bde212092b51" },
"tokyonight.nvim": { "branch": "main", "commit": "e3301873c1e96903daebb98cc9b5926810bf73dd" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"vim-illuminate": { "branch": "master", "commit": "97c1265ff0b67064b6cfdc15bafc50202a537ae2" },
"vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
}

View file

@ -1,18 +1,3 @@
-- auto-format on save
local lsp_fmt_group = vim.api.nvim_create_augroup("LspFormattingGroup", {})
vim.api.nvim_create_autocmd("BufWritePre", {
group = lsp_fmt_group,
callback = function()
local efm = vim.lsp.get_active_clients({ name = "efm" })
if vim.tbl_isempty(efm) then
return
end
vim.lsp.buf.format({ name = "efm", async = true })
end,
})
-- highlight on yank
local highlight_yank_group = vim.api.nvim_create_augroup("HighlightYankGroup", {})
vim.api.nvim_create_autocmd("TextYankPost", {
@ -21,3 +6,25 @@ vim.api.nvim_create_autocmd("TextYankPost", {
vim.highlight.on_yank()
end,
})
-- https://jrnl.sh/en/stable/privacy-and-security/#neovim
vim.api.nvim_create_autocmd({ "BufNewFile", "BufReadPre" }, {
group = vim.api.nvim_create_augroup("PrivateJrnl", {}),
pattern = "*.jrnl",
callback = function()
vim.o.shada = ""
vim.o.swapfile = false
vim.o.undofile = false
vim.o.backup = false
vim.o.writebackup = false
vim.o.shelltemp = false
vim.o.history = 0
vim.o.modeline = false
vim.o.secure = true
end,
})
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = "*.jrnl",
command = "set filetype=jrnl",
})

View file

@ -1,5 +1,11 @@
local mapkey = require("utils.keymapper").mapvimkey
-- remap default
-- Don't touch unnamed register when pasting over visual selection
vim.keymap.set("x", "p", function()
return 'pgv"' .. vim.v.register .. "y"
end, { expr = true, noremap = true, silent = true })
-- Buffer Navigation
mapkey("<leader>bn", "bnext", "n") -- Next buffer
mapkey("<leader>bp", "bprevious", "n") -- Prev buffer
@ -12,14 +18,14 @@ mapkey("<leader>m", "NvimTreeFocus", "n")
mapkey("<leader>e", "NvimTreeToggle", "n")
-- Pane and Window Navigation
mapkey("<C-h>", "<C-w>h", "n") -- Navigate Left
mapkey("<C-j>", "<C-w>j", "n") -- Navigate Down
mapkey("<C-k>", "<C-w>k", "n") -- Navigate Up
mapkey("<C-l>", "<C-w>l", "n") -- Navigate Right
mapkey("<C-h>", "wincmd h", "t") -- Navigate Left
mapkey("<C-j>", "wincmd j", "t") -- Navigate Down
mapkey("<C-k>", "wincmd k", "t") -- Navigate Up
mapkey("<C-l>", "wincmd l", "t") -- Navigate Right
-- mapkey("<C-h>", "<C-w>h", "n") -- Navigate Left
-- mapkey("<C-j>", "<C-w>j", "n") -- Navigate Down
-- mapkey("<C-k>", "<C-w>k", "n") -- Navigate Up
-- mapkey("<C-l>", "<C-w>l", "n") -- Navigate Right
-- mapkey("<C-h>", "wincmd h", "t") -- Navigate Left
-- mapkey("<C-j>", "wincmd j", "t") -- Navigate Down
-- mapkey("<C-k>", "wincmd k", "t") -- Navigate Up
-- mapkey("<C-l>", "wincmd l", "t") -- Navigate Right
mapkey("<C-h>", "TmuxNavigateLeft", "n") -- Navigate Left
mapkey("<C-j>", "TmuxNavigateDown", "n") -- Navigate Down
mapkey("<C-k>", "TmuxNavigateUp", "n") -- Navigate Up
@ -36,24 +42,12 @@ mapkey("<C-Right>", "vertical resize -2", "n")
-- Show Full File-Path
mapkey("<leader>pa", "echo expand('%:p')", "n") -- Show Full File Path
-- Notes
mapkey("<leader>ng", "Neorg workspace general", "n")
mapkey("<leader>nw", "Neorg workspace work", "n")
mapkey("<leader>ny", "Neorg workspace youtube", "n")
-- Indenting
vim.keymap.set("v", "<", "<gv", { silent = true, noremap = true })
vim.keymap.set("v", ">", ">gv", { silent = true, noremap = true })
local api = vim.api
-- Zen Mode
api.nvim_set_keymap("n", "<leader>zn", ":TZNarrow<CR>", {})
api.nvim_set_keymap("v", "<leader>zn", ":'<,'>TZNarrow<CR>", {})
api.nvim_set_keymap("n", "<leader>sm", ":TZFocus<CR>", {})
api.nvim_set_keymap("n", "<leader>zm", ":TZMinimalist<CR>", {})
api.nvim_set_keymap("n", "<leader>za", ":TZAtaraxis<CR>", {})
-- Comments
api.nvim_set_keymap("n", "<C-_>", "gtc", { noremap = false })
api.nvim_set_keymap("v", "<C-_>", "goc", { noremap = false })

View file

@ -1,13 +1,16 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
@ -18,7 +21,7 @@ local opts = {
lazy = true,
},
install = {
colorscheme = { "nightfox" },
-- colorscheme = { "nightfox" },
},
rtp = {
disabled_plugins = {
@ -33,6 +36,7 @@ local opts = {
"zipPlugin",
},
},
-- checker = { enabled = true },
change_detection = {
notify = false,
},

View file

@ -1,20 +1,24 @@
local opt = vim.opt
-- local api = vim.api
-- Tab / Indentation
opt.tabstop = 2
opt.shiftwidth = 2
opt.softtabstop = 2
opt.tabstop = 4
opt.shiftwidth = 4
opt.softtabstop = 4
opt.expandtab = true
opt.autoindent = true
opt.smartindent = true
opt.wrap = false
opt.shiftwidth = 4
-- Search
opt.incsearch = true
opt.ignorecase = true
opt.smartcase = true
opt.hlsearch = false
opt.hlsearch = true
-- Appearance
opt.title = true
opt.number = true
opt.relativenumber = false
opt.termguicolors = true
@ -28,8 +32,26 @@ opt.completeopt = "menuone,noinsert,noselect"
opt.showmode = false
-- opt.tabline = '%!v:lua.require("utils").tabline()'
opt.conceallevel = 2
opt.breakindent = true
-- Behaviour
vim.opt.wildignore:append({
"*/node_modules/*",
"*.o",
"*.a",
"*.class",
"*.pyc",
"*/.git/*",
"*/dist/*",
"*/venv/*",
"*/__pycache__/*",
"*/.stfolder/*",
})
opt.splitkeep = "cursor"
opt.shell = "zsh"
opt.showcmd = true
opt.laststatus = 2
opt.expandtab = true
opt.hidden = true
opt.errorbells = false
opt.swapfile = false
@ -41,10 +63,87 @@ opt.splitright = true
opt.splitbelow = true
opt.autochdir = false
opt.iskeyword:append("-")
opt.mouse:append("a")
opt.mouse = ""
opt.clipboard:append("unnamedplus")
opt.modifiable = true
-- opt.guicursor =
-- "n-v-c:block,i-ci-ve:block,r-cr:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175"
opt.encoding = "UTF-8"
opt.fileencoding = "utf-8"
opt.cursorline = false
-- spell
opt.spelllang = "en_us,ru"
opt.spell = true
-- api.nvim_set_option_value(
-- "langmap",
-- "йq,цw,уe,кr,еt,нy,гu,шi,щo,зp,х[,ъ],фa,ыs,вd,аf,пg,рh,оj,лk,дl,ж\\;,э',ё\\,яz,чx,сc,мv,иb,тn,ьm,б\\,,ю.,ЙQ,ЦW,УE,КR,ЕT,НY,ГU,ШI,ЩO,ЗP,Х{,Ъ},ФA,ЫS,ВD,АF,ПG,РH,ОJ,ЛK,ДL,Ж:,Э\",ЯZ,ЧX,СC,МV,ИB,ТN,ЬM,Б<,Ю>,Ё/|"
--)
vim.opt.langmap = {
"йq",
"цw",
"уe",
"кr",
"еt",
"нy",
"гu",
"шi",
"щo",
"зp",
"х[",
"ъ]",
"фa",
"ыs",
"вd",
"аf",
"пg",
"рh",
"оj",
"лk",
"дl",
"ж\\;",
"э'",
"ё\\,",
"яz",
"чx",
"сc",
"мv",
"иb",
"тn",
"ьm",
"б\\,",
"ю.",
"ЙQ",
"ЦW",
"УE",
"КR",
"ЕT",
"НY",
"ГU",
"ШI",
"ЩO",
"ЗP",
"Х{",
"Ъ}",
"ФA",
"ЫS",
"ВD",
"АF",
"ПG",
"РH",
"ОJ",
"ЛK",
"ДL",
"Ж:",
'Э"',
"ЯZ",
"ЧX",
"СC",
"МV",
"ИB",
"ТN",
"ЬM",
"Б<",
"Ю>",
"Ё/",
}

View file

@ -0,0 +1,10 @@
return {
"lowitea/aw-watcher.nvim",
opts = {
aw_server = {
host = "127.0.0.1",
port = 5600,
},
},
lazy = false
}

View file

@ -1,6 +1,7 @@
return {
"stevearc/conform.nvim",
opts = {
log_level = vim.log.levels.DEBUG,
icon = "", --'▎',
formatters_by_ft = {
lua = { "stylua" },
@ -11,10 +12,11 @@ return {
typescriptreact = { "biome" },
json = { "biome" },
sh = { "shfmt" },
markdown = { "prettier" },
["*"] = { "trim_whitespace", "codespell" },
},
format_on_save = {
timeout_ms = 500,
timeout_ms = 1000,
lsp_fallback = true,
},
},

View file

@ -0,0 +1,11 @@
return {
"sainnhe/everforest",
-- lazy = false,
priority = 1000,
config = function()
-- Optionally configure and load the colorscheme
-- directly inside the plugin declaration.
vim.g.everforest_enable_italic = true
vim.cmd.colorscheme("everforest")
end,
}

View file

@ -0,0 +1,15 @@
local config = function()
require("gruvbox").setup({
transparent_mode = true,
})
end
return {
"ellisonleao/gruvbox.nvim",
lazy = false,
priority = 1000,
opts = config,
config = function()
vim.cmd("colorscheme gruvbox")
end,
}

View file

@ -13,8 +13,7 @@ local config = function()
focusable = true,
style = "minimal",
border = "rounded",
source = "always",
source = true,
header = "",
prefix = "",
},
@ -84,16 +83,27 @@ local config = function()
require("mason-lspconfig").setup({
ensure_installed = {
"bashls",
"tsserver",
"ts_ls",
"pyright",
"lua_ls",
"jsonls",
"clangd",
"biome", -- will install for formatting only
"marksman",
"ruff",
-- "marksman",
},
automatic_installation = true,
handlers = {
lsp_zero.default_setup,
-- lsp_zero.default_setup,
-- https://github.com/neovim/nvim-lspconfig/pull/3232
function(server_name)
if server_name == "tsserver" then
server_name = "ts_ls"
else
lsp_zero.default_setup(server_name)
end
end,
lua_ls = function()
local lua_opts = lsp_zero.nvim_lua_ls()
require("lspconfig").lua_ls.setup(lua_opts)
@ -112,6 +122,10 @@ local config = function()
biome = function() -- use tsserver instead
return {}
end,
clangd = function()
vim.b.lsp_zero_enable_autoformat = 0
end,
require("lspconfig").marksman.setup({}),
},
})
@ -130,6 +144,7 @@ local config = function()
completeopt = "menu,menuone,noinsert",
},
sources = {
-- { name = "mkdnflow" },
{ name = "luasnip" },
{ name = "path" },
{ name = "nvim_lsp" },
@ -140,9 +155,9 @@ local config = function()
mapping = cmp.mapping.preset.insert({
-- ['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
["<Tab>"] = cmp.mapping.select_next_item(cmp_select),
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
-- ["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<C-Space>"] = cmp.mapping.complete(),
-- ["<C-Space>"] = cmp.mapping.complete(),
["<C-f>"] = cmp.mapping(function(fallback)
if luasnip.jumpable(1) then
luasnip.jump(1)

View file

@ -2,7 +2,7 @@ local config = {
options = {
icons_enabled = true,
theme = "auto",
globalstatus = true,
globalstatus = false,
disabled_filetypes = {
statusline = {},
winbar = {},
@ -19,46 +19,25 @@ local config = {
sections = {
lualine_a = { "mode" },
lualine_b = { "" },
lualine_x = { "diagnostics", "encoding", "fileformat", "filetype" },
lualine_x = { "diagnostics", "filetype" },
lualine_y = { "progress" },
lualine_z = { "location" },
lualine_c = {},
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {},
}
local function ins_left(component)
table.insert(config.sections.lualine_c, component)
end
local function ins_right(component)
table.insert(config.sections.lualine_x, 1, component)
end
ins_right({
-- Lsp server name .
function()
local msg = "No Active Lsp"
local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then
return msg
end
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return client.name
end
end
return msg
end,
icon = " LSP:",
color = { fg = "#ff6b6b" },
})
return {
"nvim-lualine/lualine.nvim",
lazy = false,

View file

@ -0,0 +1,12 @@
return {
"jakewvincent/mkdnflow.nvim",
-- ft = "markdown",
config = function()
require("mkdnflow").setup({
modules = {
cmp = false,
},
})
end,
-- Your other plugins
}

View file

@ -1,7 +0,0 @@
return {
"karb94/neoscroll.nvim",
config = function()
require("neoscroll").setup({})
end,
lazy = false,
}

View file

@ -1,6 +1,5 @@
local config = function()
local npairs = require("nvim-autopairs")
-- npairs.remove_rule('"""')
require("nvim-autopairs").setup({})
end
return {

View file

@ -49,5 +49,5 @@ end
return {
"nvim-treesitter/nvim-treesitter",
lazy = false,
opts = config,
config = config,
}

View file

@ -1,83 +0,0 @@
return {
"epwalsh/obsidian.nvim",
version = "*", -- recommended, use latest release instead of latest commit
lazy = true,
ft = "markdown",
dependencies = {
-- Required.
"nvim-lua/plenary.nvim",
},
opts = {
workspaces = {
{
name = "garden",
path = "~/vaults/garden/",
},
},
daily_notes = {
-- Optional, if you keep daily notes in a separate directory.
folder = "notes/dailies",
-- Optional, if you want to change the date format for the ID of daily notes.
date_format = "%Y-%m-%d",
-- Optional, if you want to change the date format of the default alias of daily notes.
alias_format = "%B %-d, %Y",
-- Optional, if you want to automatically insert a template from your template directory like 'daily.md'
template = nil,
},
-- Optional, customize the backlinks interface.
backlinks = {
-- The default height of the backlinks location list.
height = 10,
-- Whether or not to wrap lines.
wrap = true,
},
tags = {
-- The default height of the tags location list.
height = 10,
-- Whether or not to wrap lines.
wrap = true,
},
finder_mappings = {
-- Create a new note from your query with `:ObsidianSearch` and `:ObsidianQuickSwitch`.
-- Currently only telescope supports this.
new = "<C-x>",
},
ui = {
enable = true, -- set to false to disable all additional syntax features
update_debounce = 200, -- update delay after a text change (in milliseconds)
-- Define how various check-boxes are displayed
checkboxes = {
-- NOTE: the 'char' value has to be a single character, and the highlight groups are defined below.
[" "] = { char = "󰄱", hl_group = "ObsidianTodo" },
["x"] = { char = "", hl_group = "ObsidianDone" },
[">"] = { char = "", hl_group = "ObsidianRightArrow" },
["~"] = { char = "󰰱", hl_group = "ObsidianTilde" },
-- Replace the above with this if you don't have a patched font:
-- [" "] = { char = "☐", hl_group = "ObsidianTodo" },
-- ["x"] = { char = "✔", hl_group = "ObsidianDone" },
-- You can also add more custom ones...
},
-- Use bullet marks for non-checkbox lists.
bullets = { char = "", hl_group = "ObsidianBullet" },
external_link_icon = { char = "", hl_group = "ObsidianExtLinkIcon" },
-- Replace the above with this if you don't have a patched font:
-- external_link_icon = { char = "", hl_group = "ObsidianExtLinkIcon" },
reference_text = { hl_group = "ObsidianRefText" },
highlight_text = { hl_group = "ObsidianHighlightText" },
tags = { hl_group = "ObsidianTag" },
hl_groups = {
-- The options are passed directly to `vim.api.nvim_set_hl()`. See `:help nvim_set_hl`.
ObsidianTodo = { bold = true, fg = "#f78c6c" },
ObsidianDone = { bold = true, fg = "#89ddff" },
ObsidianRightArrow = { bold = true, fg = "#f78c6c" },
ObsidianTilde = { bold = true, fg = "#ff5370" },
ObsidianBullet = { bold = true, fg = "#89ddff" },
ObsidianRefText = { underline = true, fg = "#c792ea" },
ObsidianExtLinkIcon = { fg = "#c792ea" },
ObsidianTag = { italic = true, fg = "#89ddff" },
ObsidianHighlightText = { bg = "#75662e" },
},
},
},
}

View file

@ -0,0 +1,8 @@
return {
"MeanderingProgrammer/render-markdown.nvim",
opts = {},
-- dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.nvim" }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons
lazy = false,
}

View file

@ -0,0 +1,4 @@
return {
"godlygeek/tabular",
lazy = false,
}

View file

@ -1,3 +1,4 @@
-- TODO need to test
return {
"preservim/tagbar",
lazy = false,

View file

@ -9,6 +9,7 @@ local config = function()
["<C-j>"] = "move_selection_next",
["<C-k>"] = "move_selection_previous",
},
n = {},
},
},
pickers = {
@ -31,8 +32,8 @@ end
return {
"nvim-telescope/telescope.nvim",
tag = "0.1.3",
lazy = false,
tag = "0.1.8",
dependencies = { "nvim-lua/plenary.nvim" },
config = config,
keys = {

View file

@ -0,0 +1,10 @@
return {
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
lazy = false,
}

View file

@ -1,9 +0,0 @@
return {
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
config = function()
vim.cmd("colorscheme tokyonight-storm")
end,
}

View file

@ -0,0 +1,4 @@
return {
"folke/twilight.nvim",
lazy = false,
}

View file

@ -0,0 +1,7 @@
return {
"preservim/vim-markdown",
init = function()
vim.g.vim_markdown_folding_disabled = 1
end,
lazy = false,
}

View file

@ -12,5 +12,4 @@ return {
-- refer to the configuration section below
},
},
{ "folke/neodev.nvim" },
}

View file

@ -0,0 +1,7 @@
return {
ft = "markdown",
"andrewferrier/wrapping.nvim",
config = function()
require("wrapping").setup()
end,
}

View file

@ -1,26 +0,0 @@
local M = {}
function M.tabline()
local s = ""
for i = 1, vim.fn.tabpagenr("$") do
local winnr = vim.fn.tabpagewinnr(i)
local buflist = vim.fn.tabpagebuflist(i)
local bufnr = buflist[winnr]
local bufname = vim.fn.bufname(bufnr)
local filename = vim.fn.fnamemodify(bufname, ":t")
local icon = require("nvim-web-devicons").get_icon(filename)
-- Отмечаем активный таб
if i == vim.fn.tabpagenr() then
s = s .. "%#TabLineSel#"
else
s = s .. "%#TabLine#"
end
s = s .. " " .. (icon or "") .. " " .. filename .. " "
end
s = s .. "%#TabLineFill#%="
return s
end
return M

View file

@ -0,0 +1,41 @@
from pathlib import Path
from promnesia.common import Source
from promnesia.sources import auto, shellcmd
"""
List of sources to use.
You can specify your own, add more sources, etc.
See https://github.com/karlicoss/promnesia#setup for more information
"""
SOURCES = [
# Source(
# auto.index,
# # just some arbitrary directory with plaintext files
# '/usr/share/vim/',
# )
Source(
auto.index,
"/home/fz0x1/org/braindump.org",
name="braindump",
ignored=["*.html", "*.gpg"],
),
Source(
auto.index,
"/home/fz0x1/org/inbox.org",
name="inbox",
ignored=["*.html", "*.gpg"],
),
Source(
auto.index,
"/home/fz0x1/org/life.org",
name="inbox",
ignored=["*.html", "*.gpg"],
),
Source(
shellcmd.index,
[f"{Path.home() / 'scripts/bin/linkding_promnesia.sh'}"],
name="linkding",
),
]

View file

@ -0,0 +1,2 @@
set preview_images true
set preview_images_method ueberzug

366
global/.config/ranger/scope.sh Executable file
View file

@ -0,0 +1,366 @@
#!/usr/bin/env bash
set -o noclobber -o noglob -o nounset -o pipefail
IFS=$'\n'
## If the option `use_preview_script` is set to `true`,
## then this script will be called and its output will be displayed in ranger.
## ANSI color codes are supported.
## STDIN is disabled, so interactive scripts won't work properly
## This script is considered a configuration file and must be updated manually.
## It will be left untouched if you upgrade ranger.
## Because of some automated testing we do on the script #'s for comments need
## to be doubled up. Code that is commented out, because it's an alternative for
## example, gets only one #.
## Meanings of exit codes:
## code | meaning | action of ranger
## -----+------------+-------------------------------------------
## 0 | success | Display stdout as preview
## 1 | no preview | Display no preview at all
## 2 | plain text | Display the plain content of the file
## 3 | fix width | Don't reload when width changes
## 4 | fix height | Don't reload when height changes
## 5 | fix both | Don't ever reload
## 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
## 7 | image | Display the file directly as an image
## Script arguments
FILE_PATH="${1}" # Full path of the highlighted file
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
## shellcheck disable=SC2034 # PV_HEIGHT is provided for convenience and unused
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
FILE_EXTENSION="${FILE_PATH##*.}"
FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')"
## Settings
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
HIGHLIGHT_TABWIDTH=${HIGHLIGHT_TABWIDTH:-8}
HIGHLIGHT_STYLE=${HIGHLIGHT_STYLE:-pablo}
HIGHLIGHT_OPTIONS="--replace-tabs=${HIGHLIGHT_TABWIDTH} --style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}"
PYGMENTIZE_STYLE=${PYGMENTIZE_STYLE:-autumn}
OPENSCAD_IMGSIZE=${RNGR_OPENSCAD_IMGSIZE:-1000,1000}
OPENSCAD_COLORSCHEME=${RNGR_OPENSCAD_COLORSCHEME:-Tomorrow Night}
handle_extension() {
case "${FILE_EXTENSION_LOWER}" in
## Archive
a | ace | alz | arc | arj | bz | bz2 | cab | cpio | deb | gz | jar | lha | lz | lzh | lzma | lzo | \
rpm | rz | t7z | tar | tbz | tbz2 | tgz | tlz | txz | tZ | tzo | war | xpi | xz | Z | zip)
atool --list -- "${FILE_PATH}" && exit 5
bsdtar --list --file "${FILE_PATH}" && exit 5
exit 1
;;
rar)
## Avoid password prompt by providing empty password
unrar lt -p- -- "${FILE_PATH}" && exit 5
exit 1
;;
7z)
## Avoid password prompt by providing empty password
7z l -p -- "${FILE_PATH}" && exit 5
exit 1
;;
## PDF
pdf)
## Preview as text conversion
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - |
fmt -w "${PV_WIDTH}" && exit 5
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 |
fmt -w "${PV_WIDTH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1
;;
## BitTorrent
torrent)
transmission-show -- "${FILE_PATH}" && exit 5
exit 1
;;
## OpenDocument
odt | ods | odp | sxw)
## Preview as text conversion
odt2txt "${FILE_PATH}" && exit 5
## Preview as markdown conversion
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
exit 1
;;
## XLSX
xlsx)
## Preview as csv conversion
## Uses: https://github.com/dilshod/xlsx2csv
xlsx2csv -- "${FILE_PATH}" && exit 5
exit 1
;;
## HTML
htm | html | xhtml)
## Preview as text conversion
w3m -dump "${FILE_PATH}" && exit 5
lynx -dump -- "${FILE_PATH}" && exit 5
elinks -dump "${FILE_PATH}" && exit 5
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
;;
## JSON
json)
if [ -f "${FILE_PATH}" ] && [ "$(stat -c%s "${FILE_PATH}")" -gt 100000 ]; then
echo "File too large for preview"
exit 0
fi
jq --color-output . "${FILE_PATH}" && exit 5
python -m json.tool -- "${FILE_PATH}" && exit 5
;;
## Direct Stream Digital/Transfer (DSDIFF) and wavpack aren't detected
## by file(1).
dff | dsf | wv | wvc)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
;; # Continue with next handler on failure
esac
}
handle_image() {
## Size of the preview if there are multiple options or it has to be
## rendered from vector graphics. If the conversion program allows
## specifying only one dimension while keeping the aspect ratio, the width
## will be used.
local DEFAULT_SIZE="1920x1080"
local mimetype="${1}"
case "${mimetype}" in
## SVG
# image/svg+xml|image/svg)
# convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
# exit 1;;
## DjVu
# image/vnd.djvu)
# ddjvu -format=tiff -quality=90 -page=1 -size="${DEFAULT_SIZE}" \
# - "${IMAGE_CACHE_PATH}" < "${FILE_PATH}" \
# && exit 6 || exit 1;;
## Image
image/*)
local orientation
orientation="$(identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}")"
## If orientation data is present and the image actually
## needs rotating ("1" means no rotation)...
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
## ...auto-rotate the image according to the EXIF data.
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
fi
## `w3mimgdisplay` will be called for all images (unless overriden
## as above), but might fail for unsupported types.
exit 7
;;
## Video
# video/*)
# # Thumbnail
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
# exit 1;;
## PDF
# application/pdf)
# pdftoppm -f 1 -l 1 \
# -scale-to-x "${DEFAULT_SIZE%x*}" \
# -scale-to-y -1 \
# -singlefile \
# -jpeg -tiffcompression jpeg \
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
# && exit 6 || exit 1;;
## ePub, MOBI, FB2 (using Calibre)
# application/epub+zip|application/x-mobipocket-ebook|\
# application/x-fictionbook+xml)
# # ePub (using https://github.com/marianosimone/epub-thumbnailer)
# epub-thumbnailer "${FILE_PATH}" "${IMAGE_CACHE_PATH}" \
# "${DEFAULT_SIZE%x*}" && exit 6
# ebook-meta --get-cover="${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" \
# >/dev/null && exit 6
# exit 1;;
## Font
application/font* | application/*opentype)
preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png"
if fontimage -o "${preview_png}" \
--pixelsize "120" \
--fontname \
--pixelsize "80" \
--text " ABCDEFGHIJKLMNOPQRSTUVWXYZ " \
--text " abcdefghijklmnopqrstuvwxyz " \
--text " 0123456789.:,;(*!?') ff fl fi ffi ffl " \
--text " The quick brown fox jumps over the lazy dog. " \
"${FILE_PATH}"; then
convert -- "${preview_png}" "${IMAGE_CACHE_PATH}" &&
rm "${preview_png}" &&
exit 6
else
exit 1
fi
;;
## Preview archives using the first image inside.
## (Very useful for comic book collections for example.)
# application/zip|application/x-rar|application/x-7z-compressed|\
# application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar)
# local fn=""; local fe=""
# local zip=""; local rar=""; local tar=""; local bsd=""
# case "${mimetype}" in
# application/zip) zip=1 ;;
# application/x-rar) rar=1 ;;
# application/x-7z-compressed) ;;
# *) tar=1 ;;
# esac
# { [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \
# { fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \
# { [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \
# { [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return
#
# fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \
# [ print(l, end='') for l in sys.stdin if \
# (m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\
# sort -V | head -n 1)
# [ "$fn" = "" ] && return
# [ "$bsd" ] && fn=$(printf '%b' "$fn")
#
# [ "$tar" ] && tar --extract --to-stdout \
# --file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6
# fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g')
# [ "$bsd" ] && bsdtar --extract --to-stdout \
# --file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6
# [ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}"
# [ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \
# "${IMAGE_CACHE_PATH}" && exit 6
# [ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \
# "${IMAGE_CACHE_PATH}" && exit 6
# [ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}"
# ;;
esac
# openscad_image() {
# TMPPNG="$(mktemp -t XXXXXX.png)"
# openscad --colorscheme="${OPENSCAD_COLORSCHEME}" \
# --imgsize="${OPENSCAD_IMGSIZE/x/,}" \
# -o "${TMPPNG}" "${1}"
# mv "${TMPPNG}" "${IMAGE_CACHE_PATH}"
# }
# case "${FILE_EXTENSION_LOWER}" in
# ## 3D models
# ## OpenSCAD only supports png image output, and ${IMAGE_CACHE_PATH}
# ## is hardcoded as jpeg. So we make a tempfile.png and just
# ## move/rename it to jpg. This works because image libraries are
# ## smart enough to handle it.
# csg|scad)
# openscad_image "${FILE_PATH}" && exit 6
# ;;
# 3mf|amf|dxf|off|stl)
# openscad_image <(echo "import(\"${FILE_PATH}\");") && exit 6
# ;;
# esac
}
handle_mime() {
local mimetype="${1}"
case "${mimetype}" in
## RTF and DOC
text/rtf | *msword)
## Preview as text conversion
## note: catdoc does not always work for .doc files
## catdoc: http://www.wagner.pp.ru/~vitus/software/catdoc/
catdoc -- "${FILE_PATH}" && exit 5
exit 1
;;
## DOCX, ePub, FB2 (using markdown)
## You might want to remove "|epub" and/or "|fb2" below if you have
## uncommented other methods to preview those formats
*wordprocessingml.document | */epub+zip | */x-fictionbook+xml)
## Preview as markdown conversion
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
exit 1
;;
## XLS
*ms-excel)
## Preview as csv conversion
## xls2csv comes with catdoc:
## http://www.wagner.pp.ru/~vitus/software/catdoc/
xls2csv -- "${FILE_PATH}" && exit 5
exit 1
;;
## Text
text/* | */xml)
## Syntax highlight
if [[ "$(stat --printf='%s' -- "${FILE_PATH}")" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
exit 2
fi
if [[ "$(tput colors)" -ge 256 ]]; then
local pygmentize_format='terminal256'
local highlight_format='xterm256'
else
local pygmentize_format='terminal'
local highlight_format='ansi'
fi
env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight \
--out-format="${highlight_format}" \
--force -- "${FILE_PATH}" && exit 5
env COLORTERM=8bit bat --color=always --style="plain" \
-- "${FILE_PATH}" && exit 5
pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}" \
-- "${FILE_PATH}" && exit 5
exit 2
;;
## DjVu
image/vnd.djvu)
## Preview as text conversion (requires djvulibre)
djvutxt "${FILE_PATH}" | fmt -w "${PV_WIDTH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1
;;
## Image
image/*)
## Preview as text conversion
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
exiftool "${FILE_PATH}" && exit 5
exit 1
;;
## Video and audio
video/* | audio/*)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1
;;
esac
}
handle_fallback() {
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
exit 1
}
MIMETYPE="$(file --dereference --brief --mime-type -- "${FILE_PATH}")"
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
handle_image "${MIMETYPE}"
fi
handle_extension
handle_mime "${MIMETYPE}"
handle_fallback
exit 1

543
global/.emacs.d.bak/init.el Normal file
View file

@ -0,0 +1,543 @@
(menu-bar-mode -1)
(tool-bar-mode -1)
(require 'epa-file)
(epa-file-enable)
;; (setq epa-file-encrypt-to nil)
;; (setq epa-file-select-keys nil)
;; (setq epa-file-cache-passphrase-for-symmetric-encryption nil)
(setq org-startup-folded t)
(setq make-backup-files nil)
(setq auto-save-default nil)
(require 'package)
(require 'org-tempo)
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")
("nongnu" . "https://elpa.nongnu.org/nongnu/")))
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
;; Enable use-package
(eval-when-compile
(require 'use-package))
(use-package org
:pin gnu)
(use-package gruvbox-theme
:config
(load-theme 'gruvbox-dark-medium t))
(use-package org-contrib
:ensure t
:init
(require 'org-depend)
(require 'org-protocol))
(use-package ace-window
:bind ("M-o" . ace-window))
(use-package org-bullets
:hook (org-mode . org-bullets-mode))
(use-package evil
:ensure t
:init
(setq evil-undo-system 'undo-redo)
:config
(evil-mode 1))
(use-package evil-surround
:ensure t
:init
(global-evil-surround-mode 1))
(use-package helm
:ensure t
:config
(helm-mode 1))
(use-package helm-org-rifle
:ensure t
:init
(global-set-key (kbd "C-c r") 'helm-org-rifle-agenda-files))
(setq aw-dispatch-always t)
(setq use-package-always-ensure t)
;; Must do this so the agenda knows where to look for my files
(setq org-agenda-files '("~/org"))
(setq org-agenda-files (delete "~/org/done.org" org-agenda-files))
;; When a TODO is set to a done state, record a timestamp
(setq org-log-done 'time)
(setq org-log-redeadline 'time)
(setq org-log-reschedule 'time)
;; Follow the links
;; (setq org-return-follows-link t)
;; Associate all org files with org mode
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
;; Make the indentation look nicer
(add-hook 'org-mode-hook 'org-indent-mode)
;; Remap the change priority keys to use the UP or DOWN key
(define-key org-mode-map (kbd "C-c <up>") 'org-priority-up)
(define-key org-mode-map (kbd "C-c <down>") 'org-priority-down)
;; Shortcuts for storing links, viewing the agenda, and starting a capture
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(define-key global-map (kbd "C-c c") 'org-capture)
(define-key org-mode-map (kbd "C-c i") 'org-id-get-create)
(define-key org-mode-map (kbd "C-c p") 'org-set-property)
(global-set-key (kbd "C-c n") (lambda () (interactive) (find-file "~/org/notes.org")))
(global-set-key (kbd "C-c w") (lambda () (interactive) (find-file "~/org/work-log.org")))
(define-key helm-map (kbd "C-M-n") 'helm-next-source)
(define-key helm-map (kbd "C-M-p") 'helm-previous-source)
;; When you want to change the level of an org item, use SMR
(define-key org-mode-map (kbd "C-c C-g C-r") 'org-shiftmetaright)
;; Hide the markers so you just see bold text as BOLD-TEXT and not *BOLD-TEXT*
(setq org-hide-emphasis-markers t)
;; Wrap the lines in org mode so that things are easier to read
(add-hook 'org-mode-hook 'visual-line-mode)
;; (setq initial-buffer-choice
;; (lambda ()
;; (let ((agenda-buffer (org-agenda nil "a")))
;; (get-buffer "*Org Agenda*"))))
;; (setq org-agenda-window-setup 'only-window)
;; (setq org-agenda-include-diary t)
;; show :LOGBOOK:
(setq org-log-into-drawer t)
(setq org-log-done 'time)
;; evil
(define-key evil-normal-state-map (kbd "TAB") 'org-cycle) ;; return the standard functionality for TAB
(add-hook 'org-mode-hook (lambda () (org-load-modules-maybe t)))
;; (setq org-id-link-to-org-use-id t)
;; autosave org-mode buffers
(setq auto-save-timeout 20)
(add-hook 'auto-save-hook 'org-save-all-org-buffers)
;; archive
(setq org-archive-location "~/org/done.org::")
(defun archive-done-tasks ()
"Archive all tasks marked as DONE in the current buffer."
(interactive)
(org-map-entries 'org-archive-subtree "/DONE" 'file))
(define-key org-mode-map (kbd "C-c C-x C-d") 'archive-done-tasks)
;; disable autosave for some files
(defun disable-autosave-for-specific-file ()
"Disable auto-save-visited-mode for a specific file."
(when (string-equal (buffer-file-name)
(expand-file-name "~/org/private.org.gpg"))
(auto-save-visited-mode -1)))
(add-hook 'find-file-hook 'disable-autosave-for-specific-file)
(defun transform-square-brackets-to-round-ones(string-to-transform)
"Transforms [ into ( and ] into ), other chars left unchanged."
(concat
(mapcar #'(lambda (c) (if (equal c ?\[) ?\( (if (equal c ?\]) ?\) c))) string-to-transform)))
(when (display-graphic-p)
(setq org-ellipsis " [+]")
(add-hook 'org-mode-hook 'variable-pitch-mode)
(let* ((variable-tuple
(cond
((x-list-fonts "SauceCodePro Nerd Font Mono") '(:family "SauceCodePro Nerd Font Mono" :height 120))
(t (warn "Cannot find any suitable variable-pitch font.") nil)))
(fixed-tuple
(cond
((x-list-fonts "JetBrainsMono Nerd Font") '(:family "JetBrainsMono Nerd Font"))
(t (warn "Cannot find any suitable fixed-pitch font.") nil)))
(base-font-color (face-foreground 'default nil 'default))
(headline `(:inherit default :weight bold :foreground ,base-font-color)))
;; Подсветка текущей строки
(global-hl-line-mode t)
;; Установка стилей для заголовков
(custom-theme-set-faces
'user
`(org-level-8 ((t (,@headline ,@variable-tuple))))
`(org-level-7 ((t (,@headline ,@variable-tuple))))
`(org-level-6 ((t (,@headline ,@variable-tuple))))
`(org-level-5 ((t (,@headline ,@variable-tuple))))
`(org-level-4 ((t (,@headline ,@variable-tuple :height 1.0))))
`(org-level-3 ((t (,@headline ,@variable-tuple :height 1.1))))
`(org-level-2 ((t (,@headline ,@variable-tuple :height 1.25))))
`(org-level-1 ((t (,@headline ,@variable-tuple :height 1.5))))
`(org-document-title ((t (,@headline ,@variable-tuple :height 1.75 :underline nil)))))
;; Установка других стилей
(custom-set-faces
`(variable-pitch ((t ,@variable-tuple)))
`(fixed-pitch ((t ,@fixed-tuple)))
'(org-ellipsis ((t (:inherit fixed-pitch :foreground "gray40" :underline nil))))
'(org-block ((t (:inherit fixed-pitch))))
'(org-block-begin-line ((t (:inherit fixed-pitch))))
'(org-block-end-line ((t (:inherit fixed-pitch))))
'(org-src ((t (:inherit fixed-pitch))))
'(org-properties ((t (:inherit fixed-pitch))))
'(org-code ((t (:inherit (shadow fixed-pitch)))))
'(org-date ((t (:inherit (shadow fixed-pitch)))))
'(org-document-info ((t (:inherit (shadow fixed-pitch)))))
'(org-document-info-keyword ((t (:inherit (shadow fixed-pitch)))))
'(org-drawer ((t (:inherit (shadow fixed-pitch)))))
'(org-indent ((t (:inherit (org-hide fixed-pitch)))))
`(org-link ((t (:inherit fixed-pitch :foreground "tomato" :underline t))))
'(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch) :height 0.8))))
'(org-property-value ((t (:inherit fixed-pitch))) t)
'(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch)))))
'(org-table ((t (:inherit fixed-pitch))))
'(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8))))
;; '(org-verbatim ((t (:background "yellow" :foreground "black"))))
;; '(org-emphasis-alist ((t (:background "yellow" :foreground "black"))))
)))
(setq org-capture-templates
'(
("p" "Private"
entry (file+headline "~/org/private.org.gpg" "Private")
"* %?"
:empty-lines 0)
("j" "Work Log Entry"
entry (file+datetree "~/org/work-log.org")
"* %?"
:empty-lines 0)
("l" "Link"
entry (file+headline "~/org/inbox.org" "Inbox")
"* %U %?\n %:annotation\n %:link"
:empty-lines 0)
("n" "Note"
entry (file+headline "~/org/notes.org" "Random Notes")
"** %?"
:empty-lines 0)
("r" "Grocery list"
entry (file+headline "~/org/grocery.org" "Grocery list")
"* NEED2BUY [#B] %?\n:PROPERTIES:\n:Created: %T\n:END:\n "
:empty-lines 0)
("g" "General To-Do"
entry (file+headline "~/org/todos.org" "General Tasks")
"* TODO [#B] %?\n:PROPERTIES:\n:Created: %T\n:END:\n "
:empty-lines 0)
("m" "Meeting"
entry (file+datetree "~/org/meetings.org")
"* %? :meeting:%^g \n:PROPERTIES:\n:Created: %T\n:END:\n** Notes\n** Action Items\n*** TODO [#A] "
:tree-type week
:clock-in t
:clock-resume t
:empty-lines 0)
("c" "Code To-Do"
entry (file+headline "~/org/todos.org" "Code Related Tasks")
"* TODO [#B] %?\n:PROPERTIES:\n:Created: %T\n:END:\n%i\nProposed Solution:\n"
:empty-lines 0)
("w" "Selected web capture"
entry (file+headline "~/org/web-selection.org" "Selected web capture")
"* %^{Title}\nSource: %u, %:link\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?"
:empty-lines 1)
("L" "Unselected web capture"
entry (file+headline "~/org/web-links.org" "Web links")
"* %(transform-square-brackets-to-round-ones \"%:description\")%?\n:PROPERTIES:\n:Created: %T\n:END:\n- %:link\n"
:empty-lines 1)))
(setq org-todo-keywords
'((sequence "TODO(t)" "NEED2BUY(n)" "PLANNING(p)" "IN-PROGRESS(i@/!)" "VERIFYING(v!)" "BLOCKED(b@)" "|" "DONE(d!)" "CANCELED(c@/!)" )
))
(setq org-todo-keyword-faces
'(
("TODO" . (:foreground "GoldenRod" :weight bold))
("PLANNING" . (:foreground "DeepPink" :weight bold))
("IN-PROGRESS" . (:foreground "Cyan" :weight bold))
("VERIFYING" . (:foreground "DarkOrange" :weight bold))
("BLOCKED" . (:foreground "Red" :weight bold))
("DONE" . (:foreground "LimeGreen" :weight bold))
("NEED2BUY" . (:foreground "Red" :weight bold))
))
;; Tags
(setq org-tag-alist '(
;; context
(:startgroup)
("@shop" . ?s)
("@home" . ?h)
("@outdoor" . ?o)
("@any" . ?a)
("@meeting" . ?m)
(:endgroup)
;; basic tags
(:startgroup)
("chores" . ?C)
("meeting" . ?M)
("finance" . ?F)
("sport" . ?S)
("code" . ?O)
("social" . ?I)
("productivity" . ?P)
("study" . ?U)
("privacy" . ?R)
("family" . ?A)
("travel" . ?T)
("life" . ?L)
("health" . ?H)
("friends" . ?E)
("hobby" . ?B)
("research" . ?G)
("article" . ?I)
("job" . ?J)
(:endgroup)
;; Special tags
("CRITICAL" . ?X)
;; other tags
("backend")
("broken_code")
("frontend")
("hike")
("cycle")
("pkm")
("pentest")
("immigration")
("devops")
("pet")
("accomplishment")
("music")
("youtube")
("trash")
("devsecops")
))
;; Tag colors
(setq org-tag-faces
'(
("@home" . (:foreground "mediumPurple1" :weight bold))
("@outdoor" . (:foreground "royalblue1" :weight bold))
("@shop" . (:foreground "forest green" :weight bold))
("QA" . (:foreground "sienna" :weight bold))
("chores" . (:foreground "yellow1" :weight bold))
("sport" . (:foreground "green yellow" :weight bold))
("finance" . (:foreground "tomato" :weight bold))
("privacy" . (:foreground "dark olive green" :weight bold))
("study" . (:foreground "aquamarine" :weight bold))
("productivity" . (:foreground "violet" :weight bold))
("family" . (:foreground "medium violet red" :weight bold))
("health" . (:foreground "DarkOrange1" :weight bold))
("code" . (:foreground "snow3" :weight bold))
("travel" . (:foreground "salmon4" :weight bold))
("life" . (:foreground "goldenrod1" :weight bold))
("friends" . (:foreground "plum4" :weight bold))
("hobby" . (:foreground "SeaGreen1" :weight bold))
("social" . (:foreground "RoyalBlue1" :weight bold))
("research" . (:foreground "deep sky blue" :weight bold))
("meeting" . (:foreground "magenta" :weight bold))
("CRITICAL" . (:foreground "red1" :weight bold))
("job" . (:foreground "medium spring green" :weight bold))
)
)
;; Agenda View "d"
(defun air-org-skip-subtree-if-priority (priority)
"Skip an agenda subtree if it has a priority of PRIORITY.
PRIORITY may be one of the characters ?A, ?B, or ?C."
(let ((subtree-end (save-excursion (org-end-of-subtree t)))
(pri-value (* 1000 (- org-lowest-priority priority)))
(pri-current (org-get-priority (thing-at-point 'line t))))
(if (= pri-value pri-current)
subtree-end
nil)))
(setq org-agenda-skip-deadline-if-done t)
(setq org-agenda-custom-commands
'(
;; Daily Agenda & TODOs
("d" "Daily agenda and all TODOs"
;; Display items with priority A
((tags "PRIORITY=\"A\""
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
(org-agenda-overriding-header "High-priority unfinished tasks:")))
;; View 7 days in the calendar view
(agenda "" ((org-agenda-span 7)))
;; Display items with priority B (really it is view all items minus A & C)
(alltodo ""
((org-agenda-skip-function '(or (air-org-skip-subtree-if-priority ?A)
(air-org-skip-subtree-if-priority ?C)
(org-agenda-skip-if nil '(scheduled deadline))))
(org-agenda-overriding-header "ALL normal priority tasks:")))
;; Display items with pirority C
(tags "PRIORITY=\"C\""
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
(org-agenda-overriding-header "Low-priority Unfinished tasks:")))
)
;; Don't compress things (change to suite your tastes)
((org-agenda-compact-blocks nil)))
;; My Super View
("j" "My Super View"
(
(agenda ""
(
(org-agenda-remove-tags t)
(org-agenda-span 7)
(org-agenda-skip-function
'(org-agenda-skip-entry-if 'todo 'done))
)
)
(alltodo ""
(
;; Remove tags to make the view cleaner
(org-agenda-remove-tags t)
(org-agenda-prefix-format " %t %s")
(org-agenda-overriding-header "CURRENT STATUS")
;; Define the super agenda groups (sorts by order)
(org-super-agenda-groups
'(
;; Filter where tag is CRITICAL
(:name "Critical Tasks"
:tag "CRITICAL"
:order 0
)
;; Filter where TODO state is IN-PROGRESS
(:name "Currently Working"
:todo "IN-PROGRESS"
:order 1
)
;; Filter where TODO state is BLOCKED or where the tag is obstacle
(:name "Problems & Blockers"
:todo "BLOCKED"
:order 3
)
;; Filter where tag is research
(:name "Research Required"
:tag "research"
:order 4
)
;; Filter where tag is chores
(:name "Chores"
:tag "chores"
:order 5
)
;; Filter where tag is meeting and priority is A (only want TODOs from meetings)
(:name "Meeting Action Items"
:and (:tag "meeting" :priority "A")
:order 6
)
;; Filter where state is TODO and the priority is A and the tag is not meeting
(:name "Other Important Items"
:and (:todo "TODO" :priority "A" :not (:tag "meeting"))
:order 7
)
;; Filter where state is TODO and priority is B
(:name "General Backlog"
:and (:todo "TODO" :priority "B")
:order 8
)
;; Filter where the priority is C or less (supports future lower priorities)
(:name "Non Critical"
:priority<= "C"
:order 9
)
;; Filter where TODO state is VERIFYING
(:name "Currently Being Verified"
:todo "VERIFYING"
:order 10
)
;; Filter where TODO state is PLANNING
(:name "Planning Next Steps"
:todo "PLANNING"
:order 11
)
)
)
)
)
))
))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages '(gruvbox-theme ace-window)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(fixed-pitch ((t :family "JetBrainsMono Nerd Font")))
'(org-block ((t (:inherit fixed-pitch))))
'(org-block-begin-line ((t (:inherit fixed-pitch))))
'(org-block-end-line ((t (:inherit fixed-pitch))))
'(org-code ((t (:inherit (shadow fixed-pitch)))))
'(org-date ((t (:inherit (shadow fixed-pitch)))))
'(org-document-info ((t (:inherit (shadow fixed-pitch)))))
'(org-document-info-keyword ((t (:inherit (shadow fixed-pitch)))))
'(org-document-title ((t (:inherit default :weight bold :foreground "#ebdbb2" :family "SauceCodePro Nerd Font Mono" :height 120 :height 2.0 :underline nil))))
'(org-drawer ((t (:inherit (shadow fixed-pitch)))))
'(org-ellipsis ((t (:inherit fixed-pitch :foreground "gray40" :underline nil))))
'(org-indent ((t (:inherit (org-hide fixed-pitch)))))
'(org-level-1 ((t (:inherit default :weight bold :foreground "#ebdbb2" :family "SauceCodePro Nerd Font Mono" :height 120 :height 1.75))))
'(org-level-2 ((t (:inherit default :weight bold :foreground "#ebdbb2" :family "SauceCodePro Nerd Font Mono" :height 120 :height 1.5))))
'(org-level-3 ((t (:inherit default :weight bold :foreground "#ebdbb2" :family "SauceCodePro Nerd Font Mono" :height 120 :height 1.25))))
'(org-level-4 ((t (:inherit default :weight bold :foreground "#ebdbb2" :family "SauceCodePro Nerd Font Mono" :height 120 :height 1.1))))
'(org-level-5 ((t (:inherit default :weight bold :foreground "#ebdbb2" :family "SauceCodePro Nerd Font Mono" :height 120))))
'(org-level-6 ((t (:inherit default :weight bold :foreground "#ebdbb2" :family "SauceCodePro Nerd Font Mono" :height 120))))
'(org-level-7 ((t (:inherit default :weight bold :foreground "#ebdbb2" :family "SauceCodePro Nerd Font Mono" :height 120))))
'(org-level-8 ((t (:inherit default :weight bold :foreground "#ebdbb2" :family "SauceCodePro Nerd Font Mono" :height 120))))
'(org-link ((t (:inherit fixed-pitch :foreground "tomato" :underline t))))
'(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch) :height 0.8))))
'(org-properties ((t (:inherit fixed-pitch))))
'(org-property-value ((t (:inherit fixed-pitch))))
'(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch)))))
'(org-src ((t (:inherit fixed-pitch))))
'(org-table ((t (:inherit fixed-pitch))))
'(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8))))
'(variable-pitch ((t :family "SauceCodePro Nerd Font Mono" :height 120))))

View file

@ -1,6 +1,7 @@
[user]
name = foozzi
email = foozzione@gmail.com
name = fz0x1
email = fz0x1+gpg@posteo.net
signingkey = 6F819098C73891F00529EFBC6F81647BE1B459F4
[core]
excludesfile = "$HOME/.gitignore"
pager = delta
@ -15,3 +16,13 @@
colorMoved = default
[init]
defaultBranch = master
[commit]
gpgSign = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
; [credential]
; helper = osxkeychain
; useHttpPath = true

35
global/.newsboat/config Normal file
View file

@ -0,0 +1,35 @@
# general settings
auto-reload yes
# some settings
include config-os
include miniflux
# unbind keys
unbind-key ENTER
unbind-key j
unbind-key k
unbind-key J
unbind-key K
# bind keys - vim style
bind-key j down
bind-key k up
bind-key l open
bind-key h quit
# solarized
color background default default
color listnormal default default
color listnormal_unread default default
color listfocus black cyan
color listfocus_unread black cyan
color info default black
color article default default
# highlights
highlight article "^(Title):.*$" blue default
highlight article "https?://[^ ]+" red default
highlight article "\\[image\\ [0-9]+\\]" green default
max-items 0

BIN
global/.newsboat/miniflux Normal file

Binary file not shown.

5
global/.prettierrc.yaml Normal file
View file

@ -0,0 +1,5 @@
proseWrap: "always"
overrides:
- files: "*.jrnl"
options:
parser: markdown

1079
global/.spacemacs Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -1 +1,2 @@
^/\.config/alacritty/themes/deprecated-dracula\.yml$
^/\.config/nvim/lazy-lock\.json$

View file

@ -1,4 +1,5 @@
# mouse
source-file ~/.tmux/themes/tmux-colorscheme.conf
setw -g mouse on
unbind C-b
@ -10,6 +11,7 @@ bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe "pbcopy"
set -g default-terminal tmux-256color
# set -g default-terminal xterm-256color
set -sa terminal-features ',alacritty:RGB'
set -ga terminal-overrides ",*256col*:Tc"
@ -30,29 +32,37 @@ bind -n M-p last-window
bind -n M-e split-window -v -c '#{pane_current_path}'
bind -n M-d split-window -h -c '#{pane_current_path}'
bind -n M-W kill-pane
# resize to bottom
bind -n M-j resize-pane -D 5
bind -n M-k resize-pane -U 5
# Automatic restore
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
# set -g @continuum-restore 'on'
# set -g @resurrect-capture-pane-contents 'on'
#set -g @resurrect-processes ''
set -g @catppuccin_window_status_icon_enable "yes"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_status_left_separator "█"
set -g @catppuccin_status_fill "all"
set -g @catppuccin_status_modules_right "application session battery"
set -g @catppuccin_application_icon ""
# very unique Mac bug
if-shell "type 'reattach-to-user-namespace' >/dev/null" "set -g default-command 'reattach-to-user-namespace -l $SHELL'"
# set -g status-style "fg=#665c54"
# set -g status-bg default
set -g status-position top
# set -g status-interval 1
# set -g status-left ""
# disable status
#set -g status off
set -g status on
# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'schasse/tmux-jump'
run '~/.tmux/plugins/tpm/tpm'

View file

@ -0,0 +1,63 @@
### theme settings ###
# window separators
set-option -wg window-status-separator ""
# monitor window changes
set-option -wg monitor-activity on
set-option -wg monitor-bell on
# set statusbar update interval
set-option -g status-interval 1
### colorscheme ###
# change window screen colors
set-option -wg mode-style bg="#fe8019",fg="#3c3836"
# default statusbar colors (terminal bg should be #282828)
set-option -g status-style bg=terminal,fg="#a89984"
# default window title colors
set-option -wg window-status-style bg=terminal,fg="#7c6f64"
# colors for windows with activity
set-option -wg window-status-activity-style bg="#3c3836",fg="#a89984"
# colors for windows with bells
set-option -wg window-status-bell-style bg="#3c3836",fg="#fe8019"
# active window title colors
set-option -wg window-status-current-style bg=terminal,fg="#c3c3c3"
# pane border
set-option -g pane-active-border-style fg="#fe8019"
set-option -g pane-border-style fg="#3c3836"
# message info
set-option -g message-style bg="#fe8019",fg="#3c3836"
# writing commands inactive
set-option -g message-command-style bg="#a89984",fg="#3c3836"
# pane number display
set-option -g display-panes-active-colour "#fe8019"
set-option -g display-panes-colour "#3c3836"
# clock
set-option -wg clock-mode-colour "#fe8019"
# copy mode highlighting
%if #{>=:#{version},3.2}
set-option -wg copy-mode-match-style "bg=#a89984,fg=#3c3836"
set-option -wg copy-mode-current-match-style "bg=#fe8019,fg=#3c3836"
%endif
# statusbar formatting
# "#fe8019" MUST be in lowercase here (conflicts with statusline alias otherwise)
#set-option -g status-left "#{session_name} "
# set-option -g status-right "#[bg=#3c3836, fg=#7c6f64] %Y-%m-%d %H:%M:%S #[bg=#a89984, fg=#3c3836]#{?client_prefix,#[bg=#fe8019],#[bg=#a89984]} #{host_short} "
set-option -g status-right "%Y-%m-%d %H:%M:%S"
set-option -wg window-status-current-format "#{?window_zoomed_flag,#[fg=default bold],#[fg=default]} [#{window_index}]:#{window_name}"
set-option -wg window-status-format "#{?window_zoomed_flag,#[fg=default bold],#[fg=default]} [#{window_index}]:#{window_name}"

248
global/.vimrc Normal file
View file

@ -0,0 +1,248 @@
" Base settings (add comments)
set nocompatible
syntax enable " syntax highlight
set t_Co=256 " set 256 colors
set number " show line numbers
set ruler
set ttyfast " terminal acceleration
set tabstop=4 " 4 whitespaces for tabs visual presentation
set shiftwidth=4 " shift lines by 4 spaces
set smarttab " set tabs for a shifttabs logic
set expandtab " expand tabs into spaces
set autoindent " indent when moving to the next line while writing code
set cursorline " shows line under the cursor's line
set showmatch " shows matching part of bracket pairs (), [], {}
set enc=utf-8 " utf-8 by default
set nobackup " no backup files
set nowritebackup " only in case you don't want a backup file while editing
set noswapfile " no swap files
set backspace=indent,eol,start " backspace removes all (indents, EOLs, start) What is start?
set scrolloff=10 " let 10 lines before/after cursor during scroll
set clipboard=unnamed " use system clipboard
" set clipboard=unnamedplus
set exrc " enable usage of additional .vimrc files from working directory
set secure " prohibit .vimrc files to execute shell, create files, etc...
let mapleader = " " " leader key
" Buffers
set switchbuf=useopen " open buffer instead of creating a new one
set laststatus=2
" close current buffer
nmap <leader>bc :bd<CR>
" Search
set incsearch " incremental search
set hlsearch " highlight search results
" highlight 'long' lines (>= 80 symbols) in python files
augroup vimrc_autocmds
autocmd!
autocmd FileType python,rst,c,cpp highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python,rst,c,cpp match Excess /\%81v.*/
autocmd FileType python,rst,c,cpp set nowrap
autocmd FileType python,rst,c,cpp set colorcolumn=80
autocmd FileType vimwiki set wrap
autocmd FileType vimwiki set textwidth=80
augroup END
" terminal
cabbrev bterm bo term
autocmd TerminalWinOpen *
\ if &buftype == 'terminal' |
\ resize 10 |
"\ setlocal termwinsize=0x140 |
\ endif
nmap <leader>tt :bterm<CR>
autocmd FileType html setlocal tabstop=2 shiftwidth=2 softtabstop=2
autocmd FileType css setlocal tabstop=2 shiftwidth=2 softtabstop=2
autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 softtabstop=2
" plugings
" call plug#begin()
"
" Plug 'machakann/vim-highlightedyank'
" Plug 'tpope/vim-commentary'
" Plug 'easymotion/vim-easymotion'
" Plug 'preservim/nerdtree'
" " Plug 'tpope/vim-surround'
" Plug 'terryma/vim-multiple-cursors'
" " Plug 'tommcdo/vim-exchange'
" " Plug 'michaeljsmith/vim-indent-object'
" Plug 'vimwiki/vimwiki'
" Plug 'mattn/calendar-vim'
" Plug 'jamessan/vim-gnupg'
" Plug 'ryanoasis/vim-devicons'
" " https://github.com/LunarWatcher/auto-pairs/blob/master/doc/AutoPairs.txt
" Plug 'LunarWatcher/auto-pairs'
" " Plug 'vim-airline/vim-airline'
" " Plug 'vim-airline/vim-airline-themes'
" Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
" Plug 'morhetz/gruvbox'
" Plug 'christoomey/vim-tmux-navigator'
" Plug 'sheerun/vim-polyglot'
" " Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
" " Plug 'junegunn/fzf.vim'
" Plug 'mhinz/vim-startify'
" " Plug 'tpope/vim-fugitive'
" Plug 'tpope/vim-obsession'
" Plug 'ycm-core/YouCompleteMe'
" Plug 'dense-analysis/ale'
" Plug 'SirVer/ultisnips'
" Plug 'honza/vim-snippets'
" " Plug 'majutsushi/tagbar'
"
" call plug#end()
filetype on
filetype plugin on
filetype plugin indent on
" tagbar
" let g:tagbar_autofocus=0
" let g:tagbar_width=42
" autocmd BufEnter *.py :call tagbar#autoopen(0)
" ultisnips
" let g:UltiSnipsExpandTrigger = '<C-j>'
" let g:UltiSnipsJumpForwardTrigger = '<C-j>'
" let g:UltiSnipsJumpBackwardTrigger = '<C-k>'
" easymotion
" map <leader>F <Plug>(easymotion-s)
" map <leader>f <Plug>(easymotion-f)
" nerdtree
" map <c-t> :NERDTree<CR>
" nmap " :NERDTreeToggle<CR>
" let NERDTreeIgnore=['\.pyc$', '\.pyo$', '__pycache__$'] " Ignore files in NERDTree
" let NERDTreeWinSize=40
" autocmd VimEnter * if !argc() | NERDTree | endif " Load NERDTree only if vim is run without arguments
" fzf
" set rtp+=/opt/homebrew/opt/fzf
" nmap <leader>bb :Buffers<CR>
" auto-pairs
" let g:AutoPairsMapBS = 1
" let g:AutoPairsBSAfter = 0
" airline
" let g:airline#extensions#obsession#enable = 1
" let g:airline#extensions#tabline#enabled = 1
" let g:airline#extensions#ale#enabled = 1
" let g:airline_powerline_fonts = 1
" let g:airline#extensions#whitespace#enabled = 0
" let g:airline_theme='gruvbox'
" if !exists('g:airline_symbols')
" let g:airline_symbols = {}
" endif
" let g:airline_symbols.linenr = ' ☰ '
" let g:airline_symbols.colnr = ' : '
" let g:airline_symbols.maxlinenr = ''
" theme
" autocmd vimenter * ++nested colorscheme gruvbox
" set background=dark
" let g:gruvbox_contrast_dark='soft'
" vim wiki
" let g:GPGFilePattern = '*.\(gpg\|asc\|pgp\)\(.wiki\|.md\)\='
" toogle checklists
" nnoremap <leader>cl :VimwikiToggleListItem<CR>
" reset gpg-agent password cache after close or save the buffer (vimwiki diary)
" autocmd BufWritePost *.asc.md !gpgconf --reload gpg-agent
" https://github.com/WnP/vimwiki_markdown
" ~/vimwiki/personal - private content
" ~/vimwiki/public_wiki - public wiki content
" ~/vimwiki/diary - private diary
" let default_wiki = '~/Productivity/vimwiki/personal'
" let public_wiki = '~/Productivity/vimwiki/public_wiki'
" let g:diary = '~/Productivity/vimwiki/diary'
" let g:diary_index_name = 'diary'
" let g:diary_ext = '.asc.md'
" let g:vimwiki_list = [{
" \ 'path': default_wiki,
" \ 'diary_rel_path': '../diary',
" \ 'auto_diary_index': 1,
" \ 'auto_export': 0},
" \ {'path': public_wiki,
" \ 'auto_export': 0,
" \ 'diary_rel_path': '../diary',
" \ 'template_path': public_wiki . '/templates/',
" \ 'template_default': 'default',
" \ 'syntax': 'markdown',
" \ 'ext': '.md',
" \ 'path_html': public_wiki . '/site_html/',
" \ 'custom_wiki2html': 'vimwiki_markdown',
" \ 'template_ext': '.tpl'},
" \ {'path': diary,
" \ 'index': diary_index_name,
" \ 'ext': diary_ext,
" \ 'diary_rel_path': './',
" \ 'auto_diary_index': 1,
" \ 'auto_export': 0}]
" fix - https://github.com/vimwiki/vimwiki/issues/1055
" exe 'autocmd BufEnter ' . diary_index_name . diary_ext . ' :VimwikiDiaryGenerateLinks'
" inserting default diary template
" function! AppendDiaryTemplate()
" detecting path of current buffer
" let current_dir = substitute(expand('%:p:h'), '^' . $HOME, '~', '')
" if current_dir == g:diary
" r! ~/scripts/vimwiki_diary_template
" execute '1,2d'
" normal G
" normal o
" endif
" endfunction
" command! InsertDiaryTemplate call AppendDiaryTemplate()
" nnoremap <leader>idr :InsertDiaryTemplate<CR>
" inserting default GPG fingerprint for the diary
" let g:diaryGPG = 'CE7EB8727486553012A04E284EE708165AA10C48'
" command! InsertGPGAndExit call AppendGPGAndExit()
" function! AppendGPGAndExit()
" detecting vim-gnupg dialog
" if match(getline(2), '^GPG:') == 0
" call append(line('.'), g:diaryGPG)
" wq
" endif
" endfunction
" nnoremap <leader>igg :InsertGPGAndExit<CR>
" prettier
" nmap <leader>mm <Plug>(PrettierAsync)
" ALE
" let g:ale_linters = {
" \ 'python': ['ruff', 'mypy', 'pyright'],
" \}
" let g:ale_fixers = {
" \ '*': ['remove_trailing_lines', 'trim_whitespace'],
" \ 'python': ['ruff', 'ruff_format'],
" \ 'javascript': ['prettier', 'eslint'],
" \}
" let g:ale_fix_on_save = 1
" map <C-e> <Plug>(ale_next_wrap)
" map <C-r> <Plug>(ale_previous_wrap)
" nmap <leader>go :ALEGoToDefinition<CR>
" nmap <leader>qf :ALEFix<CR>
" nmap <leader>k :ALEHover<CR>
" let g:ale_python_auto_virtualenv = 1
" let g:ale_fix_on_save = 1
" YCM
" set completeopt-=preview
" autocmd CompleteDone * if pumvisible() == 0 | pclose | endif
set langmap=йq,цw,уe,кr,еt,нy,гu,шi,щo,зp,х[,ъ],фa,ыs,вd,аf,пg,рh,оj,лk,дl,ж\\;,э',ё\\,яz,чx,сc,мv,иb,тn,ьm,б\\,,ю.,ЙQ,ЦW,УE,КR,ЕT,НY,ГU,ШI,ЩO,ЗP,Х{,Ъ},ФA,ЫS,ВD,АF,ПG,РH,ОJ,ЛK,ДL,Ж:,Э\\",ЯZ,ЧX,СC,МV,ИB,ТN,ЬM,Б<,Ю>,Ё/|

View file

@ -1,6 +1,9 @@
# Path to your oh-my-zsh installation.
export TERM="tmux-256color"
export ZSH="$HOME/.oh-my-zsh"
setopt HIST_IGNORE_SPACE
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
@ -12,7 +15,7 @@ ZSH_THEME="robbyrussell"
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git python tmux genpass web-search zsh-syntax-highlighting zsh-autosuggestions)
plugins=(git python tmux genpass zsh-syntax-highlighting zsh-autosuggestions poetry)
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
@ -20,33 +23,41 @@ source $ZSH/oh-my-zsh.sh
# functions
### ARCHIVE EXTRACTION
# usage: ex <file>
ex ()
# ex ()
# {
# if [ -f "$1" ] ; then
# case $1 in
# *.tar.bz2) tar xjf $1 ;;
# *.tar.gz) tar xzf $1 ;;
# *.bz2) bunzip2 $1 ;;
# *.rar) unrar x $1 ;;
# *.gz) gunzip $1 ;;
# *.tar) tar xf $1 ;;
# *.tbz2) tar xjf $1 ;;
# *.tgz) tar xzf $1 ;;
# *.zip) unzip $1 ;;
# *.Z) uncompress $1;;
# *.7z) 7z x $1 ;;
# *.deb) ar x $1 ;;
# *.tar.xz) tar xf $1 ;;
# *.tar.zst) unzstd $1 ;;
# *) echo "'$1' cannot be extracted via ex()" ;;
# esac
# else
# echo "'$1' is not a valid file"
# fi
# }
DIARY="default"
diary_string ()
{
if [ -f "$1" ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1;;
*.7z) 7z x $1 ;;
*.deb) ar x $1 ;;
*.tar.xz) tar xf $1 ;;
*.tar.zst) unzstd $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
esac
else
echo "'$1' is not a valid file"
fi
"${HOME:?}/scripts/bin/diary.py" insert "${DIARY:?}" single "$*"
}
# aliases
## just
alias j="just"
## tmux
alias tsc='tmux switch-client -t'
alias tsd='tmux new-session -d -s'
@ -58,52 +69,78 @@ alias la="eza -lagh --git --header"
alias lt="eza -T --git-ignore"
#alias nano='micro'
## files/dirs
alias zshe='vim ~/.zshrc'
alias zshe='nvim ~/.zshrc'
alias zshs='. ~/.zshrc'
## neomutt
alias nm='neomutt'
## vim
alias diary='vim ~/vimwiki/diary/diary.asc.md'
# alias ovim='vim' # original vim
# alias diary='ovim ~/vimwiki/diary/diary.asc.md'
## nvim
alias vim='nvim'
alias evim='nvim ~/.dotfiles/global/.config/nvim/'
alias kvim='nvim ~/PKM/'
alias cvim='nvim ~/.zshrc'
alias tvim='nvim ~/Dropbox/TODO/'
alias kvimr='nvim ~/PKM/05\ -\ resources/'
alias kvimj='nvim ~/PKM/02\ -\ journal/'
alias jvim='nvim ~/PKM/02\ -\ journal/$(date "+%Y-%m-%d").md'
alias vi='nvim'
alias v='nvim'
## string
alias gen8='LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 8 | pbcopy'
## wttr.in
alias wr='curl wttr.in'
## python
alias python='python3'
alias py='python'
# Preferred editor for local and remote sessions
export EDITOR='vim'
## todo.txt
alias todo="todo.sh -d ~/Dropbox/TODO/todo.cfg"
## eton
# alias et="eton"
# alias zk="eton zk"
# alias di=" eton diary"
## toipe (https://github.com/Samyak2/toipe)
alias to="toipe -f ~/Productivity/TextSync/typing_wordlists/most_problems"
## jrnl.sh
alias jrnl=" jrnl"
alias lj="jrnl -n 3 --format json | jq '.entries[].date'"
## jupyter
alias jup="jupyter lab"
## hledger
alias ledger='just -f ~/.hledger/justfile'
alias ehledger='nvim ~/.hledger/2024.journal'
## other
alias cclear="reset && tmux clear-history && cd"
## screenshots
alias scrn="screenshot.sh"
## secure deletion files
alias rrmm="shred -n 7 -z -u"
## secure deletion files in directory
alias frmm="find . -type f -exec shred -n 7 -z -u {} +"
## doomemacs
alias resmacs="killall emacs &> /dev/null && emacs --daemon &> /dev/null"
alias em="emacsclient -c"
alias relmacs="doom sync"
## diary
# alias di="diary.sh"
alias m2jrnl="diary.py export ${DIARY:?} diaryf"
alias dib="diary.py insert ${DIARY:?} bulk"
alias dis=" diary_string"
alias dit="diary.py doctor ${DIARY:?}"
alias jrnlc="jrnl --encrypt"
# bindkeys
## autosuggest
bindkey "^]" autosuggest-accept
# envs
export DISABLE_AUTO_TITLE='true'
## fzf dracula theme
export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'
--color=dark
--color=fg:-1,bg:-1,hl:#5fff87,fg+:-1,bg+:-1,hl+:#ffaf5f
--color=info:#af87ff,prompt:#5fff87,pointer:#ff87d7,marker:#ff87d7,spinner:#ff87d7'
# paths
## rust
source $HOME/.cargo/env
## all from local/bin
export PATH=$PATH:$HOME/.local/bin
## pdtm
export PATH=$PATH:$HOME/.pdtm/go/bin
## doom emacs
export PATH=$PATH:$HOME/.config/emacs/bin
## golang
export GOPATH=$HOME/go # don't forget to change your path correctly!
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:/usr/local/go/bin
## color
export TERM=tmux-256color
if [[ -e "$HOME/.cargo/env" ]]; then
source $HOME/.cargo/env
fi
## fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"
source $HOME/.zshrc-additional
source $HOME/.zshrc-secrets

BIN
global/.zshrc-secrets Normal file

Binary file not shown.

7
global/scripts/bin/backup_keys Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env sh
backup_dir="$HOME/backup-keys-$(date +%d%m%Y%H%M%S)"
mkdir "$backup_dir"
cp -rf ~/.gnupg "$backup_dir/gnupg"
cp -rf ~/.ssh "$backup_dir/ssh"

722
global/scripts/bin/diary.py Executable file
View file

@ -0,0 +1,722 @@
#!/usr/bin/env python3
import base64
# import cProfile
import hashlib
import json
import logging
import os
# import pstats
import re
import shlex
import shutil
import sqlite3
import subprocess
import sys
import tempfile
import time
import urllib.parse
import urllib.request
from concurrent.futures import ThreadPoolExecutor, as_completed
from datetime import datetime, timezone
from pathlib import Path
from zoneinfo import ZoneInfo
DB_NAME = Path("metadata.db")
# TZ = 1
TZ = ZoneInfo("Europe/Warsaw")
TOOLS = ("jrnl", "sqlite3")
FILES = (".jpeg", ".jpg", ".png", ".gif")
FILES_PATH = Path("attachments")
for t in TOOLS:
if not shutil.which(t):
raise FileNotFoundError(f"There is no existing path for '{t}'")
class Config:
memo_token = os.getenv("MEMOS_TOKEN")
memo_url = os.getenv("MEMOS_URL")
openweathermap_api_key = os.getenv("OPENWEATHER_APIKEY")
owntracks_creds = os.getenv("OWNTRACKS_CREDS", "").encode()
owntracks_url = os.getenv("OWNTRACKS_URL")
geo_user, geo_device = os.getenv("OWNTRACKS_PARAMS", ",").split(",")
@classmethod
def validate(cls):
if not cls.memo_token or not cls.memo_url:
sys.exit("Missing MEMOS_TOKEN or MEMOS_URL environment variables.")
elif not cls.openweathermap_api_key:
sys.exit("Missing openweather api key")
elif ( # TODO need more complex checking
not cls.owntracks_creds
or not cls.owntracks_url
or not cls.geo_user
or not cls.geo_device
):
sys.exit("Missing OwnTracks data")
Config.validate()
def make_logger():
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s",
handlers=[
logging.FileHandler(Path.home() / ".diary_requests.log", mode="a"),
],
)
return logging.getLogger("urllib_logger")
def get_diary_path_by_name(name: str):
result = subprocess.run(["jrnl", "--list"], capture_output=True, text=True)
if result.stderr:
sys.exit(f"Error retrieving diary name: {result.stderr}")
matches = dict(re.findall(r"\*\s+(\w+)\s+->\s+(.+)", result.stdout.strip()))
diary_path = matches.get(name)
if not diary_path or not Path(diary_path).exists():
sys.exit(f"Diary '{name}' not found or path does not exist.")
return Path(diary_path)
def make_tz_unixtime(target_time: str):
return int(
(
datetime.strptime(target_time, "%Y-%m-%dT%H:%M:%SZ")
.replace(tzinfo=ZoneInfo("UTC"))
.astimezone(TZ)
).timestamp()
)
def find_closest_entry(data, target_timestamp: int):
return min(
(entry for entry in data if "tst" in entry),
key=lambda e: abs(target_timestamp - e["tst"]),
default=None,
)
def convert_diary_date(date_str):
try:
return (
datetime.strptime(date_str, "%Y-%m-%dT%H:%M:%SZ")
.replace(tzinfo=ZoneInfo("UTC"))
.astimezone(TZ)
).strftime("%d %b %Y at %H:%M:%S:")
except ValueError:
return None
def download_file(url, filename, diary_path, headers, metadata_id):
ext = os.path.splitext(url)[-1]
filename = f"id{metadata_id}_{int(time.time())}_{filename}"
if not Path(diary_path / FILES_PATH).exists():
Path(diary_path / FILES_PATH).mkdir(parents=True, exist_ok=True)
filepath = Path(diary_path / FILES_PATH / filename)
if ext not in FILES:
print(f"File {url} is not supporting")
if filepath.exists():
print(f"File {url} exists")
try:
request = urllib.request.Request(url, headers=headers)
with (
urllib.request.urlopen(request) as response,
open(filepath, "wb") as out_file,
):
out_file.write(response.read())
except Exception as e:
sys.exit(str(e))
return Path(FILES_PATH / filename)
def fetch_data(url, headers={}, data=None, rjson=True, log=True):
logit = make_logger()
method = "POST" if data else "GET"
encoded_data = urllib.parse.urlencode(data).encode("utf-8") if data else None
req = urllib.request.Request(url, headers=headers, data=encoded_data, method=method)
req.add_header("Content-Type", "application/x-www-form-urlencoded")
try:
with urllib.request.urlopen(req) as response:
if response.status != 200:
logit.error(response.read())
sys.exit(f"HTTP error {response.status}")
try:
response_data = response.read().decode("utf-8")
except UnicodeDecodeError as e:
logit.error(e)
response_data = response.read()
logit.info(response_data) if log else None
if not rjson:
return response_data
return json.loads(response_data)
except Exception as e:
logit.error(str(e))
raise
def delete_entity(url, headers):
logit = make_logger()
req = urllib.request.Request(url, headers=headers, method="DELETE")
try:
with urllib.request.urlopen(req) as response:
if response.status != 200:
logit.error(response.read())
sys.exit(f"HTTP delete error {response.status}")
logit.info(response.read().decode("utf-8"))
except Exception as e:
logit.error(str(e))
raise
def db_connection(diary_path: Path):
conn = sqlite3.connect(diary_path / DB_NAME)
conn.execute("PRAGMA foreign_keys = ON;")
return conn
def initialize_db(conn: sqlite3.Connection):
with conn:
conn.executescript(
"""
CREATE TABLE IF NOT EXISTS metadata (
id INTEGER PRIMARY KEY,
unixtime INTEGER NOT NULL
);
CREATE TABLE IF NOT EXISTS weather (
id INTEGER PRIMARY KEY,
temp INTEGER NOT NULL,
temp_like INTEGER NOT NULL,
sunrise INTEGER NOT NULL,
sunset INTEGER NOT NULL,
icon TEXT NOT NULL DEFAULT 'none',
metadata_id INTEGER NOT NULL,
FOREIGN KEY (metadata_id) REFERENCES metadata (id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS attachments (
id INTEGER PRIMARY KEY,
filepath TEXT NOT NULL,
metadata_id INTEGER NOT NULL,
FOREIGN KEY (metadata_id) REFERENCES metadata (id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS location (
id INTEGER PRIMARY KEY,
city TEXT NOT NULL,
lon TEXT NOT NULL,
lat TEXT NOT NULL,
tz TEXT NOT NULL,
metadata_id INTEGER NOT NULL,
FOREIGN KEY (metadata_id) REFERENCES metadata (id) ON DELETE CASCADE
);
"""
)
def insert_metadata(
conn: sqlite3.Connection,
unixtime: int,
):
cursor = conn.cursor()
cursor.execute("INSERT INTO metadata(unixtime) VALUES(?)", [unixtime])
conn.commit()
return cursor.lastrowid
def remove_metadata(conn: sqlite3.Connection, metadata_id: int):
cursor = conn.cursor()
cursor.execute("DELETE FROM metadata WHERE id=?", (metadata_id,))
conn.commit()
def insert_weather(weather: dict, conn: sqlite3.Connection, metadata_id: int):
if isinstance(weather, list):
weather = weather[0]
cursor = conn.cursor()
try:
cursor.execute(
"""
INSERT INTO weather(temp, temp_like, sunrise, sunset, icon, metadata_id)
VALUES(?, ?, ?, ?, ?, ?)
""",
[
weather["temp"],
weather["feels_like"],
weather["sunrise"],
weather["sunset"],
weather["weather"][0]["icon"],
metadata_id,
],
)
except Exception as e:
remove_metadata(conn, metadata_id)
conn.rollback()
print(e)
raise
conn.commit()
def insert_attach(filepath: str, conn: sqlite3.Connection, metadata_id: int):
cursor = conn.cursor()
try:
cursor.execute(
"""
INSERT INTO attachments(filepath, metadata_id)
VALUES(?, ?)
""",
[
filepath,
metadata_id,
],
)
except Exception as e:
remove_metadata(conn, metadata_id)
conn.rollback()
print(e)
raise
conn.commit()
def insert_location(location: dict, conn: sqlite3.Connection, metadata_id: int):
cursor = conn.cursor()
try:
# sometimes it can't get locality....
locality = location["locality"] if "locality" in location else "-"
cursor.execute(
"""
INSERT INTO location(city, lon, lat, tz, metadata_id)
VALUES(?, ?, ?, ?, ?)
""",
[
locality,
location["lon"],
location["lat"],
location["tzname"],
metadata_id,
],
)
except Exception as e:
remove_metadata(conn, metadata_id)
conn.rollback()
print(e)
raise
conn.commit()
def fetch_geo(metadata_id: int, create_time_timestamp: int, conn: sqlite3.Connection):
geo_url = f"{Config.owntracks_url}/api/0/locations"
geo_headers = {
"Authorization": f"Basic {base64.b64encode(Config.owntracks_creds).decode()}"
}
geo_response = fetch_data(
geo_url,
geo_headers,
data={
"from": datetime.fromtimestamp(int(time.time()) - 2592000).strftime(
"%Y-%m-%d"
), # 30 days
# "limit": 1000,
"device": Config.geo_device,
"user": Config.geo_user,
},
)
closest_entry = find_closest_entry(
geo_response.get("data", []), create_time_timestamp
)
if closest_entry["tst"] + (48 * 60**2) < time.time(): # 2 days
print("")
if (
input("Do you really want to use such old geo data? (Y/N) ").strip().upper()
!= "Y"
):
remove_metadata(conn, metadata_id)
sys.exit("Operation canceled.")
insert_location(closest_entry, conn, metadata_id)
return closest_entry
def fetch_weather(
metadata_id: int, closest_entry: dict, unixtime: int, conn: sqlite3.Connection
):
weather_response = fetch_data(
f"https://api.openweathermap.org/data/3.0/onecall/timemachine?lat={closest_entry['lat']}&lon={closest_entry['lon']}&dt={unixtime}&appid={Config.openweathermap_api_key}&units=metric",
headers={},
)
insert_weather(weather_response["data"], conn, metadata_id)
def doctor():
args_len = len(sys.argv)
check_diary = False
fix_diary = False
limit = 50
if args_len < 3:
sys.exit("Usage: script.py doctor <diary_name>")
if args_len >= 4 and sys.argv[3] == "check_diary":
check_diary = True
if args_len >= 5:
limit = int(sys.argv[4])
if args_len >= 4 and sys.argv[3] == "check_and_fix_diary":
fix_diary = True
check_diary = True
diary_name = sys.argv[2]
diary_path = get_diary_path_by_name(diary_name).parent
diary_filename = get_diary_path_by_name(diary_name)
# do backup ever!
make_backup(diary_filename, diary_path)
conn = db_connection(diary_path)
initialize_db(conn)
cursor = conn.cursor()
metadata = cursor.execute(
f"SELECT * FROM metadata ORDER BY id DESC LIMIT {limit}"
).fetchall()
for m in metadata:
weather = cursor.execute(
"SELECT * FROM weather WHERE metadata_id = ?", (m[0],)
).fetchall()
location = cursor.execute(
"SELECT * FROM location WHERE metadata_id = ?", (m[0],)
).fetchall()
attachment = cursor.execute(
"SELECT * FROM attachments WHERE metadata_id = ?", (m[0],)
).fetchall()
if not weather:
print(f"There is no weather info about {m[0]} - {m[1]}")
if not location:
print(f"There is no location info about {m[0]} - {m[1]}")
# I can't have attachments in every entity...
# if not attachment:
# print(f"There is no attachment info about {m[0]} - {m[1]}")
if not weather and not location and not attachment:
# delete metadata entry if any of metadata type is not exists
print("An empty metadata was deleted")
remove_metadata(conn, m[0])
# Close the connection before starting the multithreading part of the script
conn.close()
if check_diary:
def check_jrnl(metadata: list):
dt = datetime.fromtimestamp(metadata[1], tz=TZ)
diary_datetime = dt.strftime("%Y/%m/%d at %I:%M:%S %p")
try:
result = subprocess.run(
["jrnl", diary_name, "-on", diary_datetime],
check=True,
capture_output=True,
text=True,
)
return diary_datetime, result
except subprocess.CalledProcessError as e:
print(e)
raise
def remove_attachment(metadata_id):
"""Remove file from attachments directory by 'metadata_id' - 'id12_1741177528_IMG_6141.jpeg'"""
files = list(Path(diary_path / FILES_PATH).glob(f"id{metadata_id}_*"))
if len(files) < 1:
return
if len(files) > 1:
if (
input(f"There are {len(files)} files. Remove them all? (Y/N): ")
.strip()
.upper()
!= "Y"
):
return
print("There are mistaken attachment, I will delete it!")
for file in files:
file.unlink(missing_ok=True)
def process_metadata(m):
conn = db_connection(diary_path)
diary_datetime, result = check_jrnl(metadata=m)
if not result.stdout.strip():
print(
f"There is some metadata that is not associated with a diary entity: {diary_datetime}."
)
if not fix_diary:
print(
"You can automatically remove it by running the scripts with 'check_and_fix_diary' argument."
)
else:
remove_metadata(conn, m[0])
remove_attachment(m[0]) # remove attachments
print("The problem was fixed.")
conn.close()
with ThreadPoolExecutor(max_workers=10) as executor:
futures = {executor.submit(process_metadata, m): m for m in metadata}
for future in as_completed(futures):
try:
future.result()
except Exception as e:
print(f"Thread error: {e}")
raise
def make_hash(file: Path):
sha256_hash = hashlib.sha256()
with open(file, "rb") as filed:
sha256_hash.update(filed.read())
return sha256_hash.hexdigest()
def make_backup(diary_name: str, diary_path: Path):
try:
os.remove(diary_path / f"{diary_name}.bak")
except FileNotFoundError:
...
# shutil.copy2(diary_path / diary_name, diary_path / f"{diary_name}.bak") # I can't make backup when the diary is not encrypted...
shutil.copy2(diary_path / DB_NAME, diary_path / f"{DB_NAME}.bak")
def export():
if len(sys.argv) < 4 or sys.argv[1] != "export":
sys.exit("Usage: script.py export <diary_name> <tag>")
diary_name, tag = sys.argv[2], sys.argv[3]
diary_path = get_diary_path_by_name(diary_name).parent
diary_filename = get_diary_path_by_name(diary_name)
# do backup ever!
make_backup(diary_filename, diary_path)
try:
conn = db_connection(diary_path)
initialize_db(conn)
headers = {"Cookie": f"memos.access-token={Config.memo_token}"}
# query_string = urllib.parse.urlencode(
# {"filter": f"creator=='users/1'&&tag_search==['{tag}']"}
# )
query_string = urllib.parse.urlencode({"filter": f"tag in ['{tag}']"})
data = fetch_data(
f"{Config.memo_url}api/v1/users/1/memos?{query_string}", headers
)
memos = data.get("memos", [])
if not memos:
sys.exit("No memos found.")
if (
input(f"There are {len(memos)} memos. Export them all? (Y/N): ")
.strip()
.upper()
!= "Y"
):
sys.exit("Export canceled.")
for memo in memos:
create_time = memo["createTime"]
content = memo["content"].replace(f"#{tag}", "").strip()
metadata_id = insert_metadata(conn, make_tz_unixtime(create_time))
# attachments part
memo_info = fetch_data(f"{Config.memo_url}/api/v1/{memo['name']}", headers)
# check if there are resources
if "resources" in memo_info:
for resource in memo_info["resources"]:
# download files
url = f"{Config.memo_url}file/{resource['name']}/{resource['filename']}"
try:
filepath = download_file(
url=url,
diary_path=diary_path,
filename=resource["filename"],
headers=headers,
metadata_id=metadata_id,
)
except Exception:
remove_metadata(conn, metadata_id)
raise
insert_attach(
filepath=str(filepath),
conn=conn,
metadata_id=metadata_id,
)
content += "\n@attach_photo"
closest_entry = fetch_geo(metadata_id, make_tz_unixtime(create_time), conn)
fetch_weather(
metadata_id, closest_entry, make_tz_unixtime(create_time), conn
)
try:
content = shlex.quote(content)
subprocess.run(
f'printf "%s %b" "{convert_diary_date(create_time)}" {content} | jrnl {diary_name}',
shell=True,
capture_output=True,
text=True,
check=True,
)
os.system("clear")
print("Record has been inserted.")
except subprocess.CalledProcessError as e:
print(f"Error writing to journal: {e.stderr}")
raise
delete_entity(f"{Config.memo_url}/api/v1/{memo['name']}", headers)
except Exception as e:
print(f"An error occurred: {e}")
raise
def insert():
conn = None
try:
if len(sys.argv) < 3 or sys.argv[1] != "insert":
sys.exit(
"Usage: script.py insert <diary_name> [bulk|single (default)] 'content'"
)
diary_name = sys.argv[2]
insert_type = (
"bulk" if len(sys.argv) > 3 and sys.argv[3] == "bulk" else "single"
)
diary_path = get_diary_path_by_name(diary_name).parent
diary_filename = get_diary_path_by_name(diary_name)
# do backup ever!
make_backup(diary_filename, diary_path)
conn = db_connection(diary_path)
initialize_db(conn)
# generating and converting current time
datenow = datetime.now(timezone.utc)
datenow_timestamp = datenow.strftime("%Y-%m-%dT%H:%M:%SZ")
metadata_id = insert_metadata(conn, make_tz_unixtime(datenow_timestamp))
# fetching geo-data
closest_entry = fetch_geo(
metadata_id, make_tz_unixtime(datenow_timestamp), conn
)
# fetching weather data
fetch_weather(
metadata_id, closest_entry, make_tz_unixtime(datenow_timestamp), conn
)
if insert_type == "single":
"""
Inserting a string from the terminal
"""
content = shlex.quote(sys.argv[4])
if not content:
print("There is no text")
sys.exit(1)
try:
subprocess.run(
f'printf "%s %s" "{convert_diary_date(datenow_timestamp)}" {content} | jrnl {diary_name}',
shell=True,
capture_output=True,
text=True,
check=True,
)
os.system("clear")
print("Record has been inserted.")
except subprocess.CalledProcessError as e:
print(f"Error inserting single entry: {e.stderr}")
raise
elif insert_type == "bulk":
"""
Inserting entry from your editor
"""
fd, temp_file_path = tempfile.mkstemp()
os.close(fd)
hash = make_hash(Path(temp_file_path))
subprocess.run(["nvim", temp_file_path], text=True, check=True)
with open(temp_file_path, "r") as file:
content = shlex.quote(file.read())
if hash != make_hash(temp_file_path):
try:
subprocess.run(
f'printf "%s %s" "{convert_diary_date(datenow_timestamp)}" {content} | jrnl {diary_name}',
shell=True,
capture_output=True,
text=True,
check=True,
)
os.system("clear")
print("Record has been inserted.")
except subprocess.CalledProcessError as e:
print(
f"Error during bulk import: {e.stderr}, file: {temp_file_path}"
)
raise
os.remove(temp_file_path)
except Exception as e:
print(f"An error occurred: {e}")
raise
finally:
if conn:
conn.close()
print("Database connection closed.")
if __name__ == "__main__":
try:
# I want to know if I'm connected...
fetch_data(url="https://google.com", rjson=False, log=False)
...
except Exception as e:
print(f"Connection problem: {e}")
raise
try:
# I want to know if diary is encrypted...
subprocess.run(
["jrnl", "--decrypt"],
input=b"", # Пустой ввод, чтобы не ввести пароль
)
except Exception as e:
print(str(e))
raise
else:
if sys.argv[1] == "export":
export()
elif sys.argv[1] == "insert":
insert()
elif sys.argv[1] == "doctor":
# cProfile.run("doctor()", "output.prof")
# stats = pstats.Stats("output.prof")
# stats.strip_dirs().sort_stats("cumulative").print_stats(10)
doctor()
else:
print("Unknown command")
sys.exit(1)

137
global/scripts/bin/diary.sh Executable file
View file

@ -0,0 +1,137 @@
#!/usr/bin/env bash
set -e
tput clear
source "${HOME:?}/scripts/functions.sh"
CITY_FILE="${HOME:?}/scripts/cities.txt"
# do we use weather info?
weather=1
tools=("fzf" "jq" "jrnl" "nvim" "sha256sum")
check_tools "$tools"
if [[ -z "$OPENWEATHER_APIKEY" ]]; then
die "openweathermap api key is not set"
fi
function manual_geo() {
if [[ ! -f "$CITY_FILE" ]]; then
die "cities.txt is not found"
fi
CITY=$(cat "$CITY_FILE" | fzf --prompt="Type a city: ")
# Проверяем, выбран ли город
if [[ -z "$CITY" ]]; then
die "city not selected"
fi
while true; do
set_text_color 43
set_bold_text
echo -n "Type a geo: "
reset_text_format
read GEO
# if a string is empty then skip it
if [[ -z "$GEO" ]]; then
break
fi
if [[ "$GEO" =~ ^-?[0-9]+\.[0-9]+,-?[0-9]+\.[0-9]+$ ]]; then
break
else
set_text_color 1
set_bold_text
echo "Wrong geo format (lat and lon 52.18969496420507,20.90814238187223)"
reset_text_format
fi
done
}
connection=$(check_connection)
if [[ "$connection" = 0 ]]; then
manual_geo
else
http_code=$(curl -H "Authorization: Basic ${GEO_SERVER_AUTH}" -s -o /dev/null -w "%{http_code}" "${GEO_SERVER_URL}?action=diary&type=get_geo")
if [ "$http_code" -ne 200 ]; then
echo "Connection problem...\n"
manual_geo
fi
location=$(curl -H "Authorization: Basic ${GEO_SERVER_AUTH}" -s "${GEO_SERVER_URL}?action=diary&type=get_geo")
IFS=":" read -r lat lon CITY country timestamp <<<"$location"
GEO="$lat,$lon"
fi
set_text_color 43
set_bold_text
echo -n "Type a title: "
reset_text_format
read TITLE
if [[ -z "$TITLE" ]]; then
die "title not found"
fi
RESPONSE=$(curl -s "https://api.openweathermap.org/data/2.5/weather?q=${CITY}&appid=${OPENWEATHER_APIKEY}&units=metric")
if [[ "$(echo "$RESPONSE" | jq '.cod')" != "200" ]]; then
set_text_color 1
set_bold_text
echo "Error: API Response: $RESPONSE"
reset_text_format
while true; do
set_text_color 50
set_bold_text
read -p "continue? (y|n) " bad_weather_answer
reset_text_format
if [[ "$bad_weather_answer" = "n" ]]; then
exit 1
else
weather=0
break
fi
done
fi
# Парсим данные о погоде
if [[ "$weather" -eq 1 ]]; then
WEATHER="$(echo "$RESPONSE" | jq -r '.weather[0].description')"
TZ="$(calculate_timezone "$(echo "$RESPONSE" | jq -r '.timezone')")"
WEATHER_ICON="$(echo "$RESPONSE" | jq -r '.weather[0].icon')"
TEMPERATURES="🌡️ $(round $(echo "$RESPONSE" | jq -r '.main.temp'))C ($(round $(echo "$RESPONSE" | jq -r '.main.feels_like'))C)"
SUNRISE="$(date --date='@'"$(echo "$RESPONSE" | jq -r '.sys.sunrise')" +'%H:%M')"
SUNSET="$(date --date='@'"$(echo "$RESPONSE" | jq -r '.sys.sunset')" +'%H:%M')"
SUNINFO="🌅 "$SUNRISE", 🌇 "$SUNSET""
IFS=',' read -r geo1 geo2 <<<"$GEO"
fi
TEMPLATE="${TITLE}
- ${weather_emoji[WEATHER_ICON]} Weather:
- ${CITY}
- ${TEMPERATURES:-"none"}
- ${SUNINFO:-"none"}
- Geo:
- ${geo1:-"none"}
- ${geo2:-"none"}"
FILENAME="/tmp/$(generate_random_string).jrnl"
echo "$TEMPLATE" >"${FILENAME:?}"
CHECKSUMM="$(checksumm "${FILENAME:?}")"
nvim "${FILENAME:?}" || rm "${FILENAME:?}"
if [[ "$CHECKSUMM" = "$(checksumm "${FILENAME:?}")" ]]; then
rm "${FILENAME:?}"
set_bold_text
echo "Nothing saving..."
reset_text_format
exit 0
fi
tput clear
jrnl --import --file "${FILENAME:?}"

View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
source "${HOME:?}/scripts/functions.sh"
tools=("linkding" "jq")
check_tools "$tools"
NEXT=""
DATA=""
OFFSET=100
while true; do
if [[ ! -z "$NEXT" ]]; then
echo "$NEXT"
LINKDATA="$(linkding bookmarks all -o "$OFFSET")"
DATA="$DATA $(echo "$LINKDATA" | jq -r ".results[].url")"
NEXT="$(echo "$LINKDATA" | jq ".next")"
if [[ "$NEXT" = "null" ]]; then
break
fi
OFFSET="$((OFFSET + 100))"
else
LINKDATA="$(linkding bookmarks all)"
if [[ -z "$LINKDATA" ]]; then
die "There is no data to fetch"
fi
NEXT="$(echo "$LINKDATA" | jq ".next")"
DATA="$(echo "$LINKDATA" | jq -r ".results[].url")"
fi
done
echo "$DATA" | tr ' ' '\n'

15
global/scripts/bin/sbackup Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env sh
# User variables
dirs="Backup/Sensitive"
# Run backup
echo "tarsnap start"
tarsnap -c \
-f "sensetive-$(uname -n)-$(date +%Y-%m-%d_%H-%M-%S)" -C $HOME \
${dirs} 2>&1
echo "tarsnap finish"
echo "borg start"
borgmatic create --config ~/.borgmatic/sensitive.yaml
echo "borg finish"

View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
if (($# != 1)); then
echo "Error! No mode. Use: screenshot.sh full|region"
exit 2
fi
mode=$1
screenshot="$HOME/Screenshots/screenshot-$(date +'%Y_%m_%d-%H_%M_%S').png"
if [[ "$(uname)" == "Darwin" ]]; then
echo "Not implemented yet"
exit 0
elif [[ "$(uname)" == "Linux" ]]; then
case $mode in
full)
maim -o $screenshot
notify-send "Screenshot created: $screenshot"
;;
region)
maim -o --select $screenshot
notify-send "Screenshot created: $screenshot"
;;
*)
echo "Error! Invalid mode. Use screenshot.sh full|region "
;;
esac
else
echo "Unknown OS"
exit 2
fi

29272
global/scripts/cities.txt Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,83 @@
declare -A weather_emoji
weather_emoji[01d]=🌞
weather_emoji[02d]=🌥
weather_emoji[03d]=
weather_emoji[04d]=
weather_emoji[09d]=🌧
weather_emoji[10d]=🌦
weather_emoji[11d]=
weather_emoji[13d]=
weather_emoji[50d]=🌫
weather_emoji[01n]=🌑
weather_emoji[02n]=🌑
weather_emoji[03n]=
weather_emoji[04n]=☁☁
weather_emoji[09n]=🌧
weather_emoji[10n]=
weather_emoji[11n]=
weather_emoji[13n]=
weather_emoji[50n]=🌫
function set_text_color() {
tput setaf "$1"
}
function set_bold_text() {
tput bold
}
function reset_text_format() {
tput sgr0
}
function die() {
set_text_color 1
echo "Script failed: $1, exiting..."
reset_text_format
exit 1
}
function round() {
echo $(echo "$1" | awk '{print ($1 > int($1)) ? int($1)+1 : int($1)}')
}
function check_tools() {
tools="$1"
for tool in "${tools[@]}"; do
if [ ! -x "$(command -v "$tool")" ]; then
die "$tool is not installed"
fi
done
}
function calculate_timezone() {
offset_hours=$(("${1:?}" / 3600))
sign="+"
if ((offset_hours < 0)); then
sign="-"
offset_hours=$((-"$offset_hours"))
fi
echo "${offset_hours:?}"
}
function generate_random_string() {
length="${1:-10}"
echo $(cat /dev/urandom | tr -dc 'a-zA-Z09' | head -c "$length")
}
function checksumm() {
echo $(sha256sum "${1:?}" | awk '{print $1}')
}
function check_connection() {
if ping -c 1 google.com &>/dev/null; then
echo 1
else
echo 0
fi
}
function create_db() {
sqlite3 "$1" "$2"
}

View file

@ -1,25 +0,0 @@
#!/usr/bin/env python3
import datetime
import urllib.request
from urllib.parse import quote_plus
weather_url = "https://wttr.in/Ottawa?format="
url_part = "Time:+%T;+%l:+%c+%t+(%f);+%m;+Precipitation:+%p+(3hour);+Pressure:+%P;+UV index:+%u;+Sunrise:+%S;+Dawn:+%D;"
encode_url_part = quote_plus(url_part)
template = """
Date: {date}
Weather: {weather}
== Notes ==
"""
current_date_time = datetime.datetime.now()
formatted_date_time = current_date_time.strftime('%a %b %d %H:%M:%S %Z %Y')
response = urllib.request.urlopen(weather_url + encode_url_part)
weather_data = response.read().decode("utf-8").replace("+", " ")
print(template.format(date=formatted_date_time, weather=weather_data))

View file

@ -1,334 +0,0 @@
[ActivityManager][Global Shortcuts]
switch-to-activity-75a66da1-d2e6-406e-bfa4-2e7ef9de32ec=
[KDE Keyboard Layout Switcher][Global Shortcuts]
Switch keyboard layout to English (US)=
Switch keyboard layout to Russian=
Switch to Next Keyboard Layout=Meta+Alt+K
[StandardShortcuts]
AboutApp=
AboutKDE=
Activate Next Tab=Ctrl+]; Ctrl+PgDown
Activate Previous Tab=Ctrl+PgUp; Ctrl+[
ActualSize=Ctrl+0
AddBookmark=Ctrl+B
Back=Alt+Left; Back
BackwardWord=Ctrl+Left
Begin=Ctrl+Home
BeginningOfLine=Home
Clear=
Close=Ctrl+W; Ctrl+Esc
ConfigureNotifications=
ConfigureToolbars=
Copy=Ctrl+C; Ctrl+Ins
CreateFolder=F10
Cut=Ctrl+X; Shift+Del
DeleteFile=Shift+Del
DeleteWordBack=Ctrl+Backspace
DeleteWordForward=Ctrl+Del
Deselect=Ctrl+Shift+A
DocumentBack=Alt+Shift+Left
DocumentForward=Alt+Shift+Right
Donate=
EditBookmarks=
End=Ctrl+End
EndOfLine=End
Find=Ctrl+F
FindNext=F3
FindPrev=Shift+F3
FitToHeight=
FitToPage=
FitToWidth=
Forward=Forward; Alt+Right
ForwardWord=Ctrl+Right
FullScreen=Ctrl+Shift+F
Goto=
GotoLine=Ctrl+G
GotoPage=
Help=F1
Home=Home Page; Alt+Home
KeyBindings=Ctrl+Alt+,
Mail=
MoveToTrash=Del
New=Ctrl+N
Next=PgDown
NextCompletion=Ctrl+Down
Open=Ctrl+O
OpenRecent=
Paste=Ctrl+V; Shift+Ins
Paste Selection=Ctrl+Shift+Ins
Preferences=Ctrl+Shift+,
PrevCompletion=Ctrl+Up
Print=Ctrl+P
PrintPreview=
Prior=PgUp
Quit=Ctrl+Q
Redo=Ctrl+Shift+Z
Reload=F5; Refresh
RenameFile=F2
Replace=Ctrl+R
ReportBug=
Revert=
RotateDown=Down
RotateUp=Up
Save=Ctrl+S
SaveAs=Ctrl+Shift+S
SaveOptions=
SelectAll=Meta+A
ShowHideHiddenFiles=Ctrl+H; Alt+.
ShowMenubar=Ctrl+M
ShowStatusbar=
ShowToolbar=
Spelling=
SubstringCompletion=Ctrl+T
SwitchApplicationLanguage=
TextCompletion=Ctrl+E
TipofDay=
Undo=Ctrl+Z
Up=Alt+Up
WhatsThis=Shift+F1
Zoom=
ZoomIn=Ctrl+=; Ctrl++
ZoomOut=Ctrl+-
[kded5][Global Shortcuts]
Show System Activity=Ctrl+Esc
display=Display; Meta+P
[khotkeys][Global Shortcuts]
{d03619b6-9b3c-48cc-9d9c-a2aadb485550}=
[kmix][Global Shortcuts]
decrease_microphone_volume=Microphone Volume Down
decrease_volume=Volume Down
increase_microphone_volume=Microphone Volume Up
increase_volume=Volume Up
mic_mute=Microphone Mute; Meta+Volume Mute
mute=Volume Mute
[ksmserver][Global Shortcuts]
Halt Without Confirmation=
Lock Session=Screensaver; Meta+L
Log Out=Ctrl+Alt+Del
Log Out Without Confirmation=
Reboot Without Confirmation=
[kwin][Global Shortcuts]
Activate Window Demanding Attention=Meta+Ctrl+A
Decrease Opacity=
Edit Tiles=Meta+T
Expose=Ctrl+F9
ExposeAll=Ctrl+F10; Launch (C)
ExposeClass=Ctrl+F7
ExposeClassCurrentDesktop=
Increase Opacity=
Kill Window=Meta+Ctrl+Esc
Move Tablet to Next Output=
MoveMouseToCenter=Meta+F6
MoveMouseToFocus=Meta+F5
MoveZoomDown=
MoveZoomLeft=
MoveZoomRight=
MoveZoomUp=
Overview=Meta+W
Setup Window Shortcut=
Show Desktop=Meta+D
ShowDesktopGrid=Meta+F8
Suspend Compositing=Alt+Shift+F12
Switch One Desktop Down=Meta+Ctrl+Down
Switch One Desktop Up=Meta+Ctrl+Up
Switch One Desktop to the Left=Meta+Ctrl+Left
Switch One Desktop to the Right=Meta+Ctrl+Right
Switch Window Down=Meta+Alt+Down
Switch Window Left=Meta+Alt+Left
Switch Window Right=Meta+Alt+Right
Switch Window Up=Meta+Alt+Up
Switch to Desktop 1=Ctrl+F1
Switch to Desktop 10=
Switch to Desktop 11=
Switch to Desktop 12=
Switch to Desktop 13=
Switch to Desktop 14=
Switch to Desktop 15=
Switch to Desktop 16=
Switch to Desktop 17=
Switch to Desktop 18=
Switch to Desktop 19=
Switch to Desktop 2=Ctrl+F2
Switch to Desktop 20=
Switch to Desktop 3=Ctrl+F3
Switch to Desktop 4=Ctrl+F4
Switch to Desktop 5=
Switch to Desktop 6=
Switch to Desktop 7=
Switch to Desktop 8=
Switch to Desktop 9=
Switch to Next Desktop=
Switch to Next Screen=
Switch to Previous Desktop=
Switch to Previous Screen=
Switch to Screen 0=
Switch to Screen 1=
Switch to Screen 2=
Switch to Screen 3=
Switch to Screen 4=
Switch to Screen 5=
Switch to Screen 6=
Switch to Screen 7=
Switch to Screen Above=
Switch to Screen Below=
Switch to Screen to the Left=
Switch to Screen to the Right=
Toggle Night Color=
Toggle Window Raise/Lower=
Walk Through Desktop List=
Walk Through Desktop List (Reverse)=
Walk Through Desktops=
Walk Through Desktops (Reverse)=
Walk Through Windows=Meta+Tab
Walk Through Windows (Reverse)=Alt+Shift+Backtab
Walk Through Windows Alternative=
Walk Through Windows Alternative (Reverse)=
Walk Through Windows of Current Application=Alt+`
Walk Through Windows of Current Application (Reverse)=Alt+~
Walk Through Windows of Current Application Alternative=
Walk Through Windows of Current Application Alternative (Reverse)=
Window Above Other Windows=
Window Below Other Windows=
Window Close=Alt+F4; Meta+Q
Window Fullscreen=
Window Grow Horizontal=
Window Grow Vertical=
Window Lower=
Window Maximize=Meta+PgUp
Window Maximize Horizontal=
Window Maximize Vertical=
Window Minimize=Meta+PgDown
Window Move=
Window Move Center=
Window No Border=
Window On All Desktops=
Window One Desktop Down=Meta+Ctrl+Shift+Down
Window One Desktop Up=Meta+Ctrl+Shift+Up
Window One Desktop to the Left=Meta+Ctrl+Shift+Left
Window One Desktop to the Right=Meta+Ctrl+Shift+Right
Window One Screen Down=
Window One Screen Up=
Window One Screen to the Left=
Window One Screen to the Right=
Window Operations Menu=Alt+F3
Window Pack Down=
Window Pack Left=
Window Pack Right=
Window Pack Up=
Window Quick Tile Bottom=Meta+Down
Window Quick Tile Bottom Left=
Window Quick Tile Bottom Right=
Window Quick Tile Left=Meta+Left
Window Quick Tile Right=Meta+Right
Window Quick Tile Top=Meta+Up
Window Quick Tile Top Left=
Window Quick Tile Top Right=
Window Raise=
Window Resize=
Window Shade=
Window Shrink Horizontal=
Window Shrink Vertical=
Window to Desktop 1=
Window to Desktop 10=
Window to Desktop 11=
Window to Desktop 12=
Window to Desktop 13=
Window to Desktop 14=
Window to Desktop 15=
Window to Desktop 16=
Window to Desktop 17=
Window to Desktop 18=
Window to Desktop 19=
Window to Desktop 2=
Window to Desktop 20=
Window to Desktop 3=
Window to Desktop 4=
Window to Desktop 5=
Window to Desktop 6=
Window to Desktop 7=
Window to Desktop 8=
Window to Desktop 9=
Window to Next Desktop=
Window to Next Screen=Meta+Shift+Right
Window to Previous Desktop=
Window to Previous Screen=Meta+Shift+Left
Window to Screen 0=
Window to Screen 1=
Window to Screen 2=
Window to Screen 3=
Window to Screen 4=
Window to Screen 5=
Window to Screen 6=
Window to Screen 7=
view_actual_size=Meta+0
view_zoom_in=Meta++; Meta+=
view_zoom_out=Meta+-
[mediacontrol][Global Shortcuts]
mediavolumedown=
mediavolumeup=
nextmedia=Media Next
pausemedia=Media Pause
playmedia=
playpausemedia=Media Play
previousmedia=Media Previous
stopmedia=Media Stop
[org_kde_powerdevil][Global Shortcuts]
Decrease Keyboard Brightness=Keyboard Brightness Down
Decrease Screen Brightness=Monitor Brightness Down
Hibernate=Hibernate
Increase Keyboard Brightness=Keyboard Brightness Up
Increase Screen Brightness=Monitor Brightness Up
PowerDown=Power Down
PowerOff=Power Off
Sleep=Sleep
Toggle Keyboard Backlight=Keyboard Light On/Off
Turn Off Screen=
[plasmashell][Global Shortcuts]
activate task manager entry 1=Meta+1
activate task manager entry 10=
activate task manager entry 2=Meta+2
activate task manager entry 3=Meta+3
activate task manager entry 4=Meta+4
activate task manager entry 5=Meta+5
activate task manager entry 6=Meta+6
activate task manager entry 7=Meta+7
activate task manager entry 8=Meta+8
activate task manager entry 9=Meta+9
activate widget 3=Alt+F1
clear-history=
clipboard_action=Meta+Ctrl+X
cycle-panels=Meta+Alt+P
cycleNextAction=
cyclePrevAction=
edit_clipboard=
manage activities=Alt+Q
next activity=
previous activity=Meta+Shift+Tab
repeat_action=Meta+Ctrl+R
show dashboard=Ctrl+F12
show-barcode=
show-on-mouse-pos=Meta+V
stop current activity=Meta+S
switch to next activity=
switch to previous activity=
toggle do not disturb=
[wacomtablet][Global Shortcuts]
Map to fullscreen=Meta+Ctrl+F
Map to screen 1=Meta+Ctrl+1
Map to screen 2=Meta+Ctrl+2
Next Profile=Meta+Ctrl+N
Previous Profile=Meta+Ctrl+P
Toggle screen map selection=Meta+Ctrl+M
Toggle stylus mode=Meta+Ctrl+S
Toggle touch tool=Meta+Ctrl+T

7
linux/.Xmodmap Normal file
View file

@ -0,0 +1,7 @@
! changing the supply between each other
! clear mod1
! clear mod4
! keycode 64 = Super_L
! keycode 133 = Alt_L
! add mod1 = Alt_L Alt_R
! add mod4 = Super_L Super_R

13
linux/.Xresources Normal file
View file

@ -0,0 +1,13 @@
! Xft.dpi: 120
! rofi.dpi: 120
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
! cursor
Xcursor.theme: Qogir-dark
Xcursor.size: 32

View file

@ -0,0 +1,2 @@
[font]
size = 10

View file

@ -2,8 +2,8 @@
bindings = [
{key = "W", mods = "Alt", chars = "\u001BW" },
{key = "X", mods = "Alt", chars = "\u001BX" },
{key = 27, mods = "Command|Shift", chars = "\u001Bn" },
{key = 26, mods = "Command|Shift", chars = "\u001Bp" },
{key = 27, mods = "Alt|Shift", chars = "\u001Bn" },
{key = 26, mods = "Alt|Shift", chars = "\u001Bp" },
{key = "Z", mods = "Alt", chars = "\u0001w" },
# tmux resurrect plugin
{key = "R", mods = "Alt", chars = "\u0001\u0012" },

View file

@ -0,0 +1 @@
/home/fz0x1/Applications

View file

@ -0,0 +1,19 @@
[global]
font = "JetBrainsMono Nerd Font 10"
separator_color= frame
markup = full
[urgency_low]
background = "#1d2021"
foreground = "#d4be98"
frame_color = "#7daea3"
[urgency_normal]
background = "#1d2021"
foreground = "#d4be98"
frame_color = "#a9b665"
[urgency_critical]
background = "#3c1f1e"
foreground = "#ddc7a1"
frame_color = "#ea6962"

105
linux/.config/i3/autostart.sh Executable file
View file

@ -0,0 +1,105 @@
#!/usr/bin/env bash
# Disable Xorg screensaver
xset -dpms &
xset s off &
# Disable beeper
xset -b &
# merge Xresources
xrdb -merge ~/.Xresources &
# set random mac
~/scripts/bin/mac-random.sh
# xrandr settings
~/scripts/bin/setup_displays
# PolicyKit Authentication Agent - KDE
# /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
/usr/lib/polkit-kde-authentication-agent-1 &
# /usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets &
/sbin/kwalletd6 &
sleep 2
i3-msg restart
# bar
# ~/.config/polybar/launch.sh &
# Notifications
dunst &
# vpn
mullvad-vpn &
# caffeine
caffeine start &
# compositor
# picom --config ~/.picom.conf &
# wallpapers
nitrogen --restore &
# Dropbox
# I do not use it anymore since 2025-02-10
# dropbox &
# ~/.dropbox-dist/dropboxd &
# firewall
opensnitch-ui &
# logi settings
solaar --restart-on-wake-up --window=hide &
# bauh
#bauh-tray &
# bluetooth
blueman-applet &
# keyboard layout switcher
# now is using X11 variant in /etc/X11/xorg.conf.d/00-keyboard.conf
# setxkbmap -layout us,ru -option 'grp:alt_space_toggle' &
# emacs
emacs --daemon &
# brightness control
# clight &
# workrave
workrave &
# activitywatch
~/activitywatch/aw-qt &
#
# NetworkManager applet
nm-applet &
# watchdog
watchmedo shell-command --pattern='*.org;*.txt;*.md;*.gpg;*.org_archive;sync.sh' --recursive --ignore-directories -W --command "~/org/sync.sh" ~/org/ &
watchmedo shell-command --pattern='*.journal;*.sh;*.log;*.prices;*.csv;*.py' --recursive --ignore-directories -W --command "~/.hledger/sync.sh" ~/.hledger/ &
keepassxc &
nextcloud &
udiskie &
x11vnc -display :0 -rfbauth ~/.vnc/passwd -forever -shared &
# mega cloud
# I do not use it anymore since 2025-02-10
# megasync &
# lockscreen
# xss-lock --transfer-sleep-lock -- ~/scripts/bin/lock.sh
# archive commands
# xinput --set-prop "pointer:Logitech MX Ergo Multi-Device Trackball " 'libinput Accel Speed' -0.2
# xbacklight -set 90 & # only for intel
# xfce4-power-manager &

289
linux/.config/i3/config Normal file
View file

@ -0,0 +1,289 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:TerminessNerdFont, FontAwesome 10
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
#exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- ~/scripts/bin/lock.sh
#exec --no-startup-id xss-lock -- ~/scripts/bin/lock.sh
# Use pactl to adjust volume in PulseAudio.
# set $refresh_i3status killall -SIGUSR1 i3status
# bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
# bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
# bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
# bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use wpctl to adjust volume in PipeWire
bindsym XF86AudioRaiseVolume exec --no-startup-id wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%+ && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%- && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec --no-startup-id alacritty
# start emacs
bindsym $mod+m exec --no-startup-id emacsclient -a '' -c
# start browser
bindsym $mod+b exec --no-startup-id librewolf
# start tor
bindsym $mod+t exec --no-startup-id torbrowser-launcher
# wmfocus
bindsym $mod+q exec --no-startup-id wmfocus
# edit keyboard config
# bindsym $mod+Control+t exec --no-startup-id chromium "https://configure.zsa.io/moonlander/layouts/QxvPD/latest/0"
# kill focused window
bindsym $mod+Shift+q kill
# switch workspace
bindsym $mod+Control+l workspace next
bindsym $mod+Control+j workspace prev
bindsym $mod+Tab workspace back_and_forth
# start rofi (a program launcher)
bindsym $mod+d exec --no-startup-id rofi -config ~/.config/rofi/gruvbox-soft.rasi -no-lazy-grab -show drun -modi drun -dpi 120
# autotiling
exec_always --no-startup-id autotiling
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+Shift+h split h
# split in vertical orientation
bindsym $mod+Shift+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
# bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed
# bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# monitors
set $external "HDMI-1-0"
set $buildin "eDP-1"
set $main_monitor "HDMI-1-0"
# workspaces
workspace $ws1 output $main_monitor
workspace $ws2 output $main_monitor
workspace $ws3 output $main_monitor
workspace $ws4 output $main_monitor
workspace $ws5 output $main_monitor
workspace $ws6 output $main_monitor
workspace $ws7 output $main_monitor
workspace $ws8 output $main_monitor
workspace $ws9 output $main_monitor
workspace $ws10 output $main_monitor
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# i3lock
bindsym $mod+Shift+x exec --no-startup-id ~/scripts/bin/lock.sh
# screen
bindsym $mod+Control+s exec --no-startup-id ~/scripts/bin/screenshot.sh region
bindsym $mod+Control+f exec --no-startup-id ~/scripts/bin/screenshot.sh full
# bwmenu
bindsym $mod+Control+p exec --no-startup-id ~/bin/bwmenu
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
# status_command i3blocks
#}
bar {
tray_output primary
tray_padding 3
font pango:TerminessNerdFont, FontAwesome 11
position top
# status_command i3status-rs ~/.config/i3/i3status-rust.toml
status_command py3status -c ~/.config/i3/i3status.conf
colors {
separator #666666
background #1D1F21
statusline #dddddd
focused_workspace #224488 #224488 #ffffff
active_workspace #333333 #333333 #ffffff
inactive_workspace #333333 #333333 #888888
urgent_workspace #2f343a #900000 #ffffff
}
}
# default gaps
gaps inner 0
gaps outer 0
# colors
set $bgcolor #523d6499
set $in-bgcolor #3636364D
set $inactive-ws #707880
set $text #ffffff
set $u-bgcolor #ff0000
set $indicator #ffffff
set $in-text #969696
# set $focused-ws #d79921
set $focused-ws #c3c3c3
set $bar-color #523d640D
set $gray #c3c3c3
# border background text indicator (a line which shows where the next window will be placed)
# client.focused $focused-ws $focused-ws $text $indicator
# client.unfocused $inactive-ws $inactive-ws $in-text $in-bgcolor
client.focused_inactive $in-bgcolor $in-bgcolor $in-text $in-bgcolor
# client.unfocused $gray $in-bgcolor $in-text $in-bgcolor
client.urgent $u-bgcolor $u-bgcolor $text $u-bgcolor
default_border pixel 0
default_floating_border pixel 1
# window's rules
for_window [class="Xfce4-settings-manager"] focus, floating disable
for_window [window_role="(?i)GtkFileChooserDialog"] floating enable
for_window [class="net-runelite-client-RuneLite" title="Picture in Picture"] floating enable, sticky enable
for_window [window_role="About"] floating enable
for_window [window_role="Organizer"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="page-info"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="toolbox"] floating enable
for_window [window_role="webconsole"] floating enable
for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable
#p2p firefox for all workspaces
for_window [title="Picture-in-Picture"] sticky enable
# for_window [class="MEGAsync" title="Add sync"] floating disable
exec --no-startup-id ~/.config/i3/autostart.sh

37
linux/.config/i3/i3lock Executable file
View file

@ -0,0 +1,37 @@
#!/bin/sh
BLANK='#00000000'
CLEAR='#ffffff22'
DEFAULT='#00897bE6'
TEXT='#00897bE6'
WRONG='#880000bb'
VERIFYING='#00564dE6'
i3lock \
--insidever-color=$CLEAR \
--ringver-color=$VERIFYING \
\
--insidewrong-color=$CLEAR \
--ringwrong-color=$WRONG \
\
--inside-color=$BLANK \
--ring-color=$DEFAULT \
--line-color=$BLANK \
--separator-color=$DEFAULT \
\
--verif-color=$TEXT \
--wrong-color=$TEXT \
--time-color=$TEXT \
--date-color=$TEXT \
--layout-color=$TEXT \
--keyhl-color=$WRONG \
--bshl-color=$WRONG \
\
--screen 1 \
--blur 9 \
--clock \
--indicator \
--time-str="%H:%M:%S" \
--date-str="%A, %Y-%m-%d" \
--keylayout 1 \
-n

View file

@ -0,0 +1,83 @@
icons_format = "{icon}"
[theme]
theme = "plain"
[theme.overrides]
idle_bg = "#1D1F21"
idle_fg = "#c3c3c3"
separator_bg = "#1D1F21"
[icons]
icons = "awesome4"
# [icons.overrides]
# bat = ["|E|", "|_|", "|=|", "|F|"]
# bat_charging = "|^| "
[[block]]
block = "focused_window"
[block.format]
full = "🪟 $title.str(max_w:50) |"
short = "🪟 $title.str(max_w:10) |"
[block.theme_overrides]
idle_fg = "#ee5253"
[[block]]
block = "cpu"
info_cpu = 20
warning_cpu = 50
critical_cpu = 90
# [[block]]
# block = "disk_space"
# path = "/"
# info_type = "available"
# alert_unit = "GB"
# interval = 20
# warning = 20.0
# alert = 10.0
# format = " /:$available.eng(w:2) "
[[block]]
block = "memory"
format = " $icon $mem_total_used_percents.eng(w:2) "
format_alt = " $icon_swap $swap_used_percents.eng(w:2) "
[[block]]
block = "sound"
[[block.click]]
button = "left"
cmd = "pavucontrol"
[[block]]
block = "keyboard_layout"
[block.mappings]
"En" = "us"
"Ru" = "ru"
# [[block]]
# block = "temperature"
# format = " $icon $max max "
# format_alt = " $icon $min min, $max max, $average avg "
# interval = 10
# chip = "*-isa-*"
# [[block]]
# block = "xrandr"
# format = " $icon $brightness $resolution "
[[block]]
block = "time"
interval = 5
format = " $timestamp.datetime(f:'%a %d/%m %R') "
[[block]]
block = "custom"
command = "echo ''"
interval = "once"
[[block.click]]
button = "left"
cmd = "telegram-desktop"
# [[block.click]]
# button = "left"
# action = "cycle"

View file

@ -0,0 +1,78 @@
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
interval = 5
}
order += "window"
order += "coin_market"
order += "keyboard_layout"
order += "volume_status"
order += "battery_level"
order += "disk /"
order += "load"
order += "memory"
order += "tztime local"
# order += "external_script"
window {
format = '🪟 {title}'
max_width = 30
color = '#ee5253'
}
coin_market {
api_key = "b4ffb549-c4b2-422d-8e8e-fbed4aa33041"
# format_coin = "[\?color=name {name}] "
format_coin = "[\?color=symbol {symbol}] ${usd_price:.2f} "
format_coin += "[\?color=usd_percent_change_24h {usd_percent_change_24h}%]"
markets = ["btc", "xmr"]
thresholds = {
"name": [
("Bitcoin", "greenyellow"),
("Monero", "orange"),
],
"symbol": [
("BTC", "darkgray"),
("XMR", "darkgray"),
],
"usd_percent_change_24h": [(-100, "bad"), (0, "good")],
}
}
keyboard_layout {
layouts = ['ru', 'en']
cache_timeout = 0.1
}
volume_status {
cache_timeout = 0.1
}
battery_level {}
load {
format = "%1min"
}
memory {
format = "%used/%available"
threshold_degraded = "1G"
format_degraded = "MEMORY < %available"
}
tztime local {
format = "%Y-%m-%d %H:%M:%S"
}
# external_script {
# format = " "
# script_path = "telegram-desktop"
# }

View file

@ -0,0 +1,20 @@
[Default Applications]
image/webp=librewolf.desktop;
; image/png=org.xfce.ristretto.desktop;
; image/jpeg=org.xfce.ristretto.desktop;
text/plain=nvim.desktop;
x-scheme-handler/http=librewolf.desktop
x-scheme-handler/https=librewolf.desktop
x-scheme-handler/terminal=Alacritty.desktop
; application/pdf=com.github.xournalpp.xournalpp.desktop
application/x-extension-burp=install4j_psxmh6-BurpSuiteCommunity.desktop
; application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-base.desktop
; application/zip=doublecmd.desktop
; x-scheme-handler/jetbrains=jetbrains-toolbox.desktop
text/html=librewolf.desktop
x-scheme-handler/org-protocol=org-protocol.desktop
x-scheme-handler/discord-409416265891971072=discord-409416265891971072.desktop
x-scheme-handler/jagex=pyscape.desktop
[Added Associations]
application/xhtml+xml=librewolf.desktop;

View file

@ -0,0 +1,315 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
; [colors]
; background = #dd282A2E
; background-alt = #373B41
; foreground = #C5C8C6
; primary = #F0C674
; secondary = #8ABEB7
; alert = #A54242
; disabled = #707880
[colors]
background = #dd282828
background-alt = #3c3836
bg-darker = #1d2021
foreground = #fbf1c7
blue = #83a598
cyan = #8ec07c
green = #b8bb26
orange = #fe8019
purple = #d3869b
red = #fb4934
yellow = #fabd2f
bg-blue = #458588
bg-cyan = #689d6a
bg-green = #98971a
bg-orange = #d65d0e
bg-purple = #b16268
bg-red = #cc241d
bg-yellow = #d79921
black = #000
white = #FFF
[bar/fz0x1]
wm-restack = i3
; override-redirect = true
; monitor = ${env:MONITOR:HDMI-1-0}
monitor = ${env:MONITOR:HDMI-0}
width = 100%
height = 24pt
radius = 6
dpi = 120
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3pt
border-size = 4pt
border-color = #00000000
padding-left = 0
padding-right = 1
module-margin = 1
separator =
separator-foreground = ${colors.yellow}
font-0 = JetBrainsMono Nerd Font Mono:size=9:style=Regular;2
font-1 = JetBrainsMono Nerd Font Mono:size=16:style=Regular;3
; font-0 = BigBlueTermPlus Nerd Font:size=10:style=Regular;2
font-2 = "Font Awesome 6 Free"
; font-3 = "Font Awesome 6 Free:style=Solid:pixelsize=10;2"
; font-4 = "Font Awesome 6 Brands:pixelsize=10;2"
; font-1 = Noto Color Emoji:scale=8;2
; font-2 = JetBrainsMono Nerd Font Mono:size=21:style=Regular;2
modules-left = i3 xwindow
modules-right = pulseaudio xkeyboard wlan systray date
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
; wm-restack = generic
; wm-restack = bspwm
; wm-restack = i3
; override-redirect = true
[module/i3]
type = internal/i3
pin-workspaces = true
show-urgent = true
enable-click = false
enable-scroll = false
reverse-scroll = false
format = <label-state> <label-mode>
label-mode = %mode%
label-mode-background = #e60053
label-focused-font = 3
label-unfocused-font = 3
label-visible-font = 3
label-urgent-font = 3
label-focused = %icon%
label-focused-foreground = #ffffff
label-focused-background = ${colors.background}
label-focused-underline = ${colors.red}
label-focused-padding = 2
label-unfocused = %icon%
label-unfocused-padding = 2
; label-visible = %icon%
; label-visible-underline = #555555
; label-visible-padding = 2
label-urgent = %icon%
label-urgent-foreground = #000000
label-urgent-background = #bd2c40
label-urgent-padding = 2
; label-mode-padding = 2
; label-separator = |
; label-separator-padding = 2
; label-separator-foreground = #ffb52a
ws-icon-0 = 1;
ws-icon-1 = 2;󰈹
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-default = 󰇀
[module/systray]
type = internal/tray
tray-padding = 3px
; tray-background = #dd576574
tray-size = 50%
[module/xworkspaces]
type = internal/xworkspaces
label-active = %name%
label-active-background = ${colors.background}
label-active-underline= ${colors.red}
label-active-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-urgent = %name%
label-urgent-background = ${colors.bg-yellow}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${colors.red}
label-empty-padding = 1
[module/xwindow]
type = internal/xwindow
label = %title:0:60:...%
[module/pulseaudio]
type = internal/pulseaudio
format-volume-prefix = "vol "
format-volume-prefix-foreground = ${colors.yellow}
format-volume = <label-volume>
label-volume = %percentage%%
label-muted = muted
label-muted-foreground = ${colors.red}
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.green}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.foreground}
label-indicator-background = ${colors.background}
[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format-prefix-foreground = ${colors.white}
label = %percentage_used:2%%
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{A1:nm-connection-editor:}%{F#fabd2f}%ifname%%{F-} %essid% %{A}
[module/date]
type = internal/date
interval = 1
date = %H:%M
date-alt = %Y-%m-%d %H:%M:%S
label = %date%
label-foreground = ${colors.white}
[module/backlight]
type = internal/backlight
; Use the following command to list available cards:
; $ ls -1 /sys/class/backlight/
; Default: first usable card in /sys/class/backlight (new in version 3.7.0)
card = nvidia_wmi_ec_backlight
; Use the `/sys/class/backlight/.../actual-brightness` file
; rather than the regular `brightness` file.
; New in version 3.6.0
; Changed in version: 3.7.0: Defaults to true also on amdgpu backlights
; Default: true
use-actual-brightness = true
; Interval in seconds after which after which the current brightness is read
; (even if no update is detected).
; Use this as a fallback if brightness updates are not registering in polybar
; (which happens if the use-actual-brightness is false).
; There is no guarantee on the precisio of this timing.
; Set to 0 to turn off
; New in version 3.7.0
; Default: 0 (5 if use-actual-brightness is false)
poll-interval = 0
; Enable changing the backlight with the scroll wheel
; NOTE: This may require additional configuration on some systems. Polybar will
; write to `/sys/class/backlight/${self.card}/brightness` which requires polybar
; to have write access to that file.
; DO NOT RUN POLYBAR AS ROOT.
; The recommended way is to add the user to the
; `video` group and give that group write-privileges for the `brightness` file.
; See the ArchWiki for more information:
; https://wiki.archlinux.org/index.php/Backlight#ACPI
; Default: false
enable-scroll = true
; Interval for changing the brightness (in percentage points).
; New in version 3.7.0
; Default: 5
scroll-interval = 10
format = <ramp>
; Available tokens:
; %percentage% (default)
label = %percentage%%
; Only applies if <ramp> is used
ramp-4 = 🌕
ramp-3 = 🌔
ramp-2 = 🌓
ramp-1 = 🌒
ramp-0 = 🌑
; Only applies if <bar> is used
bar-width = 10
bar-indicator = |
bar-fill =
bar-empty =
; [module/system-bluetooth-bluetoothctl]
; type = custom/script
; exec = ~/.config/polybar/scripts/system-bluetooth-bluetoothctl.sh
; tail = true
; click-left = ~/.config/polybar/scripts/system-bluetooth-bluetoothctl.sh --toggle &
; [module/bluetooth]
; type = custom/text
; click-left = blueman-manager
; content = "bt"
[module/rest_timer]
type = custom/script
exec = ~/.config/polybar/rest_timer_module/rest_timer.sh
; interval = 1
tail = true
click-left = ~/.config/polybar/rest_timer_module/reset_rest_timer.sh &
[settings]
screenchange-reload = true
pseudo-transparency = true
; vim:ft=dosini

View file

@ -0,0 +1,5 @@
killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
MONITOR="HDMI-0" polybar --reload fz0x1 -c ~/.config/polybar/config.ini &

View file

@ -0,0 +1,2 @@
TOTAL_MINUTES=40
STATE_REST_TIMER="/tmp/state_rest_timer_polybar"

View file

@ -0,0 +1,5 @@
#!/usr/bin/env sh
source ~/.config/polybar/rest_timer_module/config.sh
echo $(("$TOTAL_MINUTES" * 60)) >"$STATE_REST_TIMER"

View file

@ -0,0 +1,24 @@
#!/usr/bin/env sh
source ~/.config/polybar/rest_timer_module/config.sh
if [[ ! -f "$STATE_REST_TIMER" ]]; then
echo $(("$TOTAL_MINUTES" * 60)) >"$STATE_REST_TIMER"
fi
# END_TIME=$(($(date +%s) + TIMER))
REMAINING=$(cat "$STATE_REST_TIMER")
if [[ $REMAINING -le 0 ]]; then
echo "%{F#FF0000}Time to rest!%{F-}"
# rm "$STAT_REST_TIMER"
exit 0
fi
MINUTES=$((REMAINING / 60))
SECONDS=$((REMAINING % 60))
printf "%02d:%02d\n" $MINUTES $SECONDS
REMAINING=$((REMAINING - 1))
echo $REMAINING >"$STATE_REST_TIMER"
sleep 1

Some files were not shown because too many files have changed in this diff Show more