Compare commits

...

201 commits
stow ... master

Author SHA1 Message Date
20afbefbac
zed stuff 2024-11-23 20:28:38 +01:00
f8aee3e71d
niri cleanup 2024-08-31 20:33:38 +02:00
70b2dc1fde
some rofi, some zed, etc 2024-08-31 20:25:47 +02:00
04fe526299
Update vim config 2024-08-25 17:58:32 +02:00
1245bd43ac
migration vim ongoing 2024-08-25 17:48:21 +02:00
4b7947dc22
asdf 2024-08-24 11:02:47 +02:00
e95adbedde
Add niri 2024-08-18 12:00:57 +02:00
d58a76988c
asdf 2024-08-15 18:06:16 +02:00
abfe5b5b11
Fix mason 2024-07-07 17:59:37 +02:00
ac065da8f5
äf 2024-07-07 17:58:39 +02:00
238da9413e
Set mouse configuration for sway 2024-05-05 08:44:06 +02:00
369aaec7c3
Add systray to eww, add some zed bindings 2024-05-01 14:58:09 +02:00
ElKowar
11d7a371bc
zed terminal on linux 2024-04-29 09:47:39 +02:00
9ae9191fb2
äf 2024-04-27 11:29:56 +02:00
ElKowar
88dcbccaf7
Fix more stuff 2024-04-24 13:00:58 +02:00
ElKowar
06a1cf2cb5
Crates fixed 2024-04-24 12:59:04 +02:00
c55413d989
Include compiled nvim lua 2024-04-24 12:49:58 +02:00
34b106d6e5
Fix zsh 2024-04-24 12:49:16 +02:00
ElKowar
49642fefdc
asf 2024-04-24 12:45:29 +02:00
cd156e5adb
asdf 2024-04-20 16:40:21 +02:00
elkowar
8615a48773
stuff 2024-04-20 14:51:49 +02:00
elkowar
7747ed7529
stuff 2024-04-20 14:50:45 +02:00
ElKowar
fd7a08f125
eww 2024-04-20 14:50:45 +02:00
ElKowar
86078f5d78
setup 2024-04-20 14:50:44 +02:00
ElKowar
8d296dd1ad
setup 2024-04-20 14:49:01 +02:00
f04d484dbc
Fix wezterm 2024-04-15 10:57:08 +02:00
dcae56827f
wezterm 2024-04-15 10:49:04 +02:00
c5673ce2c1
asdf 2024-04-12 20:00:38 +02:00
bda1bf3da2
starship 3 2024-04-12 19:55:37 +02:00
fa230be86d
starship 2 2024-04-12 19:53:59 +02:00
fedba574a5
starship 2024-04-12 19:38:49 +02:00
53ed90b43d
asdf 2024-04-12 18:38:13 +02:00
ef3f4dd248
Stuff 2024-04-12 18:20:04 +02:00
468e839512
vim, zed, tmux 2024-04-12 18:04:32 +02:00
a4fb67c012
Some zed, some other stuff 2024-04-11 11:05:54 +02:00
b528bd5f1f
some config, add zed 2024-04-09 10:16:38 +02:00
2b61bbf06f
asdf 2024-02-29 10:49:21 +01:00
cdb1568566
Add karabiner 2024-02-23 09:30:33 +01:00
dc4407fb68
mac stuff 2024-02-23 09:29:00 +01:00
6903c876e4
asdf 2024-02-08 15:21:56 +01:00
f4d1821217
move to having a prelude 2023-10-06 18:35:19 +02:00
d446425f25
cleanup vim 2023-10-06 18:26:06 +02:00
312a1809bd
cleanup bufferline 2023-10-06 14:44:44 +02:00
5e1361cd92
Cleanup and fixes 2023-10-06 14:11:05 +02:00
1d538b249f
fix bufferline 2023-10-06 13:37:22 +02:00
f3111fdcaa
Move to new structure of lazy.vim 2023-10-06 13:24:40 +02:00
d308c62308
pre lazy stuff 2023-10-06 09:55:32 +02:00
1d784bf739
idk 2023-10-06 08:52:43 +02:00
elkowar
006504b69a
Local gitconfig signingkey 2023-03-26 10:58:37 +02:00
elkowar
54e49b910c
stuff 2023-03-26 10:56:31 +02:00
Leon
9235c9a0a7
Re-set up laptop 2023-03-26 10:56:31 +02:00
ElKowar
6507a36364
update 2023-03-26 10:56:19 +02:00
elkowar
dbda004755
asdf 2023-03-26 10:55:59 +02:00
elkowar
6ac3d70c00
hyprland tabs 2023-03-26 10:55:59 +02:00
elkowar
2adccaef7f
idk 2023-03-26 10:55:59 +02:00
elkowar
43002a929b
add eww stuff 2023-03-26 10:55:59 +02:00
elkowar
211c367427
hyprland docs for the epic discord post 2023-03-26 10:55:59 +02:00
elkowar
d08ce9b361
Configure hyprland 2023-03-26 10:55:59 +02:00
elkowar
36cd4fcd4f
äf 2023-03-26 10:55:59 +02:00
elkowar
56ce9b7270
pinch to zoom in chrome 2023-03-26 10:55:59 +02:00
elkowar
983aaefa5c
speed up zsh 2023-03-26 10:55:59 +02:00
elkowar
1b226a4205
massive vim cleanup 2023-03-26 10:55:59 +02:00
ElKowar
e98afe1539
another kanata? 2023-03-26 10:55:59 +02:00
ElKowar
48903be512
nvlime 2023-03-26 10:55:59 +02:00
ElKowar
ee3e5be43c
laptop 2023-03-26 10:55:59 +02:00
Leon
29ad561a5b
Re-set up laptop 2023-03-26 10:55:58 +02:00
ElKowar
d03843f4fd
update 2023-03-26 10:55:49 +02:00
elkowar
13ee3507db
äf 2023-03-26 10:54:30 +02:00
ElKowar
b347aaf623
copilot and stuff 2023-03-26 10:54:23 +02:00
ElKowar
0b51bce0e5
add lsp-lines 2023-03-26 10:54:23 +02:00
ElKowar
4332b09659
update lazy 2023-03-26 10:54:22 +02:00
ElKowar
f98b6d6186
lazy and update 2023-03-26 10:54:15 +02:00
ElKowar
5cb75edb0d
work adjustments 2023-03-26 10:54:04 +02:00
Leon
d78e6c923c Re-set up laptop 2023-03-14 11:24:59 +01:00
ElKowar
368c0a6254 update 2023-03-13 13:05:12 +01:00
elkowar
ee51b1d0b8
conditional anaconda setup 2023-03-05 09:30:21 +01:00
ElKowar
d4041b68a9
lazy and update 2023-03-05 09:25:50 +01:00
ElKowar
69e4f6b469
Several additions 2023-03-05 09:25:34 +01:00
ElKowar
83834f1f3b
Add copilot 2023-03-05 09:25:34 +01:00
ElKowar
79dbde9cf9
Update 2023-03-05 09:25:34 +01:00
ElKowar
198c656d8d
work adjustments 2023-03-05 09:25:33 +01:00
elkowar
cfe9fa3dc4
minor vim changes 2023-03-05 09:23:13 +01:00
elkowar
1031294c8d
asdf 2023-02-25 18:07:21 +01:00
elkowar
2279e97c15
noicer noice 2023-02-12 19:37:28 +01:00
elkowar
fca0f21fcb
fix rofi 2023-02-12 16:39:18 +01:00
elkowar
c492385999
sioyek 2023-01-21 11:51:23 +01:00
Niclas
650c0a5eac
style(refactor): rEmove 30 trailing newlines (#8) 2023-01-17 00:09:40 +01:00
elkowar
7bc13818c9
Epic git signs and scroll bar 2023-01-16 22:47:52 +01:00
elkowar
04986ceca7
works 2023-01-16 00:11:44 +01:00
elkowar
32e98738ca
Setup glance and stuff 2023-01-15 22:52:47 +01:00
elkowar
133c46fe96
Actually fix lazy stuff 2023-01-15 22:15:21 +01:00
elkowar
8ea1a7e4ff
Fix lazy stuff 2023-01-15 22:00:57 +01:00
elkowar
2bc77c6aa2
switch and yeet lspsaga 2023-01-15 19:57:44 +01:00
elkowar
b3aaf691a0
clippy in rust-analyzer 2023-01-15 18:04:32 +01:00
elkowar
18dc1563b2
Don't swallow bazed and add noice.nvim 2023-01-07 11:46:35 +01:00
elkowar
38d010650f
Improve nvim lsp hover popup, add difftastic 2022-12-27 11:45:35 +01:00
elkowar
1d20c25d24
Merge branch 'master' of https://github.com/elkowar/dots-of-war 2022-12-17 15:55:11 +01:00
elkowar
4c4b78c005
Currently just two monitors, also some vim fixes 2022-12-17 15:54:41 +01:00
75d4ccfd91
Unalias zi 2022-10-31 09:01:48 +01:00
elkowar
0c11d35b61
Update stuff 2022-10-02 11:49:08 +02:00
elkowar
87520d4dc8
Fix xmonad not generating the right bar file 2022-09-12 10:47:34 +02:00
elkowar
cf19c78688
Migrate to new monitor setup 2022-09-12 10:43:24 +02:00
elkowar
00a166ab17
add gitconfig 2022-08-09 12:24:55 +02:00
elkowar
c1cb1aeff1
asdf 2022-07-25 15:04:57 +02:00
elkowar
0ab9b35a9b
Add gtk3 config 2022-05-11 09:17:31 +02:00
elkowar
6d1e0348b1
Disable gtk 2022-04-20 10:54:40 +02:00
elkowar
227954f664
Fix vim 2022-04-18 20:03:25 +02:00
elkowar
b5e3817574
asdf 2022-04-13 18:43:59 +02:00
elkowar
0a55773430
fix home and end in zsh 2022-03-23 15:59:45 +01:00
elkowar
6585cfd81e
Steal some zsh dots from drusk 2022-03-23 10:37:00 +01:00
elkowar
3e8208522e
Add ltex-ls words 2022-03-21 10:42:48 +01:00
elkowar
8b92a98d2f
Some changes everywhere 2022-03-21 10:42:16 +01:00
ElKowar
12b80a6351 merge 2022-03-18 12:56:27 +01:00
elkowar
50c462a55f
More nvim 2022-03-09 15:29:18 +01:00
elkowar
386ee59373
Fix bufferline 2022-02-02 12:26:55 +01:00
elkowar
59d79c12ec
Retheme of nvim 2022-02-01 12:27:42 +01:00
elkowar
fe4a5cf0b1
Some cleanup of nvim 2022-02-01 11:44:34 +01:00
elkowar
cc672106a3
Denix 2022-02-01 10:19:10 +01:00
elkowar
7a7827c584
Fix vim 2022-01-24 19:45:04 +01:00
ElKowar
9d5266e613
Fix stuff (#6) 2022-01-24 19:44:43 +01:00
elkowar
6d1211b71e
More stuff 2022-01-24 19:41:49 +01:00
elkowar
0884d20450
more config 2022-01-24 18:21:18 +01:00
elkowar
b5cab2b19f
More latex stuff 2022-01-21 10:45:37 +01:00
elkowar
a06faa9507
More latex stuff 2022-01-20 13:41:11 +01:00
elkowar
b92795c816
latex stuff 2022-01-17 15:06:25 +01:00
elkowar
3221324964
Fix vim 2022-01-14 11:23:05 +01:00
elkowar
c91f0271ef
ADd vimtex stuff 2022-01-13 11:05:31 +01:00
elkowar
eb6337b988
Fix some vim stuff 2021-11-07 12:30:08 +01:00
elkowar
e559fd39f7
Powershell comment 2021-11-05 11:16:57 +01:00
elkowar
dd285ef4ba
Cleanup Convert-HexToAnsiiEscape 2021-10-28 14:36:51 +02:00
elkowar
d88104d0f7
Add Powershell config 2021-10-28 12:38:29 +02:00
elkowar
19d7ce7fa0
Fic cmp and add powershell 2021-10-28 11:45:07 +02:00
elkowar
9fcad51633
Add onlyOnTopPart layout modifier to xmonad 2021-10-27 10:47:50 +02:00
elkowar
0588853042
cleanup plugin list 2021-10-25 00:04:22 +02:00
ElKowar
7789f69aa3 Add stabilize.nvim and try nvim-code-action-menu 2021-10-24 16:06:20 +02:00
ElKowar
58db107777 fix some vim keybinds and add showcase for ewwbar 2021-10-23 14:29:04 +02:00
ElKowar
03599fa7d7 hard constrast vim on laptop 2021-10-23 12:42:14 +02:00
ElKowar
25f0edd5c9 fix missing branch in impatient.nvim config 2021-10-23 12:25:58 +02:00
ElKowar
90ee6b4db2 make battery indicator executable 2021-10-23 11:55:30 +02:00
elkowar
7cd882157c
Clean up some plugins 2021-10-21 15:17:38 +02:00
elkowar
42e59d028c
some xmonad stuff 2021-10-21 13:25:06 +02:00
elkowar
59462125c8
upgrade to xmonad-contrib and xmonad master 2021-10-21 13:25:06 +02:00
ElKowar
ae2b84b061 merge in some laptop changes 2021-10-20 10:32:08 +02:00
elkowar
7ee97b8f45
Instant.nvim 2021-10-19 13:01:32 +02:00
elkowar
e55f52a769
Fix impatient.nvim 2021-10-16 13:03:26 +02:00
elkowar
0d87f0c247
Fix typo in rust-tools.nvim config 2021-10-13 09:00:38 +02:00
elkowar
ec67bebca0
Steal some of drusks changes to feline config 2021-10-13 08:13:23 +02:00
elkowar
4abaf5a870
Fix nvim-cmp sorter 2021-10-13 08:06:20 +02:00
elkowar
a7b6ba71df
Add debugging stuff to keybinds 2021-10-11 18:24:53 +02:00
elkowar
f46a8231a0
Add some cmp stuff to vim 2021-10-09 13:26:38 +02:00
elkowar
bba6442cd2
fix ZSH issues 2021-10-09 11:44:22 +02:00
elkowar
f21828ae0a
Add some more zsh nicetohaves 2021-10-08 17:14:46 +02:00
elkowar
263c805697
Fix zsh stuff finally 2021-10-08 16:58:07 +02:00
elkowar
b1e09e6989
Fix zsh 2021-10-08 15:59:41 +02:00
elkowar
eecf6b9165
Apply laptop stuff 2021-10-08 15:13:39 +02:00
elkowar
14fb0f7536
Start setting up codelldb stuff 2021-10-08 15:01:46 +02:00
elkowar
67c77d5155
Fix packer stuff 2021-10-08 14:20:26 +02:00
elkowar
d9a92bb735
fix autocompletion 2021-10-08 14:06:50 +02:00
elkowar
ba10fd7e89
Fix vim? 2021-10-08 13:04:57 +02:00
elkowar
b02bd70669
cleanup 2021-09-11 14:45:12 +02:00
elkowar
6995d8dd9d
Remove some unused stuff from xmonad 2021-08-23 18:11:56 +02:00
elkowar
88123ab2de
small changes 2021-08-23 16:39:58 +02:00
elkowar
d752499dc3
Some vim changes 2021-08-21 11:58:20 +02:00
elkowar
4516223a1e
Add some nvim stuff, clean up nvim UI 2021-08-17 18:38:35 +02:00
elkowar
6d69481cd7
asdf 2021-08-16 12:18:27 +02:00
elkowar
61e2d897d9
asdf 2021-08-14 15:23:04 +02:00
elkowar
94b2ceab01
fix some wrong eww config 2021-08-14 13:35:05 +02:00
elkowar
a83eac15ab
bar stuff 2021-08-14 11:06:01 +02:00
elkowar
de8bad20ec
bar stuff 2021-08-13 17:25:56 +02:00
elkowar
b6444af068
Fix bar sizing 2021-08-12 16:38:49 +02:00
elkowar
d81c401ce6
actually use eww-bar 2021-08-12 13:12:10 +02:00
elkowar
6e816303c5
more bar stuff 2021-08-11 12:43:34 +02:00
elkowar
64ac3ad811
asdf 2021-08-10 20:35:57 +02:00
elkowar
a009bbe470
Some cleanup in bar 2021-08-10 19:52:35 +02:00
elkowar
48850415d8
add eww bar 2021-08-10 18:35:08 +02:00
elkowar
5946ad4314
asdf 2021-08-06 14:46:49 +02:00
elkowar
cdd9b2f698
Some vim stuff 2021-08-03 20:18:47 +02:00
elkowar
9ca125a81c
more telescope stuff 2021-07-24 12:46:07 +02:00
elkowar
c786d0a3a7
more vim stuff 2021-07-17 11:30:55 +02:00
elkowar
5f12febcb1
vim.opt and some other stuff 2021-06-19 16:56:00 +02:00
elkowar
74e8063bfc
improve nvim formatting 2021-06-14 10:44:59 +02:00
elkowar
a54384fa2b
2021-05-23 15:16:47 +02:00
elkowar
0d91c6af9a
asdf 2021-05-22 19:37:45 +02:00
elkowar
a5e867cfd7
asdf 2021-05-22 13:03:18 +02:00
elkowar
185d017d32
asdf 2021-05-21 19:29:37 +02:00
elkowar
2283b8e7ea
fix bar 2021-05-18 17:00:54 +02:00
elkowar
22676e233e
actually fix stuff 2021-05-18 15:50:39 +02:00
elkowar
bcdb805f70
stuff kinda works,... weirdly 2021-05-18 13:47:07 +02:00
elkowar
bdeb04af86
fix gruvbox theme 2021-05-18 12:36:03 +02:00
elkowar
1eb6966032
more optimization 2021-05-18 00:34:58 +02:00
elkowar
351ba8bf77
asdf 2021-05-17 20:25:40 +02:00
elkowar
242333ceb7
autoload everything 2021-05-17 19:46:38 +02:00
elkowar
793b65c843
Add dap but commented out lol, also stuff kinda slow 2021-05-17 19:24:48 +02:00
elkowar
0a7b80f3e2
Some fixes 2021-05-17 17:06:21 +02:00
elkowar
39dae0dca0
asdf 2021-05-17 16:03:20 +02:00
elkowar
63d6a211bb
more stuff 2021-05-15 22:06:45 +02:00
elkowar
ef11d26a1a
try out feline 2021-05-15 21:10:36 +02:00
elkowar
f7076e8a26
asdf 2021-05-15 16:12:57 +02:00
elkowar
23c670c2b3
asdf 2021-05-14 22:29:13 +02:00
Niclas
ed2c5363ea
Assign variable before it is used (#4)
* Assign variable before it is used

* docs: update
2021-05-14 22:28:57 +02:00
elkowar
07e0e811b1
asdf 2021-05-14 11:24:19 +02:00
401 changed files with 39224 additions and 1957 deletions

View file

@ -0,0 +1,87 @@
env:
TERM: xterm-256color
colors:
bright:
black: "#928374"
blue: "#83a598"
cyan: "#8ec07c"
green: "#b8bb26"
magenta: "#d3869b"
red: "#fb4934"
white: "#ebdbb2"
yellow: "#fabd2f"
normal:
black: "#665c54" # this is used for comments in bash, so let's make it visible...
blue: "#458588"
cyan: "#689d6a"
green: "#98971a"
magenta: "#b16286"
red: "#cc241d"
white: "#a89984"
yellow: "#d79921"
primary:
background: "#282828"
bg_darker: "#1d2021"
bg_lighter: "#3c3836"
foreground: "#ebdbb2"
cursor:
style:
shape: "Block"
blinking: "Never"
unfocused_hollow: true
font:
#normal: { "family": "FiraMono Nerd Font" }
#normal: { "family": "Menlo" }
#normal: { "family": "APL 385 Unicode" }
normal: { "family": "Fira Code" }
#normal: { "family": "Jetbrains Mono" }
#normal: { "family": "Victor Mono" }
#normal: { "family": "Monoid" }
#normal: { "family": "Mono Lisa" }
#normal: { "family": "cherry" }
#normal: { "family": "scientifica" }
#normal: { "family": "cozette" }
#normal: { "family": "Terminus" }
offset: { "x": 0, "y": 0 }
size: 14
key_bindings:
- { "action": "SpawnNewInstance", "key": "N", "mods": "Control|Shift" }
# let's increase font size 12 times every C-S-+, and decrease 12 times on C-S-A-+... lmao
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "IncreaseFontSize", "key": "Plus", "mods": "Control|Shift" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
- { "action": "DecreaseFontSize", "key": "Plus", "mods": "Control|Shift|Alt" }
live_config_reload: true
mouse:
double_click: { "threshold": 300 }
hide_when_typing: true
triple_click: { "threshold": 300 }
window:
dynamic_padding: true
dynamic_title: true
padding: { "x": 10, "y": 10 }
#padding: { "x": 20, "y": 20 }
opacity: 1

View file

@ -0,0 +1,35 @@
#!/usr/bin/env bash
case "$1" in
"symbol")
pactl subscribe | grep --line-buffered "Event 'change' on client" | while read -r; do
case "$(pactl get-default-sink)" in
*Arctis_9*) echo "";;
#*Arctis_9*) echo "";;
*) echo "";;
esac
done
;;
"volume")
pamixer --get-volume;
pactl subscribe \
| grep --line-buffered "Event 'change' on sink " \
| while read -r evt;
do pamixer --get-volume | cut -d " " -f1;
done
;;
"toggle")
speaker_sink_id=$(pamixer --list-sinks | grep "Komplete_Audio_6" | awk '{print $1}')
game_sink_id=$(pamixer --list-sinks | grep "stereo-game" | awk '{print $1}')
case "$(pactl get-default-sink)" in
*Arctis_9*)
eww -c ~/.config/eww-bar update audio_sink=""
pactl set-default-sink $speaker_sink_id
;;
*)
eww -c ~/.config/eww-bar update audio_sink=""
pactl set-default-sink $game_sink_id
;;
esac
;;
esac

View file

@ -0,0 +1,127 @@
* {
all: unset;
}
window {
background: #282828;
color: #ebdbb2;
font-size: 14px;
& > * {
margin: 3px;
}
font-family: "Terminus (TTF)";
}
.workspaces {
button {
background: none;
margin: 3px;
padding-left: 1px;
&.inactive {
color: #888974;
}
&.active {
color: #8ec07c;
}
&.occupied {
font-size: 1.01rem;
}
&.empty {
font-size: 0.8rem;
}
}
}
.segment-top {
margin-top: 10px;
}
.segment-bottom {
margin-bottom: 10px;
}
.volume-metric {
background-color: #1d2021;
color: #ebdbb2;
padding: 0;
.volume-top > scale {
margin-bottom: 5px;
}
slider {
all: unset;
}
scale trough highlight {
all: unset;
//background-color: #8ec07c;
background-color: #665c54;
border-bottom-right-radius: 5px;
}
scale trough {
all: unset;
background-color: #1d2021;
min-width: 34px;
min-height: 2px;
}
}
.large-symbol {
font-size: 0.8em;
}
.metric {
background-color: #1d2021;
padding: 5px 2px;
}
.metric-icon {
font-family: "Font Awesome 6 Free";
font-size: 0.7em;
}
.time {
padding-top: 7px;
padding-bottom: 7px;
color: #a89984;
}
.music_popup {
all: unset;
background-color: #1d2021;
padding: 0px 20px;
margin: 0;
}
// System Tray
menu {
padding: 5px 5px;
background-color: #1d2021;
>menuitem {
font-size: 14px;
padding: 2px 5px;
//color: $foreground;
&:disabled label {
color: #928374;
}
&:hover {
background-color: #282828;
}
}
separator {
padding-top: 1px;
&:last-child {
padding: unset;
}
}
}

View file

@ -0,0 +1,148 @@
(defwidget bar [screen]
(centerbox :orientation "v"
(box :class "segment-top"
:valign "start"
(top :screen screen))
(box :valign "center"
:class "middle"
(middle :screen screen))
(box :valign "end"
:class "segment-bottom"
(bottom :screen screen))))
(defwidget top [screen]
(box :orientation "v"
;(workspaces :screen {screen == 1 ? "DP-2" : "HDMI-A-1"})
(systray :orientation "v" :icon-size 15 :spacing 10)))
;(workspaces :wsp_yuck {screen == 1 ? workspaces_1_yuck : workspaces_2_yuck}))
(defwidget workspaces [screen]
(box :orientation "v" :class "workspaces"
(for wsp in {workspaces[screen]}
(button :class "${wsp.focused ? "active" : "inactive"}"
:onclick "swaymsg workspace ${wsp.name}"
{wsp.name}))))
;(defwidget workspaces [wsp_yuck]
;(literal :content wsp_yuck))
(defwidget middle [] (time))
(defwidget time []
(box :orientation "v"
:class "time"
hour min sec))
(defwidget metric [icon ?font-size]
(box :class "metric"
:orientation "v"
(label :class "metric-icon"
:style {font-size != "" ? "font-size: ${font-size}rem;" : ""}
:text icon)
(children)))
(defwidget bottom [screen]
(box :orientation "v"
:valign "end"
:space-evenly true
:spacing "5"
(volume)
(metric :icon ""
:font-size 0.8
"${round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}%")
(metric :icon "" "${round(EWW_RAM.used_mem_perc, 0)}%")
(metric :icon "" "${round(EWW_CPU.avg, 0)}%")
(box :class "metric" (date))))
(defwidget volume []
(box :class "volume-metric"
:orientation "v"
:space-evenly false
:valign "fill"
:vexpand false
(scale :orientation "h"
:min 0
:max 100
:onchange "pamixer --set-volume $(echo {} | sed 's/\\..*//g')"
:value volume)
(eventbox :onscroll "if [ '{}' == 'up' ]; then pamixer -i 5; else pamixer -d 5; fi"
:vexpand true
:valign "fill"
(box :orientation "v"
:valign "fill"
:vexpand true
(button :onclick "rofi -theme ~/.config/rofi/launchers/type-4/style-2.rasi -show rofi-sound -modi 'rofi-sound:rofi-sound-output-chooser' &"
:onrightclick "./audio.sh toggle"
(label :text audio_sink))
(button :onclick "pavucontrol &"
"${volume}%")))))
(defwidget large-sym [sym]
(label :class "metric-icon large-symbol" :text sym))
(defwidget date []
(box :orientation "v"
:halign "center"
day_word day month year))
(defwidget niri-scroller []
(eventbox :onscroll "if [ '{}' == 'down' ]; then niri msg action focus-column-right; else niri msg action focus-column-left; fi"
:vexpand true
:valign "fill"
:style "background-color: #8ec07c; border-radius: 10px;"))
; TODO make this not hacky
(defvar audio_sink "")
(deflisten volume :initial "0" "./audio.sh volume")
(deflisten workspaces :initial '{"DP-2": [], "HDMI-A-1": []}' "./swayspaces.py")
(defpoll hour :interval "1s" "date +%H")
(defpoll min :interval "1s" "date +%M")
(defpoll sec :interval "1s" "date +%S")
(defpoll day_word :interval "10m" "date +%a | tr [:upper:] [:lower:]")
(defpoll day :interval "10m" "date +%d")
(defpoll month :interval "1h" "date +%m")
(defpoll year :interval "1h" "date +%y")
(defvar workspaces_1_yuck "")
(defvar workspaces_2_yuck "")
(defwindow niri_scroller
:monitor '["<primary>", "DisplayPort-0", "PHL 345B1C"]'
:stacking "fg"
:geometry (geometry :x 0 :y 0 :width "800px" :height "5px" :anchor "bottom center")
:reserve (struts :distance "10px" :side "bottom")
:exclusive false
(niri-scroller))
(defwindow bar_1
:monitor '["<primary>", "DisplayPort-0", "PHL 345B1C"]'
; :monitor "DisplayPort-0"
:stacking "fg"
:geometry (geometry :x 0 :y 0 :width "40px" :height "100%" :anchor "center left")
:reserve (struts :distance "40px" :side "left")
:exclusive true
(bar :screen 1))
(defwindow bar_2
:monitor '[2, "HDMI-A-1"]'
:geometry (geometry :x 0 :y 0 :width "40px" :height "100%" :anchor "top left")
:reserve (struts :distance "40px" :side "left")
(bar :screen 2))

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

View file

@ -0,0 +1,93 @@
#!/usr/bin/env python3
import subprocess
import json
def get_workspaces():
output = subprocess.check_output(["swaymsg", "-t", "get_workspaces"])
return json.loads(output.decode("utf-8"))
def generate_workspace_data() -> dict:
data = {}
for wsp in get_workspaces():
if wsp["output"] not in data:
data[wsp["output"]] = []
data[wsp["output"]].append(
{
"name": wsp["name"],
"monitor": wsp["output"],
"focused": wsp["focused"],
"visible": wsp["visible"],
}
)
return data
if __name__ == "__main__":
process = subprocess.Popen(
["swaymsg", "-t", "subscribe", "-m", '["workspace"]', "--raw"],
stdout=subprocess.PIPE,
)
if process.stdout is None:
print("Error: could not subscribe to sway events")
exit(1)
while True:
print(json.dumps(generate_workspace_data()), flush=True)
line = process.stdout.readline().decode("utf-8")
if line == "":
break
# #!/usr/bin/env python3
#
# import subprocess
# import json
#
# WSP_COUNT = 5
# MONITOR_COUNT = 2
#
#
# def get_workspaces():
# output = subprocess.check_output(["swaymsg", "-t", "get_workspaces"])
# return json.loads(output.decode("utf-8"))
#
#
# def generate_workspace_data_for_monitor(monitor: int) -> list[dict]:
# workspaces = {w["name"]: w for w in get_workspaces()}
# data = []
# for i in range(WSP_COUNT):
# name = f"{monitor+1}{i+1}"
# wsp_data = workspaces.get(name)
# entry = {
# "name": name,
# "monitor": monitor,
# "occupied": False,
# "focused": False,
# "visible": False,
# }
# if wsp_data is not None:
# entry["focused"] = wsp_data["focused"]
# entry["visible"] = wsp_data["visible"]
# entry["occupied"] = True
# data.append(entry)
# return data
#
#
# def generate_workspace_data() -> dict:
# return {i: generate_workspace_data_for_monitor(i) for i in range(MONITOR_COUNT)}
#
#
# if __name__ == "__main__":
# process = subprocess.Popen(
# ["swaymsg", "-t", "subscribe", "-m", '["workspace"]', "--raw"],
# stdout=subprocess.PIPE,
# )
# if process.stdout is None:
# print("Error: could not subscribe to sway events")
# exit(1)
# while True:
# print(json.dumps(generate_workspace_data()), flush=True)
# line = process.stdout.readline().decode("utf-8")
# if line == "":
# break

View file

@ -0,0 +1,39 @@
#!/usr/bin/env bash
gib_workspace_names() {
wmctrl -d \
| awk '{ print $1 " " $2 " " $9 }' \
| grep -v NSP \
| grep "${1}_"
}
gib_workspace_yuck() {
buffered=""
gib_workspace_names $1 | while read -r id active name; do
name="${name#*_}"
if [ "$active" == '*' ]; then
active_class="active"
else
active_class="inactive"
fi
if wmctrl -l | grep --regexp '.*\s\+'"$id"'\s\+.*' >/dev/null; then
button_class="occupied"
button_name="◆"
else
button_class="empty"
button_name="◇"
fi
buffered+="(button :class \"$button_class $active_class\" :onclick \"wmctrl -s $id\" \"$button_name\")"
if [ $button_class = "occupied" -o $active_class = "active" ]; then
echo -n "$buffered"
buffered=""
fi
done
}
box_attrs=':orientation "v" :class "workspaces" :space-evenly true :halign "center" :valign "center" :vexpand true '
eww -c ~/.config/eww-bar update workspaces_1_yuck="(box $box_attrs $(gib_workspace_yuck 1))"
eww -c ~/.config/eww-bar update workspaces_2_yuck="(box $box_attrs $(gib_workspace_yuck 2))"

View file

@ -0,0 +1,39 @@
#!/usr/bin/env bash
monitor="$1"
gib_workspace_names() {
wmctrl -d \
| awk '{ print $1 " " $2 " " $9 }' \
| grep -v NSP \
| grep "${monitor}_"
}
gib_workspace_yuck() {
buffered=""
gib_workspace_names | while read -r id active name; do
name="${name#*_}"
if [ "$active" == '*' ]; then
active_class="active"
else
active_class="inactive"
fi
if wmctrl -l | grep --regexp '.*\s\+'"$id"'\s\+.*' >/dev/null; then
button_class="occupied"
button_name="◆"
else
button_class="empty"
button_name="◇"
fi
buffered+="(button :class \"$button_class $active_class\" :onclick \"wmctrl -s $id\" \"$button_name\")"
if [ $button_class = "occupied" -o $active_class = "active" ]; then
echo -n "$buffered"
buffered=""
fi
done
}
xprop -spy -root _NET_CURRENT_DESKTOP | while read -r; do
echo '(box :orientation "v" :class "workspaces" :space-evenly true :halign "center" :valign "center" :vexpand true '"$(gib_workspace_yuck)"')'
done

View file

@ -0,0 +1,52 @@
.bar * {
all: unset;
}
.bar {
background-color: #1d2021;
color: #ebdbb2;
margin-left: 10px;
margin-right: 10px;
font-family: "CozetteVector";
font-size: 12px;
.current {
color: #8ec07c;
}
}
menuitem window {
background: #282828;
margin: 10px;
}
// System Tray
.tray menu {
padding: 5px 5px;
background-color: $background;
>menuitem {
font-family: JetBrainsMono NF;
font-size: 14px;
padding: 2px 5px;
color: $foreground;
&:disabled label {
color: $black;
}
&:hover {
background-color: $gray;
}
}
separator {
background-color: $foreground;
padding-top: 1px;
&:last-child {
padding: unset;
}
}
}

View file

@ -0,0 +1,43 @@
(deflisten workspaces :initial "[]" "bash ./scripts/get-workspaces")
(deflisten current_workspace :initial "1" "bash ./scripts/get-active-workspace")
(defpoll time :interval "1s" "date '+%d.%m.%Y - %H:%M:%S'")
(defwidget workspaces []
(eventbox :halign "start"
:onscroll "bash ${EWW_CONFIG_DIR}/scripts/change-active-workspace {} ${current_workspace}"
:class "workspaces-widget"
(box :space-evenly true
(for workspace in workspaces
(eventbox :onclick "hyprctl dispatch workspace ${workspace.id}"
(label :class {workspace.id == current_workspace ? "current" : ""}
:text " ${workspace.windows > 0 ? "◆" : "◇"} "))))))
(defwidget bar []
(centerbox :class "bar"
(workspaces)
"${time}"
(box :halign "end"
:space-evenly true
:width "150"
"󰁹 ${EWW_BATTERY["BAT1"].capacity}%"
"󰍛 ${round(EWW_RAM.used_mem_perc, 0)}%"
"󰻠 ${round(EWW_CPU.avg, 0)}%")))
(defwindow bar
:monitor 0
:geometry (geometry :x 0 :y 0 :width "100%" :height "30px" :anchor "top center")
:stacking "fg"
:exclusive true
(bar))
(defwindow test
:monitor 0
:exclusive true
:geometry (geometry :x 0 :y 0 :width "100%" :height "20px" :anchor "top center")
(box
"${EWW_NET["enp34s0"]}"
(tooltip
"${time}"
(button "test"))))

View file

@ -0,0 +1,21 @@
#! /bin/bash
function clamp {
min=$1
max=$2
val=$3
python -c "print(max($min, min($val, $max)))"
}
direction=$1
current=$2
if test "$direction" = "down"
then
target=$(clamp 1 10 $(($current+1)))
echo "jumping to $target"
hyprctl dispatch workspace $target
elif test "$direction" = "up"
then
target=$(clamp 1 10 $(($current-1)))
echo "jumping to $target"
hyprctl dispatch workspace $target
fi

View file

@ -0,0 +1,3 @@
#!/bin/bash
hyprctl monitors -j | jq --raw-output .[0].activeWorkspace.id
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 grep '^workspace>>' | stdbuf -o0 awk -F '>>|,' '{print $2}'

View file

@ -0,0 +1,11 @@
#!/bin/bash
spaces (){
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
seq 1 10 | jq --argjson windows "${WORKSPACE_WINDOWS}" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})'
}
spaces
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
spaces
done

View file

@ -0,0 +1,27 @@
<eww>
<definitions>
<def name="something">
<box class="{{some_var}}" halign="start">
<button onclick="notify-send 'test' 'message'">
{{some_script}}
</button>
</box>
</def>
</definitions>
<variables>
<var name="some_var">
foo
</var>
<script-var name="some_script" interval="1s">
date | sed 's/:/X/g' | rev
</script-var>
</variables>
<windows>
<window name="foo">
<geometry anchor="center" width="100px" height="10%"/>
<widget>
<something arg="value"/>
</widget>
</window>
</windows>
</eww>

View file

@ -1,4 +1,5 @@
<eww>
<includes>
<file path="./foo.xml"/>
@ -9,50 +10,36 @@
<progress value="{{volume}}" orientation="v" halign="start" flipped="true"/>
</def>
<def name="revtest">
<box>
<revealer reveal="{{reveal}}" transition="slideleft" duration="300ms">
hello, world
</revealer>
</box>
</def>
<def name="test">
<box class="{{some_var}}" space-evenly="false" spacing="10">
<scale value="{{scaleval}}" orientation="v" min="0" max="100" flipped="true" />
<box space-evenly="false" orientation="v">
testing {{shit}} bruh
is shit true? {{shit == true}}
is shit "shit"? {{shit == "shit"}}
true and false 🤔
{{ true && false }}
fancy ass math {{ 12 + 5 * 12 * 4 }}
bruh &quot; &lt; fuck &gt;
"
<literal content="{{lmao}}"/>
<label text="&lt; &gt; bruh &quot;"/>
{{bruh.hi}} HEHE {{bruh.ho}}
Watch this:
{{bruh.list[bruh.myIndex]}}
<if-else cond="{{shit == 'yea'}}">
<box>hi</box>
<box>ho</box>
</if-else>
thingy: {{"lmao" =~ ".ma."}}
thingy: {{"lmao" =~ "^ma.$"}}
asdasdfflmao
<box> |  {{ round((EWW_NET["enp34s0"].NET_UP) * 8 / (1024 * 1024), 2)}}
 {{ round((EWW_NET["enp34s0"].NET_DOWN) * 8 / (1024 * 1024), 2)}}
|  {{EWW_RAM}}
|  {{ round((EWW_DISK["/"].free) / (1024 * 1024 * 1024), 2)}}
</box>
<!--{{(EWW_NET[kek].NET_UP) * 10}}-->
asdf {{ round(0.1234, 2) }}
</box>
<scale value="50" orientation="v" min="0" max="100" flipped="true" />
<button onclick="pgrep 'eww' &amp;&amp; echo '' || echo ''" cursor="wait">Test bug</button>
<revealer reveal="{{reveal}}" transition="slideright" duration="300ms">
<button
onclick="notify-send 'ree' 'this is {{shit}}'"
onmiddleclick="notify-send 'ree' 'MITTE'"
@ -60,6 +47,7 @@
>
click me
</button>
</revealer>
<calendar show-heading="false" show-day-names="false" day="2" onclick="notify-send 'asdf' '{}'" />
notify-send 'ree' 'this is {{shit}}'
<multiple text="{{shit}}" />
@ -67,9 +55,9 @@
<!--<literal content="{{code}}"/>-->
</box>
</def>
</def>
<def name="multiple">
<def name="multiple">
<box orientation="v" space-evenly="false">
<box>{{text}}test</box>
@ -83,15 +71,15 @@
{{date}}
{{date-tail}}
</box>
</def>
</def>
<def name="volume_popup">
<def name="volume_popup">
<box orientation="v" space-evenly="true">
<scale flipped="true" orientation="v" value="{{volume}}" min="0" max="100" onchange="amixer sset 'Master' {}%" />
</box>
</def>
</def>
<def name="music">
<def name="music">
<box class="hi ho" orientation="h" valign="start" space-evenly="false" hexpand="true">
<image visible="{{song-image-visible}}" path="{{song-image}}" width="150" height="150" />
<box orientation="v" halign="fill" space-evenly="false" vexpand="true" hexpand="true">
@ -115,7 +103,7 @@
</box>
</box>
</box>
</def>
</def>
</definitions>
@ -128,12 +116,19 @@
done
</script-var>
<var name="reveal">
false
</var>
<var name="shit">
true
enp34s0
</var>
<var name="some_var"></var>
<var name="code"></var>
<script-var name="scaleval" interval="50ms">
echo 25
</script-var>
<var name="song-image"></var>
<var name="song-image-visible">true</var>
@ -146,11 +141,11 @@
<!--date-->
<!--</script-var>-->
<script-var name="date-tail">
while true; do
sleep 1;
notify-send 'hi' 'ho'
<!--while true; do-->
<!--sleep 1;-->
<!--notify-send 'hi' 'ho'-->
date
done
<!--done-->
</script-var>
<script-var name="date" interval="1s">
@ -164,12 +159,15 @@
<var name="bruh">
{"hi": "ho"}
{"hi": "ho", "hey": "fuck", "lol": "test" }
</var>
<script-var name="kek" interval="1s">
/home/leon/reee.sh
</script-var>
@ -190,14 +188,22 @@
<pxbar/>
</widget>
</window>
<window screen="0" name="mw" stacking="fg" focusable="false">
<window screen="0" name="mw" stacking="fg" focusable="false" windowtype="dock" wm-ignore="false" sticky="false">
<!--<window screen="2" name="mw" stacking="fg" focusable="false">-->
<geometry anchor="center" width="20%" height="20%" x="50px" y="50px"/>
<reserve side="left" distance="80px"/>
<!--<geometry anchor="center" width="20%" height="20%" x="50px" y="50px"/>-->
<geometry anchor="top center" width="20%" height="20%" x="0px" y="0px"/>
<reserve side="left" distance="30%"/>
<widget>
<test ree="test" />
</widget>
</window>
<window screen="0" name="rev">
<geometry anchor="bottom center" width="0" height="0"/>
<widget>
<revtest/>
</widget>
</window>
<window screen="0" name="mw2" stacking="fg">
<geometry anchor="bottom right"/>
<widget>

View file

@ -1,7 +0,0 @@
# Path to Oh My Fish install.
set -q XDG_DATA_HOME
and set -gx OMF_PATH "$XDG_DATA_HOME/omf"
or set -gx OMF_PATH "$HOME/.local/share/omf"
# Load Oh My Fish configuration.
source $OMF_PATH/init.fish

View file

@ -1,84 +0,0 @@
fish_vi_key_bindings
# fish_default_key_bindings
# disable truecolor for dvtm
# set -e fish_term24bit
#source /home/leon/.config/fish/gruvbox-colors.fish
#set -U FZF_TMUX 1
set -U FZF_DEFAULT_COMMANDS "--filepath-word --cycle"
set -U FZF_PREVIEW_FILE_CMD "head -n 10 | bat --color=always --decorations=never"
set -U fish_greeting
#function fish_greeting
#end
alias ls="exa --icons"
alias tcolors="env TERM=xterm-256color tcolors"
abbr --add --global vim nvim
abbr --add --global tsh trash
#abbr --add --global clear "clear && ls"
abbr --add --global cxmonad "nvim /home/leon/.xmonad/lib/Config.hs"
#if status is-interactive
#and not set -q TMUX
#exec tmux
#end
abbr --add --global gaa "git add --all"
abbr --add --global gc "git commit -m "
abbr --add --global gp "git push"
abbr --add --global gs "git status"
[ (hostname) = "garnix" ] && alias rm='echo "rm is disabled. Please use trash instead."; false'
function run_pipr
set -l commandline (commandline -b)
pipr --out-file /tmp/pipr_out --default "$commandline"
set -l result (cat /tmp/pipr_out)
commandline -r $result
commandline -f repaint
end
bind \ca run_pipr
function c
set -l result (/home/leon/scripts/conf)
commandline -r "$result"
commandline -f execute
end
function replace_with_yay
set -l cmd (commandline -b)
switch $cmd
case "*pacman*"
set edited (echo $cmd | sed 's/sudo //g' | sed 's/pacman/yay/g')
case "yay*"
set edited (echo $cmd | sed 's/yay/sudo pacman/g')
end
commandline -r "$edited"
commandline -f repaint
end
bind \cy replace_with_yay
# fff file manager cd on exit
function f
fff $argv
set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME $HOME/.cache
cd (cat $XDG_CACHE_HOME/fff/.fff_d)
end
set -x EDITOR "nvim"
set -x FFF_TRASH_CMD "trash" # make fff's trash function use trash-cli
fenv source '$HOME/.nix-profile/etc/profile.d/nix.sh'
#bass source '$HOME/.nix-profile/etc/profile.d/nix.sh' &
set -g NIX_PATH "$HOME/.nix-defexpr/channels:$NIX_PATH"
fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
#eval (direnv hook fish)

View file

@ -1 +0,0 @@
/nix/store/6y0vwjy4bp38zlq8dwhallp7325cm8vi-home-manager-files/.config/fish/config.fish

View file

@ -1,34 +0,0 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR FZF_DEFAULT_COMMANDS:\x2d\x2dfilepath\x2dword\x20\x2d\x2dcycle
SETUVAR FZF_PREVIEW_FILE_CMD:head\x20\x2dn\x2010\x20\x7c\x20bat\x20\x2d\x2dcolor\x3dalways\x20\x2d\x2ddecorations\x3dnever
SETUVAR __fish_initialized:3100
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:005fd7
SETUVAR fish_color_comment:990000
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:009900
SETUVAR fish_color_error:ff0000
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:00afff
SETUVAR fish_color_quote:999900
SETUVAR fish_color_redirection:00afff
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_greeting:\x1d
SETUVAR fish_key_bindings:fish_vi_key_bindings
SETUVAR fish_pager_color_completion:\x1d
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan

View file

@ -1,50 +0,0 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR FZF_DEFAULT_COMMANDS:\x2d\x2dfilepath\x2dword\x20\x2d\x2dcycle
SETUVAR FZF_DEFAULT_OPTS:\x2d\x2dheight\x2040\x25
SETUVAR FZF_ENABLE_OPEN_PREVIEW:1
SETUVAR FZF_LEGACY_KEYBINDINGS:0
SETUVAR FZF_PREVIEW_DIR_CMD:ls
SETUVAR FZF_PREVIEW_FILE_CMD:head\x20\x2dn\x2010\x20\x7c\x20bat\x20\x2d\x2dcolor\x3dalways\x20\x2d\x2ddecorations\x3dnever
SETUVAR FZF_TMUX:1
SETUVAR FZF_TMUX_HEIGHT:40\x25
SETUVAR SXHKD_SHELL:sh
SETUVAR __fish_initialized:3100
SETUVAR dangerous_colors:000000\x1e083743\x1e445659\x1efdf6e3\x1eb58900\x1ecb4b16\x1edc121f\x1eaf005f\x1e6c71c4\x1e268bd2\x1e2aa198\x1e859900
SETUVAR dangerous_cursors:\x5c033\x5d12\x3b\x23268bd2\x5c007\x1e\x5c033\x5d12\x3b\x23b58900\x5c007\x1e\x5c033\x5d12\x3b\x23af005f\x5c007\x1e\x5c033\x5d12\x3b\x236c71c4\x5c007
SETUVAR dangerous_day:000000\x1e333333\x1e666666\x1effffff\x1effff00\x1eff6600\x1eff0000\x1eff0033\x1e3300ff\x1e00aaff\x1e00ffff\x1e00ff00
SETUVAR dangerous_night:000000\x1e083743\x1e445659\x1efdf6e3\x1eb58900\x1ecb4b16\x1edc121f\x1eaf005f\x1e6c71c4\x1e268bd2\x1e2aa198\x1e859900
SETUVAR dangerous_nocmdhist:c\x1ed\x1ell\x1els\x1em\x1es
SETUVAR dangerous_pwdstyle:short\x1elong\x1enone
SETUVAR dangerous_sessions_active:\x1d
SETUVAR dangerous_sessions_active_pid:\x1d
SETUVAR fish_color_autosuggestion:555
SETUVAR fish_color_cancel:normal
SETUVAR fish_color_command:0087d7
SETUVAR fish_color_comment:990000
SETUVAR fish_color_cwd:008000
SETUVAR fish_color_cwd_root:800000
SETUVAR fish_color_end:009900
SETUVAR fish_color_error:ff0000
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:normal
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_match:normal
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:0087af
SETUVAR fish_color_quote:999900
SETUVAR fish_color_redirection:00afff
SETUVAR fish_color_search_match:ffff00
SETUVAR fish_color_selection:c0c0c0
SETUVAR fish_color_status:red
SETUVAR fish_color_user:00ff00
SETUVAR fish_color_valid_path:normal
SETUVAR fish_greeting:\x1d
SETUVAR fish_key_bindings:fish_vi_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_user_paths:/home/leon/\x2efzf/bin

View file

@ -1 +0,0 @@
/home/leon/.local/share/omf/themes/lambda_better/fish_prompt.fish

View file

@ -1,2 +0,0 @@
function fish_user_key_bindings
end

View file

@ -1 +0,0 @@
/home/leon/.local/share/omf/themes/lambda/fish_prompt.fish

View file

@ -1,67 +0,0 @@
function fish_prompt
# Cache exit status
set -l last_status $status
set -l normal (set_color normal)
set -l white (set_color FFFFFF)
set -l turquoise (set_color 5fdfff)
set -l orange (set_color df5f00)
set -l hotpink (set_color df005f)
set -l blue (set_color blue)
set -l limegreen (set_color 87ff00)
set -l purple (set_color af5fff)
# Configure __fish_git_prompt
set -g __fish_git_prompt_char_stateseparator ' '
set -g __fish_git_prompt_color 5fdfff
set -g __fish_git_prompt_color_flags df5f00
set -g __fish_git_prompt_color_prefix white
set -g __fish_git_prompt_color_suffix white
set -g __fish_git_prompt_showdirtystate true
set -g __fish_git_prompt_showuntrackedfiles true
set -g __fish_git_prompt_showstashstate true
set -g __fish_git_prompt_show_informative_status true
set -l current_user (whoami)
set -l vi_mode (__fish_vi_mode_prompt_real)
set -l git_prompt (__fish_git_prompt " (%s)")
#(pwd|sed "s=$HOME=~=")
set -g fish_prompt_pwd_dir_length 1
echo -n $white'╭─'$vi_mode
echo -n $white'─'$hotpink$current_user$white' in '$limegreen(prompt_pwd)
echo -n $turquoise$git_prompt
if test $last_status -gt 0
echo -n ' '$hotpink$last_status
end
echo
echo -n $white'╰─λ '
echo -n $normal
end
function __fish_vi_mode_prompt_real
set -l turquoise (set_color 5fdfff)
set -l orange (set_color df5f00)
switch $fish_bind_mode
case insert
echo -n "─"
case default
echo -n $turquoise'N'
case visual
echo -n $orange'V'
case replace_one
echo -n $turquoise'R'
end
end
# needed so fish doesn't draw it by itself
function fish_mode_prompt
end
# ⌁

View file

@ -1,27 +0,0 @@
set -l orange '#fe8019'
set -l aqua '#8ec07c'
set -l blue '#83a598'
set -l limegreen '#b8bb26'
set -l purple '#d3869b'
set -l aqua '#8ec07c'
set -l gwhite '#ebdbb2'
set -l gray2 '#665c54'
set -l purple '#d3869b'
set -l gray '#a89984'
set -l yellow '#fabd2f'
#set -U fish_color_command $blue
#set -U fish_color_normal $gwhite
#set -U fish_color_quote $aqua
#set -U fish_color_redirection $orange
#set -U fish_color_param $aqua
#set -U fish_color_comment $gray
#set -U fish_color_match $yellow
#set -U fish_color_search_match $aqua
#set -U fish_color_autosuggestion $gray2
#set -U fish_color_cancel $aqua
#set fish_color_selection
#set fish_color_end
#set fish_color_error
#set fish_color_operator

189
foot/.config/foot/foot.ini Normal file
View file

@ -0,0 +1,189 @@
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
# login-shell=no
# app-id=foot
# title=foot
# locked-title=no
# font=APL386 Unicode:size=8
font=Fira Code Nerd Font:size=12
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
# font-size-adjustment=0.5
# line-height=<font metrics>
# letter-spacing=0
# horizontal-letter-offset=0
# vertical-letter-offset=0
# underline-offset=<font metrics>
# underline-thickness=<font underline thickness>
# box-drawings-uses-font-glyphs=no
# dpi-aware=auto
# initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
pad=15x15 center # optionally append 'center'
# resize-delay-ms=100
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
# bold-text-in-bright=no
# word-delimiters=,│`|:"'()[]{}<>
# selection-target=primary
# workers=<number of logical CPUs>
# utempter=/usr/lib/utempter/utempter
[environment]
# name=value
[bell]
urgent=no
notify=no
command-focused=no
[scrollback]
lines=100000
# multiplier=3.0
# indicator-position=relative
# indicator-format=""
[url]
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols=http, https, ftp, ftps, file, gemini, gopher
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
[cursor]
style=block
# color=<inverse foreground/background>
# blink=no
# beam-thickness=1.5
# underline-thickness=<font underline thickness>
[mouse]
hide-when-typing=yes
# alternate-scroll-mode=yes
[colors]
#background=1d2021
background=282828
foreground=ebdbb2
#regular0=282828
regular0=665c54
regular1=cc241d
regular2=98971a
regular3=d79921
regular4=458588
regular5=b16286
regular6=689d6a
regular7=a89984
bright0=928374
bright1=fb4934
bright2=b8bb26
bright3=fabd2f
bright4=83a598
bright5=d3869b
bright6=8ec07c
bright7=ebdbb2
# alpha=1.0
# background=002b36
# foreground=839496
## Misc colors
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3> # black-on-yellow
# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue
# search-box-no-match=<regular0> <regular1> # black-on-red
# search-box-match=<regular0> <regular3> # black-on-yellow
# urls=<regular3>
[csd]
# preferred=server
# size=26
# font=<primary font>
# color=<foreground color>
# hide-when-typing=no
# border-width=0
# border-color=<csd.color>
# button-width=26
# button-color=<background color>
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[key-bindings]
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# clipboard-copy=Control+Shift+c XF86Copy
# clipboard-paste=Control+Shift+v XF86Paste
# primary-paste=Shift+Insert
# search-start=Control+Shift+r
# font-increase=Control+plus Control+equal Control+KP_Add
# font-decrease=Control+minus Control+KP_Subtract
# font-reset=Control+0 Control+KP_0
# spawn-terminal=Control+Shift+n
# minimize=none
# maximize=none
# fullscreen=none
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-selected=[xargs -r firefox] none
# show-urls-launch=Control+Shift+u
# show-urls-copy=none
# show-urls-persistent=none
# prompt-prev=Control+Shift+z
# prompt-next=Control+Shift+x
# unicode-input=none
# noop=none
[search-bindings]
# cancel=Control+g Control+c Escape
# commit=Return
# find-prev=Control+r
# find-next=Control+s
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Mod1+BackSpace Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
# extend-to-word-boundary=Control+w
# extend-to-next-whitespace=Control+Shift+w
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
# primary-paste=Shift+Insert
# unicode-input=none
[url-bindings]
# cancel=Control+g Control+c Control+d Escape
# toggle-url-visible=t
[text-bindings]
# \x03=Mod4+c # Map Super+c -> Ctrl+c
[mouse-bindings]
# selection-override-modifiers=Shift
# primary-paste=BTN_MIDDLE
# select-begin=BTN_LEFT
# select-begin-block=Control+BTN_LEFT
# select-extend=BTN_RIGHT
# select-extend-character-wise=Control+BTN_RIGHT
# select-word=BTN_LEFT-2
# select-word-whitespace=Control+BTN_LEFT-2
# select-row=BTN_LEFT-3
# vim: ft=dosini

46
git/.gitconfig Normal file
View file

@ -0,0 +1,46 @@
[user]
email = dev@elkowar.dev
name = elkowar
[include]
path = ~/.gitconfig.local
[credential]
helper = store
[core]
autocrlf = input
pager = delta
[pull]
rebase = false
[github]
user = ElKowar
;[diff]
;external = "difft"
[delta]
syntax-theme = gruvbox
features = side-by-side line-numbers decorations navigate
[delta "line-numbers"]
line-numbers-left-style = cyan
[init]
defaultBranch = master
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[commit]
gpgsign = true
[alias]
c = commit --verbose
s = status -s
d = diff
ds = diff --stat
dc = diff --cached
dn = diff --numstat
ss = status
a = add
[push]
autoSetupRemote = true
default = current

View file

@ -0,0 +1,15 @@
[Settings]
gtk-theme-name=gruvbox-phocus
gtk-icon-theme-name=oomox-materia-dark
gtk-font-name=xos4 Terminus
gtk-menu-images=1
gtk-xft-hinting=1
gtk-xft-rgba=rgb
gtk-application-prefer-dark-theme=1
gtk-decoration-layout=":"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-enable-input-feedback-sounds=0
gtk-button-images=1
gtk-cursor-theme-size=0
gtk-cursor-theme-name=phinger-cursors-light

View file

@ -0,0 +1,161 @@
monitor=,preferred,auto,1
exec-once = swaybg -m fill --image /home/leon/Pictures/green_leaves.jpg & mako
env = $WOBSOCK,$XDG_RUNTIME_DIR/wob.sock
exec-once = mkfifo $WOBSOCK && tail -f $WOBSOCK | wob
exec-once = eww open bar
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# Some default env vars.
env = XCURSOR_SIZE,24
input {
kb_layout = us
kb_variant =
kb_model =
kb_options = compose:ralt
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
gaps_in = 5
gaps_out = 10
border_size = 1
col.active_border = rgba(8ec07cff)
col.inactive_border = rgba(595959aa)
layout = dwindle
}
decoration {
rounding = 0
blur = no
blur_size = 3
blur_passes = 1
blur_new_optimizations = on
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 2, myBezier
animation = windowsOut, 1, 2, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 2, default
animation = workspaces, 1, 2, default
}
dwindle {
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
new_is_master = true
}
gestures {
workspace_swipe = on
workspace_swipe_create_new = on
}
device:epic mouse V1 {
sensitivity = -0.5
}
bind = SUPER SHIFT, S, exec, grim -g "$(slurp)" - | wl-copy
bind = SUPER, Return, exec, foot
bind = SUPER SHIFT, B, exec, google-chrome-stable --enable-features=TouchpadOverscrollHistoryNavigation
bind = SUPER, Q, killactive,
bind = SUPER, M, exit,
bind = SUPER, g, togglefloating,
bind = SUPER SHIFT, P, exec, rofi -show drun
bind = SUPER, P, pseudo, # dwindle
bind = SUPER, v, togglesplit, # dwindle
bind = SUPER, f, fullscreen, 1 # dwindle
bind = SUPER SHIFT, f, fullscreen, 0 # dwindle
bind = ,XF86AudioRaiseVolume, exec, pamixer -ui 2 && pamixer --get-volume > $WOBSOCK
bind = ,XF86AudioLowerVolume, exec, pamixer -ud 2 && pamixer --get-volume > $WOBSOCK
bind = ,XF86AudioMute, exec, pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK
bind = ,XF86MonBrightnessDown, exec, brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' | tee /tmp/brightness > $WOBSOCK
bind = ,XF86MonBrightnessUp, exec, brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p' | tee /tmp/brightness > $WOBSOCK
bind = SUPER, t, togglegroup
bind = SUPER, tab, changegroupactive, f
bind = SUPER SHIFT, tab, changegroupactive, b
bind = SUPER CONTROL SHIFT, h, moveintogroup, l
bind = SUPER CONTROL SHIFT, l, moveintogroup, r
bind = SUPER CONTROL SHIFT, k, moveintogroup, u
bind = SUPER CONTROL SHIFT, j, moveintogroup, d
bind = SUPER CONTROL SHIFT, n, moveoutofgroup
bind = SUPER, h, movefocus, l
bind = SUPER, l, movefocus, r
bind = SUPER, k, movefocus, u
bind = SUPER, j, movefocus, d
bind = SUPER SHIFT, h, movewindow, l
bind = SUPER SHIFT, l, movewindow, r
bind = SUPER SHIFT, k, movewindow, u
bind = SUPER SHIFT, j, movewindow, d
bind = SUPER CONTROL, h, resizeactive, -50 0
bind = SUPER CONTROL, l, resizeactive, 50 0
bind = SUPER CONTROL, k, resizeactive, 0 -50
bind = SUPER CONTROL, j, resizeactive, 0 50
# SwitcSUPERaces with mainMod + [0-9]
bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3
bind = SUPER, 4, workspace, 4
bind = SUPER, 5, workspace, 5
bind = SUPER, 6, workspace, 6
bind = SUPER, 7, workspace, 7
bind = SUPER, 8, workspace, 8
bind = SUPER, 9, workspace, 9
bind = SUPER, 0, workspace, 10
# Move SUPERindow to a workspace with mainMod + SHIFT + [0-9]
bind = SUPER SHIFT, 1, movetoworkspace, 1
bind = SUPER SHIFT, 2, movetoworkspace, 2
bind = SUPER SHIFT, 3, movetoworkspace, 3
bind = SUPER SHIFT, 4, movetoworkspace, 4
bind = SUPER SHIFT, 5, movetoworkspace, 5
bind = SUPER SHIFT, 6, movetoworkspace, 6
bind = SUPER SHIFT, 7, movetoworkspace, 7
bind = SUPER SHIFT, 8, movetoworkspace, 8
bind = SUPER SHIFT, 9, movetoworkspace, 9
bind = SUPER SHIFT, 0, movetoworkspace, 10
# ScrolSUPERh existing workspaces with mainMod + scroll
bind = SUPER, mouse_down, workspace, e+1
bind = SUPER, mouse_up, workspace, e-1
# Move/SUPERindows with mainMod + LMB/RMB and dragging
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow

View file

@ -0,0 +1,2 @@
preload = /home/leon/Pictures/green_leaves.jpg
wallpaper = monitor,/home/leon/Pictures/green_leaves.jpg

View file

@ -0,0 +1,102 @@
;; (deflayer name
;; _ _ _ _ _ _ _ _ _ _ _ _ _
;; _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
;; _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
;; _ _ _ _ _ _ _ _ _ _ _ _ _
;; _ _ _ _ _ _ _ _ _ _ _ _ _ _
;; _ _ _ _ _ _ _ _ _ _ _
;; )
(defcfg
linux-dev /dev/input/by-path/platform-i8042-serio-0-event-kbd
fallthrough true
)
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ssrq slck pause
grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup
tab q w e r t y u i o p [ ] ret del end pgdn
caps a s d f g h j k l scln ' \
lsft 102d z x c v b n m , . / rsft up
lctl lmet lalt spc ralt rctl left down rght
)
(deflayer base
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ssrq slck pause
grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup
@tab q w e r t @cy @cu @ci @co @cp [ + ret del end pgdn
@cps @ca @cs @cd @cf g @ch @cj k @cl scln ' \
lsft 102d z x c v b n m , . / rsft up
lctl lmet lalt spc ralt ralt left down rght
)
(defalias
ca (chord chords a)
cs (chord chords s)
cd (chord chords d)
cf (chord chords f)
cy (chord chords y)
cu (chord chords u)
co (chord chords o)
cp (chord chords p)
ch (chord chords h)
ci (chord chords i)
cj (chord chords j)
cl (chord chords l)
)
(defchords chords 100
(a) a
(s) s
(d) d
(f) f
(h) h
(i) i
(j) j
(l) l
(y) y
(u) u
(o) o
(p) p
(y p) (macro = S-.)
(u i o) @uml-u
(i o p) @uml-o
(a s d) @uml-a
(s d f) @uml-s
(h j) (macro S-scln S-scln)
(j i) (macro - S-.)
(j l) C-bspc)
(defalias
cps (tap-hold-release 200 200 esc (layer-toggle symbols))
tab (tap-hold-release 200 200 tab (layer-toggle umls))
s-sft (tap-hold-release 150 150 s lsft)
l-sft (tap-hold-release 150 150 l lsft)
uml-a (macro ralt S-apos a)
uml-o (macro ralt S-apos o)
uml-u (macro ralt S-apos u)
uml-s (macro ralt s s)
)
(deflayer symbols
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ S-1 S-apos / \ _ S-[ [ ] S-] _ S-8 _ _ _ _
_ home S-4 S-9 S-0 end left down up rght S-7 S-5 _
_ _ S-\ del S-/ S-` _ = S-3 bspc _ _ _ _
_ _ _ _ _ _ _ _ _
)
(deflayer umls
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ lrld _ _ @uml-u _ @uml-o _ _ _ _ _ _ _
_ @uml-a @uml-s _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _
)

View file

@ -0,0 +1,396 @@
{
"title": "Vimode with smart caps",
"maintainers": [
"Lance1o7"
],
"rules": [
{
"description": "CAPSLOCK + hjkl to arrow keys (Post ESCAPE if press CAPSLOCK alone)",
"manipulators": [
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "h",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 0
}
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
},
{
"description": "Post CAPSLOCK if press ESCAPE alone",
"manipulators": [
{
"from": {
"key_code": "escape",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "escape pressed",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "escape pressed",
"value": 0
}
}
],
"to_if_alone": [
{
"key_code": "caps_lock"
}
],
"type": "basic"
}
]
},
{
"description": "Change left_shift + Command_L to escape only if pressed at the same time.",
"manipulators": [
{
"from": {
"key_code": "left_command",
"modifiers": {
"mandatory": [
"left_shift"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "escape"
}
],
"to_if_alone": [
{
"key_code": "left_command"
}
],
"type": "basic"
}
]
},
{
"description": "Post COMMAND + A/C/V/X/Z to, when CAPSLOCK + A/C/V/X/Z is pressed",
"manipulators": [
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "a",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "a",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "c",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "c",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "v",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "v",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "w",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "w",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "x",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "x",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "z",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "z",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 0
}
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
}
]
}

View file

@ -0,0 +1,183 @@
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{
"manipulators": [
{
"description": "Change caps_lock to command+control+option+shift.",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_shift",
"modifiers": [
"left_command",
"left_control",
"left_option"
]
}
],
"type": "basic"
}
]
}
]
},
"devices": [],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": [
{
"consumer_key_code": "display_brightness_decrement"
}
]
},
{
"from": {
"key_code": "f2"
},
"to": [
{
"consumer_key_code": "display_brightness_increment"
}
]
},
{
"from": {
"key_code": "f3"
},
"to": [
{
"apple_vendor_keyboard_key_code": "mission_control"
}
]
},
{
"from": {
"key_code": "f4"
},
"to": [
{
"apple_vendor_keyboard_key_code": "spotlight"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"consumer_key_code": "dictation"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"key_code": "f6"
}
]
},
{
"from": {
"key_code": "f7"
},
"to": [
{
"consumer_key_code": "rewind"
}
]
},
{
"from": {
"key_code": "f8"
},
"to": [
{
"consumer_key_code": "play_or_pause"
}
]
},
{
"from": {
"key_code": "f9"
},
"to": [
{
"consumer_key_code": "fast_forward"
}
]
},
{
"from": {
"key_code": "f10"
},
"to": [
{
"consumer_key_code": "mute"
}
]
},
{
"from": {
"key_code": "f11"
},
"to": [
{
"consumer_key_code": "volume_decrement"
}
]
},
{
"from": {
"key_code": "f12"
},
"to": [
{
"consumer_key_code": "volume_increment"
}
]
}
],
"name": "Default profile",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"country_code": 0,
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100
}
}
]
}

View file

@ -0,0 +1,199 @@
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": []
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 832,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 832,
"vendor_id": 1452
},
"ignore": true,
"manipulate_caps_lock_led": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 34304,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
}
],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": [
{
"consumer_key_code": "display_brightness_decrement"
}
]
},
{
"from": {
"key_code": "f2"
},
"to": [
{
"consumer_key_code": "display_brightness_increment"
}
]
},
{
"from": {
"key_code": "f3"
},
"to": [
{
"apple_vendor_keyboard_key_code": "mission_control"
}
]
},
{
"from": {
"key_code": "f4"
},
"to": [
{
"apple_vendor_keyboard_key_code": "spotlight"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"consumer_key_code": "dictation"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"key_code": "f6"
}
]
},
{
"from": {
"key_code": "f7"
},
"to": [
{
"consumer_key_code": "rewind"
}
]
},
{
"from": {
"key_code": "f8"
},
"to": [
{
"consumer_key_code": "play_or_pause"
}
]
},
{
"from": {
"key_code": "f9"
},
"to": [
{
"consumer_key_code": "fast_forward"
}
]
},
{
"from": {
"key_code": "f10"
},
"to": [
{
"consumer_key_code": "mute"
}
]
},
{
"from": {
"key_code": "f11"
},
"to": [
{
"consumer_key_code": "volume_decrement"
}
]
},
{
"from": {
"key_code": "f12"
},
"to": [
{
"consumer_key_code": "volume_increment"
}
]
}
],
"name": "Default profile",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"country_code": 0,
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100
}
}
]
}

View file

@ -0,0 +1,696 @@
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{
"description": "CAPSLOCK + hjkl to arrow keys (Post ESCAPE if press CAPSLOCK alone)",
"manipulators": [
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "h",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "a",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "home"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "g",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "end"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "d",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"modifiers": [
"shift"
],
"key_code": "9"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"modifiers": [
"shift"
],
"key_code": "0"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "u",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"modifiers": [
"shift"
],
"key_code": "open_bracket"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "p",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"modifiers": [
"shift"
],
"key_code": "close_bracket"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "i",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "open_bracket"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "o",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "close_bracket"
}
],
"type": "basic"
},
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 0
}
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "x",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_forward"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "n",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_or_backspace"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "r",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "slash"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "t",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "backslash"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "e",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"modifiers": [
"shift"
],
"key_code": "quote"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "semicolon",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"modifiers": [
"shift"
],
"key_code": "7"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "quote",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"modifiers": [
"shift"
],
"key_code": "5"
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 832,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 832,
"vendor_id": 1452
},
"ignore": true,
"manipulate_caps_lock_led": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 34304,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
}
],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": [
{
"consumer_key_code": "display_brightness_decrement"
}
]
},
{
"from": {
"key_code": "f2"
},
"to": [
{
"consumer_key_code": "display_brightness_increment"
}
]
},
{
"from": {
"key_code": "f3"
},
"to": [
{
"apple_vendor_keyboard_key_code": "mission_control"
}
]
},
{
"from": {
"key_code": "f4"
},
"to": [
{
"apple_vendor_keyboard_key_code": "spotlight"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"consumer_key_code": "dictation"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"key_code": "f6"
}
]
},
{
"from": {
"key_code": "f7"
},
"to": [
{
"consumer_key_code": "rewind"
}
]
},
{
"from": {
"key_code": "f8"
},
"to": [
{
"consumer_key_code": "play_or_pause"
}
]
},
{
"from": {
"key_code": "f9"
},
"to": [
{
"consumer_key_code": "fast_forward"
}
]
},
{
"from": {
"key_code": "f10"
},
"to": [
{
"consumer_key_code": "mute"
}
]
},
{
"from": {
"key_code": "f11"
},
"to": [
{
"consumer_key_code": "volume_decrement"
}
]
},
{
"from": {
"key_code": "f12"
},
"to": [
{
"consumer_key_code": "volume_increment"
}
]
}
],
"name": "Default profile",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"country_code": 0
},
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100
}
]
}

View file

@ -0,0 +1,249 @@
global:
ask_for_confirmation_before_quitting: true
check_for_updates_on_startup: true
show_in_menu_bar: true
show_profile_name_in_menu_bar: false
unsafe_ui: false
profiles:
- complex_modifications:
parameters:
basic.simultaneous_threshold_milliseconds: 50
basic.to_delayed_action_delay_milliseconds: 500
basic.to_if_alone_timeout_milliseconds: 1000
basic.to_if_held_down_threshold_milliseconds: 500
mouse_motion_to_scroll.speed: 100
rules:
- description: CAPSLOCK + hjkl to arrow keys (Post ESCAPE if press CAPSLOCK alone)
manipulators:
- conditions: &conds
- name: caps_lock pressed
type: variable_if
value: 1
from:
key_code: j
modifiers: { optional: [any] }
to: [{ key_code: down_arrow } ]
type: basic
- conditions: *conds
from:
key_code: k
modifiers: { optional: [any] }
to: [{key_code: up_arrow}]
type: basic
- conditions: *conds
from:
key_code: h
modifiers: { optional: [any] }
to: [{ key_code: left_arrow }]
type: basic
- conditions: *conds
from:
key_code: l
modifiers: { optional: [any] }
to: [{key_code: right_arrow } ]
type: basic
- conditions: *conds
from:
key_code: a
modifiers: { optional: [any] }
to: [ { key_code: home } ]
type: basic
- conditions: *conds
from:
key_code: g
modifiers: { optional: [any] }
to: [ { key_code: end } ]
type: basic
- conditions: *conds
from:
key_code: d
modifiers: { optional: [any] }
to:
- modifiers: [shift ]
key_code: '9'
type: basic
- conditions: *conds
from:
key_code: f
modifiers: { optional: [any] }
to:
- modifiers: [shift]
key_code: '0'
type: basic
- conditions: *conds
from:
key_code: u
modifiers: { optional: [any] }
to:
- modifiers: [ shift ]
key_code: open_bracket
type: basic
- conditions: *conds
from:
key_code: p
modifiers: { optional: [any] }
to:
- modifiers: [ shift ]
key_code: close_bracket
type: basic
- conditions: *conds
from:
key_code: i
modifiers: { optional: [any] }
to: [ { key_code: open_bracket } ]
type: basic
- conditions: *conds
from:
key_code: o
modifiers: { optional: [any] }
to: [ { key_code: close_bracket } ]
type: basic
- from:
key_code: caps_lock
modifiers: { optional: [any] }
to:
- set_variable:
name: caps_lock pressed
value: 1
to_after_key_up:
- set_variable:
name: caps_lock pressed
value: 0
to_if_alone:
- key_code: escape
type: basic
- conditions: *conds
from:
key_code: 'x'
modifiers: { optional: [any] }
to: [ { key_code: delete_forward } ]
type: basic
- conditions: *conds
from:
key_code: 'n'
modifiers: { optional: [any] }
to: [ { key_code: delete_or_backspace } ]
type: basic
- conditions: *conds
from:
key_code: 'e'
modifiers: { optional: [any] }
to: [ { key_code: quote, modifiers: ["shift"] } ]
type: basic
- conditions: *conds
from:
key_code: 'r'
modifiers: { optional: [any] }
to: [ { key_code: slash } ]
type: basic
- conditions: *conds
from:
key_code: 't'
modifiers: { optional: [any] }
to: [ { key_code: backslash } ]
type: basic
- conditions: *conds
from:
key_code: 'semicolon'
modifiers: { optional: [any] }
to: [ { modifiers: [shift], key_code: '7' } ]
type: basic
- conditions: *conds
from:
key_code: 'quote'
modifiers: { optional: [any] }
to: [ { modifiers: [shift], key_code: '5' } ]
type: basic
devices:
- disable_built_in_keyboard_if_exists: false
fn_function_keys: []
identifiers:
is_keyboard: true
is_pointing_device: false
product_id: 832
vendor_id: 1452
ignore: false
manipulate_caps_lock_led: true
simple_modifications: []
treat_as_built_in_keyboard: false
- disable_built_in_keyboard_if_exists: false
fn_function_keys: []
identifiers:
is_keyboard: false
is_pointing_device: true
product_id: 832
vendor_id: 1452
ignore: true
manipulate_caps_lock_led: false
simple_modifications: []
treat_as_built_in_keyboard: false
- disable_built_in_keyboard_if_exists: false
fn_function_keys: []
identifiers:
is_keyboard: true
is_pointing_device: false
product_id: 34304
vendor_id: 1452
ignore: false
manipulate_caps_lock_led: true
simple_modifications: []
treat_as_built_in_keyboard: false
fn_function_keys:
- from:
key_code: f1
to:
- consumer_key_code: display_brightness_decrement
- from:
key_code: f2
to:
- consumer_key_code: display_brightness_increment
- from:
key_code: f3
to:
- apple_vendor_keyboard_key_code: mission_control
- from:
key_code: f4
to:
- apple_vendor_keyboard_key_code: spotlight
- from:
key_code: f5
to:
- consumer_key_code: dictation
- from:
key_code: f6
to:
- key_code: f6
- from:
key_code: f7
to:
- consumer_key_code: rewind
- from:
key_code: f8
to:
- consumer_key_code: play_or_pause
- from:
key_code: f9
to:
- consumer_key_code: fast_forward
- from:
key_code: f10
to:
- consumer_key_code: mute
- from:
key_code: f11
to:
- consumer_key_code: volume_decrement
- from:
key_code: f12
to:
- consumer_key_code: volume_increment
name: Default profile
parameters:
delay_milliseconds_before_open_device: 1000
selected: true
simple_modifications: []
virtual_hid_keyboard:
country_code: 0
indicate_sticky_modifier_keys_state: true
mouse_key_xy_scale: 100

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,740 @@
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{
"description": "CAPSLOCK + hjkl to arrow keys (Post ESCAPE if press CAPSLOCK alone)",
"manipulators": [
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "h",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "a",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "home"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "g",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "end"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "d",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "9",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "0",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "u",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "open_bracket",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "p",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "close_bracket",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "i",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "open_bracket"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "o",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "close_bracket"
}
],
"type": "basic"
},
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 0
}
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "x",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_forward"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "n",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_or_backspace"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "r",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "slash"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "t",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "backslash"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "e",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "quote",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "semicolon",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "7",
"modifiers": [
"shift"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "quote",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "5",
"modifiers": [
"shift"
]
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 832,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 832,
"vendor_id": 1452
},
"ignore": true,
"manipulate_caps_lock_led": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 34304,
"vendor_id": 1452
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 50484,
"vendor_id": 1133
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 50484,
"vendor_id": 1133
},
"ignore": true,
"manipulate_caps_lock_led": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 8775,
"vendor_id": 1008
},
"ignore": false,
"manipulate_caps_lock_led": true,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
}
],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": [
{
"consumer_key_code": "display_brightness_decrement"
}
]
},
{
"from": {
"key_code": "f2"
},
"to": [
{
"consumer_key_code": "display_brightness_increment"
}
]
},
{
"from": {
"key_code": "f3"
},
"to": [
{
"apple_vendor_keyboard_key_code": "mission_control"
}
]
},
{
"from": {
"key_code": "f4"
},
"to": [
{
"apple_vendor_keyboard_key_code": "spotlight"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"consumer_key_code": "dictation"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"key_code": "f6"
}
]
},
{
"from": {
"key_code": "f7"
},
"to": [
{
"consumer_key_code": "rewind"
}
]
},
{
"from": {
"key_code": "f8"
},
"to": [
{
"consumer_key_code": "play_or_pause"
}
]
},
{
"from": {
"key_code": "f9"
},
"to": [
{
"consumer_key_code": "fast_forward"
}
]
},
{
"from": {
"key_code": "f10"
},
"to": [
{
"consumer_key_code": "mute"
}
]
},
{
"from": {
"key_code": "f11"
},
"to": [
{
"consumer_key_code": "volume_decrement"
}
]
},
{
"from": {
"key_code": "f12"
},
"to": [
{
"consumer_key_code": "volume_increment"
}
]
}
],
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100,
"name": "Default profile",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"country_code": 0,
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100
}
}
]
}

View file

@ -0,0 +1,199 @@
function manipulators(): Array<Mapping> {
return [
// Raise binds
bindWithMods(["left_option", "left_cmd"], "t", raise("Teams")),
// movement
bindCaps("h", press("left_arrow")),
bindCaps("j", press("down_arrow")),
bindCaps("k", press("up_arrow")),
bindCaps("l", press("right_arrow")),
bindCaps("a", press("home")),
bindCaps("g", press("end")),
// umlauts
bind(["a", "s", "d"], umlaut("a")),
bind(["k", "l", "semicolon"], umlaut("o")),
bind(["i", "o", "p"], umlaut("u")),
bind(["s", "d", "f"], [press("s", ["left_option"]), press("vk_none")]),
bind(["f", "a", "s", "d"], umlaut("a", true)),
bind(["j", "k", "l", "semicolon"], umlaut("o", true)),
bind(["j", "i", "o", "p"], umlaut("u", true)),
bind(["j", "l"], press("delete_or_backspace", ["left_option"])),
bindCaps("d", press("9", ["shift"])),
bindCaps("f", press("0", ["shift"])),
bindCaps("u", press("open_bracket", ["shift"])),
bindCaps("p", press("close_bracket", ["shift"])),
bindCaps("i", press("open_bracket")),
bindCaps("o", press("close_bracket")),
bindCaps("x", press("delete_forward")),
bindCaps("n", press("delete_or_backspace")),
bindCaps("r", press("slash")),
bindCaps("t", press("backslash")),
bindCaps("e", press("quote", ["shift"])),
bindCaps("semicolon", press("7", ["shift"])),
bindCaps("quote", press("5", ["shift"])),
{
from: from("caps_lock"),
to: setVariable("caps_lock pressed", 1),
to_after_key_up: setVariable("caps_lock pressed", 0),
to_if_alone: [press("escape")],
type: "basic",
},
];
}
function fn_function_keys(): Array<Mapping> {
return [
bind("f1", toConsumer("display_brightness_decrement")),
bind("f2", toConsumer("display_brightness_increment")),
bind("f3", toApple("mission_control")),
bind("f4", toApple("spotlight")),
bind("f5", toConsumer("dictation")),
bind("f6", press("f6")),
bind("f7", toConsumer("rewind")),
bind("f8", toConsumer("play_or_pause")),
bind("f9", toConsumer("fast_forward")),
bind("f10", toConsumer("mute")),
bind("f11", toConsumer("volume_decrement")),
bind("f12", toConsumer("volume_increment")),
];
}
function generate() {
const rules = [{
description: "CAPSLOCK + hjkl to arrow keys",
manipulators: manipulators(),
}];
return {
global: {
ask_for_confirmation_before_quitting: true,
check_for_updates_on_startup: true,
show_in_menu_bar: true,
show_profile_name_in_menu_bar: false,
unsafe_ui: false,
},
profiles: [
{
complex_modifications: {
parameters: {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100,
},
rules,
},
fn_function_keys: fn_function_keys(),
indicate_sticky_modifier_keys_state: true,
mouse_key_xy_scale: 100,
name: "Default profile",
parameters: { delay_milliseconds_before_open_device: 1000 },
selected: true,
simple_modifications: [],
virtual_hid_keyboard: {
country_code: 0,
indicate_sticky_modifier_keys_state: true,
mouse_key_xy_scale: 100,
},
devices: [],
},
],
};
}
console.log(JSON.stringify(generate(), null, 2));
// Helpers and types
type Condition = { name: string; type: string; value: number };
type From =
| { key_code: string; modifiers: { optional: string[] } }
| { simultaneous: { key_code: string }[]; modifiers: { optional: string[] } };
type ToAction =
| { key_code: string; modifiers?: string[] }
| { consumer_key_code: string; modifiers?: string[] }
| { apple_vendor_keyboard_key_code: string; modifiers?: string[] }
| { set_variable: { name: string; value: number } };
type To = Array<ToAction>;
type Mapping = {
conditions?: Condition[];
from: From;
to: To;
to_after_key_up?: To;
to_if_alone?: To;
type: "basic";
};
function from(key: string | string[], optional: string[] = ["any"], mandatory: string[] = []): From {
if (typeof key === "string") {
return { key_code: key, modifiers: { optional, mandatory } };
} else if (Array.isArray(key)) {
return {
simultaneous: key.map((x) => ({ key_code: x })),
modifiers: { optional },
};
} else {
throw new Error("Invalid key type");
}
}
function umlaut(letter: string, capital: boolean = false): To {
return [
press("u", ["left_option"]),
press(letter, capital ? ["left_shift"] : []),
press("vk_none"),
];
}
function press(key: string, mods: string[] = []): ToAction {
return { key_code: key, modifiers: mods };
}
function toConsumer(key: string): To {
return [{ consumer_key_code: key }];
}
function toApple(key: string): To {
return [{ apple_vendor_keyboard_key_code: key }];
}
function bind(
f: string | string[],
to: ToAction | To,
when: Condition[] = [],
): Mapping {
const toValue = Array.isArray(to) ? to : [to];
return { conditions: when, from: from(f), to: toValue, type: "basic" };
}
function bindWithMods(
f: string | string[],
mods: string[],
to: ToAction | To,
when: Condition[] = [],
): Mapping {
const toValue = Array.isArray(to) ? to : [to];
return { conditions: when, from: from(f, [], mods), to: toValue, type: "basic" };
}
function bindCaps(from: string | string[], to: ToAction | To): Mapping {
const capsCondition: Condition = {
name: "caps_lock pressed",
type: "variable_if",
value: 1,
};
return bind(from, to, [capsCondition]);
}
function setVariable(name: string, value: number): To {
return [{ set_variable: { name, value } }];
}

View file

@ -0,0 +1,5 @@
#!/bin/sh
deno run ./karabiner.ts > karabiner.json
# yq -o=json config.yaml > karabiner.json

View file

@ -0,0 +1,72 @@
#|
(deflayer name
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _
)
-------------------------------------------------------------------------- |#
(defcfg
input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
output (uinput-sink "KMonad")
fallthrough true
allow-cmd true
)
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ssrq slck pause
grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup
tab q w e r t y u i o p [ ] ret del end pgdn
caps a s d f g h j k l ; ' \
lsft 102d z x c v b n m , . - rsft up
lctl lmet lalt spc ralt rctl cmp rctl left down rght
)
(deflayer base
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ssrq slck pause
grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup
@tab q w e r t y u i o p [ + ret del end pgdn
@cps a s d f g h j k l ; ' \
lsft 102d z x c v b n m , . / rsft up
lctl lmet lalt spc ralt ralt cmp rctl left down rght
)
(defalias
cps (tap-hold-next-release 200 esc (layer-toggle symbols))
tab (tap-hold-next-release 200 tab (layer-toggle umls))
s-sft (tap-hold-next-release 150 s lsft)
l-sft (tap-hold-next-release 150 l lsft)
uml-a #(ralt " a)
uml-o #(ralt " o)
uml-u #(ralt " u)
uml-s #(ralt s s)
excl (around lsft 1)
)
(deflayer symbols
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ @excl " / \\ _ { [ ] } _ * _ _ _ _
_ home $ \( \) end left down up right & % _
_ _ | delete ? ~ _ = # bspc _ #(~ /) _ _
_ _ _ _ _ _ _ _ _ _ _
)
(deflayer umls
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ @uml-u _ @uml-o _ _ _ _ _ _ _
_ @uml-a @uml-s _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _
)

View file

@ -0,0 +1,165 @@
Machine
Actor-Scripting-Spiele
SHENZEN
TIS
Assemblysprachen
MMO-Strategiespiel
Screeps
Robocode
Combat
while True: learn()
Actor-Scripting-Spielen
while
True
learn
goto
while-Schleifen
Konditionalblöcke
bibliotheksinternen
spieleigene
spieleigenen
Scripture
Gameengine
GoTo
Instruktionssprünge
Humans
Summentyps
id
AStStmt
Expr-Objekten
StmtSideEffect
AstStmt
Summentyp
Expr
programmdefinierten
Bytecodeevaluation
Bytecoderepräsentation
Bytecodes
Bytecodedarstellung
Debug
Instruktionslisten
Instruktionsliste
Reduktionsschritte
Datentransformationssysteme
Akteurverhalten
CryEngine
Gameengines
Zachtronics
Engines
Kowarschick
itch.io
Indiespielentwickler
Instruktionsblöcken
Instruktionsketten
Instruktionszeiger
Runtimeobjekt
Instruktionszähler
Bytecodeinterpreter
Bytecodeoperationen
Lightbot
blockbasierte
Blockbasierte
blockbasierten
skriptbasierten
Bytecodeinstruktionen
Compilertechniken
Compilerstruktur
Zach
Skriptbasierte
rasterbasierte
feldweise
Bytecodedarstellungen
Tree-walk
Bytecodecompiler
ASTs
Parsern
Tree
Kindelemente
LLVM-Compiler
LLVM-Projekt
LLVM-IR
Clang
LLVM-Projekts
Bytecodezwischensprache
Bytecodeprogramme
Jsofocaml
maschinencodeähnlichen
Typüberprüfung
bytecodeähnliche
Reduktionsschritten
intermediate
Transpiler
Plattformabdeckung
Transpiliert
Compileroptimierungen
Compiler-Backends
transpiliert
Kompilationsprozesses
Kompilationsschritte
Performanzvorteile
Kompilationsprozess
literale
spielspezifische
Integrated
Typkonvertierungen
Typkonvertierung
Literalsyntax
literalen
Typsynthese
spieldefinierten
Markerinterface
Programmvalidierung
Instruktionskonstrukte
Typkorrektheit
literaler
spieldefinierte
Konditionalblocks
Summentypen
Konditionaloperator
Ahead-of-time
bytecodeartige
bytecodeartigen
spielinternen
Typsyntheseprozess
Konditionalblöcken
bibliotheksinterne
Typkonstrukten
Tilemap
Dropdowns
Scrollelemente
Komponentensystem
Prefabs
Instruktionskomponenten
Instruktionsblöcke
mausbasierte
Datensammlungstypen
HashMaps
skriptbasierte
summentypbasierten
Typarumente
Typargumente
spielspezifischen
datenzentriert
operationszentriert
datenzentrierten
operationszentrierte
Fokusses
Konditionalkonstrukte
Testframework
Instruktionsaufruf
Typüberprüfungsfunktionalität
Akteurposition
nichtlexikalen
lexikale
Editorabschnitt
Editoransätze
fsdocs
Assembly
Allan
Blomquist
Zachary
Parser-
Tileset
scrollbar
Bytecodeformate
Plattformern

View file

@ -0,0 +1,5 @@
GERMAN_WORD_REPEAT_RULE
DE_SENTENCE_WHITESPACE
EINHEIT_LEERZEICHEN
COMMA_PARENTHESIS_WHITESPACE
TOO_LONG_SENTENCE_DE

View file

@ -0,0 +1,62 @@
{"rule":"GERMAN_WORD_REPEAT_RULE","sentence":"^\\QIn Spielen wie Human Resource Machine \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q und Tuk Tuk \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q nutzt der Spieler eine klassische Skriptsprache, in welcher meist Akteure innerhalb der Spielwelt direkt über entsprechende Instruktionen kontrolliert werden.\\E$"}
{"rule":"COMMA_PARENTHESIS_WHITESPACE","sentence":"^\\QWas ist .\\E$"}
{"rule":"DOPPELTE_SATZZEICHEN","sentence":"^\\QWarum F?.\\E$"}
{"rule":"COMMA_PARENTHESIS_WHITESPACE","sentence":"^\\QDie Gameengine Unity baut auf dem .NET-Ökosystem auf.\\E$"}
{"rule":"PRAEP_DAT","sentence":"^\\QDa auch F-Bibliotheken problemlos in C-Projekte eingebunden werden können, wurde für die Implementierung von die Programmiersprache F genutzt.\\E$"}
{"rule":"EMPFOHLENE_GETRENNTSCHREIBUNG","sentence":"^\\QIn Spielen mit nichtlinearen Programmstrukturen, wie while True: learn() werden hier die konkreten Werte oft als das Netzwerk durchlaufende Objekte dargestellt.\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QIn dieser Struktur ist auch zu sehen, wie die Programmdarstellung der Bibliothek flexibel erweiterbar ist: Die Variante AstStmt.\\E$"}
{"rule":"DE_SENTENCE_WHITESPACE","sentence":"^\\QExternal enthält, ähnlichw\\E$"}
{"rule":"DE_SENTENCE_WHITESPACE","sentence":"^\\QStmtSideEffect kann eine beliebige Aktion darstellen, welche vom Bibliotheksnutzer als Funktion übergeben werden kann.\\E$"}
{"rule":"DE_SENTENCE_WHITESPACE","sentence":"^\\QExternal enthält hier wieder eine Funktion, welche einen beliebigen primitiven Wert zurückgibt.\\E$"}
{"rule":"PUNCTUATION_PARAGRAPH_END","sentence":"^\\QQuellcode Bytecode\\E$"}
{"rule":"F_ANSTATT_PH","sentence":"^\\QIn while True: learn() wird die Programmstruktur als Graphstruktur visualisiert.\\E$"}
{"rule":"EMPFOHLENE_GETRENNTSCHREIBUNG","sentence":"^\\QSpiele welche sich auf die Gestaltung von Datenflussstrukturen fokussieren, nutzen hierfür meist eine nichtlineare Darstellung.\\E$"}
{"rule":"COMMA_PARENTHESIS_WHITESPACE","sentence":"^\\QDie Gameengines Unity und Godot bauen auf dem .NET-Ökosystem auf.\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QItch.io Zeug\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QErstprüfer: Prof. Dr. Tim Reichert Zweitprüfer: Ulrich Straus\\E$"}
{"rule":"EINHEIT_LEERZEICHEN","sentence":"^\\QLaut Nutzungsdaten von itch.io, einer der beliebtesten Spielportale für Indiespielentwickler, verwenden 77% aller Spiele, welche die genutzte Engine angeben, Unity.\\E$"}
{"rule":"COMMA_PARENTHESIS_WHITESPACE","sentence":"^\\QUm also ein möglichst breites Spektrum an Spielentwicklern ansprechen zu können, but \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q daher auf dem .NET-Ökosystem auf.\\E$"}
{"rule":"COMMA_PARENTHESIS_WHITESPACE","sentence":"^\\QUm also ein möglichst breites Spektrum an Spielentwicklern ansprechen zu können, baut \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q daher auf dem .NET-Ökosystem auf.\\E$"}
{"rule":"EMPFOHLENE_GETRENNTSCHREIBUNG","sentence":"^\\QSpiele mit nichtlinearen Programmiersprachen.\\E$"}
{"rule":"PUNCTUATION_PARAGRAPH_END","sentence":"^\\QSolche Graphstrukturen eignen sich gut, um komplexe mathematische oder logische Berechnungen darzustellen und werden außerhalb von Programmierspielen beispielsweise in visuellen Datenflussprogrammiersprachen wie Pure Data\\E$"}
{"rule":"F_ANSTATT_PH","sentence":"^\\QSolche Graphstrukturen eignen sich gut, um komplexe mathematische oder logische Berechnungen darzustellen und werden außerhalb von Programmierspielen beispielsweise in visuellen Datenflussprogrammiersprachen wie der vor allem für Klangsynthese und Audiosignalverarbeitung eingesetzten Sprache Pure Data oder der Simulationssoftware Simulink eingesetzt.\\E$"}
{"rule":"DE_CASE","sentence":"^\\QDas hier erwartete Interface \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q definiert zwei Funktionen, die ein solcher Ausdruck implementieren muss: [\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q] Generiert eine Textdarstellung des Ausdrucks.\\E$"}
{"rule":"PUNCTUATION_PARAGRAPH_END","sentence":"^\\Q\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q unterscheidet zwischen zwei Oberkategorien von Programmdarstellungen: lineare Darstellungen rekursive Baumdarstellungen\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QAbstract Syntax Trees.\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QEs gibt zwei übliche Möglichkeiten, Bytecodes anzuwenden: Als Zwischendarstellung (Intermediate Representation, \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q)\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QEin weiteres Beispiel für die Verwendung als Zwischendarstellung ist der in \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q Compiler Js_of_ocaml, welcher OCaml-Bytecode in Javascript übersetzt\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QBeim sogenannten constant folding werden beispielsweise Teilausdrücke identifiziert, die keine Nebeneffekte enthalten und nicht auf unbekannte Variablen referenzieren.\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QBeim sogenannten constant folding werden beispielsweise Teilausdrücke identifiziert, die keine Nebeneffekte enthalten und jedes Mal denselben Wert zurückgeben werden \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QEs gibt zwei übliche Möglichkeiten, Bytecodes anzuwenden: als intermediate Representation (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q) oder zur Ausführung in einem Bytecodeinterpreter.\\E$"}
{"rule":"F_ANSTATT_PH","sentence":"^\\QIn \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q wird die Programmstruktur als Graphstruktur visualisiert.\\E$"}
{"rule":"F_ANSTATT_PH","sentence":"^\\QAusdrücke werden in \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q in einer graphbasierten Darstellung bearbeitet, \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q zeigt den Ausdruckseditor in \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}
{"rule":"F_ANSTATT_PH","sentence":"^\\QAusdrücke werden in \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q in einer graphbasierten Darstellung bearbeitet, welche sowohl die Struktur als auch die Evaluation des Ausdrucks visuell darstellt.\\E$"}
{"rule":"F_ANSTATT_PH","sentence":"^\\QIn \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q wird die Programmstruktur als Graphstruktur dargestellt.\\E$"}
{"rule":"DE_CASE","sentence":"^\\QAls Programmierspiele bezeichnet man Spiele, in welchen die Spielenden Programme entwickeln müssen, um im Spiel voranzukommen.\\E$"}
{"rule":"F_ANSTATT_PH","sentence":"^\\QSolche Graphstrukturen eignen sich gut, um komplexe mathematische oder logische Berechnungen darzustellen und werden außerhalb von Programmierspielen beispielsweise in visuellen Datenflussprogrammiersprachen wie der vor allem für Klangsynthese und Audiosignalverarbeitung eingesetzten Sprache \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q oder der Simulationssoftware Simulink eingesetzt.\\E$"}
{"rule":"F_ANSTATT_PH","sentence":"^\\QSolche Graphstrukturen eignen sich gut, um komplexe mathematische oder logische Berechnungen darzustellen und werden außerhalb von Programmierspielen beispielsweise in visuellen Datenflussprogrammiersprachen wie der vor allem für Klangsynthese und Audiosignalverarbeitung eingesetzten Sprache \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q oder der Simulationssoftware \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q eingesetzt.\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QDa keine konkrete Syntax vorgegeben werden soll, setzt \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q hier auf eine strukturierte Darstellung in Form eines Abstract Syntax Trees \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}
{"rule":"PUNCTUATION_PARAGRAPH_END","sentence":"^\\Q\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q bietet hier die folgenden binären Operationen: [arithmetische Operatoren] \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q), \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q), \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q), \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q), \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q (%\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q) [numerische Vergleichsoperatoren] \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q), \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q) [generische Vergleichsoperatoren] \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q), \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q) [logische Operatoren] \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q), \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q) [Zeichenkettenkonkatenation] \\E(?:Dummy|Ina|Jimmy-)[0-9]+$"}
{"rule":"F_ANSTATT_PH","sentence":"^\\QAusdrücke werden in \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q in einer graphbasierten Darstellung bearbeitet, welche sowohl die Struktur als auch die Auswertung des Ausdrucks visuell darstellt.\\E$"}
{"rule":"COMMA_BEHIND_RELATIVE_CLAUSE","sentence":"^\\QDer größte Vorteil der Übersetzung in Maschinencode ist die Laufzeiteffizienz und Hardwarenähe, die dadurch erreicht werden kann \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QDa keine konkrete Syntax vorgegeben werden soll, setzt \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q hier auf eine strukturierte Darstellung in Form eines Abstract Syntax Trees (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q).\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QDer Aufbau der textbasierten Programmierspiele von Zachtronics ist ähnlich: laut Firmengründer \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q setzen diese auf eine weitgehend klassische Parser- und Compilerstruktur, welche den Programmcode in eine separate Laufzeitsimulation übergibt, die den Code schrittweise ausführt.\\E$"}
{"rule":"COMMA_BEHIND_RELATIVE_CLAUSE","sentence":"^\\QVariablen sind hier in dem Kontext, in dem sie initialisiert wurden, und allen darin enthaltenen Kontexten verfügbar, nicht aber außerhalb des jeweiligen Kontexts.\\E$"}
{"rule":"COMMA_BEHIND_RELATIVE_CLAUSE","sentence":"^\\QVariablen sind hier nur in dem Kontext, in dem sie initialisiert wurden, verfügbar.\\E$"}
{"rule":"COMMA_BEHIND_RELATIVE_CLAUSE","sentence":"^\\QVariablen sind in solchen Systemen nur in dem Kontext, in dem sie initialisiert wurden, verfügbar.\\E$"}
{"rule":"DE_CASE","sentence":"^\\QDiese Unterschiede fallen vor allem durch unterschiedliche mitgelieferte Typen und Klassen der Standardbibliothek, als auch bei der Verwendung von F-spezifischen Typkonstrukten aus C heraus auf.\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QDieses ist in F als \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q mit spezifischer Syntax gut unterstützt, und wird sowohl von F- als auch C-Listen implementiert.\\E$"}
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QDieses ist in F als \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q mit spezifischer Syntax gut unterstützt und wird sowohl von F- als auch C-Listen implementiert.\\E$"}
{"rule":"DE_CASE","sentence":"^\\QDurch die direkte Verwendung von F-spezifischen Datenstrukturen wie den Summentypen in der \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q-Darstellung oder den F-Typen \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q und \\E(?:Dummy|Ina|Jimmy-)[0-9]+$"}
{"rule":"DE_CASE","sentence":"^\\Q[Verwendung von F-spezifischen Konstrukten]\\E$"}
{"rule":"DE_CASE","sentence":"^\\QDie Bibliothek setzt an vielen Stellen auf F-spezifische Features, welche sowohl der strukturellen Komplexität als auch der Lesbarkeit des Bibliothekscodes deutlich helfen.\\E$"}
{"rule":"DE_CASE","sentence":"^\\QAndererseits sind einige der Programmierschnittstellen der Bibliothek aufgrund der Verwendung von F-spezifischen Sprachkonstrukten in der öffentlichen API aus C heraus deutlich schwieriger nutzbar.\\E$"}
{"rule":"MODALVERB_FLEKT_VERB","sentence":"^\\QF ist eine multiparadigmatische Programmiersprache, welche primär auf die -Plattform abzielt.\\E$"}
{"rule":"AUSLASSUNGSPUNKTE","sentence":"^\\QDa die Ausdrücke \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q, \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q,... die Spielwelt referenzieren müssen, würden diese die Referenz auf die Spielwelt bereits bei der Initialisierung des Ausdrucks benötigen.\\E$"}
{"rule":"FALSCHE_VERWENDUNG_DES_BINDESTRICHS","sentence":"^\\QDieses ist in als \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q mit spezifischer Syntax gut unterstützt und wird sowohl von - als auch -Listen implementiert.\\E$"}
{"rule":"MODALVERB_FLEKT_VERB","sentence":"^\\Q\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q ist eine multiparadigmatische Programmiersprache, welche primär auf die -Plattform abzielt.\\E$"}
{"rule":"F_ANSTATT_PH","sentence":"^\\QSolche Graphstrukturen eignen sich gut, um komplexe mathematische oder logische Berechnungen darzustellen und werden außerhalb von Programmierspielen beispielsweise in visuellen Datenflussprogrammiersprachen wie der vor allem für Klangsynthese und Audiosignalverarbeitung eingesetzten Sprache \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q oder der Simulationssoftware \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q eingesetzt.\\E$"}
{"rule":"F_ANSTATT_PH","sentence":"^\\QAuch ist die graphbasierte Darstellung eine sehr direkte Repräsentation des \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q und bietet sich daher gut für die visuelle Darstellung der schrittweisen Auswertung von Ausdrücken an.\\E$"}
{"rule":"PUNCTUATION_PARAGRAPH_END","sentence":"^\\Q\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q unterscheidet zwischen zwei Oberkategorien von Programmdarstellungen: rekursive Baumdarstellungen lineare Darstellungen\\E$"}
{"rule":"EMPFOHLENE_GETRENNTSCHREIBUNG","sentence":"^\\QSpiele, die sich auf die Gestaltung von Datenflussstrukturen fokussieren, nutzen hierfür meist eine nichtlineare Darstellung.\\E$"}
{"rule":"PUNCTUATION_PARAGRAPH_END","sentence":"^\\Q\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q unterscheiden zwischen zwei Oberkategorien von Programmdarstellungen: rekursive Baumdarstellungen lineare Darstellungen\\E$"}

View file

@ -0,0 +1 @@
Tuk Tuk

View file

View file

@ -0,0 +1,41 @@
#!/usr/bin/env bash
primary-wl-to-x () {
while read; do
if [[ "$(wl-paste --primary --no-newline | sha256sum)" != "$(xclip -selection primary -out | sha256sum)" ]]; then
echo "syncing primary wl->x"
wl-paste --primary --no-newline | xclip -selection primary -in
fi
done < <(wl-paste --primary --watch echo)
}
primary-x-to-wl () {
while clipnotify -s primary; do
if [[ "$(wl-paste --primary --no-newline | sha256sum)" != "$(xclip -selection primary -out | sha256sum)" ]]; then
echo "syncing primary x->wl"
xclip -selection primary -out | wl-copy --primary
fi
done
}
clipboard-wl-to-x () {
while read; do
if [[ "$(wl-paste --no-newline | sha256sum)" != "$(xclip -selection clipboard -out | sha256sum)" ]]; then
echo "syncing clipboard wl->x"
wl-paste --no-newline | xclip -selection clipboard -in
fi
done < <(wl-paste --watch echo)
}
clipboard-x-to-wl () {
while clipnotify -s clipboard; do
if [[ "$(wl-paste --no-newline | sha256sum)" != "$(xclip -selection clipboard -out | sha256sum)" ]]; then
echo "syncing clipboard x->wl"
xclip -selection clipboard -out | wl-copy
fi
done
}
clipboard-wl-to-x &
clipboard-x-to-wl &
primary-wl-to-x &
primary-x-to-wl &

View file

@ -0,0 +1,309 @@
input {
keyboard {
xkb {
layout "us"
options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
}
repeat-delay 280
repeat-rate 50
}
touchpad {
dwt
tap
natural-scroll
// accel-speed 0.2
}
mouse {
accel-speed -0.1
}
//warp-mouse-to-focus
focus-follows-mouse max-scroll-amount="20%"
workspace-auto-back-and-forth
}
cursor {
xcursor-theme "phinger-cursors-light"
xcursor-size 12
}
environment {
DISPLAY ":0"
XDG_SESSION_TYPE "wayland"
ELECTRON_OZONE_PLATFORM_HINT "auto"
// GDK_BACKEND "x11"
}
output "DP-2" {
mode "3440x1440@99.982"
//variable-refresh-rate
scale 1
transform "normal"
position x=2560 y=0
//position x=1440 y=0
}
output "HDMI-A-1" {
mode "2560x1440"
scale 1
position x=0 y=0
//transform "270"
}
layout {
gaps 16
// center-focused-column "always" // - "never", "always" "on-overflow"
center-focused-column "on-overflow" // - "never", "always" "on-overflow"
always-center-single-column
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
default-column-width { proportion 0.33333; }
focus-ring {
width 2
active-color "#8ec07c"
inactive-color "#1d2021"
}
}
spawn-at-startup "bash" "-c" "eww -c ~/.config/eww-bar open-many bar_1 niri_scroller"
spawn-at-startup "xwayland-satellite"
spawn-at-startup "bash" "-c" "ELECTRON_OZONE_PLATFORM_HINT=auto 1password --silent"
spawn-at-startup "wl-paste" "--watch" "xclip -in -sel c"
spawn-at-startup "~/.config/niri/clipboardfix.sh"
spawn-at-startup "clipse" "-listen"
spawn-at-startup "wl-clip-persist" "--clipboard" "regular"
// spawn-at-startup "swaybg" "-m" "fill" "-i" "~/Pictures/wallpapers/green_leaves.jpg"
prefer-no-csd
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
animations {
window-open {
duration-ms 200
curve "ease-out-quad"
custom-shader r"
float map(float value, float min1, float max1, float min2, float max2) {
return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
}
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
float cur = niri_clamped_progress;
if (coords_geo.x > cur) {
return vec4(0.0);
}
vec3 coord = vec3(map(coords_geo.x,0.0, cur, 0.0, 1.0 ), coords_geo.y, coords_geo.z);
return texture2D(niri_tex, (niri_geo_to_tex * coord).st);
}
"
}
window-close {
duration-ms 200
curve "ease-out-quad"
custom-shader r"
float map(float value, float min1, float max1, float min2, float max2) {
return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
}
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
float cur = 1.0-niri_clamped_progress;
if (coords_geo.x > cur) {
return vec4(0.0);
}
vec3 coord = vec3(map(coords_geo.x,0.0, cur, 0.0, 1.0), coords_geo.y, coords_geo.z);
return texture2D(niri_tex, (niri_geo_to_tex * coord).st);
}
"
}
}
window-rule {
match app-id=r#"^foot$"#
default-column-width { proportion 0.3333; }
}
// Example: block out two password managers from screen capture.
// (This example rule is commented out with a "/-" in front.)
window-rule {
match app-id=r#"1Password"#
match title=r#"[gG]mail"#
match app-id=r#".*[mM]ako.*"#
match title=r#".*[Ww]hats[aA]pp.*$"#
// opacity 0.5
block-out-from "screen-capture"
}
window-rule {
match app-id=r#"^[gG]edit$"#;
match app-id=r#"^[eE]og$"#;
// fake-fullscreen true
}
window-rule {
match title=r#"^.* is sharing your screen.$"#;
}
window-rule {
clip-to-geometry true
geometry-corner-radius 8
}
binds {
Mod+Shift+Slash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+T { spawn "foot"; }
Mod+B { spawn "bash" "-c" "unset DISPLAY && google-chrome --enable-features=TouchpadOverscrollHistoryNavigation --enable-features=UseOzonePlatform --ozone-platform=wayland"; }
Mod+Shift+P { spawn "~/.config/rofi/launchers/type-2/launcher.sh"; }
Mod+Shift+B { spawn "firefox"; }
// Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked.
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
Mod+Shift+Q { close-window; }
Mod+H { focus-column-or-monitor-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+L { focus-column-or-monitor-right; }
Mod+Shift+H { move-column-left; }
Mod+Shift+J { move-window-down; }
Mod+Shift+K { move-window-up; }
Mod+Shift+L { move-column-right; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
Mod+Ctrl+H { focus-monitor-left; }
Mod+Ctrl+J { focus-monitor-down; }
Mod+Ctrl+K { focus-monitor-up; }
Mod+Ctrl+L { focus-monitor-right; }
Mod+Shift+Ctrl+H { move-window-to-monitor-left; }
Mod+Shift+Ctrl+J { move-window-to-monitor-down; }
Mod+Shift+Ctrl+K { move-window-to-monitor-up; }
Mod+Shift+Ctrl+L { move-window-to-monitor-right; }
Mod+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
//Mod+I { focus-workspace-up create-if-first=true; }
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
Mod+Shift+U { move-column-to-workspace-down; }
Mod+Shift+I { move-column-to-workspace-up; }
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Ctrl+U { move-workspace-down; }
Mod+Ctrl+I { move-workspace-up; }
Mod+Shift+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+Shift+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
// Mod+Ctrl+Shift+WheelScrollDown { scroll-viewport-left amount=0.1; }
// Mod+Ctrl+Shift+WheelScrollUp { scroll-viewport-right amount=0.1; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
Mod+WheelScrollDown { focus-column-right; }
Mod+WheelScrollUp { focus-column-left; }
// Mod+Shift+WheelScrollDown { scroll-viewport-right-by-column; }
// Mod+Shift+WheelScrollUp { scroll-viewport-left-by-column; }
// Mod+Shift+WheelScrollDown { scroll-viewport-right-by-fraction amount=0.1; }
// Mod+Shift+WheelScrollUp { scroll-viewport-left-by-fraction amount=0.1; }
// Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
// Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
// Similarly, you can bind touchpad scroll "ticks".
// Touchpad scrolling is continuous, so for these binds it is split into
// discrete intervals.
// These binds are also affected by touchpad's natural-scroll, so these
// example binds are "inverted", since we have natural-scroll enabled for
// touchpads by default.
// Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
// Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+Ctrl+1 { move-column-to-workspace 1; }
Mod+Ctrl+2 { move-column-to-workspace 2; }
Mod+Ctrl+3 { move-column-to-workspace 3; }
Mod+Ctrl+4 { move-column-to-workspace 4; }
Mod+Ctrl+5 { move-column-to-workspace 5; }
Mod+Ctrl+6 { move-column-to-workspace 6; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Ctrl+9 { move-column-to-workspace 9; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+1 { move-window-to-workspace 1; }
// Switches focus between the current and the previous workspace.
// Mod+Tab { focus-workspace-previous; }
Mod+Comma { consume-window-into-column; }
Mod+Period { consume-or-expel-window-right; }
//Mod+Period { expel-window-from-column; }
// There are also commands that consume or expel a single window to the side.
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
Mod+R { switch-preset-column-width; }
Mod+Shift+R { reset-window-height; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
Mod+C { center-column; }
Mod+Minus { set-column-width "-10%"; }
Mod+Shift+Equal { set-column-width "+10%"; }
Mod+Equal { set-column-width "+10%"; }
Mod+Ctrl+Minus { set-window-height "-10%"; }
Mod+Ctrl+Equal { set-window-height "+10%"; }
Mod+Ctrl+Shift+Equal { set-window-height "+10%"; }
Mod+Shift+S { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
Mod+Shift+V { spawn "alacritty" "-e" "clipse"; }
Ctrl+Shift+Print {
spawn "sh" "-c" r#"
file=~/Videos/recordings/"$(date +%s)".mp4
wf-recorder -c h264_vaapi -r 60 --bframes 0 -g "$(slurp -b '#00000090' -w 0)" -f "$file"
wl-copy file:/"$file" -t text/uri-list
"#;
}
Ctrl+Escape { spawn "killall" "-s" "SIGINT" "wf-recorder"; }
Mod+Shift+E { quit; }
}

View file

@ -31,7 +31,7 @@
base = {
enable = true;
enableFish = true;
enableZsh = true;
enableZsh = false;
includeNiceToHaves = true;
includeHaskellDev = true;
};

View file

@ -31,17 +31,19 @@ in
elkowar.generalConfig.shellAbbrs = {
vim = "nvim";
cxmonad = "cd ~/.xmonad && nvim /home/leon/.xmonad/lib/Config.hs && cd -";
cnix = "cd ~/nixpkgs/ && nvim home.nix && cd -";
cnix = "cd ~/.config/nixpkgs/ && nvim home.nix && cd -";
cvim = "cd ~/.config/nvim/ && nvim fnl/init.fnl && cd -";
ra = "ranger";
gaa = "git add --all";
lg = "lazygit";
gc = "git commit -m ";
gp = "git push";
gst = "git status";
g = "git fuzzy";
cr = "cargo run --";
y = "z";
};
home.packages = with pkgs; lib.mkMerge [
@ -55,7 +57,6 @@ in
ripgrep
fd
jq
nodejs
nodePackages.bash-language-server
nodePackages.dockerfile-language-server-nodejs
cargo-outdated
@ -77,12 +78,11 @@ in
gtop
nix-prefetch
cargo-bloat
sccache
bpytop
cargo-watch
cargo-expand
gdbgui
lldb
#lldb
zola
python38Packages.pylint
gitAndTools.gitflow
@ -96,6 +96,7 @@ in
kmonad
gitAndTools.delta
git-fuzzy
codelldb
]
)
(
@ -113,7 +114,7 @@ in
fzf = {
enable = true;
enable = false;
enableFishIntegration = cfg.enableFish;
enableZshIntegration = cfg.enableZsh;
defaultCommand = "rg --files";
@ -125,7 +126,8 @@ in
enable = true;
enableFishIntegration = cfg.enableFish;
enableZshIntegration = cfg.enableZsh;
enableNixDirenvIntegration = true;
# enableNixDirenvIntegration = true;
stdlib = (builtins.readFile ./direnvrc);
};
};

View file

@ -27,19 +27,19 @@ in
#hyper-haskell
font-manager
haskellPackages.arbtt
sqlite-web
#flameshot
sxhkd
okular
];
elkowar.desktop = {
gtk.enable = true;
gtk.enable = false;
};
elkowar.programs = {
@ -101,7 +101,7 @@ in
xresources.properties = with config.elkowar.desktop.colors; {
"Xcursor.size" = "16";
"Xcursor.theme" = "capitaine-cursors-light";
#"Xcursor.theme" = "capitaine-cursors-light";
"Xft.autohint" = "0";
"Xft.antialias" = "1";
"Xft.hinting" = "true";
@ -111,6 +111,10 @@ in
"Xft.lcdfilter" = "lcddefault";
"st.font" = "Terminus (TTF):pixelsize=16";
"st.boxdraw" = 1;
"st.boxdraw_bold" = 1;
"st.boxdraw_braille" = 1;
"st.scrollrate" = 1;
"*.background" = primary.background;
"*.foreground" = primary.foreground;
@ -130,6 +134,31 @@ in
"*.color13" = bright.magenta;
"*.color14" = bright.cyan;
"*.color15" = bright.white;
#"st.termname" = "st-256color";
#"st.borderless" = 1;
#"st.font" = "Terminus (TTF):size=16:antialias=true:autohint=true";
#"st.borderpx" = 10;
#"st.cursorshape" = 3;
#"st.cursorthickness" = 1;
#"st.cursorblinkstyle" = 0;
#"st.cursorblinkontype" = 0;
#"st.disablebold" = 0;
#"st.disableitalics" = 0;
#"st.disableroman" = 0;
#"st.scrollrate" = 1;
#"st.blinktimeout" = 100;
#"st.bellvolume" = 5;
#"st.actionfps" = 60;
#"st.mouseScrollLines" = 3;
#"st.boxdraw" = 1;
#"st.boxdraw_bold" = 1;
#"st.boxdraw_braille" = 1;
#"st.opacity" = 255;
#"st.disable_alpha_correction" = 0;
#"st.prompt_char" = "λ !`printf '\033[z'`";
#"st.shell" = "/usr/bin/bash";
};
};
}

View file

@ -9,7 +9,7 @@ in
config = lib.mkIf cfg.enable {
programs.alacritty = {
enable = true;
enable = false;
settings = {
live_config_reload = true;
@ -23,13 +23,13 @@ in
style = "Block";
unfocused_hollow = true;
};
shell = "/home/leon/.nix-profile/bin/zsh";
#shell = "/usr/bin/zsh";
#shell = "/usr/bin/fish";
mouse = {
double_click.threshold = 300;
triple_click.threshold = 300;
hide_when_typing = true;
url.launcher.program = "xdg-open";
#hints.launcher.program = "xdg-open";
};
key_bindings = [
@ -44,9 +44,11 @@ in
font = {
size = 12;
#normal.family = "Iosevka";
normal.family = "Terminus (TTF)";
normal.family = "xos4 Terminus";
#normal.family = "Terminus (TTF)";
offset.x = 0;
offset.y = -2;
#offset.y = -2;
offset.y = 0;
};
colors = config.elkowar.desktop.colors;
};

View file

@ -10,7 +10,8 @@ in
config = lib.mkIf cfg.enable {
gtk = {
enable = true;
theme.name = "elkowars_phocus";
#theme.name = "elkowars_phocus";
theme.name = "gruvbox-phocus";
iconTheme.name = "oomox-materia-dark";
#iconTheme.name = "Numix";
#font.name = "Terminus (TTF) 12";
@ -31,6 +32,7 @@ in
gtk-button-images = 1;
#ctk-cursor-theme-name = "capitaine-cursors-light";
gtk-cursor-theme-size = 0;
gtk-cursor-theme-name="phinger-cursors-light";
};
gtk3.extraCss = ''

View file

@ -68,7 +68,8 @@ in
inputbar,
prompt,
textbox-prompt-colon,
entry {
entry,
element-text, element-icon {
background-color: @background-light;
}

View file

@ -0,0 +1,151 @@
# Usage: use_nix [...]
#
# Load environment variables from `nix-shell`.
# If you have a `default.nix` or `shell.nix` one of these will be used and
# the derived environment will be stored at ./.direnv/env-<hash>
# and symlink to it will be created at ./.direnv/default.
# Dependencies are added to the GC roots, such that the environment remains persistent.
#
# The resulting environment is cached for better performance.
#
# To trigger switch to a different environment:
# `rm -f .direnv/default`
#
# To derive a new environment:
# `rm -rf .direnv/env-$(md5sum {shell,default}.nix 2> /dev/null | cut -c -32)`
#
# To remove cache:
# `rm -f .direnv/dump-*`
#
# To remove all environments:
# `rm -rf .direnv/env-*`
#
# To remove only old environments:
# `find .direnv -name 'env-*' -and -not -name `readlink .direnv/default` -exec rm -rf {} +`
#
set -eo pipefail
use_nix() {
# define all local variables
local shell f env_hash dir default wd drv dump path_backup
local files_to_watch=()
declare opt
declare OPTARG
declare OPTIND
while getopts ":s:w:" opt; do
case "${opt}" in
s)
shell="${OPTARG}"
files_to_watch=("${files_to_watch[@]}" "${shell}")
;;
w)
files_to_watch=("${files_to_watch[@]}" "${OPTARG}")
;;
:)
>&2 echo "Invalid option: $OPTARG requires an argument"
;;
\?)
>&2 echo "Invalid option: $OPTARG"
exit 1
;;
esac
done
shift $((OPTIND -1))
if [[ -z "${shell}" ]]; then
>&2 echo "ERR: no shell was given"
exit 1
fi
for f in "${files_to_watch[@]}"; do
if ! [[ -f "${f}" ]]; then
>&2 echo "cannot watch file ${f} because it does not exist"
exit 1
fi
done
# compute the hash of all the files that makes up the development environment
env_hash="$(hashContents "${files_to_watch[@]}")"
dir="$(direnv_layout_dir)"
default="${dir}/default"
if [[ ! -L "${default}" ]] || [[ ! -d $(readlink "${default}") ]]; then
wd="${dir}/env-${env_hash}"
mkdir -p "${wd}"
drv="${wd}/env.drv"
if [[ ! -f "${drv}" ]]; then
log_status "use nix: deriving new environment"
IN_NIX_SHELL=1 nix-instantiate --add-root "${drv}" --indirect "${shell}" > /dev/null
nix-store -r $(nix-store --query --references "${drv}") --add-root "${wd}/dep" --indirect > /dev/null
fi
rm -f "${default}"
ln -s $(basename "${wd}") "${default}"
fi
drv=$(readlink "${default}/env.drv")
dump="${dir}/dump-$(hashFile ".envrc")-$(hashFile ${drv})"
if [[ ! -f "${dump}" ]] || [[ "${XDG_CONFIG_DIR}/direnv/direnvrc" -nt "${dump}" ]]; then
log_status "use nix: updating cache"
old=$(find "${dir}" -name 'dump-*')
nix-shell --pure "${drv}" --show-trace --run "$(join_args "$direnv" dump bash)" > "${dump}"
rm -f ${old}
fi
# evaluate the dump created by nix-shell earlier, but have to merge the PATH
# with the current PATH
# NOTE: we eval the dump here as opposed to direnv_load it because we don't
# want to persist environment variables coming from the shell at the time of
# the dump. See https://github.com/direnv/direnv/issues/405 for context.
path_backup="${PATH}"
eval $(cat "${dump}")
export PATH="${PATH}:${path_backup}"
for f in "${files_to_watch[@]}"; do
watch_file "${f}"
done
}
hashContents() {
if has md5sum; then
cat "${@}" | md5sum | cut -c -32
elif has md5; then
cat "${@}" | md5 -q
fi
}
hashFile() {
if has md5sum; then
md5sum "${@}" | cut -c -32
elif has md5; then
md5 -q "${@}"
fi
}
fail() {
log_error "${@}"
exit 1
}
validateVersion() {
local version="$("${direnv}" version)"
local major="$(echo "${version}" | cut -d. -f1)"
local minor="$(echo "${version}" | cut -d. -f2)"
local patch="$(echo "${version}" | cut -d. -f3)"
if [[ "${major}" -gt 2 ]]; then return 0; fi
if [[ "${major}" -eq 2 ]] && [[ "${minor}" -gt 18 ]]; then return 0; fi
if [[ "${major}" -eq 2 ]] && [[ "${minor}" -eq 18 ]] && [[ "${patch}" -ge 2 ]]; then return 0; fi
return 1
}
if ! validateVersion; then
echo "This .envrc requires direnv version 2.18.2 or above."
exit 1
fi

View file

@ -153,9 +153,13 @@ in
initExtra = ''
eval $(opam env)
eval $(luarocks path --lua-version=5.4)
eval "$(zoxide init zsh)"
export MANPAGER='nvim +Man! +"set nocul" +"set noshowcmd" +"set noruler" +"set noshowmode" +"set laststatus=2" +"set statusline=\ %t"'
export MANPAGER='nvim +Man! +"set nocul" +"set noshowcmd" +"set noruler" +"set noshowmode" +"set laststatus=0"'
setopt nobeep
setopt HIST_IGNORE_ALL_DUPS

View file

@ -12,6 +12,7 @@ self: super: {
git-fuzzy = super.callPackage ../packages/git-fuzzy.nix { };
nixGL = import sources.nixGL { };
scr = super.callPackage ../packages/scr.nix { };
codelldb = super.callPackage ../packages/codelldb.nix { };
my-st = super.callPackage ../packages/st/st-tanish2002 { };
kmonad = import "${sources.kmonad}/nix";
}

View file

@ -2,7 +2,6 @@
let
wrapped =
writeScriptBin "alacritty" ''
writeScriptBin "alacritty"
#!/bin/sh
exec ${nixGL.nixGLIntel}/bin/nixGLIntel ${alacritty}/bin/alacritty "$@"
'';

View file

@ -0,0 +1,9 @@
{ stdenv, symlinkJoin, makeWrapper, writeScriptBin, vscode-extensions }:
writeScriptBin "codelldb" ''
${vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/.codelldb-wrapped_ \
--liblldb ${vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/lldb/lib/liblldb.so $@
''
#writeScriptBin "codelldb" ''
#${vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/.codelldb-wrapped_ \
#--liblldb ${vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/lldb/lib/liblldb.so $@
#''

View file

@ -0,0 +1,32 @@
{ fetchFromGitHub, stdenvNoCC, lib, makeWrapper, extraPackages ? [] }:
let
binPath = lib.makeBinPath ([] ++ extraPackages);
in
stdenvNoCC.mkDerivation rec {
pname = "scr";
version = "2.1";
src = fetchFromGitHub {
owner = "6gk";
repo = "scr";
rev = "v${version}";
sha256 = "0fgmv99zlppi5wa2qylbvnblk9kc6i201byz8m79ld8cwiymabi2";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = "install -m755 -D ./scr $out/bin/scr";
postFixup = ''
wrapProgram "$out/bin/scr" --prefix PATH : ${binPath}
'';
meta = {
description = "Super CRappy SCReenshot SCRipt";
longDescription = ''
Super CRappy SCReenshot SCRipt
(and recording ^)
A SCRipt for Sound Cloud Rappers
'';
homepage = "https://github.com/6gk/scr";
maintainers = with lib.maintainers; [ elkowar ];
license = lib.licenses.mit;
platforms = lib.platforms.all;
};
}

View file

@ -1,2 +1,2 @@
lua
plugin
lua-old

View file

@ -0,0 +1,2 @@
{}

View file

@ -1,38 +0,0 @@
(module colors
{}
{:dark0_hard "#1d2021"
:dark0 "#282828"
:dark0_soft "#32302f"
:dark1 "#3c3836"
:dark2 "#504945"
:dark3 "#665c54"
:dark4 "#7c6f64"
:light0_hard "#f9f5d7"
:light0 "#fbf1c7"
:light0_soft "#f2e5bc"
:light1 "#ebdbb2"
:light2 "#d5c4a1"
:light3 "#bdae93"
:light4 "#a89984"
:bright_red "#fb4934"
:bright_green "#b8bb26"
:bright_yellow "#fabd2f"
:bright_blue "#83a598"
:bright_purple "#d3869b"
:bright_aqua "#8ec07c"
:bright_orange "#fe8019"
:neutral_red "#cc241d"
:neutral_green "#98971a"
:neutral_yellow "#d79921"
:neutral_blue "#458588"
:neutral_purple "#b16286"
:neutral_aqua "#689d6a"
:neutral_orange "#d65d0e"
:faded_red "#9d0006"
:faded_green "#79740e"
:faded_yellow "#b57614"
:faded_blue "#076678"
:faded_purple "#8f3f71"
:faded_aqua "#427b58"
:faded_orange "#af3a03"
:gray "#928374"})

View file

@ -0,0 +1,38 @@
{:bg_main (if (= "epix" (vim.fn.hostname)) "#1d2021" "#282828")
:bg_second (if (= "epix" (vim.fn.hostname)) "#181A1B" "#1d2021")
:dark0_hard "#1d2021"
:dark0 "#282828"
:dark0_soft "#32302f"
:dark1 "#3c3836"
:dark2 "#504945"
:dark3 "#665c54"
:dark4 "#7c6f64"
:light0_hard "#f9f5d7"
:light0 "#fbf1c7"
:light0_soft "#f2e5bc"
:light1 "#ebdbb2"
:light2 "#d5c4a1"
:light3 "#bdae93"
:light4 "#a89984"
:bright_red "#fb4934"
:bright_green "#b8bb26"
:bright_yellow "#fabd2f"
:bright_blue "#83a598"
:bright_purple "#d3869b"
:bright_aqua "#8ec07c"
:bright_orange "#fe8019"
:neutral_red "#cc241d"
:neutral_green "#98971a"
:neutral_yellow "#d79921"
:neutral_blue "#458588"
:neutral_purple "#b16286"
:neutral_aqua "#689d6a"
:neutral_orange "#d65d0e"
:faded_red "#9d0006"
:faded_green "#79740e"
:faded_yellow "#b57614"
:faded_blue "#076678"
:faded_purple "#8f3f71"
:faded_aqua "#427b58"
:faded_orange "#af3a03"
:gray "#928374"}

View file

@ -0,0 +1,194 @@
(local {: autoload : a : str : utils} (require :dots.prelude))
(local wk (autoload :which-key))
(local glance (autoload :glance))
(local crates (autoload :crates))
(local dap (autoload :dap))
(local dapui (autoload :dapui))
; undo autopairs fuckup
(set vim.g.AutoPairsShortcutBackInsert "<M-b>")
(utils.keymap :n :K "<Nop>")
(utils.keymap :v :K "<Nop>")
(utils.keymap :i "" "<C-w>")
(utils.keymap :i :<C-h> "<C-w>")
(utils.keymap :i :<C-BS> "<C-w>")
(utils.keymap :n :zt "zt<c-y><c-y><c-y>")
(utils.keymap :n :zb "zb<c-e><c-e><c-e>")
; these should really not be necessary, but whatever...
(utils.keymap :n :<space>c<space> "<cmd>call nerdcommenter#Comment(\"m\", \"Toggle\")<CR>" {})
(utils.keymap :v :<space>c<space> "<cmd>call nerdcommenter#Comment(\"x\", \"Toggle\")<CR>" {})
(utils.keymap :n :<C-LeftMouse> "<LeftMouse><cmd>lua vim.lsp.buf.definition()<CR>")
(utils.keymap :n :<A-LeftMouse> "<Esc><LeftMouse><cmd>lua vim.lsp.buf.hover()<CR>")
(utils.keymap [:n :v] :<space><space>c "\"+y")
;(utils.keymap :i :<C-l><C-j> "<Plug>(copilot-suggest)")
;(utils.keymap :i :<C-l><C-d> "<Plug>(copilot-dismiss)")
;(utils.keymap :i :<C-l><C-n> "<Plug>(copilot-next)")
;(utils.keymap :i :<C-l><C-p> "<Plug>(copilot-previous)")
;(utils.keymap :i :<C-l><C-o> "<cmd>Copilot panel<cr>")
(utils.keymap :n :<a-s-j> "<cmd>RustMoveItemDown<cr>j")
(utils.keymap :n :<a-s-k> "<cmd>RustMoveItemUp<cr>k")
(utils.keymap :n :<Backspace> "<cmd>HopChar2<CR>")
; Fix keybinds in linewrapped mode
;(utils.keymap [:n] :j "gj")
;(utils.keymap [:n] :k "gk")
(fn open-selection-zotero []
(let [(_ _ sel) (utils.get-selection)]
(vim.cmd (.. "silent !xdg-open zotero://select/items/@" (str.join sel)))))
(fn key-map [obj]
(icollect [key val (pairs obj)]
(utils.prepend key val)))
(fn m [bind desc]
{1 bind :desc desc})
(fn cmd [s desc] (utils.prepend (.. "<cmd>" s "<cr>") {:desc desc}))
(fn sel-cmd [s desc] (utils.prepend (.. "<cmd>'<,'>" s "<cr>") {:desc desc}))
(fn rebind [s desc] (m s desc))
(fn format []
(if (a.some #$1.server_capabilities.documentFormattingProvider (vim.lsp.get_active_clients))
(vim.lsp.buf.format {:async true})
(vim.cmd "Neoformat")))
(fn open-rename []
(vim.api.nvim_feedkeys (.. ":IncRename " (vim.fn.expand "<cword>")) "n" ""))
(fn toggle-lsp-lines []
(vim.diagnostic.config {:virtual_lines (not (. (vim.diagnostic.config) :virtual_lines))})
; TODO: this doesn't seem to work...
(vim.diagnostic.config {:virtual_text (not (. (vim.diagnostic.config) :virtual_lines))}))
(fn toggle-lsp-lines-current []
(vim.diagnostic.config {:virtual_lines {:only_current_line true}}))
(wk.setup {})
(wk.add
(key-map
{"<leader>c" {:group "+comment out"}
"<leader>e" {:group "+emmet"}
"<leader>[" (cmd "HopWord" "Hop to a word")
"<leader>h" (cmd "bprevious" "previous buffer")
"<leader>l" (cmd "bnext" "next buffer")
"<leader>o" (cmd "Telescope live_grep" "Grep files")
"<leader>P" (cmd "Telescope frecency frecency default_text=:CWD:" "Frecency magic")
"<leader>p" (cmd "Telescope find_files" "Open file-browser")
"<leader>:" (cmd "Telescope commands" "Search command with fzf")
"<leader>s" (cmd "w" "Save file")
"<leader>g" (cmd "Neogit" "Git")
"<leader>n" (m (. (require :persistence) :load) "Load last session")
"<leader>d" {:group "+Debugging"}
"<leader>db" (m dap.toggle_breakpoint "toggle breakpoint")
"<leader>du" (m dapui.toggle "toggle dapui")
"<leader>dc" (m dap.step_into "continue")
"<leader>dr" (m dap.repl.open "open repl")
"<leader>ds" {:group "+Step"}
"<leader>dso" (m dap.step_over "over")
"<leader>dsu" (m dap.step_out "out")
"<leader>dsi" (m dap.step_into "into")
"<leader>m" {:group "+Code actions"}
"<leader>m;" (m #(set vim.o.spell (not vim.o.spell)) "Toggle spell checking")
"<leader>md" (m vim.lsp.buf.hover "Show documentation")
"<leader>mo" (cmd "SymbolsOutline" "Outline")
"<leader>mS" (cmd "Telescope lsp_document_symbols" "Symbols in document")
"<leader>ms" (cmd "Telescope lsp_dynamic_workspace_symbols" "Symbols in workspace")
"<leader>mT" (m vim.lsp.buf.signature_help "Show signature help")
"<leader>mn" (m open-rename "Rename")
"<leader>mv" (cmd "CodeActionMenu" "Apply codeaction")
"<leader>mA" (m #(vim.diagnostic.open_float {:scope :cursor}) "Cursor diagnostics")
"<leader>ma" (m #(vim.diagnostic.open_float {}) "Line diagnostics")
"<leader>mh" (cmd "RustToggleInlayHints" "Toggle inlay hints")
"<leader>mr" (cmd "Trouble lsp_references" "Show references")
"<leader>mE" (cmd "Trouble document_diagnostics" "List diagnostics")
"<leader>me" (cmd "Trouble workspace_diagnostics" "Show diagnostics")
"<leader>mt" (cmd "Trouble lsp_type_definitions" "Go to type-definition")
"<leader>mi" (cmd "Trouble lsp_implementations" "Show implementation")
"<leader>mg" (cmd "Trouble lsp_definitions" "Go to definition")
"<leader>mw" (m toggle-lsp-lines "Toggle LSP lines")
"<leader>mW" (m toggle-lsp-lines-current "Toggle LSP line")
"<leader>mf" (m format "format file")
"<leader>m," (cmd "RustRunnables" "Run rust stuff")
"<leader>mx" {:group "+Glance"}
"<leader>mxd" (m #(glance.open "definitions") "Definitions")
"<leader>mxr" (m #(glance.open "references") "References")
"<leader>mxt" (m #(glance.open "type_definitions") "Type definitions")
"<leader>mxi" (m #(glance.open "implementations") "Implementations")
"<leader>c" {:group "+Crates"}
"<leader>mcj" (m crates.show_popup "crates popup")
"<leader>mcf" (m crates.show_features_popup "crate features")
"<leader>mcv" (m crates.show_versions_popup "crate versions")
"<leader>mcd" (m crates.show_dependencies_popup "crate dependencies")
"<leader>mch" (m crates.open_documentation "crate documentation")
"<leader>f" {:group "+folds"}
"<leader>fo" (cmd "foldopen" "open fold")
"<leader>fn" (cmd "foldclose" "close fold")
"<leader>fj" (rebind "zj" "jump to next fold")
"<leader>fk" (rebind "zk" "jump to previous fold")
"<leader>v" {:group "+view-and-layout"}
"<leader>vn" (cmd "set relativenumber!" "toggle relative numbers")
"<leader>vm" (cmd "set nonumber! norelativenumber" "toggle numbers")
"<leader>vg" (cmd "ZenMode" "toggle zen mode")
"<leader>vi" (cmd "IndentGuidesToggle" "toggle indent guides")
"<leader>vw" (cmd "set wrap! linebreak!" "toggle linewrapping")
"<leader>b" {:group "+buffers"}
"<leader>bb" (cmd ":Telescope buffers" "select open buffer")
"<leader>bc" (cmd ":Bdelete!" "close open buffer")
"<leader>bw" (cmd ":Bwipeout!" "wipeout open buffer")}))
(wk.add
(key-map
{"<tab>" {:hidden true}
"gss" {:desc "init selection"}
"z" {:group "folds"}
"zc" (m "<cmd>foldclose<cr>" "close fold")
"zo" (m "<cmd>foldopen<cr>" "open fold")}))
(wk.add
(key-map {"<tab>" {:hidden true :mode "i"}}))
(wk.add
(utils.prepend
(key-map
{"<leader>s" (sel-cmd "VSSplit" "keep selection visible in split")
"<leader>z" (m open-selection-zotero "open in zotero")
"gs" {:group "+Selection"}
"gsj" {:desc "increment selection"}
"gsk" {:desc "decrement selection"}
"gsl" {:desc "increment node"}
"gsh" {:desc "decrement node"}})
{:mode "v"}))
(set vim.o.timeoutlen 200)

View file

@ -0,0 +1,74 @@
(local {: autoload : a : utils : colors} (require :dots.prelude))
(local bufferline (autoload :bufferline))
(vim.cmd "hi link BufferLineTabSeparatorSelected BufferLineSeparatorSelected")
(vim.cmd "hi link BufferLineTabSeparator BufferLineSeparator")
(fn mk-active [fg]
{:bg colors.neutral_aqua :fg fg :italic false :bold false})
(fn mk-visible [fg]
{:bg colors.dark1 :fg fg :italic false :bold false})
(fn setup []
; :h bufferline-lua-highlights
(let [selected {:bg colors.neutral_aqua :fg colors.bg_main :gui "NONE"}
visible {:bg colors.dark1 :fg colors.neutral_aqua}]
(bufferline.setup
{:options
{:diagnostics "nvim_lsp"
:diagnostics_indicator (fn [cnt _lvl _diagnostics-dict] (.. " (" cnt ")"))
:show_buffer_close_icons false
:show_buffer_icons false
:show_close_icon false
:show_tab_indicators false
:enforce_regular_tabs false
:tab_size 10}
; https://github.com/akinsho/nvim-bufferline.lua/blob/4ebab39af2376b850724dd29c29579c8e024abe6/lua/bufferline/config.lua#L74
:highlights
{:fill {:bg colors.bg_main :fg colors.light0}
:background visible
:buffer_visible visible
:buffer_selected (a.assoc selected :bold false :italic false)
:modified visible :modified_visible visible :modified_selected selected
:hint visible :hint_visible visible :hint_selected selected
:info visible :info_visible visible :info_selected selected
:warning visible :warning_visible visible :warning_selected selected
:error visible :error_visible visible :error_selected selected
:duplicate visible :duplicate_visible visible :duplicate_selected selected
:diagnostic (mk-visible colors.neutral_red)
:diagnostic_visible (mk-visible colors.neutral_red)
:diagnostic_selected (mk-active colors.faded_red)
:info_diagnostic (mk-visible colors.neutral_blue)
:info_diagnostic_visible (mk-visible colors.neutral_blue)
:info_diagnostic_selected (mk-active colors.faded_blue)
:hint_diagnostic (mk-visible colors.neutral_yellow)
:hint_diagnostic_visible (mk-visible colors.neutral_yellow)
:hint_diagnostic_selected (mk-active colors.faded_orange)
:warning_diagnostic (mk-visible colors.neutral_orange)
:warning_diagnostic_visible (mk-visible colors.neutral_orange)
:warning_diagnostic_selected (mk-active colors.faded_orange)
:error_diagnostic (mk-visible colors.neutral_red)
:error_diagnostic_visible (mk-visible colors.neutral_red)
:error_diagnostic_selected (mk-active colors.red)
:separator visible
:separator_visible {:bg colors.red}
:separator_selected {:bg colors.red}
:indicator_selected {:bg colors.neutral_aqua :fg colors.neutral_aqua :italic false :bold false}
:tab_separator {:bg colors.red}
:tab_separator_selected {:bg colors.neutral_aqua :fg colors.neutral_aqua}
; stuff I've never seen before :thonk:
:pick_selected {:bg colors.bright_red :fg colors.bright_red}
:tab_selected {:bg colors.bright_green :fg colors.bright_green}
:tab {:bg colors.bright_yellow :fg colors.bright_yellow}}})))
[(utils.plugin :akinsho/nvim-bufferline.lua
{:config setup :tag "v4.7.0"})]

View file

@ -0,0 +1,70 @@
(local {: autoload : utils} (require :dots.prelude))
(local cmp (autoload :cmp))
; check this for coloring maybe
; https://github.com/hrsh7th/nvim-cmp/blob/ada9ddeff71e82ad0e52c9a280a1e315a8810b9a/lua/cmp/entry.lua#L199
(fn item-formatter [item vim-item]
(let [padding (string.rep " " (- 10 (vim.fn.strwidth vim-item.abbr)))
details (?. item :completion_item :detail)]
(when details
(set vim-item.abbr (.. vim-item.abbr padding " " details))))
vim-item)
(fn setup []
(cmp.setup
{:snippet {:expand (fn [args] ((. vim.fn :vsnip#anonymous) args.body))}
:completion {:autocomplete false}
:mapping (cmp.mapping.preset.insert
{:<C-d> (cmp.mapping.scroll_docs -4)
:<C-f> (cmp.mapping.scroll_docs 4)
:<C-space> (cmp.mapping.complete)
:<esc> #(do (cmp.mapping.close) (vim.cmd "stopinsert"))
:<CR> (cmp.mapping.confirm {:select true})})
:experimental {:custom_menu true}
:sources [{:name "nvim_lsp" :priority 5}
{:name "vsnip" :priority 3}
; {:name "omni"} ; this prints the completion thing, for some reason,....
{:name "nvim_lua"}
{:name "calc"}
{:name "path"}
{:name "nvim_lsp_signature_help"}
{:name "conventionalcommits"}
{:name "crates"}]
;{:name "buffer"}]
:formatting {:format item-formatter}
:sorting {:priority_weight 2
:comparators [#(do (if (and (= 15 ($1:get_kind)) (= 15 ($2:get_kind))) nil
(= 15 ($1:get_kind)) false
(= 15 ($2:get_kind)) true
nil)) ; 15 means "SNIPPET", see https://github.com/hrsh7th/nvim-cmp/blob/main/lua/cmp/types/lsp.lua
cmp.config.compare.offset
cmp.config.compare.exact
cmp.config.compare.score
cmp.config.compare.kind
cmp.config.compare.sort_text
cmp.config.compare.length
cmp.config.compare.order]}})
(cmp.setup.cmdline "/" {:sources [{:name :buffer}]}))
[(utils.plugin :hrsh7th/vim-vsnip {:lazy true :event ["VeryLazy"]})
(utils.plugin :hrsh7th/vim-vsnip-integ {:lazy true :event ["VeryLazy"]})
(utils.plugin :rafamadriz/friendly-snippets)
(utils.plugin :hrsh7th/nvim-cmp {:lazy true
:event ["VeryLazy"]
:dependencies [[:hrsh7th/cmp-nvim-lsp]
[:hrsh7th/cmp-buffer]
[:hrsh7th/cmp-vsnip]
[:hrsh7th/cmp-nvim-lua]
[:hrsh7th/cmp-calc]
[:hrsh7th/cmp-path]
[:hrsh7th/cmp-nvim-lsp-signature-help]
[:davidsierradz/cmp-conventionalcommits]
[:hrsh7th/cmp-omni]]
:config setup})]

View file

@ -0,0 +1,12 @@
(local utils (require :dots.utils))
;:github/copilot.vim {:cmd ["Copilot"]}
[(utils.plugin
:zbirenbaum/copilot.lua
{:cmd "Copilot"
:event "InsertEnter"
:opts {:panel {:enabled false}
:suggestion {:enabled true
:auto_trigger :true
:keymap {:accept "<tab>"
:next "<C-l><C-n>"}}}})]

View file

@ -0,0 +1,14 @@
(local {: autoload : utils} (require :dots.prelude))
(local cb (autoload :diffview.config))
(local diffview (autoload :diffview))
[(utils.plugin
:sindrets/diffview.nvim
{:cmd ["DiffviewOpen" "DiffviewToggleFiles"]
:config #(diffview.setup
{:diff_binaries false
:file_panel {:width 35
:use_icons false}
:key_bindings {:view {:<leader>dn (cb.diffview_callback "select_next_entry")
:<leader>dp (cb.diffview_callback "select_prev_entry")
:<leader>dd (cb.diffview_callback "toggle_files")}}})})]

View file

@ -0,0 +1,14 @@
(local utils (require :dots.utils))
(fn setup []
(set vim.g.user_emmet_mode "n")
(set vim.g.user_emmet_leader_key "<leader>e")
(set vim.g.user_emmet_settings {:javascript.jsx {:extends "jsx"}
:typescript.jsx {:extends "jsx"}}))
[(utils.plugin
:mattn/emmet-vim
{:lazy true
:config setup})]

View file

@ -0,0 +1,110 @@
(local {: autoload : utils : a : str : colors} (require :dots.prelude))
(local feline (autoload :feline))
(fn setup []
(set vim.opt.termguicolors true)
(local modes
{:n {:text "NORMAL" :color colors.neutral_aqua}
:i {:text "INSERT" :color colors.neutral_yellow}
:c {:text "CMMAND" :color colors.neutral_aqua}
:ce {:text "NORMEX" :color colors.neutral_aqua}
:cv {:text "EX" :color colors.neutral_aqua}
:ic {:text "INSCOMP" :color colors.neutral_aqua}
:no {:text "OP-PENDING" :color colors.neutral_aqua}
:r {:text "HIT-ENTER" :color colors.neutral_aqua}
:r? {:text "CONFIRM" :color colors.neutral_aqua}
:R {:text "REPLACE" :color colors.neutral_aqua}
:Rv {:text "VIRTUAL" :color colors.neutral_aqua}
:s {:text "SELECT" :color colors.neutral_aqua}
:S {:text "SELECT" :color colors.neutral_aqua}
:t {:text "TERM" :color colors.neutral_aqua}
:v {:text "VISUAL" :color colors.neutral_blue}
:V {:text "VISUAL LINE" :color colors.neutral_blue}
"" {:text "VISUAL BLOCK" :color colors.neutral_blue}})
(local bar-bg colors.bg_main)
(local horiz-separator-color colors.light1)
(fn or-empty [x] (or x ""))
(fn spaces [x] (if x (.. " " x " ") ""))
(fn get-current-filepath []
(let [file (utils.shorten-path (vim.fn.bufname) 30 30)]
(if (a.empty? file) ""
vim.bo.readonly (.. "RO " file)
(and vim.bo.modifiable vim.bo.modified) (.. file " ●")
(.. file " "))))
(fn vim-mode-hl [use-as-fg?]
(let [color (. modes (vim.fn.mode) :color)]
(if use-as-fg? {:bg bar-bg :fg color} {:bg color :fg bar-bg})))
(fn git-status-provider []
(or-empty (utils.keep-if #(~= "master" $1)
(?. vim.b :gitsigns_status_dict :head))))
(fn vim-mode []
(.. " " (or (. modes (vim.fn.mode) :text) vim.fn.mode) " "))
;(fn lsp-progress-provider []
;(let [msgs (vim.lsp.util.get_progress_messages)
;s (icollect [_ msg (ipairs msgs)]
;(when msg.message
;(.. msg.title " " msg.message)))]
;(or-empty (str.join " | " s))))
(fn lsp-progress-provider []
(vim.lsp.status))
(fn lsp-diagnostic-component [kind color]
{:enabled #(~= 0 (length (vim.diagnostic.get 0 {:severity kind})))
:provider #(spaces (length (vim.diagnostic.get 0 {:severity kind})))
:left_sep ""
:right_sep ""
:hl {:fg bar-bg :bg color}})
(fn coordinates []
(let [[line col] (vim.api.nvim_win_get_cursor 0)]
(.. " " line ":" col " ")))
; Fills the bar with an horizontal line
(fn inactive-separator-provider []
(if (not= (vim.fn.winnr) (vim.fn.winnr :j))
(string.rep "─" (vim.api.nvim_win_get_width 0))
""))
(local components {:active {} :inactive {}})
(tset components.active 1
[{:provider vim-mode :hl #(vim-mode-hl false)}
{:provider get-current-filepath :left_sep " " :hl {:fg colors.light4}}
{:provider git-status-provider :left_sep " " :hl #(vim-mode-hl true)}])
(tset components.active 2
[{:provider lsp-progress-provider
:left_sep " "
:right_sep " "
:enabled #(< 0 (length (vim.lsp.buf_get_clients)))}])
(tset components.active 3
[{:provider vim.bo.filetype :right_sep " " :hl #(vim-mode-hl true)}
(lsp-diagnostic-component vim.diagnostic.severity.INFO colors.neutral_green)
(lsp-diagnostic-component vim.diagnostic.severity.HINT colors.neutral_aqua)
(lsp-diagnostic-component vim.diagnostic.severity.WARN colors.neutral_yellow)
(lsp-diagnostic-component vim.diagnostic.severity.ERROR colors.neutral_red)
{:provider coordinates :hl #(vim-mode-hl false)}])
(tset components.inactive 1
[{:provider inactive-separator-provider
:hl {:bg "NONE" :fg horiz-separator-color}}])
(utils.highlight-add :StatusLineNC {:bg "NONE" :fg colors.light1})
(feline.setup {:theme {:fg colors.light1 :bg colors.bg_main}
:components components}))
[(utils.plugin :Famiu/feline.nvim {:config setup})]

View file

@ -0,0 +1,7 @@
(local {: autoload : utils} (require :dots.prelude))
; (local flutter-tools (autoload :flutter-tools)))
[(utils.plugin :akinsho/flutter-tools.nvim
{:config true
:lazy false
:dependencies ["nvim-lua/plenary.nvim" "stevearc/dressing.nvim"]})]

View file

@ -0,0 +1,26 @@
(local {: autoload} (require :nfnl.module))
(local utils (autoload :dots.utils))
(local gitsigns (autoload :gitsigns))
(fn setup []
(gitsigns.setup
{:signs {:add {:text "▍"}
:change {:text "▍"}
:delete {:text "▍"}
:topdelete {:text "▍"}
:changedelete {:text "▍"}}
; :keymaps {:noremap true
; :buffer true}
:current_line_blame false
:update_debounce 100})
(let [scrollbar-gitsigns (require "scrollbar.handlers.gitsigns")]
(scrollbar-gitsigns.setup)))
[(utils.plugin
:lewis6991/gitsigns.nvim
{:dependencies [:vim-gruvbox8
:petertriho/nvim-scrollbar]
:config setup})]

View file

@ -0,0 +1,145 @@
(local {: autoload} (require :nfnl.module))
(local utils (autoload :dots.utils))
(local colors (autoload :dots.colors))
(fn setup []
(set vim.g.gruvbox_italics 0)
(set vim.g.gruvbox_italicise_strings 0)
(set vim.g.gruvbox_filetype_hi_groups 1)
(set vim.g.gruvbox_plugin_hi_groups 1)
(fn setup-colors []
(utils.highlight-add
["GruvboxBlueSign" "GruvboxAquaSign" "GruvboxRedSign" "GruvboxYellowSign" "GruvboxGreenSign" "GruvboxOrangeSign" "GruvboxPurpleSign"]
{:bg "NONE"})
; hide empty line ~'s
(utils.highlight :EndOfBuffer {:bg "NONE" :fg colors.bg_main})
(utils.highlight :LineNr {:bg "NONE"})
(utils.highlight-add :Pmenu {:bg colors.bg_second})
(utils.highlight-add :PmenuSel {:bg colors.bright_aqua})
(utils.highlight-add :PmenuSbar {:bg colors.bg_second})
(utils.highlight-add :PmenuThumb {:bg colors.dark1})
(utils.highlight-add :NormalFloat {:bg colors.bg_second})
(utils.highlight-add :SignColumn {:bg colors.bg_main})
(utils.highlight-add :FloatBorder {:bg colors.bg_second})
(utils.highlight-add :SpecialComment {:fg colors.dark4})
(utils.highlight-add
[:LspDiagnosticsSignError :LspDiagnosticsSignWarning :LspDiagnosticsSignInformation :LspDiagnosticsSignHint]
{:bg "NONE"})
(utils.highlight-add :DiagnosticError {:fg colors.bright_red})
(utils.highlight-add :DiagnosticWarning {:fg colors.bright_orange})
(utils.highlight-add :DiagnosticInformation {:fg colors.bright_aqua})
(utils.highlight-add :DiagnosticHint {:fg colors.bright_yellow})
(utils.highlight-add :DiagnosticVirtualTextError {:bg "#342828" :fg colors.bright_red})
(utils.highlight-add :DiagnosticVirtualTextWarning {:bg "#473027" :fg colors.bright_orange})
(utils.highlight-add :DiagnosticVirtualTextWarning {:bg "#3b2c28" :fg colors.bright_orange})
(utils.highlight-add :DiagnosticVirtualTextInformation {:bg "#272d2f" :fg colors.bright_aqua})
(utils.highlight-add :DiagnosticVirtualTextHint {:bg "#272d2f" :fg colors.bright_yellow})
(utils.highlight :LspDiagnosticsUnderlineError {:gui "undercurl"})
;(vim.fn.sign_localine :LspDiagnosticsSignError {:text "◆"})
;(vim.fn.sign_localine :LspDiagnosticsSignWarning {:text "◆"})
;(vim.fn.sign_localine :LspDiagnosticsSignHint {:text "◆"})
;(vim.fn.sign_localine :LspDiagnosticsSignInformation {:text "◆"})
(utils.highlight :StatusLine {:bg colors.dark1 :fg colors.light0})
(vim.cmd "highlight link Function GruvboxGreen")
(utils.highlight-add :Function {:gui "NONE"}))
(fn setup-telescope-theme []
(local prompt "blacker")
(if
(= prompt "bright")
(let [promptbg "#689d6a"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.bg_main})
(utils.highlight-add :TelescopePromptTitle {:bg promptbg :fg colors.dark1}))
(= prompt "dark")
(let [promptbg "#252525"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_blue :fg colors.dark1}))
(= prompt "black")
(let [promptbg "#212526"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_green :fg colors.dark1}))
(= prompt "blacker")
(let [promptbg "#1f2324"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_blue :fg colors.dark1})))
(local side "darker")
(if
(= side "brighter")
(let [previewbg "#1f2324"]
(utils.highlight-add :TelescopePreviewNormal {:bg previewbg})
(utils.highlight-add :TelescopePreviewBorder {:bg previewbg :fg previewbg}))
(= side "darker")
(let [previewbg "#1a1e1f"]
(utils.highlight-add :TelescopePreviewNormal {:bg previewbg})
(utils.highlight-add :TelescopePreviewBorder {:bg previewbg :fg previewbg})))
(utils.highlight-add :TelescopeBorder {:bg colors.bg_second :fg colors.bg_second}) (utils.highlight-add :TelescopeNormal {:bg colors.bg_second})
(utils.highlight-add :TelescopePreviewTitle {:bg colors.neutral_green :fg colors.dark1})
(utils.highlight-add :TelescopeResultsTitle {:bg colors.neutral_aqua :fg colors.dark1})
(utils.highlight-add :TelescopeSelection {:bg colors.neutral_aqua :fg colors.dark1}))
(fn setup-noice-theme []
(utils.highlight-add :NoicePopupmenu {:bg colors.bg_second})
(utils.highlight-add :NoiceCmdline {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePopup {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePrompt {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePopupBorder {:fg colors.bright_aqua})
(utils.highlight-add :NoiceCmdlineIcon {:fg colors.bright_aqua}))
(vim.api.nvim_create_autocmd "ColorScheme" {:pattern "*" :callback setup-colors})
(setup-colors)
(vim.api.nvim_create_autocmd "ColorScheme" {:pattern "*" :callback setup-telescope-theme})
(setup-telescope-theme)
(vim.api.nvim_create_autocmd "ColorScheme" {:pattern "*" :callback setup-noice-theme})
(setup-noice-theme)
(vim.api.nvim_create_autocmd
"ColorScheme"
{:pattern "*"
:callback
(fn []
(utils.highlight-add "GitSignsAdd" {:gui "NONE" :bg "NONE" :fg colors.bright_aqua})
(utils.highlight-add "GitSignsDelete" {:gui "NONE" :bg "NONE" :fg colors.neutral_red})
(utils.highlight-add "GitSignsChange" {:gui "NONE" :bg "NONE" :fg colors.bright_blue})
(utils.highlight-add "ScrollbarGitAdd" {:gui "NONE" :bg "NONE" :fg colors.bright_aqua})
(utils.highlight-add "ScrollbarGitDelete" {:gui "NONE" :bg "NONE" :fg colors.neutral_red})
(utils.highlight-add "ScrollbarGitChange" {:gui "NONE" :bg "NONE" :fg colors.bright_blue}))})
(if (= "epix" (vim.fn.hostname))
(vim.cmd "colorscheme gruvbox8_hard")
(vim.cmd "colorscheme gruvbox8")))
[(utils.plugin :lifepillar/vim-gruvbox8 {:lazy false :priority 1000 :config setup})]

View file

@ -0,0 +1,263 @@
(local {: autoload : a : utils} (require :dots.prelude))
(local lsp (autoload :lspconfig))
(local lsp-configs (autoload :lspconfig/configs))
(local cmp_nvim_lsp (autoload :cmp_nvim_lsp))
(fn setup []
; TODO check https://github.com/neovim/nvim-lspconfig/blob/master/ADVANCED_README.md for default config for all of them
(tset vim.lsp.handlers :textDocument/publishDiagnostics
(vim.lsp.with vim.lsp.diagnostic.on_publish_diagnostics
{:update_in_insert false
:virtual_text {:prefix "◆"}
:signs false
:severity_sort true}))
(fn on_attach [client bufnr]
(if client.server_capabilities.documentHighlight
(do
(utils.highlight "LspReferenceRead" {:gui "underline"})
(utils.highlight "LspReferenceText" {:gui "underline"})
(utils.highlight "LspReferenceWrite" {:gui "underline"})
(vim.api.nvim_exec
"augroup lsp_document_highlight
autocmd! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END"
false))))
(fn better_root_pattern [patterns except-patterns]
"match path if one of the given patterns is matched, EXCEPT if one of the except-patterns is matched"
(fn [path]
(when (not ((lsp.util.root_pattern except-patterns) path))
((lsp.util.root_pattern patterns) path))))
; advertise snippet support
(local default-capabilities
(let [capabilities (vim.lsp.protocol.make_client_capabilities)]
(set capabilities.textDocument.completion.completionItem.snippetSupport true)
(cmp_nvim_lsp.default_capabilities capabilities)))
(fn init-lsp [lsp-name ?opts]
"initialize a language server with defaults"
(let [merged-opts (a.merge {:on_attach on_attach :capabilities default-capabilities} (or ?opts {}))]
((. lsp lsp-name :setup) merged-opts)))
(init-lsp :jsonls {:commands {:Format [ #(vim.lsp.buf.range_formatting [] [0 0] [(vim.fn.line "$") 0])]}})
(init-lsp :denols {:root_dir (better_root_pattern [".git"] ["package.json"])})
(init-lsp :hls {:settings {:languageServerHaskell {:formattingProvider "stylish-haskell"}}})
(init-lsp :ocamllsp)
(init-lsp :vimls)
(init-lsp :gopls)
(init-lsp :bashls)
(init-lsp :erlangls)
(init-lsp :yamlls)
(init-lsp :html)
(init-lsp :svelte)
(init-lsp :elmls)
(init-lsp :texlab)
(init-lsp :pyright)
;(init-lsp :ltex {:settings {:ltex {:dictionary {:de-DE [":~/.config/ltex-ls/dictionary.txt"]}
;:disabledRules {:de-DE [":~/.config/ltex-ls/disabledRules.txt"]}
;:hiddenFalsePositives {:de-DE [":~/.config/ltex-ls/hiddenFalsePositives.txt"]}
;:additionalRules {:motherTongue "de-DE"}}}})
(init-lsp :vls)
;(init-lsp :clangd)
;(init-lsp :ccls)
(init-lsp :perlls)
(init-lsp :powershell_es {:bundle_path "/home/leon/powershell"})
;(ltex-ls.init)
(init-lsp :clangd)
(init-lsp :cssls {:filestypes ["css" "scss" "less" "stylus"]
:root_dir (lsp.util.root_pattern ["package.json" ".git"])
:settings {:css {:validate true}
:less {:validate true}
:scss {:validate true}}})
(lsp.tsserver.setup {:root_dir (lsp.util.root_pattern "package.json")
:on_attach (fn [client bufnr]
(set client.resolved_capabilities.document_formatting false)
(on_attach client bufnr))})
(let [
rustaceanvim (require "rustaceanvim")
rustaceanvim-config (require "rustaceanvim.config")
extension-path "/home/leon/.vscode/extensions/vadimcn.vscode-lldb-1.6.8/"
codelldb-path (.. extension-path "adapter/codelldb")
liblldb-path (.. extension-path "lldb/lib/liblldb.so")
features nil]
(set vim.g.rustaceanvim {:tools {:inlay_hints {:show_parameter_hints false}
:autoSetHints false}
:dap {:adapter (rustaceanvim-config.get_codelldb_adapter codelldb-path liblldb-path)}
:server {:on_attach on_attach
:capabilities default-capabilities
:settings {:rust-analyzer {:cargo {:loadOutDirsFromCheck true
:features (or features "all")
:noDefaultFeatures (~= nil features)}
:procMacro {:enable true}
:diagnostics {:enable false ;; native rust analyzer diagnostics
:experimental {:enable false}}
:checkOnSave {:overrideCommand ["cargo" "clippy" "--workspace" "--message-format=json" "--all-targets" "--all-features"]}}}}}))
;:cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}}))
(when (or true (not lsp.fennel_language_server))
(tset lsp-configs :fennel_language_server
{:default_config {:cmd "/Users/leon/.cargo/bin/fennel-language-server"
:filetypes [:fennel]
:single_file_support true
:root_dir (lsp.util.root_pattern ["fnl" "init.lua"])
:settings {:fennel {:workspace {:library (vim.api.nvim_list_runtime_paths)}
:diagnostics {:globals [:vim]}}}}}))
(init-lsp :fennel_language_server
{:root_dir (lsp.util.root_pattern ["fnl" "init.lua"])
:settings {:fennel {:workspace {:library (vim.api.nvim_list_runtime_paths)}
:diagnostics {:globals [:vim :comment]}}}})
;
;
; (let [sumneko_root_path (.. vim.env.HOME "/.local/share/lua-language-server")
; sumneko_binary (.. sumneko_root_path "/bin/Linux/lua-language-server"))
; (init-lsp
; :lua_ls
; {:cmd [sumneko_binary "-E" (.. sumneko_root_path "/main.lua")]
; :settings {:Lua {:runtime {:version "LuaJIT"
; :path (vim.split package.path ";")}
; :diagnostics {:globals ["vim"]}
; :workspace {:library {(vim.fn.expand "$VIMRUNTIME/lua") true
; (vim.fn.expand "$VIMRUNTIME/lua/vim/lsp") true}}
; :telemetry false}}}))
(comment
(when (not lsp.prolog_lsp)
(tset lsp-configs :prolog_lsp
{:default_config {:cmd ["swipl" "-g" "use_module(library(lsp_server))." "-g" "lsp_server:main" "-t" "halt" "--" "stdio"]
:filetypes ["prolog"]
:root_dir (fn [fname] (or (lsp.util.find_git_ancestor fname) (vim.loop.os_homedir)))
:settings {}}}))
(lsp.prolog_lsp.setup {}))
(comment
(let [ewwls-path "/home/leon/coding/projects/ls-eww/crates/ewwls/target/debug/ewwls"]
(when (vim.fn.filereadable ewwls-path)
(when (not lsp.ewwls)
(set lsp-configs.ewwls
{:default_config {:cmd [ewwls-path]
:filetypes ["yuck"]
:root_dir (fn [fname] (or (lsp.util.find_git_ancestor fname) (vim.loop.os_homedir)))
:settings {}}}))
(init-lsp :ewwls))))
; Idris2 ----------------------------------------------------------- <<<<<
(local autostart-semantic-highlighting true)
(fn refresh-semantic-highlighting []
(when autostart-semantic-highlighting
(vim.lsp.buf_request 0
:textDocument/semanticTokens/full
{:textDocument (vim.lsp.util.make_text_document_params)}
nil)
vim.NIL))
(when (not lsp.idris2_lsp)
(set lsp-configs.idris2_lsp
{:default_config
{:cmd [:idris2-lsp]
:filetypes [:idris2]
:on_new_config (fn [new-config new-root-dir]
(set new-config.cmd {1 :idris2-lsp})
(set new-config.capabilities.workspace.semanticTokens {:refreshSupport true}))
:root_dir (fn [fname]
(local scandir (require :plenary.scandir))
(fn find-ipkg-ancestor [fname]
(lsp.util.search_ancestors
fname
(fn [path]
(local res (scandir.scan_dir path {:depth 1 :search_pattern ".+%.ipkg"}))
(when (not (vim.tbl_isempty res)) path))))
(or (or (find-ipkg-ancestor fname)
(lsp.util.find_git_ancestor fname))
(vim.loop.os_homedir)))
:settings {}}}))
(lsp.idris2_lsp.setup
{:on_attach refresh-semantic-highlighting
:autostart true
:handlers {:workspace/semanticTokens/refresh refresh-semantic-highlighting
:textDocument/semanticTokens/full
(fn [err method result client-id bufnr config]
(let [client (vim.lsp.get_client_by_id client-id)
legend client.server_capabilities.semanticTokensProvider.legend
token-types legend.tokenTypes
data result.data
ns (vim.api.nvim_create_namespace :nvim-lsp-semantic)]
(vim.api.nvim_buf_clear_namespace bufnr ns 0 (- 1))
(local tokens {})
(var (prev-line prev-start) (values nil 0))
(for [i 1 (length data) 5]
(local delta-line (. data i))
(set prev-line
(or (and prev-line (+ prev-line delta-line))
delta-line))
(local delta-start (. data (+ i 1)))
(set prev-start (or (and (= delta-line 0) (+ prev-start delta-start))
delta-start))
(local token-type (. token-types (+ (. data (+ i 3)) 1)))
(vim.api.nvim_buf_add_highlight bufnr
ns
(.. :LspSemantic_ token-type)
prev-line
prev-start
(+ prev-start (. data (+ i 2)))))))}})
(vim.cmd "highlight link LspSemantic_type Include")
(vim.cmd "highlight link LspSemantic_function Identifier")
(vim.cmd "highlight link LspSemantic_struct Number")
(vim.cmd "highlight LspSemantic_variable guifg=gray")
(vim.cmd "highlight link LspSemantic_keyword Structure")
; --------------------------------- >>>>>
(set vim.opt.signcolumn "yes")
; Cleanup links in markdown documentation
(fn cleanup-markdown [contents]
(if (= contents.kind "markdown")
(tset contents :value (string.gsub contents.value "%[([^%]]+)%]%(([^%)]+)%)" "[%1]")))
contents)
(let [previous-handler (. vim.lsp.handlers :textDocument/hover)]
(tset vim.lsp.handlers :textDocument/hover
(fn [a result b c]
(if (not (and result result.contents))
(previous-handler a result b c)
(let [new-contents (cleanup-markdown result.contents)]
(tset result :contents new-contents)
(previous-handler a result b c)))))))
[(utils.plugin :williamboman/mason.nvim {:config #((. (require :mason) :setup))})
(utils.plugin :williamboman/mason-lspconfig.nvim {:config {:ensure_installed ["rust_analyzer"]}})
(utils.plugin :neovim/nvim-lspconfig {:event "VeryLazy" :lazy true :config setup})]
; vim:foldmarker=<<<<<,>>>>>

View file

@ -0,0 +1,152 @@
(local {: autoload : utils} (require :dots.prelude))
(local lsp (autoload :lspconfig))
(local configs (autoload :lspconfig/configs))
(local lsputil (autoload :lspconfig/util))
(fn cmds [xs]
(icollect [_ x (ipairs xs)]
(.. "\\" x "{}")))
(local latex-command-settings
{:dummy (cmds ["texttt" "scripture" "lstref" "figref" "tblref" "secref" "personaltextcite" "personalparencite" "textcite" "parencite" "parencite[]" "game" "acsu" "enquote" "name" "item" "reqref" "gamebtn" "fs" "cs" "appref" "sorty"])
:ignore (cmds ["urlfootnote" "caption" "todo"])})
(local Dictionary-file {:de-DE [(.. (vim.fn.getenv "HOME") "/.config/ltex-ls/dictionary.txt")]})
(local Disabled-rules-file {:de-DE [(.. (vim.fn.getenv "HOME") "/.config/ltex-ls/disable.txt")]})
(local False-positives-file {:de-DE [(.. (vim.fn.getenv "HOME") "/.config/ltex-ls/false.txt")]})
(local latex-command-settings-formatted
(let [tbl {}]
(each [option commands (pairs latex-command-settings)]
(each [_ command (ipairs commands)]
(tset tbl command option)))
tbl))
(fn read-files [files]
(let [dict {}]
(each [_ file (ipairs files)]
(local f (io.open file :r))
(when (~= nil f)
(each [l (f:lines)]
(table.insert dict l))))
dict))
(fn find-ltex-lang []
(let [buf-clients (vim.lsp.buf_get_clients)]
(each [_ client (ipairs buf-clients)]
(when (= client.name :ltex)
(let [___antifnl_rtn_1___ client.config.settings.ltex.language]
(lua "return ___antifnl_rtn_1___"))))))
(fn find-ltex-files [filetype value]
(if (= filetype :dictionary)
(. Dictionary-file (or value (find-ltex-lang)))
(= filetype :disable)
(. Disabled-rules-file (or value (find-ltex-lang)))
(= filetype :falsePositive)
(. False-positives-file (or value (find-ltex-lang)))))
(fn update-config [lang configtype]
(let [buf-clients (vim.lsp.buf_get_clients)]
(var client nil)
(each [_ lsp (ipairs buf-clients)]
(when (= lsp.name :ltex)
(set client lsp)))
(if client
(if (= configtype :dictionary)
(if client.config.settings.ltex.dictionary
(do
(set client.config.settings.ltex.dictionary
{lang (read-files (. Dictionary-file lang))})
(client.notify :workspace/didChangeConfiguration
client.config.settings))
(vim.notify "Error when reading dictionary config, check it"))
(= configtype :disable)
(if client.config.settings.ltex.disabledRules
(do
(set client.config.settings.ltex.disabledRules
{lang (read-files (. Disabled-rules-file lang))})
(client.notify :workspace/didChangeConfiguration
client.config.settings))
(vim.notify "Error when reading disabledRules config, check it"))
(= configtype :falsePositive)
(if client.config.settings.ltex.hiddenFalsePositives
(do
(set client.config.settings.ltex.hiddenFalsePositives
{lang (read-files (. False-positives-file lang))})
(client.notify :workspace/didChangeConfiguration
client.config.settings))
(vim.notify "Error when reading hiddenFalsePositives config, check it")))
nil)))
(fn add-to-file [filetype lang file value]
(set-forcibly! file (io.open (. file (- (length file) 0)) :a+))
(if file (do
(file:write (.. value "\n"))
(file:close))
(let [___antifnl_rtns_1___ [(print "Failed insert %q" value)]]
(lua "return (table.unpack or _G.unpack)(___antifnl_rtns_1___)")))
(if (= filetype :dictionary) (update-config lang :dictionary)
(= filetype :disable) (update-config lang :disable)
(= filetype :falsePositive) (update-config lang :falsePositive)))
(fn add-to [filetype lang file value]
(let [dict (read-files file)]
(each [_ v (ipairs dict)]
(when (= v value)
(lua "return nil")))
(add-to-file filetype lang file value)))
(fn init []
(set configs.ltex
{:default_config {:cmd [:ltex-ls]
:filetypes [:tex :latex :bib]
:root_dir (fn [filename] (lsputil.path.dirname filename))}})
(lsp.ltex.setup {:settings {:ltex {:enabled [:latex :tex :bib]
:language "de-DE"
:checkFrequency "save"
:diagnosticSeverity "information"
:setenceCacheSize 5000
:additionalRules {:enablePickyRules true
:motherTongue "de-DE"}
:dictionary (utils.map-values read-files Dictionary-file)
:disabledRules (utils.map-values read-files Disabled-rules-file)
:hiddenFalsePositives (utils.map-values read-files False-positives-file)
:latex {:commands latex-command-settings-formatted}}}})
(set lsp.ltex.dictionary_file Dictionary-file)
(set lsp.ltex.disabledrules_file Disabled-rules-file)
(set lsp.ltex.falsepostivies_file False-positives-file)
(local orig-execute-command vim.lsp.buf.execute_command)
(set vim.lsp.buf.execute_command
(fn [command]
(if (= command.command :_ltex.addToDictionary)
(let [arg (. (. command.arguments 1) :words)]
(each [lang words (pairs arg)]
(each [_ word (ipairs words)]
(local filetype :dictionary)
(add-to filetype lang (find-ltex-files filetype lang) word))))
(= command.command :_ltex.disableRules)
(let [arg (. (. command.arguments 1) :ruleIds)]
(each [lang rules (pairs arg)]
(each [_ rule (ipairs rules)]
(local filetype :disable)
(add-to filetype lang (find-ltex-files filetype lang) rule))))
(= command.command :_ltex.hideFalsePositives)
(let [arg (. (. command.arguments 1) :falsePositives)]
(each [lang rules (pairs arg)]
(each [_ rule (ipairs rules)]
(local filetype :falsePositive)
(add-to filetype lang (find-ltex-files filetype lang) rule))))
(orig-execute-command command)))))
[]

View file

@ -0,0 +1,35 @@
(local utils (require :dots.utils))
[(utils.plugin
:folke/noice.nvim
{:dependencies [:MunifTanjim/nui.nvim]
:opts {:presets {:inc_rename true
:long_message_to_split true
:bottom_search true}
;:command_palette true}
:lsp {:override {:vim.lsp.util.convert_input_to_markdown_lines true
:vim.lsp.util.stylize_markdown true
:cmp.entry.get_documentation true}}
:views {:cmdline_popup {:border {:style "none" :padding [1 1]}
:position {:row 5 :col "50%"}
:size {:width 60 :height "auto"}}
:popupmenu {:relative "editor"
:border {:style "none" :padding [1 1]}
:position {:row 8 :col "50%"}
:size {:width 60 :height 10}}
:mini {:max_height 5}}
:cmdline {:view "cmdline" ; change to cmdline_popup
:format {:cmdline {:icon ":"}
:lua false
:help false}}
:messages {:view "mini"
:view_error "cmdline_output"
:view_warn "mini"
:view_search "virtualtext"}
:markdown {:hover {"|(%S-)|" vim.cmd.help}}
:routes [{:view "notify" :filter {:event "msg_showmode"}}
{:view "mini"
:filter {:error true :max_height 5}}
{:view "cmdline_output"
:filter {:error true :min_height 6}}]}})]
[]

View file

@ -0,0 +1,16 @@
(local {: autoload : utils} (require :dots.prelude))
(local colorizer (autoload :colorizer))
[(utils.plugin
:norcalli/nvim-colorizer.lua
{:event "VeryLazy"
:lazy true
:config #(colorizer.setup
["*"]
{:RGB true
:RRGGBB true
:names true
:RRGGBBAA true
:rgb_fn true
:hsl_fn true
:mode "background"})})]

View file

@ -0,0 +1,15 @@
(local {: autoload : utils} (require :dots.prelude))
(local vault-path (.. (vim.fn.expand "~") "/Documents/obsidian-vault"))
[(utils.plugin :epwalsh/obsidian.nvim
{:lazy true
:version "*"
:ft "markdown"
:event [(.. "BufReadPre " vault-path "/**.md")
(.. "BufNewFile " vault-path "/**.md")]
:dependencies ["nvim-lua/plenary.nvim"]
:opts {:workspaces [{:name "Vault"
:path vault-path}]
:completion {:nvim_cmp true}}})]

View file

@ -0,0 +1,180 @@
;(local {: autolod} (require :nfnl.module))
(macro setup [name opts]
`((. (require ,name) :setup) ,opts))
(macro plugin [name ?opts]
(if (= nil ?opts)
name
(do (tset ?opts 1 name) ?opts)))
[(plugin :Olical/aniseed)
(plugin :Olical/nfnl)
(plugin :nvim-lua/plenary.nvim)
(plugin :norcalli/nvim.lua)
(plugin :kyazdani42/nvim-web-devicons)
(plugin :folke/which-key.nvim)
(plugin :ckipp01/nvim-jenkinsfile-linter
{:dependencies ["nvim-lua/plenary.nvim"]})
(plugin :psliwka/vim-smoothie)
(plugin :nathanaelkane/vim-indent-guides
{:cmd ["IndentGuidesToggle"]})
(plugin :luukvbaal/stabilize.nvim {:config true})
(plugin :stevearc/dressing.nvim {:config true})
(plugin :tweekmonster/startuptime.vim {:cmd ["StartupTime"]})
(plugin :moll/vim-bbye {:lazy true :cmd [:Bdelete :Bwipeout]})
(plugin :petertriho/nvim-scrollbar
{:event "VeryLazy"
:lazy true
:config true})
(plugin :TimUntersberger/neogit
{:opts {:integrations {:diffview true}}
:cmd ["Neogit"]})
(plugin :folke/persistence.nvim
{:opts {:dir (vim.fn.expand (.. (vim.fn.stdpath "cache") "/sessions/"))}})
(plugin "https://git.sr.ht/~whynothugo/lsp_lines.nvim"
{:config #(do (setup :lsp_lines)
(vim.diagnostic.config {:virtual_lines false}))})
; editing and movement <<<
(plugin :jiangmiao/auto-pairs)
(plugin :tpope/vim-repeat)
(plugin :preservim/nerdcommenter
{:event "VeryLazy"
:lazy true
:priority 1000})
(plugin :godlygeek/tabular
{:cmd ["Tabularize"]})
(plugin :tpope/vim-surround)
(plugin :hauleth/sad.vim)
(plugin :wellle/targets.vim) ; more text objects. IE: cin (change in next parens). generally better handling of surrounding objects.
(plugin :mg979/vim-visual-multi
{:lazy true :event "VeryLazy"})
(plugin :tommcdo/vim-exchange)
(plugin :phaazon/hop.nvim
{:lazy true
:event "VeryLazy"
:opts {:keys "jfkdls;amvieurow"}})
; >>>
; debugger <<<
(plugin :rcarriga/nvim-dap-ui
{:lazy true
:config true
:dependencies [:mfussenegger/nvim-dap
:nvim-neotest/nvim-nio]})
(plugin :mfussenegger/nvim-dap
{:lazy true})
(plugin :nvim-telescope/telescope-dap.nvim
{:lazy true
:dependencies [:nvim-telescope/telescope.nvim
:mfussenegger/nvim-dap]})
; >>>
; git stuff <<<
(plugin :ldelossa/gh.nvim
{:lazy true
:config #(do ((. (require "litee.lib") :setup))
((. (require "litee.gh") :setup)))
:dependencies [:ldelossa/litee.nvim]})
(plugin :pwntester/octo.nvim
{:lazy true
:dependencies [:nvim-lua/plenary.nvim
:nvim-telescope/telescope.nvim
:kyazdani42/nvim-web-devicons]
:config true})
(plugin :ruanyl/vim-gh-line)
(plugin :rhysd/conflict-marker.vim)
(plugin :tpope/vim-fugitive
{:lazy true :event "VeryLazy"})
; >>>
; lsp <<<
(plugin :ray-x/lsp_signature.nvim
{:event :BufEnter})
(plugin :weilbith/nvim-code-action-menu
{:cmd "CodeActionMenu"
:config #(set vim.g.code_action_menu_show_details false)})
(plugin :dnlhc/glance.nvim
{:lazy true :config true})
(plugin :smjonas/inc-rename.nvim
{:opts {:input_buffer_type "dressing"}})
; >>>
; cmp <<<
; >>>
; code-related ----------------------------------------- <<<
(plugin :monkoose/nvlime
{:ft ["lisp"] :dependencies [:monkoose/parsley]})
(plugin :imsnif/kdl.vim)
(plugin :tpope/vim-sleuth)
(plugin :editorconfig/editorconfig-vim)
(plugin :sbdchd/neoformat)
(plugin :elkowar/antifennel-nvim
{:config #(set vim.g.antifennel_executable "/home/leon/tmp/antifennel/antifennel")})
(plugin :Olical/conjure {:ft ["fennel"]})
(plugin :eraserhd/parinfer-rust {:build "cargo build --release"})
(plugin :kmonad/kmonad-vim)
(plugin :elkowar/yuck.vim {:ft ["yuck"]})
(plugin :cespare/vim-toml {:ft ["toml"]})
(plugin :bduggan/vim-raku {:ft ["raku"]})
(plugin :LnL7/vim-nix {:ft ["nix"]})
(plugin :kevinoid/vim-jsonc {})
(plugin :pangloss/vim-javascript {:ft ["javascript"]}) ; syntax highlighting JS
(plugin :ianks/vim-tsx {:ft ["typescript-react"]})
(plugin :leafgarland/typescript-vim {:ft ["typescript" "typescript-react" "javascript"]})
(plugin :HerringtonDarkholme/yats.vim {}) ; typescript syntax highlighting
(plugin :mxw/vim-jsx {})
(plugin :purescript-contrib/purescript-vim {:ft ["purescript"]})
(plugin :derekelkins/agda-vim {:ft ["agda"]})
(plugin :neovimhaskell/haskell-vim { :ft ["haskell"]})
(plugin :monkoose/nvlime
{:ft ["lisp"]
:dependencies ["monkoose/parsley"]
:config #(set vim.g.vlime_overlay "slimv")})
(plugin :rust-lang/rust.vim
{:ft ["rust"]
:dependencies ["mattn/webapi-vim"]
:config #(do (set vim.g.rustfmt_fail_silently 1))})
(plugin :Saecki/crates.nvim
{:dependencies ["nvim-lua/plenary.nvim"]
;:event ["BufRead Cargo.toml"]
;:lazy true
:opts {;:disable_invalid_feature_diagnostic true
:enable_update_available_warning false}})
; temporarily using this fork that merges a few fixes, until simrat is back
(plugin :mrcjkb/rustaceanvim {:version "^4" :ft ["rust" "toml"]})
;(plugin :MunifTanjim/rust-tools.nvim
;{:ft ["rust" "toml"]
;:dependencies ["nvim-lua/popup.nvim" "nvim-lua/plenary.nvim"]})
;(plugin :simrat39/rust-tools.nvim
;{:ft ["rust" "toml"]
;:dependencies ["nvim-lua/popup.nvim" "nvim-lua/plenary.nvim"]})
(plugin :qnighy/lalrpop.vim {})
(plugin :edwinb/idris2-vim {:ft ["idris2"]})
(plugin :vmchale/ats-vim {:ft ["ats" "dats" "sats"]})
(plugin :bakpakin/fennel.vim {:ft ["fennel"]})
(plugin :evanleck/vim-svelte {})]
; >>>
; vim:foldmarker=<<<,>>>

View file

@ -0,0 +1,20 @@
(local {: autoload : utils} (require :dots.prelude))
(local telescope (autoload :telescope))
(local actions (autoload :telescope.actions))
(fn setup []
(telescope.setup
{:defaults {:mappings {:i {:<esc> actions.close}}
:file_ignore_patterns ["Cargo.lock" ".*.snap" "docs/theme/.*" "node%_modules/.*" "target/.*"]}
:extensions {:ui-select [((. (require "telescope.themes") :get_dropdown))]}})
(telescope.load_extension "dap")
(utils.keymap :n :<C-p> ":Telescope find_files<CR>"))
[(utils.plugin :nvim-telescope/telescope.nvim
{:config setup
:cmd ["Telescope"]
:dependencies [:nvim-lua/popup.nvim
:nvim-lua/plenary.nvim]})]

View file

@ -0,0 +1,12 @@
(local utils (require :dots.utils))
[(utils.plugin
:folke/todo-comments.nvim
{:lazy true
:event "VeryLazy"
:opts {:keywords {:TODO {:icon " "}
:WARN {:icon " " :alt [:WARNING :XXX :!!!]}
:NOTE {:icon " " :alt [:INFO]}
:FIX {:icon " " :alt [:FIXME :BUG :FIXIT :ISSUE :PHIX]}
:PERF {:icon " " :alt [:OPTIM :PERFORMANCE :OPTIMIZE]}
:HACK {:icon " "}}}})]

View file

@ -0,0 +1,64 @@
(local utils (require :dots.utils))
; require('ts_context_commentstring').setup {} and set vim.g.skip_ts_context_commentstring_module = true to speed up loading instead.
(fn setup []
(local configs (require :nvim-treesitter.configs))
(set vim.g.skip_ts_context_commentstring_module true)
(configs.setup
{:ensure_installed ["rust" "fennel" "commonlisp" "vim" "regex" "lua" "bash" "markdown" "markdown_inline"]
; :ensure_installed "maintained"
:highlight {:enable false
:disable ["fennel" "rust" "haskell"]}
:incremental_selection {:enable false
:keymaps {:init_selection "gss"
:node_incremental "gsl"
:node_decremental "gsh"
:scope_incremental "gsj"
:scope_decremental "gsk"}}
:textsubjects {:enable true
:disable ["noice"]
:prev_selection ","
:keymaps {"." "textsubjects-smart"}}
; Might fuck with gitsigns
;:rainbow {:enable true}
;:extended_mode true}
;:context_commentstring {:enable true :disable ["rust" "fennel"]}
:playground
{:enable false
:disable ["fennel"]
:updatetime 25 ; Debounced time for highlighting nodes in the playground from source code
:persist_queries false ; Whether the query persists across vim sessions
:keybindings
{:toggle_query_editor "o"
:toggle_hl_groups "i"
:toggle_injected_languages "t"
:toggle_anonymous_nodes "a"
:toggle_language_display "I"
:focus_language "f"
:unfocus_language "F"
:update "R"
:goto_node "<cr>"
:show_help "?"}}}))
;[(utils.plugin :nvim-treesitter/nvim-treesitter
;{:config setup
;:lazy true
;:event ["VeryLazy"]
;:build ":TSUpdate"})
;(utils.plugin :RRethy/nvim-treesitter-textsubjects
;{:dependencies [:nvim-treesitter/nvim-treesitter]
;:lazy true
;:event ["VeryLazy"]})
;(utils.plugin :JoosepAlviste/nvim-ts-context-commentstring
;{:event ["VeryLazy"]
;:lazy true
;:dependencies [:nvim-treesitter/nvim-treesitter]})
;(utils.plugin :nvim-treesitter/playground
;{:event ["VeryLazy"]
;:lazy true
;:dependencies [:nvim-treesitter/nvim-treesitter]})]
[]

View file

@ -0,0 +1,38 @@
(local {: autoload : utils : colors} (require :dots.prelude))
(local trouble (autoload :trouble))
(fn setup []
(trouble.setup
{:icons false
; disabled due to https://github.com/folke/trouble.nvim/issues/125
:auto_preview false
:auto_close true
:auto_open false
:auto_jump ["lsp_definitions" "lsp_workspace_diagnostics" "lsp_type_definitions"]
:indent_lines false
:multiline false
:action_keys
{:jump "<CR>"
:jump_close "o"
:close ["<esc>" "q"]
:cancel "q"
:preview "p"
:toggle_preview "P"
:toggle_mode "m"
:hover ["a" "K"]}})
(utils.highlight "TroubleFoldIcon" {:bg "NONE" :fg colors.bright_orange})
(utils.highlight "TroubleCount" {:bg "NONE" :fg colors.bright_green})
(utils.highlight "TroubleText" {:bg "NONE" :fg colors.light0})
(utils.highlight "TroubleSignError" {:bg "NONE" :fg colors.bright_red})
(utils.highlight "TroubleSignWarning" {:bg "NONE" :fg colors.bright_yellow})
(utils.highlight "TroubleSignInformation" {:bg "NONE" :fg colors.bright_aqua})
(utils.highlight "TroubleSignHint" {:bg "NONE" :fg colors.bright_blue}))
[(utils.plugin
:folke/trouble.nvim
{:lazy true
:config setup
:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]})]

View file

@ -0,0 +1,42 @@
(local utils (require :dots.utils))
(fn setup []
(set vim.g.vimtex_view_method "general")
(set vim.g.vimtex_view_general_viewer "zathura")
(set vim.g.vimtex_view_general_options "--synctex-forward @line:1:@tex @pdf")
;(set vim.g.vimtex_view_general_options "--unique file:@pdf#src:@line@tex")
(set vim.g.vimtex_quickfix_method "pplatex")
(set vim.g.vimtex_quickfix_mode 2)
(set vim.g.vimtex_quickfix_open_on_warning 0)
(set vim.g.vimtex_compiler_latexmk {:build_dir ""
:callback 1
:continuous 1
:executable "latexmk"
:hooks []
:options ["-verbose"
"-file-line-error"
"-synctex=1"
"-interaction=nonstopmode"
"-shell-escape"]})
(set vim.g.vimtex_syntax_custom_cmds
[{:name "scripture" :argstyle "ital"}])
(set vim.g.vimtex_syntax_conceal {:accents 1
:cites 1
:fancy 1
:greek 1
:math_bounds 1
:math_delimiters 1
:math_fracs 1
:math_super_sub 1
:math_symbols 1
:sections 0
:styles 0}))
[(utils.plugin
:lervag/vimtex
{:ft ["latex" "tex"]
:config setup})]

View file

@ -0,0 +1,6 @@
(local {: autoload} (require :nfnl.module))
{: autoload
:a (autoload :nfnl.core)
:str (autoload :nfnl.string)
:utils (autoload :dots.utils)
:colors (autoload :dots.colors)}

View file

@ -0,0 +1,160 @@
(local {: autoload : a : str} (require :dots.prelude))
(fn plugin [name ?opts]
(if (= nil ?opts)
name
(do
(tset ?opts 1 name)
?opts)))
(fn prepend [a list]
(local x list)
(table.insert x 1 a)
x)
(fn all [f]
(not (a.some #(not (f $1)))))
(fn single-to-list [x]
"Returns the list given to it. If given a single value, wraps it in a list"
(if (a.table? x) x [x]))
(fn contains? [list elem]
(or (a.some #(= elem $1) list)) false)
(fn filter-table [f t]
(collect [k v (pairs t)]
(when (f k v)
(values k v))))
(fn split-last [s sep]
"split a string at the last occurrence of a separator"
(for [i (length s) 1 -1]
(let [c (s:sub i i)]
(when (= sep c)
(let [left (s:sub 1 (- i 1))
right (s:sub (+ i 1))]
(lua "return { left, right }")))))
[s])
(fn find-where [pred xs]
(each [_ x (ipairs xs)]
(when (pred x)
(lua "return x"))))
(fn find-map [f xs]
(each [_ x (ipairs xs)]
(let [res (f x)]
(when (~= nil res)
(lua "return res")))))
(fn keep-if [f x]
(when (f x) x))
(fn map-values [f t]
"Map over the values of a table, keeping the keys intact"
(let [tbl {}]
(each [k v (pairs t)] (tset tbl k (f v)))
tbl))
(fn without-keys [keys t]
(filter-table #(not (contains? keys $1)) t))
(fn keymap [modes from to ?opts]
"Set a mapping in the given modes, and some optional parameters, defaulting to {:noremap true :silent true}.
If :buffer is set, uses buf_set_keymap rather than set_keymap"
(let [full-opts (->> (or ?opts {})
(a.merge {:noremap true :silent true})
(without-keys [:buffer]))]
(each [_ mode (ipairs (single-to-list modes))]
(let [keymap-opts (if (-?> ?opts (. :buffer)) (a.assoc full-opts :buffer 0) full-opts)]
(vim.keymap.set mode from to keymap-opts)))))
(fn del-keymap [mode from ?buf-local]
"Remove a keymap. Arguments: mode, mapping, bool if mapping should be buffer-local."
(vim.keymap.del mode from
(if ?buf-local {:buffer 0} {})))
(fn buffer-content [bufnr]
"Returns a table of lines in the given buffer"
(vim.api.nvim_buf_get_lines bufnr 0 -1 false))
(fn surround-if-present [a mid b]
(if mid
(.. a mid b)
""))
(fn highlight [group-arg colset]
(let [default { :fg "NONE" :bg "NONE" :gui "NONE"}
opts (a.merge default colset)]
(each [_ group (ipairs (single-to-list group-arg))]
(vim.cmd (.. "hi! " group " guifg='" opts.fg "' guibg='" opts.bg "' gui='" opts.gui "'")))))
(fn highlight-add [group-arg colset]
(each [_ group (ipairs (single-to-list group-arg))]
(vim.cmd
(.. "hi! "
group
(surround-if-present " guibg='" colset.bg "'")
(surround-if-present " guifg='" colset.fg "'")
(surround-if-present " gui='" colset.gui "'")))))
(fn shorten-path [path seg-length shorten-after]
"shorten a filepath by truncating the segments to n characters, if the path exceeds a given length"
(let [segments (str.split path "/")]
(if (or (> shorten-after (length path))
(> 2 (length segments)))
path
(let [init (a.butlast segments)
filename (a.last segments)
shortened-segs (a.map #(string.sub $1 1 seg-length) init)]
(.. (str.join "/" shortened-segs) "/" filename)))))
(fn comp [f g]
(fn [...]
(f (g ...))))
(fn get-selection []
(let [[_ s-start-line s-start-col] (vim.fn.getpos "'<")
[_ s-end-line s-end-col] (vim.fn.getpos "'>")
n-lines (+ 1 (math.abs (- s-end-line s-start-line)))
lines (vim.api.nvim_buf_get_lines 0 (- s-start-line 1) s-end-line false)]
(if (= nil (. lines 1))
(values s-start-line s-end-line lines)
(do
(tset lines 1 (string.sub (. lines 1) s-start-col -1))
(if (= 1 n-lines)
(tset lines n-lines (string.sub (. lines n-lines) 1 (+ 1 (- s-end-col s-start-col))))
(tset lines n-lines (string.sub (. lines n-lines) 1 s-end-col)))
(values s-start-line s-end-line lines)))))
{: plugin
: all
: single-to-list
: contains?
: filter-table
: split-last
: find-where
: find-map
: keep-if
: map-values
: without-keys
: keymap
: del-keymap
: buffer-content
: surround-if-present
: highlight
: highlight-add
: shorten-path
: prepend
: comp
: get-selection}

View file

@ -1,49 +0,0 @@
(module help-thingy
{require {utils utils
a aniseed.core
str aniseed.string
fennel aniseed.fennel
popup popup
ts nvim-treesitter}
require-macros [macros]})
(def helpfiles-path (str.join "/" (a.butlast (str.split vim.o.helpfile "/"))))
(def tags
(var entries {})
(each [line _ (io.lines (.. helpfiles-path "/tags"))]
(let [[key file address] (str.split line "\t")]
(tset entries key {:file (.. helpfiles-path "/" file) :address address})))
entries)
(defn find-help-tag-for [topic]
(or (. tags topic)
(. tags (.. topic "()"))
(. tags (.. (string.gsub topic "vim%.api%." "") "()"))
(. tags (.. (string.gsub topic "vim%.fn%." "") "()"))
(. tags (.. (string.gsub topic "fn%." "") "()"))
(. tags (.. (string.gsub topic "vim%.o%." "") "()"))
(. tags (.. (string.gsub topic "vim%.b%." "") "()"))
(. tags (.. (string.gsub topic "vim%.g%." "") "()"))))
(defn help-for-tag [tag]
(var data nil)
(each [line _ (io.lines tag.file)]
(if (= nil data)
(when (~= -1 (vim.fn.match line (tag.address:sub 2)))
(set data [line]))
(if (or (> 2 (length data))
(= "" line)
(= " " (line:sub 1 1))
(= "\t" (line:sub 1 1))
(= "<" (line:sub 1 1)))
(table.insert data line)
(lua "return data")))))
(fn _G.get_help []
(if-let [help-tag (find-help-tag-for (get-current-word))]
(pop (help-for-tag help-tag) :help)))
(utils.keymap :n :ML ":call v:lua.get_help()<CR>")

View file

@ -1,165 +0,0 @@
(module init
{autoload {utils utils
nvim aniseed.nvim
a aniseed.core
str aniseed.string
fennel aniseed.fennel
colors colors
gehzu nvim-gehzu}
require-macros [macros]})
(macro make-errors-epic [f]
`(xpcall #,f #(a.println (fennel.traceback $1))))
(when (vim.fn.has "termguicolors")
(se termguicolors true))
(make-errors-epic (require "plugins"))
(make-errors-epic (require "plugins.lsp"))
(make-errors-epic (require "keybinds"))
(make-errors-epic (require "smart-compe-conjure"))
; Basic setup --------------------------------------- foldstart
(vim-let mapleader "\\<Space>")
(vim-let maplocalleader ",")
(vim.cmd "filetype plugin indent on")
(vim.cmd "syntax on")
(se foldmethod "marker")
(se showmode false)
(se undodir (.. vim.env.HOME "/.vim/undo-dir"))
(se undofile true)
(se shortmess (.. vim.o.shortmess "c")) ; Don't give completion messages like 'match 1 of 2' or 'The only match'
(se hidden true)
(se encoding "utf-8")
(se number false)
(se relativenumber false)
(se compatible false)
(se cursorline true)
(se incsearch true)
(se hlsearch true)
(se inccommand "nosplit")
(se signcolumn "yes")
(se shiftwidth 2)
(se tabstop 2)
(se backspace "indent,eol,start")
(se autoindent true)
(se smartindent true)
(se expandtab true)
(se wrap false)
(se completeopt "longest,menuone,noselect")
(se laststatus 2)
(se showmode true)
(se splitbelow true)
(se splitright true)
(se mouse "a")
(se shell "bash")
(se background "dark")
(vim-let &t_ut "")
(vim.cmd "autocmd! BufReadPost *.hs :set shiftwidth=2")
(vim.cmd "autocmd! FileType vim setlocal foldmethod=marker")
;Disables automatic commenting on newline)
(vim.cmd "autocmd! FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o")
; Auto-close quickfix list when element is selected)
(vim.cmd "autocmd! FileType qf nnoremap <buffer> <CR> <CR>:cclose<CR>")
(vim.cmd "autocmd! TextYankPost * silent! lua vim.highlight.on_yank {higroup=\"IncSearch\", timeout=300}")
; foldend
; Colors ------------------------------------------------------- foldstart
(utils.highlight-add
["GruvboxBlueSign" "GruvboxAquaSign" "GruvboxRedSign" "GruvboxYellowSign" "GruvboxGreenSign" "GruvboxOrangeSign" "GruvboxPurpleSign"]
{:bg "NONE"})
; hide empty line ~'s
(utils.highlight :EndOfBuffer {:bg "NONE" :fg colors.dark0})
(utils.highlight :LineNr {:bg "NONE"})
(utils.highlight-add :Pmenu {:bg colors.dark0_hard})
(utils.highlight-add :PmenuSel {:bg colors.bright_aqua})
(utils.highlight-add :PmenuSbar {:bg colors.dark0_hard})
(utils.highlight-add :PmenuThumb {:bg colors.dark1})
(utils.highlight-add :NormalFloat {:bg colors.dark0_hard})
(utils.highlight-add :SignColumn {:bg colors.dark0})
(utils.highlight ["StatusLine" "GalaxyLineInfo" "GalaxySpace" ] {:bg colors.dark1 :fg colors.light0})
(vim.cmd "highlight link Function GruvboxGreen")
; foldend
; Plugin config ----------------------- foldstart
(set vim.g.VM_leader "m") ; visual-multi leader
; rust.vim
(set vim.g.rust_clip_command "xclip -selection clipboard")
(set vim.g.rustfmt_autosave 1)
(set vim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
(set vim.g.vim_parinfer_filetypes ["carp" "fennel"])
; foldend
; :: and _ as space ------------------------------------------------------------------- foldstart
(var remapped-space nil)
(fn _G.RebindShit [newKey]
(set remapped-space {:old (vim.fn.maparg :<Space> :i)
:cur newKey})
(utils.keymap :i :<Space> newKey {:buffer true}))
(fn _G.UnbindSpaceStuff []
(when (and remapped-space (~= remapped-space {}))
(utils.del-keymap :i :<Space> true)
(when (~= remapped-space.old "")
(utils.keymap :i :<Space> remapped-space.old {:buffer true}))
(set remapped-space nil)))
(nvim.command "autocmd! InsertLeave * :call v:lua.UnbindSpaceStuff()")
(utils.keymap :n "<Tab>j" ":call v:lua.RebindShit('_')<CR>")
(utils.keymap :n "<Tab>k" ":call v:lua.RebindShit('::')<CR>")
(utils.keymap :i "<Tab>j" "<space><C-o>:call v:lua.RebindShit('_')<CR>")
(utils.keymap :i "<Tab>k" "<space><C-o>:call v:lua.RebindShit('::')<CR>")
(utils.keymap :n "ö" "a")
; foldend
; :: autoclose empty unnamed buffers ----------------------------------------------- foldstart
(fn _G.clean_no_name_empty_buffers []
(let [bufs (a.filter #(and (a.empty? (vim.fn.bufname $1))
(< (vim.fn.bufwinnr $1) 0)
(vim.api.nvim_buf_is_loaded $1)
(= "" (str.join (utils.buffer-content $1)))
(vim.api.nvim_buf_get_option $1 "buflisted"))
(vim.fn.range 1 (vim.api.nvim_buf_get_number "$")))]
(when (not (a.empty? bufs))
(vim.cmd (.. "bdelete " (str.join " " bufs))))))
(vim.cmd "autocmd! BufCreate * :call v:lua.clean_no_name_empty_buffers()")
; foldend
(vim.cmd
"command! -nargs=1 L :lua print(vim.inspect(<args>))")
; vim:foldmarker=foldstart,foldend

View file

@ -1,107 +0,0 @@
(module keybinds
{require {a aniseed.core
nvim aniseed.nvim
utils utils
fennel aniseed.fennel
wk which-key
treesitter-selection nvim-treesitter.incremental_selection
trouble trouble}
require-macros [macros]})
(utils.keymap :i :<C-Space> "compe#complete()" {:expr true})
(utils.keymap :i :<esc> "compe#close('<esc>')" {:expr true})
(utils.keymap [:n] :<C-p> "<cmd>Telescope find_files<cr>")
(utils.keymap :n :K "<Nop>")
(utils.keymap :v :K "<Nop>")
(utils.keymap :n :MM "<cmd>lua require('nvim-gehzu').go_to_definition()<CR>" {})
(utils.keymap :n :MN "<cmd>lua require('nvim-gehzu').show_definition()<CR>" {})
; TODO let's see if i want these
; (utils.keymap :n :<C-h> "<C-w><C-h>")
; (utils.keymap :n :<C-j> "<C-w><C-j>")
; (utils.keymap :n :<C-k> "<C-w><C-k>")
; (utils.keymap :n :<C-l> "<C-w><C-l>")
(fn cmd [s desc] [(.. "<cmd>" s "<cr>") desc])
(fn rebind [s desc] [s desc])
(wk.setup {})
(wk.register
{"c" {:name "+comment out"}
"e" {:name "+emmet"}
"h" (cmd "bprevious" "previous buffer")
"l" (cmd "bnext" "next buffer")
"o" (cmd "Telescope live_grep" "Grep files")
"p" (cmd "Telescope file_browser" "Open file-browser")
":" (cmd "Telescope commands" "Search command with fzf")
"m" {:name "+Code actions"
"d" (cmd "Lspsaga hover_doc" "Show documentation")
"b" (cmd "Lspsaga lsp_finder" "Find stuff")
"x" (cmd "Lspsaga preview_definition" "Preview definition")
"o" (cmd "SymbolsOutline" "Outline")
"S" (cmd "Telescope lsp_document_symbols" "Symbols in document")
"s" (cmd "Telescope lsp_dynamic_workspace_symbols" "Symbols in workspace")
"t" (cmd "Lspsaga signature_help" "Show signature help")
"n" (cmd "Lspsaga rename" "Rename")
"v" (cmd "Lspsaga code_action" "Apply codeaction")
"A" (cmd "Lspsaga show_cursor_diagnostics" "Cursor diagnostics")
"a" (cmd "Lspsaga show_line_diagnostics" "Line diagnostics")
"h" (cmd "RustToggleInlayHints" "Toggle inlay hints")
"r" [#(trouble.open "lsp_references") "Show references"]
"E" [#(trouble.open "lsp_document_diagnostics") "List diagnostics"]
"e" [#(trouble.open "lsp_workspace_diagnostics") "Show diagnostics"]
"g" [vim.lsp.buf.definition "Go to definition"]
"i" [vim.lsp.buf.implementation "Show implementation"]
"f" [vim.lsp.buf.formatting "format file"]}
"f" {:name "+folds"
"o" (cmd "foldopen" "open fold")
"n" (cmd "foldclose" "close fold")
"j" (rebind "zj" "jump to next fold")
"k" (rebind "zk" "jump to previous fold")}
"v" {:name "+view-and-layout"
"n" (cmd "set relativenumber!" "toggle relative numbers")
"m" (cmd "set nonumber! norelativenumber" "toggle numbers")
"g" (cmd "Goyo | set linebreak" "toggle focus mode")
"i" (cmd "IndentGuidesToggle" "toggle indent guides")}
"b" {:name "+buffers"
"b" (cmd "Buffers" "select open buffer")
"c" (cmd "bdelete!" "close open buffer")
"w" (cmd "bwipeout!" "wipeout open buffer")}}
{:prefix "<leader>"})
(wk.register
{"<tab>" "which_key_ignore"
"gss" "init selection"
"z" {:name "+folds"
"c" (cmd "foldclose" "close fold")
"o" (cmd "foldopen" "open fold")}})
(wk.register
{"<tab>" "which_key_ignore"}
{:mode "i"})
(wk.register
{:name "+Selection"
"j" "increment selection"
"k" "decrement selection"
"l" "increment node"
"h" "decrement node"}
{:prefix "gs"
:mode "v"})
(set nvim.o.timeoutlen 200)

View file

@ -1,3 +1,5 @@
;; [nfnl-macro]
{:augroup
(fn [name ...]
`(do
@ -6,6 +8,11 @@
,...
(nvim.ex.augroup :END)))
:al
(fn [name thing]
`(local ,name ((. (require :nfnl.module) :autoload) ,(tostring thing))))
:autocmd
(fn [...]
`(nvim.ex.autocmd ,...))
@ -18,77 +25,17 @@
(fn [name]
`(.. "lua require('" *module-name* "')['" ,(tostring name) "']()"))
:dbg
(fn [x]
`(let [view# (. (require "aniseed.fennel") :view)]
(print (.. `,(tostring x) " => " (view# ,x)))
,x))
:dbg-call
(fn [x ...]
`(do
(let [a# (require "aniseed.core")]
(a#.println ,...))
(,x ,...)))
:pkg
(fn [name mappings ...]
`(if (~= nil (. packer_plugins `,(tostring name)))
(let ,mappings ,...)
(print (.. "plugin disabled " `,(tostring name)))))
:vim-let
(fn [field value]
(let [text (.. "let " `,(tostring field) "=\"" value "\"")]
`(vim.cmd ,text)))
:each-pair
(fn [args ...]
(let [[l# r# d#] args]
`(let [a# (require "aniseed.core")
`(let [a# (require "nfnl.core")
data# ,d#]
(for [i# 1 (a#.count data#) 2]
(let [,l# (. data# i#)
,r# (. data# (+ i# 1))]
,...)))))
:if-let
(fn [[name value] ...]
`(let [,name ,value]
(when ,name ,...)))
:packer-use
(fn [...]
(let [a (require "aniseed.core")
fennel (require "aniseed.fennel")
args [...]
use-statements []]
(for [i 1 (a.count args) 2]
(let [name (. args i)
block (. args (+ i 1))]
(a.assoc block 1 name)
(when (. block :mod)
(a.assoc block :config `#((. (require "utils") :safe-require) ,(. block :mod))))
(a.assoc block :mod)
(table.insert use-statements block)))
(let [use-sym (gensym)]
`(let [packer# (require "packer")]
(packer#.startup
(fn [,use-sym]
,(unpack
(icollect [_# v# (ipairs use-statements)]
`(,use-sym ,v#)))))))))
,...)))))}
:se
(fn [name value]
(let [str-name (tostring name)
(info-ok scope) (pcall #(. (vim.api.nvim_get_option_info str-name) :scope))]
(if info-ok
(match scope
:global `(tset vim.o ,str-name ,value)
:win `(tset vim.wo ,str-name ,value)
:buf `(tset vim.bo ,str-name ,value)
_ (print (.. "option " str-name " has unhandled scope " scope)))
(print (.. "Unknown vim-option: " str-name)))))}

View file

@ -0,0 +1,144 @@
(local {: autoload} (require :nfnl.module))
(local a (autoload :nfnl.core))
(local str (autoload :nfnl.string))
(local utils (autoload :dots.utils))
(local lazy (require :lazy))
(when (vim.fn.has "termguicolors")
(set vim.opt.termguicolors true))
(vim.cmd "let mapleader=\"\\<Space>\"")
(vim.cmd "let maplocalleader=\",\"")
(lazy.setup {:import "dots.plugins" :install {:colorscheme "gruvbox8"}})
; (require "impatient")
(require "dots.keybinds")
; add to runtimepath
(let [added-paths []]
(set vim.opt.runtimepath (.. vim.o.runtimepath (str.join "," added-paths))))
; Basic setup --------------------------------------- foldstart
(vim.cmd "filetype plugin indent on")
(vim.cmd "syntax on")
(set vim.opt.foldmethod "marker")
(set vim.opt.scrolloff 5)
(set vim.opt.showmode false)
(set vim.opt.undodir (.. vim.env.HOME "/.vim/undo-dir"))
(set vim.opt.undofile true)
(set vim.opt.shortmess (.. vim.o.shortmess "c")) ; Don't give completion messages like 'match 1 of 2' or 'The only match'
(set vim.opt.hidden true)
(set vim.opt.encoding "utf-8")
(set vim.opt.number false)
(set vim.opt.relativenumber false)
(set vim.opt.compatible false)
(set vim.opt.cursorline true)
(set vim.opt.incsearch true)
(set vim.opt.hlsearch true)
(set vim.opt.inccommand "nosplit")
(set vim.opt.signcolumn "yes")
(set vim.opt.shiftwidth 2)
(set vim.opt.tabstop 2)
(set vim.opt.backspace "indent,eol,start")
(set vim.opt.autoindent true)
(set vim.opt.smartindent true)
(set vim.opt.expandtab true)
(set vim.opt.wrap false)
(set vim.opt.completeopt "menuone,noselect")
(set vim.opt.laststatus 2)
(set vim.opt.splitbelow true)
(set vim.opt.splitright true)
(set vim.opt.mouse "a")
(set vim.opt.shell "bash")
(set vim.opt.background "dark")
(set vim.opt.swapfile false)
(set vim.opt.undolevels 10000)
(set vim.opt.keywordprg "rusty-man")
(set vim.g.AutoPairsMultilineClose 0)
(vim.cmd "let &t_ut=\"\"")
(set vim.opt.title true)
(set vim.opt.titlelen 0)
(set vim.opt.titlestring "%{expand(\"%:p\")} [%{mode()}]")
(vim.api.nvim_create_autocmd "BufWritePost" {:pattern "*.hs" :callback #(set vim.opt.shiftwidth 2)})
(vim.api.nvim_create_autocmd "FileType" {:pattern "vim" :callback #(set vim.opt_local.foldmethod "marker")})
;Disables automatic commenting on newline)
(vim.api.nvim_create_autocmd "FileType"
{:pattern "*"
:callback #(set vim.opt_local.formatoptions (vim.o.formatoptions:gsub "[cor]" ""))})
; Auto-close quickfix list when element is selected)
(vim.api.nvim_create_autocmd "FileType"
{:pattern "qf"
:callback #(vim.cmd "nnoremap <buffer> <CR> <CR>:cclose<CR>")})
(vim.api.nvim_create_autocmd "TextYankPost"
{:pattern "*"
:callback #(vim.highlight.on_yank {:higroup "IncSearch" :timeout 300})})
(set vim.g.copilot_filetypes {:TelescopePrompt false})
; foldend
; Colors ------------------------------------------------------- foldstart
; foldend
(vim.diagnostic.config
{:float {:border "single"
:style "minimal"}})
; Plugin config ----------------------- foldstart
(set vim.g.VM_leader "m") ; visual-multi leader
; rust.vim
(set vim.g.rust_clip_command "xclip -selection clipboard")
;(set vim.g.rustfmt_autosave 1)
(set vim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
(set vim.g.vim_parinfer_filetypes ["carp" "fennel" "clojure"])
(set vim.g.parinfer_additional_filetypes ["yuck"])
; foldend
; :: autoclose empty unnamed buffers ----------------------------------------------- foldstart
(fn _G.clean_no_name_empty_buffers []
(let [bufs (a.filter #(and (a.empty? (vim.fn.bufname $1))
(< (vim.fn.bufwinnr $1) 0)
(vim.api.nvim_buf_is_loaded $1)
(= "" (str.join (utils.buffer-content $1)))
(vim.api.nvim_buf_get_option $1 "buflisted"))
(vim.fn.range 1 (vim.fn.bufnr "$")))]
(when (not (a.empty? bufs))
(vim.cmd (.. "bdelete " (str.join " " bufs))))))
(vim.cmd "autocmd! BufCreate * :call v:lua.clean_no_name_empty_buffers()")
; foldend
(vim.cmd
"command! -nargs=1 L :lua print(vim.inspect(<args>))")
; vim:foldmarker=foldstart,foldend

View file

@ -1,122 +0,0 @@
(module plugins
{require {}
require-macros [macros]})
(packer-use
"/home/leon/coding/projects/nvim-gehzu" {}
:gruvbox-community/gruvbox {:opt false
:config #(vim.cmd "colorscheme gruvbox")}
:nvim-telescope/telescope.nvim {:mod "plugins.telescope"
:cmd ["Telescope"]
:requires [:nvim-lua/popup.nvim :nvim-lua/plenary.nvim]}
:kyazdani42/nvim-web-devicons {}
:p00f/nvim-ts-rainbow {}
:romgrk/nvim-treesitter-context {}
:JoosepAlviste/nvim-ts-context-commentstring {}
:nvim-treesitter/nvim-treesitter {:mod "plugins.treesitter"
:run ":TSUpdate"}
:nvim-treesitter/playground {}
; :code-biscuits/nvim-biscuits {} ; show opening line after closing curly
:folke/which-key.nvim {}
:pwntester/octo.nvim {}
; json query stuff
:gennaro-tedesco/nvim-jqx {:ft ["json"]}
:Olical/aniseed {}; :tag "v3.16.0"}
; general purpose lua wrappers for nvim stuff
:norcalli/nvim.lua {}
:glepnir/galaxyline.nvim {:mod "plugins.galaxyline"
:after "gruvbox"}
:akinsho/nvim-bufferline.lua {:mod "plugins.bufferline"}
:sindrets/diffview.nvim {:mod "plugins.diffview"}
:tweekmonster/startuptime.vim {:cmd ["StartupTime"]}
:tpope/vim-repeat {}
:junegunn/goyo.vim {:cmd "Goyo"}
:lewis6991/gitsigns.nvim {:mod "plugins.gitsigns"}
:tpope/vim-fugitive {}
:preservim/nerdcommenter {}
:godlygeek/tabular {:cmd ["Tabularize"]} ; :Tab /regex can align code on occurrences of the given regex. I.e. :Tab /= aligns all = signs in a block.
:tpope/vim-surround {}
:nathanaelkane/vim-indent-guides {} ; Can be toggled using <leader>ig (intent-guides)
; <C-n> to select current word. <C-n> to select next occurrence.
; with multiple lines selected in Visual mode, <C-n> to insert cursor in each line. I not i to insert in Visual-mode.
:terryma/vim-multiple-cursors {}
:mg979/vim-visual-multi {}
:hauleth/sad.vim {} ; Use siw instead of ciw. when using . afterwards, will find the next occurrence of the changed word and change it too
:wellle/targets.vim {} ; more text objects. IE: cin (change in next parens). generally better handling of surrounding objects.
:iamcco/markdown-preview.nvim {:run vim.fn.mkdp#util#install}
; code-related ----------------------------------------- <<<
:folke/lsp-trouble.nvim {:mod "plugins.trouble"}
:simrat39/symbols-outline.nvim {:mod "plugins.symbols-outline"}
:neovim/nvim-lspconfig {}
:hrsh7th/nvim-compe {:mod "plugins.compe"}
:glepnir/lspsaga.nvim {:mod "plugins.lspsaga"}
:Olical/conjure {}
:tami5/compe-conjure {:requires [:Olical/conjure]}
:ciaranm/detectindent {:mod "plugins.detect-indent"}
:pechorin/any-jump.vim {}
:justinmk/vim-sneak {:mod "plugins.sneak"}
:psliwka/vim-smoothie {}
:editorconfig/editorconfig-vim {}
:honza/vim-snippets {}
:tommcdo/vim-exchange {}
;:frazrepo/vim-rainbow {}
:bhurlow/vim-parinfer {:ft ["fennel" "carp" "lisp" "elisp"]}
:bduggan/vim-raku {:ft ["raku"]}
:LnL7/vim-nix {:ft ["nix"]}
:kevinoid/vim-jsonc {}
:norcalli/nvim-colorizer.lua {:mod "plugins.nvim-colorizer"}
:pangloss/vim-javascript {} ; syntax highlighting JS
:ianks/vim-tsx {}
:leafgarland/typescript-vim {}
:sheerun/vim-polyglot {} ; Syntax highlighting for most languages
:HerringtonDarkholme/yats.vim {} ; typescript syntax highlighting
:mxw/vim-jsx {}
:mattn/emmet-vim {:mod "plugins.emmet"}
:purescript-contrib/purescript-vim {}
:derekelkins/agda-vim {:ft ["agda"]}
:neovimhaskell/haskell-vim { :ft ["haskell"]}
:rust-lang/rust.vim {:ft ["rust"]
:requires ["mattn/webapi-vim"]}
:simrat39/rust-tools.nvim {:ft ["rust"]}
:ray-x/lsp_signature.nvim {}
:vmchale/ats-vim {:ft ["ats"]}
:bakpakin/fennel.vim {})
; >>>
; vim:foldmarker=<<<,>>>

View file

@ -1,69 +0,0 @@
(module plugins.bufferline
{require {a aniseed.core
fennel aniseed.fennel
nvim aniseed.nvim
utils utils
bufferline bufferline
colors colors}})
; :h bufferline-lua-highlights
(let [selected {:gui "" :guibg colors.neutral_aqua :guifg colors.dark0}
visible {:gui "" :guibg colors.dark1 :guifg colors.neutral_aqua}]
(bufferline.setup
{:options
{:diagnostics "nvim_lsp"
:diagnostics_indicator (fn [cnt lvl diagnostics-dict] (.. " (" cnt ")"))
:show_buffer_close_icons false
:show_buffer_icons false
:show_close_icon false
:show_tab_indicators false
:enforce_regular_tabs false
:tab_size 10}
; https://github.com/akinsho/nvim-bufferline.lua/blob/4ebab39af2376b850724dd29c29579c8e024abe6/lua/bufferline/config.lua#L74
:highlights
{:fill {:guibg colors.dark0 :guifg colors.light0}
:background visible
:buffer_visible visible
:buffer_selected selected
:modified visible
:modified_visible visible
:modified_selected selected
:error visible
:error_selected selected
:error_visible selected
:warning visible
:warning_selected selected
:warning_visible visible
:duplicate visible
:duplicate_visible visible
:duplicate_selected selected
:diagnostic {:gui "" :guibg colors.dark1 :guifg colors.neutral_red}
:diagnostic_visible {:gui "" :guibg colors.dark1 :guifg colors.neutral_red}
:diagnostic_selected {:gui "" :guibg colors.neutral_aqua :guifg colors.faded_red}
:info_diagnostic {:gui "" :guibg colors.dark1 :guifg colors.neutral_blue}
:info_diagnostic_visible {:gui "" :guibg colors.dark1 :guifg colors.neutral_blue}
:info_diagnostic_selected {:gui "" :guibg colors.neutral_aqua :guifg colors.faded_blue}
:warning_diagnostic {:gui "" :guibg colors.dark1 :guifg colors.neutral_yellow}
:warning_diagnostic_visible {:gui "" :guibg colors.dark1 :guifg colors.neutral_yellow}
:warning_diagnostic_selected {:gui "" :guibg colors.neutral_aqua :guifg colors.faded_yellow}
:error_diagnostic {:gui "" :guibg colors.dark1 :guifg colors.neutral_red}
:error_diagnostic_visible {:gui "" :guibg colors.dark1 :guifg colors.neutral_red}
:error_diagnostic_selected {:gui "" :guibg colors.neutral_aqua :guifg colors.red}
:separator visible
:indicator_selected {:guibg colors.neutral_aqua :guifg colors.neutral_aqua}
; stuff I've never seen before :thonk:
:pick_selected {:guibg colors.bright_red :guifg colors.bright_red}
:tab_selected {:guibg colors.bright_green :guifg colors.bright_green}
:tab {:guibg colors.bright_yellow :guifg colors.bright_yellow}}}))
(utils.highlight :BufferLineInfoSelected {:bg colors.neutral_aqua :fg colors.dark0 :gui "NONE"})

View file

@ -1,24 +0,0 @@
(module plugins.compe
{autoload {compe compe}})
;(compe.setup
;{:enabled true
;:autocomplete false
;:debug false
;:min_length 1
;:preselect "enable"
;:throttle_time 80
;:source_timeout 200
;:incomplete_delay 400
;:max_abbr_width 100
;:max_kind_width 100
;:max_menu_width 100
;:documentation true
;:source {:path true
;:buffer true
;:calc true
;:nvim_lsp true
;:nvim_lua true
;:vsnip false
;:conjure true}})

View file

@ -1,6 +0,0 @@
(module plugins.detect-indent)
(vim.cmd "autocmd! BufReadPost * :DetectIndent")
(set vim.g.detectindent_preferred_expandtab 1)
(set vim.g.detectindent_preferred_indent 2)

View file

@ -1,11 +0,0 @@
(module plugins.diffview
{autoload {diffview diffview
cb diffview.config}})
(diffview.setup
{:diff_binaries false
:file_panel {:width 35
:use_icons false}
:key_bindings {:view {:<leader>dn (cb.diffview_callback "select_next_entry")
:<leader>dp (cb.diffview_callback "select_prev_entry")
:<leader>dd (cb.diffview_callback "toggle_files")}}})

View file

@ -1,7 +0,0 @@
(module plugins.emmet)
(set vim.g.user_emmet_mode "n")
(set vim.g.user_emmet_leader_key "<leader>e")
(set vim.g.user_emmet_settings {:javascript.jsx {:extends "jsx"}
:typescript.jsx {:extends "jsx"}})

View file

@ -1,109 +0,0 @@
(module plugins.galaxyline
{require {a aniseed.core
str aniseed.string
fennel aniseed.fennel
nvim aniseed.nvim
utils utils
colors colors
galaxyline galaxyline
gl-condition galaxyline.condition
gl-fileinfo galaxyline.provider_fileinfo
gl-diagnostic galaxyline.provider_diagnostic
gl-vcs galaxyline.provider_vcs}
require-macros [macros]})
(def- bar-bg-col colors.dark1)
(local modes
{:n {:text "NORMAL" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:i {:text "INSERT" :colors {:bg colors.neutral_yellow :fg colors.dark0}}
:c {:text "CMMAND" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:ce {:text "NORMEX" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:cv {:text "EX" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:ic {:text "INSCOMP" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:no {:text "OP-PENDING" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:r {:text "HIT-ENTER" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:r? {:text "CONFIRM" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:R {:text "REPLACE" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:Rv {:text "VIRTUAL" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:s {:text "SELECT" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:S {:text "SELECT" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:t {:text "TERM" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
:v {:text "VISUAL" :colors {:bg colors.neutral_blue :fg colors.dark0}}
:V {:text "VISUAL LINE" :colors {:bg colors.neutral_blue :fg colors.dark0}}
"" {:text "VISUAL BLOCK" :colors {:bg colors.neutral_blue :fg colors.dark0}}})
(fn get-current-filename []
(nvim.fn.expand "%:t"))
(fn get-current-filepath []
(let [file (utils.shorten-path (vim.fn.bufname) 5 50)]
(if (a.empty? file) ""
nvim.bo.readonly (.. "RO " file)
(and nvim.bo.modifiable nvim.bo.modified) (.. file " ")
file)))
(set galaxyline.short_line_list ["dbui" "diff" "peekaboo" "undotree" "vista" "vista_markdown"])
(fn make-lsp-diagnostic-provider [kind]
(fn []
(let [n (vim.lsp.diagnostic.get_count 0 kind)]
(if (= n 0) "" (.. " " n " ")))))
(set galaxyline.section.left
[{:ViMode {:provider
#(let [vim-mode (nvim.fn.mode)
modedata (or (. modes vim-mode)
{:text vim-mode
:colors {:bg colors.neutral_orange :fg colors.dark0}})]
(utils.highlight "GalaxyViMode" modedata.colors)
(.. " " modedata.text " "))}}
{:FileName {:provider get-current-filepath
:highlight [colors.light4 bar-bg-col]}}
{:Space {:provider #""
:highlight [colors.light0 bar-bg-col]}}])
(set galaxyline.section.right
[{:GitBranch {:highlight [colors.light4 bar-bg-col]
:provider
#(let [branch (gl-vcs.get_git_branch)]
(if (= "master" branch) "" branch))}}
{:FileType {:provider #nvim.bo.filetype
:highlight [colors.neutral_aqua bar-bg-col]}}
{:DiagnosticInfo {:provider (make-lsp-diagnostic-provider "Info")
:highlight [colors.dark1 colors.neutral_blue]}}
{:DiagnosticWarn {:provider (make-lsp-diagnostic-provider "Warning")
:highlight [colors.dark1 colors.neutral_yellow]
:separator ""}}
{:DiagnosticError {:provider (make-lsp-diagnostic-provider "Error")
:highlight [colors.dark1 colors.bright_red]
:separator ""}}
{:LineInfo {:provider #(.. " " (gl-fileinfo.line_column) " ")
:highlight "GalaxyViMode"
:separator ""}}])
(do
(fn add-segment-defaults [data]
(a.merge {:highlight [colors.light0 bar-bg-col]
:separator " "
:separator_highlight "StatusLine"}
data))
(fn map-gl-section [f section]
(icollect [_ elem (ipairs section)]
(collect [k v (pairs elem)]
(values k (f v)))))
(set galaxyline.section.left (map-gl-section add-segment-defaults galaxyline.section.left))
(set galaxyline.section.right (map-gl-section add-segment-defaults galaxyline.section.right)))

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