Compare commits

...

280 Commits

Author SHA1 Message Date
63ceb40b45 Remove redundant 'dmenu' scripts 2025-11-10 20:41:51 +01:00
17792f297b Add 'vscode-langservers-extracted' to neovim Nix flake 2025-11-10 18:33:48 +01:00
61278b8fb3 Merge 'home-manager' flake into NixOS flake 2025-11-10 17:47:59 +01:00
85165468f5 Update 'kitty.conf' 2025-11-10 15:29:49 +01:00
3fb3b1e521 Set up sops-nix secrets 2025-11-06 23:13:26 +01:00
43f5cc701e Add neovim skeleton module 2025-11-06 14:31:55 +01:00
ffc34d78d7 Fix conform eslint-prettier conflicting formatters 2025-11-06 12:16:10 +01:00
61ac93b68f Add git push/pull aliases 2025-11-06 11:16:14 +01:00
411986643a Update bash aliases 2025-11-06 11:14:59 +01:00
5d88ea6f11 Add back zettelkasten markdown file completion 2025-11-04 23:31:24 +01:00
fa6c4d786b Update gitsigns.nvim config 2025-11-04 23:31:24 +01:00
a07473f125 Add lua module snippet 2025-11-04 23:31:24 +01:00
7fd1b35186 Set up lua language server for Neovim 2025-11-04 23:31:24 +01:00
38e27e7208 Set up kitty-scrollback.nvim 2025-11-04 16:36:10 +01:00
f83d453320 Use 'dockerfile' filetype for 'containerfiles' 2025-11-04 16:36:10 +01:00
4d1b84db3c Update gitignore 2025-11-04 16:36:10 +01:00
bb76c9fa3a Update Nix home manager flake 2025-11-04 16:36:10 +01:00
242d0fe094 Migrate to new Neovim 'lspconfig' version 2025-11-01 23:28:37 +01:00
4567ea177b Add 'nixpkgs.follows' to 'nixgl' input in Nix home manager flake 2025-10-28 22:13:41 +01:00
165c71a2a4 Declare keepassxc config in Nix home manager flake 2025-10-28 12:56:59 +01:00
f42a896d53 Modularize neovim & git config in Nix home manager flake 2025-10-28 11:54:40 +01:00
c605f61445 Modularize firefox config in Nix home manager flake 2025-10-28 11:52:33 +01:00
783908c5eb Declare anki package in Nix home manager flake 2025-10-28 11:46:20 +01:00
966065dd30 Format home manager flake (nixfmt) 2025-10-28 00:19:28 +01:00
01264a395d Move git & neovim into Nix home manager flake 2025-10-28 00:18:10 +01:00
292a2883be Declare bookmarks in firefox toolbar 2025-10-27 23:56:29 +01:00
5a50aa540f Improve pomo script 2025-10-26 22:46:15 +01:00
84e0c7f700 Move firefox (with addons) into Nix home manager flake 2025-10-26 22:42:28 +01:00
a737b50284 Update 'git-cb' script 2025-10-24 10:12:29 +02:00
608a3bc725 Remove taskwarrior related neovim stuff 2025-10-23 16:52:23 +02:00
15cf8bc566 Set up nix formatter and language server 2025-10-23 16:26:04 +02:00
2943f5a371 Merge commit 'f035c9318b23aea7479c124d749f5678c060e7b3' 2025-10-21 00:00:41 +02:00
24ce8f39af Migrate '.vim/plugin' to neovim 2025-10-20 23:57:01 +02:00
e3d9612e57 Remove vim yin/yang colorschemes 2025-10-20 23:57:01 +02:00
05986a30bb Migrate '.vim/ftplugin' to neovim 2025-10-20 23:57:01 +02:00
05bc2ec59e Migrate vim snippets to neovim (LuaSnip) 2025-10-20 23:57:01 +02:00
128ae8ed1e Migrate '.vim/ftdetect/prolog' to neovim 2025-10-20 23:57:01 +02:00
f3188f7b4b Migrate '.vim/after/syntax' to neovim 2025-10-20 23:57:01 +02:00
85d56f97d1 Migrate vim init config to neovim 2025-10-20 23:57:01 +02:00
afca2cae5d Migrate '.vim/after' to neovim 2025-10-20 23:57:01 +02:00
d6875c97d9 Add 'eslint_d' PID to 'nvim-lint' config 2025-10-16 12:14:15 +02:00
568e45f59b Remove jira aliases 2025-10-16 12:08:22 +02:00
78fa170e7a Disable 'xdg-user-dirs' by default 2025-10-16 11:56:18 +02:00
5216f7938b Alias bash 'history' command to 'h' 2025-10-16 11:56:18 +02:00
0f29dc3054 Add neovim dependencies to flake 2025-10-15 22:48:09 +02:00
c901a1cea4 test 2025-10-15 22:25:28 +02:00
6113c086eb Merge commit '490998275cbdc5ff032d4a39794bf850f4bfefec' 2025-10-15 22:18:59 +02:00
470f69fada Add neovim 'auto-session' plugin setup 2025-10-15 22:17:56 +02:00
d3a67ab58d Add minimal readme to my neovim configuration 2025-10-15 21:26:56 +02:00
f79bc5427d Add minimal readme to my neovim configuration 2025-10-15 21:19:22 +02:00
4fe60cf861 Remove neovim lazy load related config 2025-10-15 20:50:58 +02:00
211da54bcf Fall back to 'paq.nvim' only when not on 'nixCats' 2025-10-15 20:38:39 +02:00
b6d3015559 Add 'nixCatsUtils' from 'nixCats' 2025-10-15 20:15:43 +02:00
139089fc9d Add neovim packages to 'nixCats' flake 2025-10-14 22:03:49 +02:00
a54e745190 Add minimal 'nixCats' flake template 2025-10-13 21:59:58 +02:00
6e48621275 Link NixOS repo in dotfiles repository 2025-10-04 18:33:55 +02:00
f64b634dd8 Remove absolute path from github credential helper 2025-10-04 18:03:55 +02:00
a4bcea8834 Define nixGL with wrapper 2025-10-03 23:42:39 +02:00
ec1a76dff1 Remove redundant vim JS/TS plugins (as migrated to nvim) 2025-10-03 23:42:39 +02:00
6c2c452fac Extend 'ftdetect.lua' for tsconfig and dotenv files 2025-10-03 23:42:39 +02:00
6ed4de0b11 Migrate vim vscode jsonc filetype detection to nvim 2025-10-03 23:42:39 +02:00
58df131415 Remove 'tpope/vim-commentary' and use nvim commenting (see ':h commenting') 2025-10-03 23:42:39 +02:00
46e7625928 Modularize nix packages into 'packages.nix' 2025-10-03 23:42:39 +02:00
fe5ebec536 Set up nix with home manager (only work host for now) 2025-10-03 23:42:39 +02:00
20914d33c7 Replace 'alacritty' with 'kitty' 2025-10-03 23:42:19 +02:00
060f6a2f83 Add kitty configuration 2025-10-03 23:33:16 +02:00
e36012e0d6 Update tmux themes to be more consistent 2025-10-03 23:30:48 +02:00
f4a17dc0c8 Add zenwritten tmux themes (from zenwritten.nvim) 2025-10-03 23:19:49 +02:00
2f29d940f2 Add zenwritten kitty themes (from zenwritten.nvim) 2025-10-03 23:19:27 +02:00
4bdbfa0c0d Add 'ip' bash aliases 2025-07-12 18:14:26 +02:00
ee49296d41 Clean bash aliases (remove unused) 2025-07-12 18:14:01 +02:00
e35cf075bf Extract JavaScript aliases to '~/.bash_aliases/js' 2025-07-12 18:10:50 +02:00
05ee0bf5f1 Add 'sshconfig' host snippet 2025-06-28 14:02:05 +02:00
46543f4eb8 Add taskwarrior 'sync.example' 2025-06-28 13:54:33 +02:00
058dc4107c Replace 'gitblame.nvim' with 'gitsigns.nvim' 2025-06-28 13:46:57 +02:00
b8953fc74a Add ripgrep pcakage to 'setup' script (dependency for nvim) 2025-06-27 19:34:20 +02:00
b64d22e114 Remove 'whoamip' script 2025-06-27 19:33:55 +02:00
0a50cd90b3 Hide prettier errors 2025-06-27 19:31:33 +02:00
4dbeaccf51 Use 'stop_after_first' for prettier in 'conform.nvim' 2025-06-27 19:29:59 +02:00
df7d2aca6b Support 'helm' yaml files 2025-06-27 19:28:36 +02:00
6b350ab1dd Automate selecting jira tickets in 'git-cb' script 2025-06-20 15:11:25 +02:00
b53f1ee586 Add 'git-cb' script 2025-06-20 15:03:58 +02:00
bd4133d5e5 Source jira aliases if installed 2025-06-20 13:58:29 +02:00
78e6695782 Add global yamllint config 2025-06-19 11:46:12 +02:00
33542630d5 Add alacritty zenwritten themes 2025-06-16 21:16:22 +02:00
7c44c1cd4e Configure tridactyl search bindings 2025-06-06 20:40:08 +02:00
bc62524451 Add 'tridactylrc' 2025-06-06 20:25:35 +02:00
e70f6f6a5f Remove 'nvm' from bashrc (using 'mise' now) 2025-06-06 19:54:24 +02:00
55306b1d6f Add commented out nvim options 2025-06-05 20:23:39 +02:00
b5b48016ef Improve 'save-passwddb' script 2025-06-05 20:14:47 +02:00
6760db72c5 Fix and simplify 'nvm' setup 2025-05-27 23:20:23 +02:00
28f6655e2e Add 'xclip' package to '~/.bin/setup' 2025-05-27 21:29:38 +02:00
09288ce752 Migrate 'unblevable/quick-scope' to nvim 'jinh0/eyeliner' 2025-05-15 18:22:08 +02:00
5afe069edf Fix 'image.nvim' plugin warnings 2025-05-15 18:09:50 +02:00
22e23ba416 Migrate pandoc 'AnkiDeck' function to neovim 2025-05-15 18:09:50 +02:00
5b08b04332 Migrate 'fzf.vim' to neovim 'fzf-lua' 2025-05-15 18:09:37 +02:00
90725931a7 Remove telescope and dressing 2025-05-15 16:30:21 +02:00
9e3b784168 Modularize ssh config 2025-05-15 10:28:58 +02:00
1bb976d442 Set up neovim AI plugins (for test run) 2025-05-10 22:56:19 +02:00
37a05500bf refactor: use explicit executable check for zk command 2025-05-09 22:22:01 +02:00
e8962144e5 fix: improve zk command check and error handling 2025-05-09 22:21:15 +02:00
ae2a439c14 chore: update zk setup script prompts and execution 2025-05-09 22:21:08 +02:00
2c7f44ce16 feat: add prompt to run zk after setup 2025-05-09 22:16:27 +02:00
b58ff906e9 feat: add setup script for zettelkasten 2025-05-09 22:16:19 +02:00
8046bd1868 Add diagnostic config 2025-05-05 23:07:27 +02:00
800ae0cbde Add 'stylua' config 2025-05-05 23:06:22 +02:00
8f2787f439 Add/migrate some basic lua snippets 2025-05-05 23:06:00 +02:00
a76fd5cd62 Use smarter newline mapping for json filetype 2025-05-05 23:02:46 +02:00
e660a92443 Add neovim plugins (+configuration) 2025-05-05 22:51:56 +02:00
958883c21c Add nvim 'fzf-lua' plugin 2025-05-05 22:51:56 +02:00
fd11b48fa9 Set up nvim package manager 2025-05-05 22:51:56 +02:00
66714ab532 Add neovim keymaps 2025-05-05 22:51:55 +02:00
7fb822dbff Highlight nvim yanks 2025-05-01 17:01:30 +02:00
5e5d88a92a Detect '.lintstagedrc' filetype (json) 2025-05-01 17:01:01 +02:00
f6e525cf53 Add neovim keymaps 2025-05-01 16:59:35 +02:00
e5fe794c41 Move vim config to 'vim' module 2025-05-01 16:58:23 +02:00
d576a3f8e7 Add 'shellcheck=bash' and editor hints to bash config/aliases 2025-03-01 12:05:26 +01:00
7149917762 Switch terminal to kitty 2025-02-16 16:15:03 +01:00
5d2cb51aee Move XMonad calculator command to '.bin/calc' 2025-02-16 16:13:00 +01:00
c88c54b9ca Remove spawn zettelkasten XMonad keybinding 2025-02-16 16:08:51 +01:00
e36b04aaa7 Track tmux hooks fallback config 2025-02-06 09:28:09 +01:00
8adb4a2add Use 'local' for function arguments 2025-02-06 00:15:12 +01:00
4e928c2306 Extend automatic dotfiles setup 2025-02-05 23:18:10 +01:00
87bfdb5ba2 Add packages to setup 2025-02-05 23:17:55 +01:00
21208c1afa Update readme 2025-02-05 20:42:33 +01:00
80e381f62d Update tmux config 2025-02-05 20:34:13 +01:00
0307be8d2c Add 'gnome-setup' to 'setup' 2025-02-05 20:32:09 +01:00
a574645fa0 Update dotfiles setup 2025-02-05 20:11:42 +01:00
d463bd7432 Add worktree config alias 2025-02-05 19:48:28 +01:00
3f685d0753 Update Github CLI config 2025-02-05 19:48:11 +01:00
3e71764fd8 Configure alacritty window settings 2025-02-05 17:31:44 +01:00
3f5a4427c0 Clear gnome pinned apps on setup 2025-02-05 01:22:50 +01:00
e525ea0274 Add 'setup-gnome' script 2025-02-05 01:11:50 +01:00
a83d0fd28f Update 'setup' script 2025-02-05 00:31:41 +01:00
f858f7374b Add 'sb-wg' script 2025-01-28 19:25:56 +01:00
733b37de30 Remove redundant 'taskd' environment variables 2025-01-15 17:20:36 +01:00
b8694ba1c4 Remove wacom keybindings 2025-01-11 22:30:36 +01:00
999921b86b Map 'F10 to xrandr --auto 2025-01-11 22:30:08 +01:00
650e6fc247 Update gitignore 2025-01-11 15:52:40 +01:00
d20283c8f7 Improve '.bash_history' config 2025-01-11 15:48:24 +01:00
e385015238 Update alacritty config 2025-01-11 15:41:21 +01:00
82b780951d Split alacritty config 2025-01-11 15:34:53 +01:00
4ca7557e98 Use 'nvimdiff' as mergetool 2025-01-06 17:15:03 +01:00
454b80aa4e Remove autorandr config 2025-01-02 21:35:23 +01:00
e9ad41f94f Remove sketch (or wacom) scripts 2025-01-02 21:33:44 +01:00
d4ba22670a Refactor 'fzf-book' 2025-01-02 21:14:07 +01:00
7e10a1c39d Add pnpm config 2025-01-02 21:08:12 +01:00
5805c9093f Make 'ag' respect gitignore 2025-01-02 21:07:20 +01:00
ec0e06a805 Add git rebase aliases 2025-01-02 21:05:31 +01:00
b5365da6ca Remove default snippet comments 2025-01-02 21:01:31 +01:00
15f1227522 Source '~/.bash_completions' if it exists 2024-12-28 13:29:03 +01:00
1f192f94fa Use '.' instead of 'source' 2024-12-28 13:28:43 +01:00
04d44eb8dd Remove 'coc.nvim' plugin 2024-12-25 16:47:57 +01:00
849c7e97fa Use single key for interactive staging (git) 2024-12-25 16:47:57 +01:00
83437bd724 Update alacritty config 2024-12-23 21:11:53 +01:00
9e7524ce5e Migrate alacritty to toml 2024-12-23 20:51:32 +01:00
8d69407d71 Update xmonad statusbar(s) 2024-12-23 00:02:20 +01:00
2590f238df Update XMonad imports 2024-12-22 23:58:23 +01:00
6c8b99d375 Remove nix profile from path 2024-12-22 23:50:04 +01:00
1cdd9ecb81 Modify taskwarrior default report 2024-12-22 20:06:21 +01:00
7540945509 Extract taskwarrior aliases to own file 2024-12-22 20:06:00 +01:00
6d3ab7e6b9 Add taskwarrior 'z-arch' host config 2024-12-22 19:51:39 +01:00
3824bd663c Update taskwarrior config 2024-12-22 19:50:15 +01:00
f4b69ffd0a Remove ipython profile 2024-12-15 21:24:24 +01:00
799dd32950 Add codi shell wrapper 2024-12-15 13:39:39 +01:00
adc550b2ed Save X session errors 2024-12-14 17:55:03 +01:00
64b0958236 Only set 'SSH_AUTH_SOCK' out of ssh session 2024-12-14 17:51:45 +01:00
ae567ecb58 Source bash prompt 2024-12-14 17:39:29 +01:00
db5ca355b1 Add fold for aliases 2024-12-14 17:39:02 +01:00
3307434f30 Ignore shell check SC1091,SC1090 2024-12-14 17:14:24 +01:00
69d5463960 Add 'git commit --ammend' alias 2024-12-14 16:35:58 +01:00
8b893257af Add signing key to git config 2024-12-14 16:35:06 +01:00
a758946e82 Add npm and yarn checks 2024-12-14 16:34:07 +01:00
d9603c543c Update git aliases 2024-12-14 15:57:23 +01:00
e29e6e808c Disable git commit gpgsign 2024-12-14 15:51:50 +01:00
6b444e90e2 Add git worktree alias 2024-12-14 15:51:16 +01:00
171d56150d Migrate 'dmenu-trans' to rofi 2024-12-12 19:24:39 +01:00
fc08e2046b Add 'taskdeps' script 2024-12-07 20:31:53 +01:00
41c7740c0c Remove unused systemd user services 2024-10-08 20:37:57 +02:00
1dd6ac51ae Update wiki.vim config 2024-10-08 20:36:56 +02:00
2444cba1cb Update 'pandocCiteKey' syntax highlighting 2024-10-08 20:35:51 +02:00
02eab915e7 Fix 'GetContext' 2024-10-08 20:35:12 +02:00
e3517c8dc0 Allow remap for split mappings 2024-10-08 20:34:46 +02:00
06c90adb7c Add 'AnkiDeck' function 2024-10-08 20:34:26 +02:00
93a76e7940 Remove 'vim-obsession' plugin 2024-10-08 20:33:37 +02:00
d2ac9d3822 Update wiki file types 2024-10-08 20:30:38 +02:00
14b69eb0f8 Update quickscope.vim config 2024-10-08 20:29:05 +02:00
ce21e48fd7 Remove 'copilot.nvim' 2024-10-08 20:22:31 +02:00
e1f55bed1a Reorganize bash config 2024-09-29 11:41:29 +02:00
393e2c5db5 Move host-specific configuration 2024-09-29 11:38:47 +02:00
6cf696e1f6 Update bash editor configuration 2024-09-29 11:36:20 +02:00
78fafd18ee Update NeoVim VSCode mappings 2024-09-23 20:36:20 +02:00
ea4bb90bab Add neovim vscode config 2024-09-22 18:36:31 +02:00
620a5863a3 Organize vimrc 2024-09-22 16:27:17 +02:00
227944b184 Clean vimrc 2024-09-22 16:03:50 +02:00
8ed805dacf Fix guibg error 2024-09-22 14:13:51 +02:00
21e5d0ac86 Separate config into '.vim/plugins/' 2024-09-22 11:54:49 +00:00
0ce01efd46 Update colorscheme config 2024-09-22 11:54:49 +00:00
5a29b672a2 Add rofi keybindings to XMonad 2024-09-22 11:54:49 +00:00
2f4ed6cc51 Update password backup scripts 2024-09-22 11:54:49 +00:00
a6a85d1ea5 Update 'save-passwddb script'
Update `save-passwddb` script to use Proton drive instead of Google
drive. Also fixes an issue with too many files being included.
2024-09-22 11:54:49 +00:00
58478b9b15 Delete .vim/snips/.snippets 2024-09-22 11:41:30 +00:00
0fe4662551 Update taskwarrior sync setup 2024-09-13 14:17:00 +02:00
ed44636981 Use regex for filename basename snippet 2024-09-02 19:17:50 +02:00
72629f5b98 Update 'layoutHook' 2024-03-30 16:59:35 +01:00
e771a09fbe Add 'swallowEventHook' 2024-03-30 16:50:15 +01:00
b6ba9ab4ea Remove ShowWName stuff 2024-03-30 16:27:19 +01:00
09812befdc Add folds for hooks 2024-03-30 16:26:32 +01:00
f98b19f0b1 Add 'myHandleEventHook' 2024-03-30 16:21:22 +01:00
d2bf1ed9bd Add 'myModMask' 2024-03-30 16:17:43 +01:00
3795d10197 Organize imports 2024-03-30 16:15:35 +01:00
b0df672009 Fix deprecated 'dynamicPropertyChange' 2024-03-30 16:00:54 +01:00
42df25d5cc Update '.bash_profile' 2024-01-30 21:51:18 +01:00
ac066bb076 Add '1px border <color>' snippets 2024-01-30 21:48:10 +01:00
01842d8f1e Use polybar config 2024-01-30 15:54:02 +01:00
4b74af8b99 Update readme 2024-01-28 21:21:44 +01:00
28d1e36003 Update 'fzf-book' script 2024-01-28 21:21:33 +01:00
4708739c66 Update anki scripts 2024-01-28 21:20:49 +01:00
bb54ec3629 Remove 'prep-duration' argument 2024-01-28 21:20:21 +01:00
e9017047cd Update 'clear' argument 2024-01-28 21:20:05 +01:00
6aefd6bd92 Update pomo directory 2024-01-28 21:19:21 +01:00
71d8b33123 Update drive directory 2024-01-28 21:17:59 +01:00
93f223c1ec Update 'tmux-workspace' script 2024-01-28 20:34:43 +01:00
3d1fe7b173 Fix shellcheck warning 2024-01-28 20:33:29 +01:00
bab4c612f3 Remove 'get-displays' 2024-01-28 20:32:17 +01:00
16c87b6b4c Use rofi launcher 2024-01-28 20:27:45 +01:00
892ab35612 Update key bindings 2024-01-28 20:26:46 +01:00
958de4e03c Add 'zk' script 2024-01-26 12:27:41 +01:00
fade05a394 Update user-dirs 2024-01-26 12:19:17 +01:00
e11085ca91 Add section link snippet 2024-01-09 12:45:49 +01:00
4e625a45fa Update .gitignore 2024-01-03 19:39:59 +01:00
2793ac2349 Update 'shiftAndView' 2024-01-03 19:39:15 +01:00
2e29cb8292 Snap floating windows on drop 2024-01-03 18:58:31 +01:00
5e5c5464d3 Add quarto plugin 2024-01-02 21:35:56 +01:00
f52a222230 Extract 'wiki.vim' config 2023-12-30 13:30:48 +01:00
3801186f8b Extract 'md-img-paste.vim' config 2023-12-30 13:27:22 +01:00
e5a61705ee Update shebang snippets 2023-12-30 01:46:22 +01:00
d57cff1227 Update pandoc config 2023-12-21 22:41:32 +01:00
5b51c48ece Update fzf config 2023-12-21 22:40:04 +01:00
1ccfb2b8fe Update eslint & prettier config 2023-12-18 14:06:59 +01:00
0092d0793f Extract 'commentary' config 2023-12-18 14:03:51 +01:00
480d1d8434 Extract (& update) 'copilot' config 2023-12-18 14:03:08 +01:00
6190162e49 Extract 'sandwich' config 2023-12-18 14:01:24 +01:00
1c8afd0690 Move silver_searcher config 2023-12-18 13:57:05 +01:00
d6d23f913b Improve zettelkasten preview 2023-12-18 13:54:07 +01:00
24aeb3ffe3 Extract 'utils' config 2023-12-18 13:50:23 +01:00
1b62acfc80 Extract 'fold' config 2023-12-18 13:47:46 +01:00
ad20848d86 Extract 'netrw' config 2023-12-18 13:45:53 +01:00
8e468a30b8 Hack statusbar color theme update 2023-12-15 16:13:06 +01:00
08fb963ea7 Add polybar example config 2023-12-13 16:06:39 +01:00
371a373431 Untrack xournalpp config 2023-12-11 23:44:40 +01:00
12cf0754b6 Untrack blender config 2023-12-11 22:50:19 +01:00
07c99da684 Sign commits using gpg 2023-12-10 10:52:57 +01:00
7d10e4fda4 Move alacritty config to $XDG_CONFIG_HOME 2023-12-10 10:39:18 +01:00
9e71502574 Use example file for spotify config 2023-12-10 10:33:37 +01:00
4c5607d1ed Use nvimpager as pager 2023-12-10 01:08:12 +01:00
8c7cca7f62 Bind 'copy' to 'y' 2023-12-10 01:07:39 +01:00
df120d9fbb Fix clearing timer 2023-12-09 21:29:04 +01:00
07eec68706 Refactor 'pomo' script 2023-12-09 21:19:41 +01:00
41568b9bc6 Add module docstring 2023-12-09 20:48:54 +01:00
54f887f7d4 Save all KeePassXC databases 2023-12-09 20:39:04 +01:00
9297830bcf Replace 'init.vim' by 'init.lua' 2023-12-09 17:49:35 +01:00
d93fb7fb2a Export 'GOPATH' 2023-12-09 17:49:35 +01:00
37eeb40184 Use '<C-a>' for tmux prefix 2023-12-09 17:49:35 +01:00
4f0106ca03 Keep inputrc in default location (fix) 2023-12-09 17:49:35 +01:00
fcb1469297 Update screen temperature script 2023-11-21 13:57:28 +01:00
9ab374f38e Fix delete shortcut 2023-11-18 17:50:01 +01:00
hektor
6e091db8fa Update README.md 2023-11-18 17:43:15 +01:00
5a7df6bcd2 Use polybar 2023-11-18 17:35:16 +01:00
4849b64ea5 Add 'copy window to all workspaces' shortcuts 2023-11-18 17:26:46 +01:00
48681cfd4d Add basic ssh host backup script 2023-10-21 17:11:53 +02:00
0485edf197 Add 'fzf-ssh' script 2023-10-21 16:52:37 +02:00
0f8704bbb5 Use screen-temperature script 2023-09-12 12:45:01 +02:00
e8cad0a7a5 Fix shellcheck warnings 2023-08-30 17:03:37 +02:00
ea0ec29bce Update tmux path for config reload 2023-08-30 17:03:37 +02:00
3aa1900aa2 Update mpv config 2023-08-30 17:03:37 +02:00
378cd0c389 Update firefox config 2023-08-30 17:03:37 +02:00
734896b483 Update autorandr config 2023-08-30 17:03:37 +02:00
538b613185 Untrack atom config 2023-08-30 17:03:37 +02:00
47b036b046 Move inputrc to 'XDG_CONFIG_HOME' 2023-08-30 17:03:37 +02:00
214 changed files with 5619 additions and 6955 deletions

View File

@@ -1,28 +0,0 @@
window:
padding:
x: 0
y: 0
font:
normal:
family: Iosevka Term SS08
white: '#d0d0d0'
bold:
family: Iosevka Term SS08
style: bold
italic:
family: Iosevka Term SS08
style: italic
size: 12
colors:
primary:
foreground: '0x111111'
background: '0xcccccc'
normal:
black: '0x000000'
red: '0xcc3333'
green: '0x33cc33'
yellow: '0x885800'
blue: '0x3333cc'
magenta: '0xcc33cc'
cyan: '0x33cccc'
white: '0xcccccc'

View File

@@ -1,26 +1,9 @@
# shellcheck shell=bash
# vim: set ft=bash :
# Alias aliases
alias al=alias
alias alf="alias | fzf"
alias al-=unalias
# Edit configuration files
alias eba="nvim ~/.bashrc"
alias eal="nvim ~/.bash_aliasrc"
alias ev="nvim ~/.vimrc"
# Navigation
alias ..="cd .."
alias .2="cd ../.."
alias .3="cd ../../.."
# Colorize output
alias ls="ls --color=auto"
alias grep="grep --color=auto"
alias ip="ip --color"
# Listing
alias l="ls -1p"
alias ll="ls -lhp"
alias lt="ls -lhtp"
@@ -28,7 +11,8 @@ alias la="ls -lhap"
alias lta="ls -lhatp"
alias ldir="ls -dp" # list directories
# Safety
alias grep="grep --color=auto"
alias rm="rm -I --preserve-root"
alias mv="mv -iv"
alias cp="cp -iv"
@@ -38,32 +22,32 @@ alias chown="chown --preserve-root"
alias chmod="chmod --preserve-root"
alias chgrp="chgrp --preserve-root"
# Clipboard
alias clip="xclip -sel clip"
alias srclip="clip -o | speedread -w 500"
alias ip="ip --color"
alias ipa="ip -brief address"
alias ipl="ip -brief link"
alias ipr="ip route"
alias clip="xclip -sel clip"
# Other
alias cfg="/usr/bin/git --git-dir=/home/h/.git/ --work-tree=/home/h"
alias df="df -kTh"
alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables
# Programs
alias h="history"
alias o="xdg-open"
alias v="nvim"
alias zk='cd ~/.zk && nvim "$(cat ~/.zk/current-zettel.txt)"'
alias vf="fzf --bind 'enter:become(nvim {})'"
alias g='git'
alias t=' task'
alias k="kubectl"
alias t='task'
alias tsh='tasksh'
alias z='zathura --fork'
alias f='fzf'
alias fm='pcmanfm &>/dev/null &'
alias xev='xev | grep -A2 ButtonPress' # Ignore mouse movements
alias mm='micromamba'
# Languages
alias js="node"
alias ts="ts-node"
alias r5="plt-r5rs --no-prim"
alias hs="ghci"
alias pl="swipl"

View File

@@ -1,3 +1,4 @@
# shellcheck shell=bash
# vim: set ft=bash :
reboot-to-windows ()

View File

@@ -1,7 +1,7 @@
# shellcheck shell=bash
# vim: set ft=bash :
source "$HOME/.bash_aliases/dualboot"
alias lm='ddcutil setvcp 10'
alias cuda-available='python -c "import torch; print(\"CUDA enabled:\", torch.cuda.is_available());"'

View File

@@ -1,3 +1,4 @@
# shellcheck shell=bash
# vim: set ft=bash :
source "$HOME/.bash_aliases/dualboot"

35
.bash_aliases/lang-js Normal file
View File

@@ -0,0 +1,35 @@
# shellcheck shell=bash
# vim: set ft=bash :
alias js="node"
alias ts="ts-node"
yarn() {
if [[ -f "package-lock.json" ]]; then
echo "WARNING: package-lock.json exists"
read -p "Are you sure you want to run yarn? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
command yarn "$@"
else
echo "Aborted"
fi
else
command yarn "$@"
fi
}
npm() {
if [[ -f "yarn.lock" ]]; then
echo "WARNING: yarn.lock exists"
read -p "Are you sure you want to run npm? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
command npm "$@"
else
echo "Aborted"
fi
else
command npm "$@"
fi
}

View File

@@ -1,7 +1,10 @@
# shellcheck shell=bash
# shellcheck disable=SC1090
[[ -f ~/.bashrc ]] && . ~/.bashrc
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket"
export _JAVA_AWT_WM_NONREPARENTING=1
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
exec startx "$HOME/.config/X11/xinitrc"
if [[ -z "${DISPLAY}" ]] && [[ "${XDG_VTNR}" -eq 1 ]]; then
exec startx "$HOME/.config/X11/xinitrc" >& ~/.xsession-errors
fi

119
.bashrc
View File

@@ -1,37 +1,34 @@
# shellcheck shell=bash
# shellcheck disable=SC1091,SC1090
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
source /etc/os-release
. /etc/os-release
# Editor & prompt configuration
[ -f "$HOME/.bashrc.d/editor" ] && . "$HOME/.bashrc.d/editor"
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
# Aliases {{{
# Load aliases dynamically
[ -f "$HOME/.bash_aliases/all" ] && source "$HOME/.bash_aliases/all"
[ -f "$HOME/.bash_aliases/$HOSTNAME" ] && source "$HOME/.bash_aliases/$HOSTNAME"
[ -f "$HOME/.bash_aliases/private" ] && source "$HOME/.bash_aliases/private"
[ -f "$HOME/.bash_aliases/all" ] && . "$HOME/.bash_aliases/all"
[ -f "$HOME/.bash_aliases/hosts/$HOSTNAME" ] && . "$HOME/.bash_aliases/hosts/$HOSTNAME"
[ -f "$HOME/.bash_aliases/private" ] && . "$HOME/.bash_aliases/private"
[ -f "$HOME/.bash_aliases/lang-js" ] && . "$HOME/.bash_aliases/lang-js"
# Completions {{{
[ -d "$HOME/.bash_completions" ] && for file in "$HOME/.bash_completions"/*; do
[ -f "$file" ] && . "$file"
done
# }}}
# Dynamic configuration {{{
[ -f "$HOME/.bashrc.d/$HOSTNAME" ] && source "$HOME/.bashrc.d/$HOSTNAME"
[ -f "$HOME/.bashrc.d/private" ] && source "$HOME/.bashrc.d/private"
# Host-specific and private configurations
[ -f "$HOME/.bashrc.d/hosts/$HOSTNAME" ] && . "$HOME/.bashrc.d/hosts/$HOSTNAME"
[ -f "$HOME/.bashrc.d/private" ] && . "$HOME/.bashrc.d/private"
# }}}
# Prompt {{{
get_branch_name() {
git symbolic-ref --quiet --short HEAD 2>/dev/null \
|| git rev-parse --short HEAD 2>/dev/null \
|| echo 'some branch'
}
get_git_info() {
git rev-parse --is-inside-work-tree &>/dev/null || return
echo -e "$(get_branch_name)"
}
PS1="\u \w ❭\[$(tput sgr0)\] "
# Ellipsis when deep in directory
export PROMPT_DIRTRIM=2
export PS1
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
# }}}
# Path {{{
@@ -40,46 +37,30 @@ export PATH=~/.bin:$PATH
# }}}
# History {{{
export HISTSIZE=999999
export HISTFILESIZE= # Unlimited
export HISTCONTROL=ignoreboth:erasedups
export HISTSIZE=500000
# Omit `clear, ls...`; commands prepended with space
export HISTIGNORE="clear:l: *"
export HISTIGNORE=" *:clear:l:ls:cd" # Omit commands from history (e.g. those prepended with space)
# }}}
# Man pages {{{
# See `:h :Man` in NeoVim
export MANWIDTH=999
# export MANPAGER='nvim +Man!'
export MANWIDTH=80
export PAGER=nvimpager
# }}}
# Editor {{{
# Set vim as default editor
export EDITOR=nvim
export SUDO_EDITOR=nvim
# }}}
# Nvm
export PATH=~/.nvm/versions/node/v14.16.0/bin:$PATH
export NVM_DIR="$HOME/.nvm"
[[ -s "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh" --no-use
# X11 {{{
export XDG_SESSION_TYPE=X11
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME=$HOME/.local/share
# }}}
# Nix package manager {{{
# Add ~/.nix-profile/bin to PATH
export PATH=~/.nix-profile/bin:$PATH
# }}}
# FZF {{{
# Check if fzf is installed
if [ -f "/usr/bin/fzf" ]; then
# Fuzzy finder setup
export FZF_COMPLETION_TRIGGER='**'
export FZF_DEFAULT_COMMAND='ag --hidden --skip-vcs-ignores -t -g ""'
export FZF_DEFAULT_COMMAND='ag -g ""'
export FZF_DEFAULT_OPTS="
--pointer='❭'
--height 10%
@@ -88,11 +69,11 @@ if [ -f "/usr/bin/fzf" ]; then
export FZF_CTRL_T_OPTS="--preview='bat {} | head -500'"
if [[ $ID == "raspbian" ]]; then
source /usr/share/doc/fzf/examples/completion.bash
source /usr/share/doc/fzf/examples/key-bindings.bash
. /usr/share/doc/fzf/examples/completion.bash
. /usr/share/doc/fzf/examples/key-bindings.bash
elif [[ $ID == "arch" ]]; then
source /usr/share/fzf/completion.bash
source /usr/share/fzf/key-bindings.bash
. /usr/share/fzf/completion.bash
. /usr/share/fzf/key-bindings.bash
fi
_fzf_setup_completion path vim zathura xournalpp nvim mpv
@@ -101,14 +82,8 @@ else
fi
# }}}
# Node {{{
# Move nvm folder away from home directory
export NVM_DIR="${XDG_CONFIG_HOME}/nvm"
# Pretty much what is in `/usr/share/nvm/init-nvm.sh` but we add the `--no-use`
# flag to `nvm.sh` to make it lazy
source /usr/share/nvm/nvm.sh --no-use
source /usr/share/nvm/bash_completion
source /usr/share/nvm/install-nvm-exec
# Go {{{
export GOPATH="${XDG_DATA_HOME}/go"
# }}}
# Jupyter {{{
@@ -116,8 +91,36 @@ export JUPYTERLAB_DIR=$HOME/.local/share/jupyter/lab
# }}}
# Conda {{{
[ -f /opt/miniconda3/etc/profile.d/conda.sh ] && source /opt/miniconda3/etc/profile.d/conda.sh
[ -f /opt/miniconda3/etc/profile.d/conda.sh ] && . /opt/miniconda3/etc/profile.d/conda.sh
# }}}
# Zettelkasten {{{
export ZK_PATH="$HOME/.zk"
# SSH Agent {{{
if [[ -z "${SSH_CONNECTION}" ]]; then
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
fi
# }}}
# pnpm
export PNPM_HOME="/home/h/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
# Codi
# Usage: codi [filetype] [filename]
codi() {
local syntax="${1:-python}"
shift
nvim -c \
"let g:startify_disable_at_vimenter = 1 |\
set bt=nofile ls=0 noru nonu nornu |\
hi ColorColumn ctermbg=NONE |\
hi VertSplit ctermbg=NONE |\
hi NonText ctermfg=0 |\
Codi $syntax" "$@"
}

19
.bashrc.d/editor Normal file
View File

@@ -0,0 +1,19 @@
# shellcheck shell=bash
# vim: set ft=bash :
# Set NeoVim as default editor
export EDITOR=nvim
export SUDO_EDITOR="$EDITOR"
declare -A -r EDITOR_CONFIGS=(
["nvim"]="$HOME/.config/nvim/init.lua"
["vim"]="$HOME/.vimrc"
)
edit_editor_config() {
for editor in "${!EDITOR_CONFIGS[@]}"; do
if [ "$EDITOR" = "$editor" ]; then
$EDITOR "${EDITOR_CONFIGS[$editor]}"
fi
done
}

View File

@@ -1 +0,0 @@
# Laptop configuration

19
.bashrc.d/hosts/flex-arch Normal file
View File

@@ -0,0 +1,19 @@
# shellcheck shell=bash
# vim: set ft=bash :
# >>> mamba initialize >>>
# !! Contents within this block are managed by 'mamba init' !!
export MAMBA_EXE="/usr/bin/micromamba";
export MAMBA_ROOT_PREFIX="/home/h/.local/share/micromamba";
__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
if [ -f "/home/h/.local/share/micromamba/etc/profile.d/micromamba.sh" ]; then
. "/home/h/.local/share/micromamba/etc/profile.d/micromamba.sh"
else
export PATH="/home/h/.local/share/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
fi
fi
unset __mamba_setup
# <<< mamba initialize <<<

22
.bashrc.d/prompt Normal file
View File

@@ -0,0 +1,22 @@
# shellcheck shell=bash
# vim: set ft=bash :
get_branch_name() {
git symbolic-ref --quiet --short HEAD 2>/dev/null \
|| git rev-parse --short HEAD 2>/dev/null \
|| echo 'some branch'
}
get_git_info() {
git rev-parse --is-inside-work-tree &>/dev/null || return
echo -e "($(get_branch_name))"
}
if [[ $SSH_CONNECTION ]]; then
PS1='\[\033[01;31m\]\u@\h\[\033[00m\] $(get_git_info)\W❭\[$(tput sgr0)\] '
else
PS1='\u $(get_git_info)\W❭\[$(tput sgr0)\] '
fi
# Ellipsis when deep in directory
export PROMPT_DIRTRIM=2
export PS1

View File

@@ -20,7 +20,7 @@ chmod +x <script>
## Notes
Statusbar scripts are prefixed with `sb` under the assumption you're using
`dwmblocks` (scripts my need changes to be used with different statusbars).
`polybar` (scripts my need changes to be used with different statusbars).
Some scripts have dependencies (e.g. `fzf`, `jq`, `xclip`, ...), make sure you
have them installed.

3
.bin/calc Executable file
View File

@@ -0,0 +1,3 @@
#!/usr/env/bin bash
ipython -i /home/h/.bin/calc.py

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env bash
options="Mouse\nHeadphones"
selected="$(echo -e "$options" | dmenu -i)"
case "$selected" in
"Mouse") toggle-bt-device E4:19:21:56:C8:70;;
"Headphones") toggle-bt-device 38:18:4C:D4:74:42;;
esac

View File

@@ -1,13 +0,0 @@
#!/usr/bin/env bash
# Open pdf by title
# Note: does not handle incorrect metadata
dir=/home/h/doc/books
ag -g ".pdf$" $dir \
| xargs -n1 -d '\n' pdfinfo 2> /dev/null \
| grep "Title: " \
| awk '{for (i=2; i<NF; i++) printf $i " "; printf $NF; printf "\n"}' \
| grep -v "Title:"\
| dmenu -i -p "Read:"

View File

@@ -1,12 +0,0 @@
#!/usr/bin/env bash
options="Play\nPause\nNext\nPrevious"
selected=$(echo -e "$options" | dmenu -i)
case "$selected" in
"Play") playerctl --player=ncspot play;;
"Pause") playerctl --player=ncspot pause;;
"Next") playerctl --player=ncspot next;;
"Previous") playerctl --player=ncspot previous;;
esac

View File

@@ -1,9 +0,0 @@
#!/usr/bin/env bash
options="nl:en\nen:nl\nnl:fr\nfr:nl\nen:fr\nfr:en\nnl:de\nde:nl"
selected=$(echo -e "$options" | dmenu -p "s?:t?" -i -l 0)
notify-send --app-name= -t 3000 "$(trans "$selected" -b "$(dmenu -p "$selected" &)" \
| tr -d '\n' \
| xclip -sel clip -f)"

View File

@@ -3,8 +3,12 @@
# Generate menu of book filenames and save paths
# Preview window contains metadata
function get_book_paths {
find /home/h/doc/books/ -regex '.*\.\(pdf\|epub\|djvu\)' -type f | sort
}
function select_file {
echo "$(find /home/h/doc/books/ -regex '.*\.\(pdf\|epub\|djvu\)' -type f | sort | fzf --delimiter=/ --with-nth=-1)"
get_book_paths | fzf --delimiter=/ --with-nth=-1
}
function open {
@@ -22,3 +26,5 @@ case "$1" in
--help) printf "open \n" >&2 ;;
*) open "$(select_file)" ;;
esac
[[ -n "$selected" ]] && xdg-open "$selected" &> /dev/null & disown

View File

@@ -1,7 +0,0 @@
#!/usr/bin/env bash
# Find and open Xournal sketch
selected=$(ls ~/sketches/*.xopp | fzf)
xournalpp "$selected" &

3
.bin/fzf-ssh Executable file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
ssh "$(ssh-hosts | fzf)"

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash
curl localhost:8765 -X POST -d '{"action": "deckNames", "version": 6}' | jq '.result[]' -r
curl 127.0.0.1:8765 -X POST -d '{"action": "deckNames", "version": 6}' | jq '.result[]' -r

221
.bin/git-cb Executable file
View File

@@ -0,0 +1,221 @@
#!/usr/bin/env bash
set -euo pipefail
readonly ALLOWED_MAIN_BRANCHES=("main" "master" "develop")
readonly BRANCH_TYPES=(
"feat For new features"
"hotfix For urgent fixes"
"fix For fixes"
"release For preparing releases"
"chore For non-code tasks"
)
error() {
echo "Error: $1" >&2
exit 1
}
warn() {
echo "Warning: $1" >&2
}
check_dependencies() {
local missing=()
for cmd in git fzf; do
if ! command -v "$cmd" &> /dev/null; then
missing+=("$cmd")
fi
done
if [[ ${#missing[@]} -gt 0 ]]; then
error "Missing required commands: ${missing[*]}"
fi
}
check_git_repo() {
if ! git rev-parse --git-dir &> /dev/null; then
error "Not in a git repository"
fi
}
check_current_branch() {
local current_branch
current_branch=$(git branch --show-current)
local is_main_branch=false
for branch in "${ALLOWED_MAIN_BRANCHES[@]}"; do
if [[ "$current_branch" == "$branch" ]]; then
is_main_branch=true
break
fi
done
if [[ "$is_main_branch" == false ]]; then
warn "Not branching from a main branch (current: $current_branch)"
read -rp "Continue anyway? [y/N] " response
if [[ ! "$response" =~ ^[Yy]$ ]]; then
exit 0
fi
fi
}
get_user_email() {
local email
email=$(git config --get user.email 2>/dev/null)
if [[ -z "$email" ]]; then
error "Git user email not configured. Run: git config user.email 'your@email.com'"
fi
echo "$email"
}
select_branch_type() {
local selected
selected=$(printf '%s\n' "${BRANCH_TYPES[@]}" | \
fzf --prompt="Select branch type: " \
--height=40% \
--border \
--info=inline) || error "Branch type selection cancelled"
echo "${selected%% *}"
}
select_jira_ticket() {
local email=$1
if ! command -v jira &> /dev/null; then
warn "Jira CLI not found. Proceeding without ticket ID."
return 0
fi
echo "Fetching Jira tickets for $email..." >&2
local jira_data
jira_data=$(jira issue list --assignee="$email" --order-by=priority --plain --no-headers 2>/dev/null) || {
warn "Could not fetch Jira tickets. Proceeding without ticket ID."
return 0
}
if [[ -z "$jira_data" ]]; then
warn "No Jira tickets found. Proceeding without ticket ID."
return 0
fi
echo "$jira_data" >&2
echo "" >&2
local formatted_tickets
formatted_tickets=$(echo "$jira_data" | awk '{
ticket_id = $2
$1 = $2 = ""
description = $0
gsub(/^[ \t]+/, "", description)
if (length(description) > 60) {
description = substr(description, 1, 57) "..."
}
print ticket_id " - " description
}')
if [[ -z "$formatted_tickets" ]]; then
warn "No tickets to display. Proceeding without ticket ID."
return 0
fi
local selected_ticket
selected_ticket=$(echo -e "SKIP - Create branch without ticket ID\n$formatted_tickets" | \
fzf --prompt="Select Jira ticket (or skip): " \
--height=40% \
--border \
--info=inline) || error "Ticket selection cancelled"
if [[ "$selected_ticket" != "SKIP"* ]]; then
echo "${selected_ticket%% -*}"
fi
}
get_branch_description() {
local ticket_id=$1
local editor="${EDITOR:-vi}"
local tmpfile
tmpfile=$(mktemp)
trap "rm -f '$tmpfile'" EXIT
if [[ -n "$ticket_id" ]]; then
cat > "$tmpfile" << EOF
# Selected ticket: $ticket_id
# Enter your branch description below in kebab-case (e.g., my-description):
# The ticket ID will be automatically included in the branch name.
# Lines starting with # will be ignored.
EOF
else
cat > "$tmpfile" << 'EOF'
# Enter your branch description below in kebab-case (e.g., my-description):
# Lines starting with # will be ignored.
EOF
fi
"$editor" "$tmpfile" < /dev/tty > /dev/tty
local desc
desc=$(grep -v '^#' "$tmpfile" | tr -d '\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
echo "$desc"
}
validate_description() {
local desc=$1
if [[ -z "$desc" ]]; then
error "No description provided"
fi
if [[ ! "$desc" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]]; then
error "Invalid branch description format.\nUse lowercase letters, numbers, and hyphens only.\nNo trailing or consecutive hyphens allowed.\nExample: my-feature-description"
fi
}
create_branch() {
local type=$1
local ticket_id=$2
local desc=$3
local branch
if [[ -n "$ticket_id" ]]; then
branch="$type/$ticket_id-$desc"
else
branch="$type/$desc"
fi
if git show-ref --verify --quiet "refs/heads/$branch"; then
error "Branch '$branch' already exists"
fi
echo ""
echo "Creating branch: $branch"
git checkout -b "$branch"
}
main() {
check_dependencies
check_git_repo
check_current_branch
local email
email=$(get_user_email)
local type
type=$(select_branch_type)
echo "About to call select_jira_ticket" >&2
local ticket_id=""
ticket_id=$(select_jira_ticket "$email")
local desc
desc=$(get_branch_description "$ticket_id")
validate_description "$desc"
create_branch "$type" "$ticket_id" "$desc"
}
main "$@"

101
.bin/pomo
View File

@@ -1,11 +1,12 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# vim: set filetype=python:
"""
Pomodoro timer
# Pomodoro timer
#
# - Writes pomodoro timer to temporary file so dwmblocks
# statusbar can read it
# - Notification on session finish
# - Notification on break finish
- Writes pomodoro timer to temporary file so statusbar can read it
- Notification on session finish
- Notification on break finish
"""
import os
import atexit
@@ -13,56 +14,66 @@ from argparse import ArgumentParser
from time import sleep
from plyer import notification
POMO_PATH = os.path.join(os.getenv("XDG_DATA_HOME", os.path.expanduser("~/.local/share")), "pomo")
@atexit.register
def clear():
os.system('echo -n "" > /tmp/pomo')
if os.path.exists(POMO_PATH):
os.remove(POMO_PATH)
def format_mins_secs(mins, secs):
return f"{mins:02d}:{secs:02d}"
atexit.register(clear)
parser = ArgumentParser()
parser.add_argument('-p', '--prep-duration', type=int,
help='Pre session duration', default=0)
parser.add_argument('-w', '--work-duration', type=int,
help='Session duration', default=25)
parser.add_argument('-b', '--break-duration', type=int,
help='Break duration', default=5)
parser.add_argument('-r', '--repeats', type=int,
help='Numer of sessions', default=1)
args = parser.parse_args()
prep_duration = args.prep_duration * 60
work_duration = args.work_duration * 60
break_duration = args.break_duration * 60
repeats = args.repeats
def make_countdown(color="#000000"):
def make_countdown():
def countdown(duration):
while duration != 0:
mins = duration // 60
secs = duration % 60
# os.system('echo -n "{:s} {:02d}:{:02d} \x01" > /tmp/pomo'.format(color, mins, secs))
os.system(
'echo -n "<fc={:s}> {:02d}:{:02d} </fc>" > /tmp/pomo'.format(color, mins, secs))
time_str = format_mins_secs(mins, secs)
os.system(f'echo -n "{time_str}" > {POMO_PATH}')
sleep(1)
duration -= 1
return countdown
prep_countdown = make_countdown("#0000aa")
work_countdown = make_countdown("#aa0000")
break_countdown = make_countdown("#00bb00")
def main(args):
work_duration = args.work_duration * 60
break_duration = args.break_duration * 60
repeats = args.repeats
prep_countdown(prep_duration)
work_countdown = make_countdown()
break_countdown = make_countdown()
while repeats != 0:
notification.notify(title="Get started")
work_countdown(work_duration)
if break_duration != 0:
notification.notify(title="Time for a break")
break_countdown(break_duration)
notification.notify(title="Break is over, back to work")
repeats -= 1
while repeats != 0:
notification.notify(title="Get started")
work_countdown(work_duration)
if break_duration != 0:
notification.notify(title="Time for a break")
break_countdown(break_duration)
notification.notify(title="Break is over, back to work")
repeats -= 1
def handle_signal(signal, frame):
# Wait for clear to finish
clear()
print('Exiting')
exit(0)
if __name__ == '__main__':
parser = ArgumentParser()
parser.add_argument('-w', '--work-duration', type=int,
help='Session duration', default=25)
parser.add_argument('-b', '--break-duration', type=int,
help='Break duration', default=5)
parser.add_argument('-r', '--repeats', type=int,
help='Numer of sessions', default=1)
parser.add_argument('-c', '--clear', action='store_true',
help='Clear timer')
args = parser.parse_args()
main(args)

19
.bin/restore-passwddb Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Backup existing password databases and
# database keys (using date in filename date -u
# +%Y-%m-%d_%H-%M-%S)
RCLONE_REMOTE="proton-drive"
for f in "$HOME/doc"/*.{kdbx,kdbx.key}; do
[ -e "$f" ] || continue
echo "Backing up $f to $f-$(date -u +%Y-%m-%d_%H-%M-%S)"
cp "$f" "$f-$(date -u +%Y-%m-%d_%H-%M-%S)"
done
echo "Restoring KeePassXC databases and database keys"
rclone copyto \
"$RCLONE_REMOTE:doc"/ "$HOME/doc/" \
--progress \
--include "/*.{kdbx,kdbx.key}"

13
.bin/rofi-trans Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
options="nl:en\nen:nl\nnl:fr\nfr:nl\nen:fr\nfr:en\nnl:de\nde:nl"
selected=$(echo -en "$options" | rofi -dmenu -p "source?:target?" -i)
# notify-send --app-name= -t 3000 "$(trans "$selected" -b "$(rofi -dmenu -p "$selected" &)" \
# | tr -d '\n' \
# | xclip -sel clip -f)"
translation="$(trans "$selected" -b "$(rofi -dmenu -p "$selected" &)" | tr -d '\n')"
echo -e "Copy" | rofi -p "translation" -dmenu -i -mesg "$translation" | xargs -I{} echo -n "$translation" | xclip -selection clipboard

View File

@@ -2,15 +2,74 @@
# Save (encrypted) password database to cloud storage
#
# Can be run manually or daily by enabling the corresponding systemd user
# service and timer, i.e.
#
# `systemctl --user enable save-passwddb.service`
# `systemctl --user enable save-passwddb.timer`
# Usage:
# save-passwddb - Save databases to cloud
# save-passwddb init - Restore databases from cloud (with single backup archive)
if [ -f "$HOME/doc/passwd.kdbx" ]; then
rclone copy "$HOME/doc/passwd.kdbx" google-drive:
else
echo "Password database not found, use 'rclone copy google-drive:passwd.kdbx $HOME/doc/passwd.kdbx' to restore"
exit 1
fi
RCLONE_REMOTE="proton"
SOURCE_DIR="$HOME/doc"
TARGET_DIR="$RCLONE_REMOTE:doc"
BACKUP_DIR="$HOME/doc/bak"
function save_databases() {
if [ 0 -lt "$(ls $SOURCE_DIR/*.kdbx 2>/dev/null | wc -w)" ]; then
echo "[save] Saving KeePassXC databases and database keys"
rclone copy "$SOURCE_DIR" "$TARGET_DIR" \
--include "/*.{kdbx,kdbx.key}" \
--progress
echo "[save] Done"
else
echo "[save] No password database found, restore with:"
echo ""
echo " $0 init"
exit 1
fi
}
function backup_existing() {
mkdir -p "$BACKUP_DIR"
local timestamp=$(date +%Y%m%d-%H%M%S)
local backup_file="$BACKUP_DIR/passwddb_backup_${timestamp}.tar.gz"
echo "[backup] Creating backup archive: ${backup_file}"
tar -czf "$backup_file" -C "$SOURCE_DIR" $(find "$SOURCE_DIR" -maxdepth 1 -type f \( -name "*.kdbx" -o -name "*.kdbx.key" \) -printf "%f ")
echo "[backup] Backup complete"
}
function restore_databases() {
echo "[init] Checking for existing files..."
local existing_files=$(find "$SOURCE_DIR" -maxdepth 1 -type f \( -name "*.kdbx" -o -name "*.kdbx.key" \) -print)
if [ -n "$existing_files" ]; then
echo "[init] Found existing database files:"
echo "$existing_files" | while read -r file; do
echo " - $file"
done
read -p "[init] Create backup archive of existing files? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
backup_existing
fi
fi
echo "[init] Restoring KeePassXC databases and database keys"
mkdir -p "$SOURCE_DIR"
rclone copy "$TARGET_DIR" "$SOURCE_DIR" \
--include "*.{kdbx,kdbx.key}" \
--progress
echo "[init] Done"
}
case "$1" in
""|save)
save_databases
;;
init)
restore_databases
;;
*)
echo "Usage: $0 [init|save]"
exit 1
;;
esac

12
.bin/save-ssh-host Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
selected_hosts="$(ssh-hosts | fzf -m)"
for host in $selected_hosts; do
echo "Saving $host"
directories="$(ssh "$host" ls | fzf -m)"
for directory in $directories; do
echo "Saving $host:$directory"
ssh "$host" "(tar cvzf - ~/$directory)" > "${host}_${directory}.tar.gz"
done
done

View File

@@ -5,7 +5,7 @@
num_to_review=200
# Get current card count from Anki
count=$(curl -s localhost:8765 -X POST -d '{"action": "getNumCardsReviewedToday", "version": 6}' | jq '.result')
count=$(curl -s 127.0.0.1:8765 -X POST -d '{"action": "getNumCardsReviewedToday", "version": 6}' | jq '.result')
if [ -z "$count" ]
then

12
.bin/sb-wg Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env sh
# Reference: https://github.com/mil-ad/polybar-wireguard
connected_interfaces=$(networkctl | grep -P "\d+ .* wireguard routable" -o | cut -d" " -f2)
if [ -n "$connected_interfaces" ];
then
for interface in $connected_interfaces; do echo "$interface"; done
else
exit 1
fi

51
.bin/screen-temperature Executable file
View File

@@ -0,0 +1,51 @@
#!/usr/bin/env python
import sys
import subprocess
DEFAULT_TEMPERATURE = 3500
try:
with open('/tmp/temperature', 'r') as temp_file:
current_temperature = int(temp_file.read())
except FileNotFoundError:
current_temperature = DEFAULT_TEMPERATURE
# If no argument is given print the current temperature
if len(sys.argv) == 1:
print(current_temperature)
sys.exit(0)
elif len(sys.argv) != 2:
print("""
Usage:
screen-temperature
print current temperature
screen-temperature <temperature>
set screen temperature to <temperature>
screen-temperature <+|-><temperature>
increase or decrease screen temperature by <temperature>
""")
sys.exit(1)
temperature_change = sys.argv[1]
if temperature_change.startswith("+"):
new_temperature = current_temperature + int(temperature_change[1:])
elif temperature_change.startswith("-"):
new_temperature = current_temperature - int(temperature_change[1:])
else:
new_temperature = int(temperature_change)
try:
subprocess.run(["redshift", "-O", str(new_temperature), "-P"], check=True)
with open('/tmp/temperature', 'w') as temp_file:
temp_file.write(str(new_temperature) + '\n')
# Send notification
subprocess.run(
["notify-send", str(new_temperature) + "K"])
except subprocess.CalledProcessError:
print("Error: could not set screen temperature.")
sys.exit(1)

View File

@@ -1,89 +0,0 @@
#!/usr/bin/env bash
# Note: this script gets called from $HOME/.config/autorandr/docked/postswitch,
# default drawing area on 4K monitor
# Centered draw area:
#
# x_offset = screen_width/2 - draw_width/2
# y_offset = screen_height/2 - draw_height/2
#
# Drawing area
# TODO: w,h,x,y parameters w/ these defaults
# call script from autorandr with corresponding parameters.
#
# Get screen resolution (TODO: test external monitor)
resolution=$(xrandr --current | grep "connected primary" | awk '{print $4}' | sed 's/x/ /g' | sed 's/+[0-9]//g')
screen_w=$(echo "$resolution" | awk '{print $1}')
screen_h=$(echo "$resolution" | awk '{print $2}')
w=1920 # Width
h=1080 # Height
x="$((screen_w - 1920))" # Horizontal offset
y="$((screen_h - 1080))" # Vertical offset
orientation="landscape" # Portrait/landscape
# Get rotation setting
rotate=`[[ "$orientation" == "landscape" ]] && echo "half" || echo "ccw"`
#
# Wacom tablet
#
# Right bottom
xsetwacom set "Wacom Intuos Pro M Pen stylus" rotate "$rotate"
xsetwacom set "Wacom Intuos Pro M Finger touch" rotate "$rotate"
xsetwacom set "Wacom Intuos Pro M Pen eraser" rotate "$rotate"
xsetwacom set "Wacom Intuos Pro M Pen cursor" rotate "$rotate"
xsetwacom set "Wacom Intuos Pro M Pen stylus" rotate "$rotate"
xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput "$w"x"$h"+"$x"+"$y"
xsetwacom set "Wacom Intuos Pro M Finger touch" MapToOutput "$w"x"$h"+"$x"+"$y"
xsetwacom set "Wacom Intuos Pro M Pen eraser" MapToOutput "$w"x"$h"+"$x"+"$y"
xsetwacom set "Wacom Intuos Pro M Pen cursor" MapToOutput "$w"x"$h"+"$x"+"$y"
xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput "$w"x"$h"+"$x"+"$y"
# Centered
# xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)"
# xsetwacom set "Wacom Intuos Pro M Finger touch" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)"
# xsetwacom set "Wacom HID 5214 Pen stylus" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)"
# xsetwacom set "Wacom HID 5214 Finger touch" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)"
# xsetwacom set "Wacom Intuos Pro M Pen eraser" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)"
# xsetwacom set "Wacom Intuos Pro M Pen cursor" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)"
# xsetwacom set "Wacom HID 5214 Pen eraser" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)"
# xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)"
# # Rotate drawing are for vertical drawing
# # (physical controls above drawing area)
# xsetwacom set "Wacom Intuos Pro M Pen stylus" rotate ccw
# xsetwacom set "Wacom Intuos Pro M Finger touch" rotate ccw
# xsetwacom set "Wacom HID 5214 Pen stylus" rotate ccw
# xsetwacom set "Wacom HID 5214 Finger touch" rotate ccw
# xsetwacom set "Wacom Intuos Pro M Pen eraser" rotate ccw
# xsetwacom set "Wacom Intuos Pro M Pen cursor" rotate ccw
# xsetwacom set "Wacom HID 5214 Pen eraser" rotate ccw
# xsetwacom set "Wacom Intuos Pro M Pen stylus" rotate ccw
# # Set drawing area to left side on 3840x2160 monitor
# xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput 1080x1920+130+130
# xsetwacom set "Wacom Intuos Pro M Finger touch" MapToOutput 1080x1920+130+130
# xsetwacom set "Wacom HID 5214 Pen stylus" MapToOutput 1080x1920+130+130
# xsetwacom set "Wacom HID 5214 Finger touch" MapToOutput 1080x1920+130+130
# xsetwacom set "Wacom Intuos Pro M Pen eraser" MapToOutput 1080x1920+130+130
# xsetwacom set "Wacom Intuos Pro M Pen cursor" MapToOutput 1080x1920+130+130
# xsetwacom set "Wacom HID 5214 Pen eraser" MapToOutput 1080x1920+130+130
# xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput 1080x1920+130+130
#
# Laptop touch display
#
xsetwacom set "Wacom HID 5214 Pen stylus" rotate none
xsetwacom set "Wacom HID 5214 Finger touch" rotate none
xsetwacom set "Wacom HID 5214 Pen eraser" rotate none
xsetwacom set "Wacom HID 5214 Pen eraser" MapToOutput 1920x1080+0+0
xsetwacom set "Wacom HID 5214 Pen stylus" MapToOutput 1920x1080+0+0
xsetwacom set "Wacom HID 5214 Finger touch" MapToOutput 1920x1080+0+0
xsetwacom --set "Wacom Intuos Pro M Finger touch" TOUCH off

View File

@@ -1,76 +1,208 @@
#!/bin/bash
pac_list=(
at
automake
autopep8
base
base-devel
bash-completion
bash-language-server
bc
brightnessctl
chromium
dmidecode
entr
eslint_d
feh
firefox-developer-edition
firefox-tridactyl
firefox-tridactyl-native
firefox-tridactyl-native-debug
fzf
gcc
git
haskell-language-server
haskell-ormolu
hsetroot
htop
httpie
jq
keepassxc
kitty
lua-language-server
make
man-db
man-pages
neovim
nmap
nodejs-lts-jod
pacman-contrib
pandoc-cli
pandoc-crossref
parallel
pass
pkgbuild-language-server
pnpm
ripgrep
sshfs
stylelint
svelte-language-server
tailwindcss-language-server
task
tldr
tmux
tmuxp
tree
tree-sitter-cli
ts-node
typescript-language-server
unzip
vim-language-server
wget
xclip
yaml-language-server
)
aurpac_list=(
hadolint-bin
nvm
nvimpager
paru
tmux-bash-completion-git
ttf-iosevka-term-ss08
vim-plug
vtsls
xbanish
)
install() {
if pacman -Qi "$1" &> /dev/null; then
echo ""$1" is already installed"
local package="$1"
if pacman -Qi "$package" &> /dev/null; then
echo "$package is already installed"
else
echo "Installing " "$1"
sudo pacman -S --noconfirm --needed "$1"
echo "Installing " "$package"
sudo pacman -S --noconfirm --needed "$package"
fi
}
# Packages to install from Arch repositories
pac_list=(
git
vim
)
aurpac() {
git clone "https://aur.archlinux.org/$1.git" "$HOME/.build/$1"
}
# Packages to install from AUR
aurpac_list=(
xbanish
ttf-iosevka-term-ss08
)
install_packages() {
announce "Installing packages"
local count
for pac in "${pac_list[@]}" ; do
count=$((count+1))
install "$pac";
done
echo "$count packages installed"
}
# Suckless software to build
suckless_list=( $(ls -1 "$HOME/.suckless/") )
install_dotfiles() {
announce "Installing dotfiles"
origin="https://git.hektormisplon.xyz/hektor/dots"
git clone "$origin" "$HOME/dots"
cp -r "$HOME/dots/.git" "$HOME/.git"
git --git-dir="$HOME/.git" config --local status.showUntrackedFiles no
git --git-dir="$HOME/.git" stash -m "[dots]"
git --git-dir="$HOME/.git" stash apply
git --git-dir="$HOME/.git" restore "$HOME"
}
count=0
install_aur_packages() {
announce "Installing AUR packages"
local count
for package in "${aurpac_list[@]}" ; do
if pacman -Qi "$1" &> /dev/null; then
echo "$1 is already installed"
else
count=$((count+1))
aurpac "$package" && makepkg -si -D "$HOME/.build/$package"
fi
done
echo "$count AUR packages installed"
}
echo " "
echo "Installing required packages"
echo " "
setup_neovim() {
announce "Setting up NeoVim"
git clone --depth=1 https://github.com/savq/paq-nvim.git \
"${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/pack/paqs/start/paq-nvim
}
setup_keyboard() {
announce "Setting up keyboard"
install "interception-tools"
install "interception-caps2esc"
udevmon_config_contents="\
- JOB: intercept -g \$DEVNODE | caps2esc -m 1 | uinput -d \$DEVNODE
DEVICE:
EVENTS:
EV_KEY: [KEY_CAPSLOCK]"
if [ -f /etc/interception/udevmon.yaml ] && diff -q <(echo "$udevmon_config_contents") /etc/interception/udevmon.yaml; then
echo "udevmon config already exists"
echo "$udevmon_config_contents"
elif [ -f /etc/interception/udevmon.yaml ]; then
echo "interception udevmon.yaml already exists"
cat /etc/interception/udevmon.yaml
echo "verify if this config matches the one below"
echo "$udevmon_config_contents"
else
echo "interception udevmon.yaml does not exist, creating one"
sudo bash -c "echo '$udevmon_config_contents' > /etc/interception/udevmon.yaml"
fi
sudo systemctl enable --now udevmon.service
if pgrep -x caps2esc > /dev/null; then
echo "caps2esc is already running"
else
caps2esc -m 1
fi
}
configure_gnome() {
announce "Configuring Gnome"; setup-gnome
}
setup_firewall() {
announce "Configuring firewalld"
install firewalld
sudo systemctl enable --now firewalld
}
setup_docker() {
announce "Setting up Docker"
install docker
install docker-compose
sudo systemctl enable --now docker.socket
sudo usermod -aG docker "$USER"
echo "User added to docker group, please restart your session"
}
announce() {
local message="$1"
echo " "
echo "[dots] $message"
echo " "
}
confirm() {
local question="$1"
read -r -p "[dots] $question? [y/N]" -n 1
case "$REPLY" in y|Y ) "$2";; * ) echo "Skipping"; esac
}
printf '%s\n' "${pac_list[@]}"
for pac in "${pac_list[@]}" ; do
count=$[count+1]
install "$pac";
done
echo " "
echo "Installing aur packages"
echo " "
# [ ] Create aurpac installer function
for aurpac in "${aurpac_list[@]}" ; do
if pacman -Qi "$1" &> /dev/null; then
echo "$1 is already installed"
else
count=$[count+1]
("$HOME/.bin/aurpac" "$aurpac" && cd "$aurpac" && makepkg -si)
fi
done
echo " "
echo "Setting up suckless tools"
echo " "
printf '%s\n' "${suckless_list[@]}"
# for tool in "${suckless_list[@]}" ; do
# count=$[count+1]
# (cd "$HOME/.suckless/$tool/" && sudo make clean install);
# done
# echo " "
# echo "Setting up vim"
# echo " "
# cp .vimrc $HOME/.vimrc
# vim +PlugInstall
## Bluetooth setup
# ___
# - [ ] Check if /etc/pulse/default.pa contains following line
# load-module module-switch-on-connect
confirm "Install these packages? " install_packages
printf '%s\n' "${aurpac_list[@]}"
confirm "Install these AUR packages? " install_aur_packages
confirm "Setup NeoVim? " setup_neovim
confirm "Install dotfiles? " install_dotfiles
confirm "Setup keyboard? " setup_keyboard
if pacman -Qi "gdm" &> /dev/null; then
confirm "Configure Gnome? " configure_gnome
fi
confirm "Setup firewall? " setup_firewall
confirm "Setup Docker? " setup_docker

37
.bin/setup-gnome Executable file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/env bash
gsettings set org.gnome.desktop.background primary-color "#555555"
gsettings set org.gnome.desktop.wm.preferences workspace-names "['sh', 'www', 'dev', 'info', 'etc']"
gsettings set org.gnome.desktop.wm.keybindings close "['<Shift><Super>Delete']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>j']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Super>k']"
gsettings set org.gnome.shell.keybindings toggle-application-view "['<Super>p']"
gsettings set org.gnome.mutter center-new-windows true
gsettings set org.gnome.shell.keybindings toggle-quick-settings []
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>a']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['<Super>s']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "['<Super>d']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4 "['<Super>f']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5 "['<Super>g']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['<Super><Shift>a']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['<Super><Shift>s']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['<Super><Shift>d']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['<Super><Shift>f']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-5 "['<Super><Shift>g']"
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ name "Kitty"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ command "kitty"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ binding "<Shift><Super>Return"
gsettings set org.gnome.shell.keybindings screenshot "['Print']"
gsettings set org.gnome.desktop.wm.preferences num-workspaces "5"
gsettings set org.gnome.mutter dynamic-workspaces "false"
gsettings set org.gnome.shell.extensions.window-list display-all-workspaces "true"
gsettings set org.gnome.shell.app-switcher current-workspace-only "true"
gsettings set org.gnome.login-screen logo ''
gsettings set org.gnome.shell favorite-apps "['firefox-developer-edition.desktop']"

20
.bin/setup-zk Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
if [ ! -d ~/.zk ]; then
echo "[zk] Setting up zettelkasten"
gh repo clone zk ~/.zk
else
echo "[zk] Zettelkasten already set up."
fi
read -p "Would you like open your zettelkasten? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
if [ -x "$(command -v zk)" ]; then
zk
else
echo "Error: 'zk' command not found or not executable"
exit 1
fi
fi

View File

@@ -1,41 +0,0 @@
#!/usr/bin/env bash
# Open xournal in wacom drawing area
# xdotool key "Super_L+f"
function start_xournal() {
# Prevent multiple xournalpp instances
if pgrep -x "xournalpp" > /dev/null
then
echo "Xournal is already running"
else
xournalpp &
fi
}
function resize_xournal() {
# Resize xournalpp window to draw area
sleep 1
xournal_id=$(xdotool search --onlyvisible --name xournal)
resize-for-wacom-horizontal
# FIXME: Automate for different resolutions
# Bottom centered
# xdotool windowsize "$xournal_id" 1920 1080
# xdotool windowmove "$xournal_id" 1920 1080
# Centered
xdotool windowsize "$xournal_id" 1920 1080
xdotool windowmove "$xournal_id" 960 540
# Vertical
# xournal_id=$(xdotool search --onlyvisible --name xournal)
# xdotool windowsize "$xournal_id" 1080 1920
# xdotool windowmove "$xournal_id" 130 540
}
set-wacom-draw-area
start_xournal
resize_xournal

5
.bin/ssh-hosts Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
ssh_hosts="$(grep -E 'Host [a-z0-9\-]*$' ~/.ssh/config | awk '{print $2}')"
echo "$ssh_hosts"

144
.bin/taskdeps Executable file
View File

@@ -0,0 +1,144 @@
#!/usr/bin/python
import argparse
import json
import subprocess
from collections import defaultdict
def get_task_data():
command = (
"task +PENDING or +WAITING -COMPLETED -DELETED export | "
"jq '[.[] | {uuid: .uuid, id, depends: .depends, description: .description, status: .status }]'"
)
output = subprocess.check_output(command, shell=True)
return json.loads(output)
def parse_task_data(data):
dependency_graph = defaultdict(list)
task_details = {}
dependent_tasks = set()
for task in data:
task_id = task["uuid"]
task_details[task_id] = {
"id": task.get("id", "?"),
"description": task.get("description", "No description"),
"status": task.get("status", "Unknown status"),
}
if task["depends"]:
for dependency in task["depends"]:
dependency_graph[dependency].append(task_id)
dependent_tasks.add(task_id)
root_tasks = set(task_details.keys()) - dependent_tasks
return task_details, dependency_graph, root_tasks
def get_all_parents(task_id, dependency_graph):
return [
parent for parent, children in dependency_graph.items() if task_id in children
]
def build_ascii_dag(
task_id,
task_details,
dependency_graph,
prefix="",
is_last=True,
show_id=True,
visited=None,
):
if visited is None:
visited = set()
if task_id in visited:
return [f"{prefix}{'└── ' if is_last else '├── '}... (cycle detected)"]
visited.add(task_id)
task_info = task_details[task_id]
task_line = f"{prefix}{'└── ' if is_last else '├── '}{task_info['id'] + ': ' if show_id else ''}{task_info['description']} ({task_info['status']})"
lines = [task_line]
children = dependency_graph.get(task_id, [])
for idx, child in enumerate(children):
child_is_last = idx == len(children) - 1
child_prefix = prefix + (" " if is_last else "│ ")
lines.extend(
build_ascii_dag(
child,
task_details,
dependency_graph,
child_prefix,
child_is_last,
show_id,
visited.copy(),
)
)
return lines
def render_dependency_dag(task_details, dependency_graph, root_tasks, show_id):
dag_lines = []
global_visited = set()
def dfs(task_id, prefix="", is_last=True, visited=None):
if visited is None:
visited = set()
if task_id in visited:
return
visited.add(task_id)
global_visited.add(task_id)
task_info = task_details[task_id]
task_line = f"{prefix}{'└── ' if is_last else '├── '}{str(task_info['id']) + ': ' if show_id else ''}{task_info['description']} ({task_info['status']})"
dag_lines.append(task_line)
children = dependency_graph.get(task_id, [])
for idx, child in enumerate(children):
child_is_last = idx == len(children) - 1
child_prefix = prefix + (" " if is_last else "│ ")
dfs(child, child_prefix, child_is_last, visited.copy())
root_tasks_with_children = [
root for root in root_tasks if dependency_graph.get(root, [])
]
for root in sorted(
root_tasks_with_children,
key=lambda x: len(dependency_graph.get(x, [])),
reverse=True,
):
if root not in global_visited:
dfs(root)
dag_lines.append("")
return "\n".join(dag_lines).rstrip()
def main(args):
data = get_task_data()
task_details, dependency_graph, root_tasks = parse_task_data(data)
ascii_dag = render_dependency_dag(
task_details, dependency_graph, root_tasks, show_id=args.show_id
)
print(ascii_dag)
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Generates a task dependency DAG for Taskwarrior tasks."
)
parser.add_argument(
"--show-id",
action="store_true",
default=False,
help="Include task IDs in the output.",
)
args = parser.parse_args()
main(args)

View File

@@ -3,16 +3,11 @@
session="main"
tmux attach-session -t $session || tmux new-session -s $session \; \
rename-window todo \; \
send-keys -t 0 "task" C-m \; \
rename-window task \; \
send-keys -t 1 "task" C-m \; \
new-window -n zk \; \
send-keys -t 0 "nvim $ZK_PATH/index.md" C-m \; \
new-window -n music \; \
send-keys -t 0 "ncspot" C-m \; \
send-keys -t 2 "nvim $ZK_PATH/index.md" C-m \; \
new-window -n term \; \
new-window -n make \; \
split-window -h \; \
split-window -h \; \
send-keys -t 0 'cd "$ZK_PATH" && ./entr' C-m \; \
send-keys -t 1 'cd "$ZK_PATH" && live-server . --watch=*.html' C-m \; \
select-window -t 2 \;
new-window -n music \; \
send-keys -t 4 "echo 'TODO: open music player'" C-m \; \
select-window -t 1 \;

View File

@@ -1,5 +0,0 @@
#!/usr/bin/env bash
# Get local IP
ip addr show $@ | awk '/inet / {gsub(/\/.*/,"",$2); print $2}' | tail -n 1

View File

@@ -1,3 +0,0 @@
#!/usr/bin/env bash
xrandr -q --current | sed -n 's/^\([^ ]\+\) connected .*/\1/p'

33
.bin/zk Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
if [ "$TERM_PROGRAM" = tmux ]; then
cd ~/.zk && $EDITOR "$(cat ~/.zk/current-zettel.txt)"
else
echo 'Not in tmux'
echo 'Choose an option:'
echo '1. Open in tmux'
echo '2. Open in current terminal'
read -r -p 'Enter your choice: ' choice
case $choice in
1)
# Check if a tmux session is running with a window named zk
if tmux list-windows -F '#{window_name}' | grep -q zk; then
# Attach to the session containing the 'zk' window
session="$(tmux list-windows -F '#{window_name} #{session_name}' | grep zk | head -n 1 | awk '{ print $2 }')"
tmux attach -t "$session"
else
# Create session with a window named 'zk' and start nvim
tmux new-session -s zk -n zk -d
tmux send-keys -t zk:zk "cd ~/.zk && $EDITOR \"\$(cat ~/.zk/current-zettel.txt)\"" Enter
tmux attach -t zk
fi
;;
2)
cd ~/.zk && $EDITOR "$(cat ~/.zk/current-zettel.txt)"
;;
*)
echo 'Not opening Zettelkasten'
exit 1
;;
esac
fi

View File

@@ -1,13 +0,0 @@
# Atom config
Quick and dirty Atom config for live-coding (Tidalcycles, Hydra.js).
## Setup
Note: by default Atom uses `$HOME/.atom` as its config directory, to use
`$HOME/.config/atom` add a global environment variable `ATOM_HOME`
E.g. for arch you can add `export ATOM_HOME=$HOME/.config/atom` to the
following file
`/etc/profile.d/atom.sh`

View File

@@ -1,52 +0,0 @@
"*":
"atom-package-deps":
ignored: [
"linter-ui-default"
]
core:
autoHideMenuBar: true
disabledPackages: [
"linter-glslify"
"github"
"spell-check"
"background-tips"
"wrap-guide"
"whitespace"
"welcome"
"markdown-preview"
"tabs"
"git-diff"
"go-to-line"
"image-view"
"language-coffee-script"
"language-git"
"autocomplete-glsl"
"autocomplete-atom-api"
"autocomplete-css"
"autocomplete-html"
"autocomplete-plus"
"autocomplete-snippets"
"notifications"
]
telemetryConsent: "no"
themes: [
"one-dark-ui"
"dun-syntax"
]
editor:
fontFamily: "Iosevka Term SS08"
fontSize: 21
scrollPastEnd: true
"exception-reporting":
userId: "6f9fc289-7b3c-4490-937e-5e58e9765c5e"
"linter-ui-default":
showPanel: true
"prettier-atom":
formatOnSaveOptions:
enabled: true
"status-bar":
isVisible: false
tabs:
alwaysShowTabBar: false
welcome:
showOnStartup: false

View File

@@ -1 +0,0 @@
atom.commands.dispatch(document.querySelector('atom-workspace'), 'atom-hydra:toggle')

View File

@@ -1,13 +0,0 @@
'atom-text-editor.vim-mode-plus:not(.insert-mode)':
'space s h': 'window:focus-pane-on-left'
'space s l': 'window:focus-pane-on-right'
'space s k': 'window:focus-pane-above'
'space s j': 'window:focus-pane-below'
'space s v': 'pane:split-right-and-copy-active-item'
'space s s': 'pane:split-down-and-copy-active-item'
'space q': 'core:close'
's': 'unset!'
'space p': 'fuzzy-finder:toggle-file-finder'
'atom-text-editor':
'ctrl-b': 'tree-view:toggle'

View File

@@ -1,8 +0,0 @@
atom-hydra@0.3.6
autocomplete-glsl@0.2.3
dun-syntax@0.6.0
linter@3.4.0
linter-glslify@1.0.0
linter-ui-default@3.4.1
platformio-ide-terminal@2.10.1
vim-mode-plus@1.36.7

View File

@@ -1,133 +0,0 @@
// The ui-variables file is provided by base themes provided by Atom.
//
// See https://github.com/atom/atom-dark-ui/blob/master/styles/ui-variables.less
// for a full listing of what's available.
@import "ui-variables";
&.hydra-flash {
// color: @text-color-selected;
// background-color: @background-color-selected;
// color: #000;
background: rgba(255, 255, 255, 0.5) !important;
//background: #0f0 !important;
}
&.evalFlash {
// color: @text-color-selected;
// background-color: @background-color-selected;
// color: #000;
background: rgba(255, 255, 255, 0.8) !important;
//background: #0f0 !important;
}
.hydra,
.hydra canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background: black;
}
body.hydra-enabled {
&,
atom-workspace,
.header *,
.footer *,
atom-workspace-axis,
atom-workspace-axis
:not(.cursor):not(autocomplete-suggestion-list):not(atom-overlay):not(span):not(.region),
atom-workspace *:before,
atom-workspace *:after {
background: transparent; /*!important;*/
border: none !important;
text-shadow: 0 1px 1px black;
box-shadow: none !important;
}
.line > span {
background: rgba(0, 0, 0, 0.6);
}
.cursor {
width: 0 !important;
box-shadow: 0 0 3px #0ff !important;
border-left: 4px solid #0ff !important;
}
autocomplete-suggestion-list,
atom-overlay {
background: rgba(0, 0, 0, 0.9) !important;
}
.region {
background: rgba(0, 255, 255, 0.4) !important;
z-index: 9 !important;
}
.selected:before {
background: #0005 !important;
border-left: 8px #8888 solid !important;
}
/* transparent background for file tabs */
li.texteditor.tab{
background: rgba(0, 0, 0, 0.0)!important;
}
}
/*.evalFlash > span {
background-color: rgba(255, 255, 255, 0.9);
}
//styles from tidal-atom
atom-text-editor.editor .line {
transition: background-color .8s ease-out;
-webkit-transition: background-color .8s ease-out;
background-color: rgba(0, 0, 0, 0.6);
// &.line-green {
// background-color: @green-color;
// }
//
// &.line-blue {
// background-color: @blue-color;
// }
&.line-error {
background-color: fadeout(@background-color-error, 95%);
border: 1px solid fadeout(@background-color-error, 50%);
}
&.line-highlight {
background-color: @background-color-highlight;
}
&.eval-success {
color: @text-color-success;
background-color: fadeout(@background-color-success, 50%);
}
&.eval-error,
&.eval-syntax-error {
color: @text-color-error;
background-color: @background-color-error;
}
}*/
.elegante {
background-color: #f00;
font-family: fantasy;
}
/*
atom-panel div.tidalcycles.console {
height: 100px;
padding: 3px 10px;
font-size: 14px;
overflow: scroll;
font-family: Consolas, monospace;
.error{
color: @text-color-error;
}
}
*/

View File

@@ -1,322 +0,0 @@
@import "syntax-variables";
@import "ui-variables";
// Cursor style
// =========================
.cursor-base () {
border: none;
background: none;
opacity: 0.5;
}
.underline-cursor(@bottom-width: 0.2em) {
.cursor-base();
border-bottom-width: @bottom-width;
border-bottom-style: solid;
border-bottom-color: @syntax-cursor-color;
}
atom-text-editor.vim-mode-plus.normal-mode,
atom-text-editor.vim-mode-plus.visual-mode,
atom-text-editor.vim-mode-plus.operator-pending-mode,
atom-text-editor.vim-mode-plus.insert-mode.replace {
&.is-focused,
&.vim-mode-plus-input-focused,
&.vim-mode-plus-search-input-focused {
.cursor {
.cursor-base();
background-color: @syntax-cursor-color; // block-cursor
}
}
&.vim-mode-plus-input-focused.hide-cursor {
.cursor { opacity: 0; }
.cursors.blink-off .cursor { opacity: 0; }
}
}
atom-text-editor.vim-mode-plus.operator-pending-mode {
&.is-focused,
&.vim-mode-plus-search-input-focused {
.cursor { .underline-cursor(0.6em); }
.cursors.blink-off .cursor { opacity: 0; }
}
}
atom-text-editor.vim-mode-plus.insert-mode.replace {
&.is-focused {
.cursor {
.underline-cursor(0.3em);
opacity: 0.8;
}
}
}
// vim-mode-plus-input-focused for surround, f, F, t, T, r etc.
atom-text-editor.vim-mode-plus.normal-mode,
atom-text-editor.vim-mode-plus.visual-mode,
atom-text-editor.vim-mode-plus.operator-pending-mode, {
&.vim-mode-plus-input-focused {
.cursor { .underline-cursor(); }
}
}
atom-text-editor.vim-mode-plus-input-char-waiting {
&.is-focused { .cursor { .underline-cursor(); } }
}
// Flash ranges e.g. flashing yanked range.
// =========================
.flash-animation (@animation-name, @color) {
@keyframes @animation-name {
from { background-color: @color; }
to { background-color: transparent; }
}
}
.flash (@animation-name; @duration) {
animation-name: @animation-name;
animation-duration: @duration;
animation-iteration-count: 1;
}
@flash-base-color: contrast(@syntax-background-color, darken(@syntax-selection-color, 3%), lighten(@syntax-selection-color, 3%));
@flash-search-color: fadeout(darken(@syntax-selection-flash-color, 10%), 20%);
@flash-added-color: fadeout(darken(@syntax-color-added, 10%), 50%);
@flash-removed-color: fadeout(@syntax-color-removed, 50%);
// flashOnOperate
.flash-animation(flash-operator, @flash-base-color);
.flash-animation(flash-operator-occurrence, @flash-added-color);
.flash-animation(flash-operator-remove-occurrence, @flash-removed-color);
// flashOnUndoRedo
.flash-animation(flash-undo-redo, @flash-base-color);
.flash-animation(flash-undo-redo-multiple-changes, @flash-added-color);
.flash-animation(flash-undo-redo-multiple-deletes, @flash-removed-color);
// flashOnSearch
.flash-animation(flash-search, @flash-search-color);
.flash-animation(flash-screen, @flash-base-color);
atom-text-editor .vim-mode-plus-flash {
// flashOnOperate
&.operator .region { .flash(flash-operator, 0.5s); }
&.operator-long .region { .flash(flash-operator, 0.8s); }
&.operator-occurrence .region { .flash(flash-operator-occurrence, 0.8s); }
&.operator-remove-occurrence .region { .flash(flash-operator-remove-occurrence, 0.8s); }
// flashOnUndoRedo
&.undo-redo .region { .flash(flash-undo-redo, 0.5s); }
&.undo-redo-multiple-changes .region { .flash(flash-undo-redo-multiple-changes, 0.5s); }
&.undo-redo-multiple-deletes .region { .flash(flash-undo-redo-multiple-deletes, 0.5s); }
// flashOnSearch
&.search .region { .flash(flash-search, 1.0s); z-index: 1; }
&.screen .region { .flash(flash-screen, 0.3s); }
// demo-mode pkg integration to stop flash while demo-mode's hover is active
&.operator-demo .region { background: @flash-base-color; }
&.operator-long-demo .region { background: @flash-base-color; }
&.operator-occurrence-demo .region { background: @flash-added-color; }
&.operator-remove-occurrence-demo .region { background: @flash-removed-color; }
&.undo-redo-demo .region { background: @flash-base-color; }
&.undo-redo-multiple-changes-demo .region { background: @flash-added-color; }
&.undo-redo-multiple-deletes-demo .region { background: @flash-removed-color; }
}
// Hover Counter
// =========================
.vim-mode-plus-hover {
display: block;
color: @text-color-highlight;
background-color: @base-background-color;
border-radius: @component-border-radius;
box-shadow: 0 0 1px @syntax-text-color;
margin-top: -3.0em;
margin-left: -0.3em;
padding-left: 0.2em;
padding-right: 0.2em;
text-align: center;
&.first { background-color: @background-color-info; }
&.last { background-color: @background-color-error; }
}
atom-text-editor[mini].vim-mode-plus-input {
background-color: inherit;
font-weight: normal;
color: @text-color;
line-height: 1.28;
cursor: default;
white-space: nowrap;
padding-left: 10px;
height: 0px !important;
width: 0px !important;
overflow: hidden !important;
border: none !important;
padding: 0 !important;
display: block !important;
position: fixed !important;
top: -10px !important;
left: -10px !important;
}
// Search
// =========================
// input
.vim-mode-plus-search-container {
display: flex;
> div {
padding: @component-padding/2 @component-padding;
border: none;
}
.editor-container { width: 100%; }
}
atom-text-editor[mini].vim-mode-plus-search {
border: none;
color: @text-color;
cursor: default;
&.is-focused { box-shadow: none; }
&::before {
font-size: 1.2em;
padding-right: 0.5em;
content: "/";
}
&.backwards::before { content: "?"; }
}
@search-match-base: @syntax-result-marker-color;
@search-match: hsla(hue(@search-match-base), saturation(@search-match-base), lightness(@search-match-base), 0.4);
@search-match-first: fadeout(@syntax-color-renamed, 60%);
@search-match-last: fadeout(@syntax-color-removed, 60%);
@search-match-border-current: hsla(hue(@search-match-base), saturation(@search-match-base), lightness(@search-match-base), 1.0);
@search-match-border-first: syntax-color-renamed;
@search-match-border-last: syntax-color-removed;
atom-text-editor:not(.silent) {
.vim-mode-plus-search-match {
.region { background-color: @search-match; }
&.first .region { background-color: @search-match-first; }
&.last .region { background-color: @search-match-last; }
}
}
@keyframes flash-find-char {
from { border-color: @syntax-color-function; }
to { border-color: transparent; }
}
// highlight
.round-box {
box-sizing: border-box;
border-radius: @component-border-radius;
}
atom-text-editor {
.vim-mode-plus-search-match {
.region {
.round-box();
border: 2px solid transparent;
transition: border-color 0.2s;
}
&.current .region {
border-color: @search-match-border-current;
transition-duration: 0.1s;
}
&.first.current .region {
border-color: search-match-border-first;
}
&.last.current .region {
border-color: @search-match-border-last;
}
}
.vim-mode-plus-highlight-search .region {
.round-box();
border: 1px solid fadeout(@syntax-text-color, 70%);
background-color: @syntax-selection-color;
}
.vim-mode-plus-persistent-selection .region {
background-color: @syntax-selection-color;
}
.vim-mode-plus-target-range .region {
background-color: @syntax-selection-color;
}
.vim-mode-plus-occurrence-base .region {
box-sizing: border-box;
border-bottom-width: 2px;
border-bottom-style: dotted;
z-index: 1;
border-color: @syntax-color-modified;
}
.vim-mode-plus-find-char {
.region {
box-sizing: border-box;
border-width: 0px;
border-bottom-width: 2px;
border-style: solid;
}
&.pre-confirm .region {
border-color: @syntax-color-modified;
&.current { border-bottom-width: 5px; }
}
&.post-confirm .region {
.flash(flash-find-char, 2.0s);
&.long { animation-duration: 4.0s; }
}
}
}
// Maximize Pane
// =========================
atom-workspace.vim-mode-plus--pane-maximized {
atom-dock.left { display: none; }
atom-dock.right { display: none; }
atom-dock.bottom { display: none; }
atom-pane-container {
position: relative;
atom-pane-axis:not(.vim-mode-plus--active-pane-axis) { display: none; }
atom-pane {
.item-views { background: @syntax-background-color !important; }
display: none;
&.vim-mode-plus--active-pane {
display: flex;
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 100;
}
}
}
&.vim-mode-plus--hide-tab-bar { .tab-bar { display: none; } }
&.vim-mode-plus--hide-status-bar { .status-bar { display: none; } }
&.vim-mode-plus--pane-centered {
atom-text-editor:not(.mini) {
margin-left: 20%;
atom-text-editor {
// Some package embed another text-editor into normal text-editor by using block decoration.
// But we don't want this editor in editor centered again.
// E.g. git-diff-details, inline-git-diff
margin-left: 0%;
}
}
}
}
// SelectList Highlight matched text
// =========================
.vim-mode-plus-select-list .list-group .character-match {
color: @text-color-highlight;
font-weight: bold;
}
.demo-mode-container {
.kind {
color: @text-color-selected;
}
}

View File

@@ -1,8 +0,0 @@
output eDP
off
output HDMI-A-0
crtc 0
mode 3840x2160
pos 0x0
primary
rate 60.00

View File

@@ -1 +0,0 @@
HDMI-A-0 00ffffffffffff00410c8fc16d040000271c0103803c22782a67a1a5554da2270e5054bfef00d1c0b30095008180814081c0010101014dd000a0f0703e803020350055502100001aa36600a0f0701f803020350055502100001a000000fc0050484c203237364538560a2020000000fd0017501ea03c000a20202020202001a7020333f14c9004031f1301125d5e5f606123090707830100006d030c001000387820006001020367d85dc401788003e30f000c565e00a0a0a029503020350055502100001e023a801871382d40582c450055502100001e011d007251d01e206e28550055502100001e4d6c80a070703e8030203a0055502100001a000000004e

View File

@@ -1,8 +0,0 @@
output eDP
off
output HDMI-A-0
crtc 0
mode 3840x2160
pos 0x0
primary
rate 60.00

View File

@@ -1 +0,0 @@
$HOME/.bin/set-wacom-draw-area

View File

@@ -1,2 +0,0 @@
HDMI-A-0 00ffffffffffff00410c8fc16d040000271c0103803c22782a67a1a5554da2270e5054bfef00d1c0b30095008180814081c0010101014dd000a0f0703e803020350055502100001aa36600a0f0701f803020350055502100001a000000fc0050484c203237364538560a2020000000fd0017501ea03c000a20202020202001a7020333f14c9004031f1301125d5e5f606123090707830100006d030c001000387820006001020367d85dc401788003e30f000c565e00a0a0a029503020350055502100001e023a801871382d40582c450055502100001e011d007251d01e206e28550055502100001e4d6c80a070703e8030203a0055502100001a000000004e
eDP 00ffffffffffff0009e5d60800000000251d0104a51f1178031ef5965d5b91291c505400000001010101010101010101010101010101c0398018713828403020360035ae1000001a000000000000000000000000000000000000000000fe00424f452043510a202020202020000000fe004e5631343046484d2d4e34550a0011

View File

@@ -1,8 +0,0 @@
output HDMI-A-0
off
output eDP
crtc 0
mode 1920x1080
pos 0x0
primary
rate 60.00

View File

@@ -1 +0,0 @@
eDP 00ffffffffffff0009e5d60800000000251d0104a51f1178031ef5965d5b91291c505400000001010101010101010101010101010101c0398018713828403020360035ae1000001a000000000000000000000000000000000000000000fe00424f452043510a202020202020000000fe004e5631343046484d2d4e34550a0011

View File

@@ -1,3 +0,0 @@
for i in ~/.mozilla/firefox/*.*default*
do ln -s user.js "$i/user.js"
done

View File

@@ -1,14 +0,0 @@
/*
* Note: has to be symlinked to profile directories for your
* firefox release
*
* E.g.
*
* ```sh
* ln -s user.js ~/.mozilla/firefox/*.default-release/user.js
* ```
* Or check out the `setup` script
*
*/
user_pref('browser.download.dir', '/home/h/dl')

View File

@@ -15,7 +15,7 @@ TYPE_ARROW=a
TYPE_CIRCLE=o
TYPE_CIRCLECOUNT=Shift+o
TYPE_COMMIT_CURRENT_TOOL=Ctrl+Return
TYPE_COPY=Ctrl+c
TYPE_COPY=y
TYPE_DELETE_CURRENT_TOOL=
TYPE_DRAWER=l
TYPE_EXIT=q

View File

@@ -1,15 +1,16 @@
git_protocol: ssh
prompt: enabled
aliases:
co: pr checkout
c: repo clone
f: repo fork
rc: repo create
rv: repo view
re: repo edit
rm: repo remove
rn: repo rename
lr: repo list
li: issue list
al: alias
al-: alias delete
co: pr checkout
c: repo clone
f: repo fork
rc: repo create
rv: repo view
re: repo edit
rm: repo remove
rn: repo rename
lr: repo list
li: issue list
al: alias
al-: alias delete
version: "1"

167
.config/kitty/kitty.conf Normal file
View File

@@ -0,0 +1,167 @@
#: Fonts {{{
font_family Iosevka Term SS08
bold_font auto
italic_font auto
bold_italic_font auto
font_size 12.0
disable_ligatures never
# }}}
#: Cursor {{{
cursor_shape block
cursor_blink_interval 0
#: }}}
#: Scrollback {{{
scrollback_lines 8192
scrollbar scrolled
scrollback_pager_history_size 1024
#: }}}
#: Mouse {{{
mouse_hide_wait 0.0
paste_actions quote-urls-at-prompt,confirm
#: }}}
#: Performance tuning {{{
repaint_delay 8
input_delay 2
#: }}}
#: Terminal bell {{{
enable_audio_bell yes
window_alert_on_bell yes
#: }}}
#: Window layout {{{
remember_window_size no
remember_window_position no
enabled_layouts *
hide_window_decorations yes
#: }}}
#: Tab bar {{{
tab_bar_edge top
tab_bar_style powerline
tab_bar_min_tabs 1
tab_powerline_style slanted
tab_activity_symbol !
tab_title_template "{index}{fmt.fg.red}{bell_symbol}{fmt.fg.tab}{activity_symbol}:{tab.last_focused_progress_percent}{title}"
#: }}}
#: Advanced {{{
notify_on_cmd_finish unfocused
#: }}}
#: OS specific tweaks {{{
linux_display_server auto
wayland_enable_ime no
#: }}}
#: Keyboard shortcuts {{{
kitty_mod ctrl+shift
map kitty_mod+c copy_to_clipboard
map kitty_mod+v paste_from_clipboard
map cmd+v
# map kitty_mod+o pass_selection_to_program
# map kitty_mod+o pass_selection_to_program firefox
# map kitty_mod+y new_window less @selection
map kitty_mod+z scroll_to_prompt -1
map kitty_mod+x scroll_to_prompt 1
map kitty_mod+h show_scrollback
# map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R
#:: For more details on piping screen and buffer contents to external
#:: programs, see launch <https://sw.kovidgoyal.net/kitty/launch/>.
# map kitty_mod+g show_last_command_output
# map kitty_mod+enter launch --cwd=current
# map cmd+enter
# map ctrl+n launch --location=neighbor
# map ctrl+f launch --location=first
map kitty_mod+n
map cmd+n
map kitty_mod+w
map shift+cmd+d
map kitty_mod+]
map kitty_mod+[
map kitty_mod+f
map kitty_mod+b
map kitty_mod+`
map kitty_mod+r
map cmd+r
map kitty_mod+1
map cmd+1
map kitty_mod+2
map cmd+2
map kitty_mod+3
map cmd+3
map kitty_mod+4
map cmd+4
map kitty_mod+5
map cmd+5
map kitty_mod+6
map cmd+6
map kitty_mod+7
map cmd+7
map kitty_mod+8
map cmd+8
map kitty_mod+9
map cmd+9
map kitty_mod+0
map f1 goto_tab 1
map f2 goto_tab 2
map f3 goto_tab 3
map f4 goto_tab 4
map f5 goto_tab 5
map f6 goto_tab 6
map f7 goto_tab 7
map f8 goto_tab 8
map kitty_mod+c new_tab
map cmd+t
map kitty_mod+q
map cmd+w
map kitty_mod+.
map kitty_mod+,
map kitty_mod+alt+t
map shift+cmd+i
map kitty_mod+f1
map kitty_mod+f11
map ctrl+cmd+f
map kitty_mod+f10
map opt+cmd+s
map kitty_mod+u kitten unicode_input
map ctrl+cmd+space
map kitty_mod+/ kitty_shell window
map kitty_mod+f5
map kitty_mod+r load_config_file
map shift+cmd+/
map cmd+h
map opt+cmd+
map cmd+m
map cmd+q
#: }}}
include ./themes/zenwritten_dark.conf
include ./nvim.conf

8
.config/kitty/nvim.conf Normal file
View File

@@ -0,0 +1,8 @@
allow_remote_control socket-only
listen_on unix:/tmp/kitty
shell_integration enabled
action_alias kitty_scrollback_nvim kitten ~/.local/share/nvim/site/pack/paqs/start/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py
map kitty_mod+h kitty_scrollback_nvim
map kitty_mod+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output
mouse_map ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output

View File

@@ -0,0 +1,49 @@
# This file is auto-generated by shipwright.nvim
# vim:ft=kitty
## name: zenwritten_dark
## author: Michael Chris Lopez
## license: MIT
## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_dark.conf
## blurb: A zenbones variant with zero hue and saturation.
foreground #BBBBBB
background #191919
selection_foreground #BBBBBB
selection_background #404040
# Cursor colors
cursor #C9C9C9
cursor_text_color #191919
# URL underline color when hovering with mouse
# kitty window border colors
# OS Window titlebar colors
# Tab bar colors
active_tab_foreground #BBBBBB
active_tab_background #65435E
inactive_tab_foreground #BBBBBB
inactive_tab_background #303030
# Colors for marks (marked text in the terminal)
# The basic 16 colors
# black
color0 #191919
color8 #3D3839
# red
color1 #DE6E7C
color9 #E8838F
# green
color2 #819B69
color10 #8BAE68
# yellow
color3 #B77E64
color11 #D68C67
# blue
color4 #6099C0
color12 #61ABDA
# magenta
color5 #B279A7
color13 #CF86C1
# cyan
color6 #66A5AD
color14 #65B8C1
# white
color7 #BBBBBB
color15 #8E8E8E
# You can set the remaining 240 colors as color16 to color255.

View File

@@ -0,0 +1,49 @@
# This file is auto-generated by shipwright.nvim
# vim:ft=kitty
## name: zenwritten_light
## author: Michael Chris Lopez
## license: MIT
## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_light.conf
## blurb: A zenbones variant with zero hue and saturation.
foreground #353535
background #EEEEEE
selection_foreground #353535
selection_background #D7D7D7
# Cursor colors
cursor #353535
cursor_text_color #EEEEEE
# URL underline color when hovering with mouse
# kitty window border colors
# OS Window titlebar colors
# Tab bar colors
active_tab_foreground #353535
active_tab_background #DEB9D6
inactive_tab_foreground #353535
inactive_tab_background #CFCFCF
# Colors for marks (marked text in the terminal)
# The basic 16 colors
# black
color0 #EEEEEE
color8 #C6C3C3
# red
color1 #A8334C
color9 #94253E
# green
color2 #4F6C31
color10 #3F5A22
# yellow
color3 #944927
color11 #803D1C
# blue
color4 #286486
color12 #1D5573
# magenta
color5 #88507D
color13 #7B3B70
# cyan
color6 #3B8992
color14 #2B747C
# white
color7 #353535
color15 #5C5C5C
# You can set the remaining 240 colors as color16 to color255.

View File

@@ -13,4 +13,3 @@ K add video-pan-y 0.01
J add video-pan-y -0.01
m cycle mute
s subs

View File

@@ -48,8 +48,6 @@ local user_opts = {
seekrangeseparate = true, -- wether the seekranges overlay on the bar-style seekbar
seekrangealpha = 210, -- transparency of seekranges
seekbarkeyframes = true, -- use keyframes when dragging the seekbar
title = "${media-title}", -- string compatible with property-expansion
-- to be shown as OSC title
tooltipborder = 1, -- border of tooltip in bottom/topbar
tooltipfontsize = 17.5,
tooltipseekbar = false, -- following cursor bar over the playback seekbar

1
.config/nix/nix.conf Normal file
View File

@@ -0,0 +1 @@
experimental-features = nix-command flakes

6
.config/nvim/README.md Normal file
View File

@@ -0,0 +1,6 @@
# Neovim configuration
My neovim configuration. Available as a Nix flake [^nixcats]. When installing manually,
`paq.nvim` is used as a fallback plugin manager.
[^nixcats]: Based on [this nixCats `example` template](https://github.com/BirdeeHub/nixCats-nvim/tree/77dffad8235eb77684fcb7599487c8e9f23d5b8f/templates/example)

View File

@@ -1,3 +1,4 @@
vim.cmd([[
function GetClozeNumber()
let REGEX_CLOZE_START = '{{c\d\+::'
@@ -33,3 +34,4 @@ let g:sandwich#recipes += [
\ 'nesting': 1
\ }
\ ]
]])

View File

@@ -0,0 +1,3 @@
require("auto-session").setup({
auto_session_enabled = vim.env.KITTY_SCROLLBACK_NVIM ~= "true", -- See kitty-scrollback.nvim
})

View File

@@ -0,0 +1,16 @@
require("codecompanion").setup({
extensions = {
mcphub = {
callback = "mcphub.extensions.codecompanion",
opts = {
make_vars = true,
make_slash_commands = true,
show_result_in_chat = true
}
}
},
strategies = {
chat = { adapter = "openai" },
inline = { adapter = "openai" },
},
})

View File

@@ -0,0 +1,29 @@
require("conform").setup({
format_after_save = {
lsp_fallback = false,
async = false,
timeout_ms = 500,
},
formatters_by_ft = {
awk = { "awk" },
bash = { "shellcheck" },
c = { "clang-format" },
cpp = { "clang-format" },
css = { "prettierd", "prettier", stop_after_first = true },
gdscript = { "gdformat" },
haskell = { "ormolu" },
html = { "prettierd", "prettier", stop_after_first = true },
lua = { "stylua" }, -- configured in stylua.toml
markdown = { "prettierd", "prettier", stop_after_first = true },
nix = { "nixfmt" },
javascript = { "eslint_d", "eslint", "prettierd", "prettier", stop_after_first = true },
javascriptreact = { "eslint_d", "eslint", "prettierd", "prettier", stop_after_first = true },
json = { "prettierd", "prettier", stop_after_first = true },
jsonc = { "prettierd", "prettier", stop_after_first = true },
python = { "isort", "black" },
svelte = { "eslint_d", "prettierd", "prettier", stop_after_first = true },
typescript = { "eslint_d", "prettierd", "prettier", stop_after_first = true },
typescriptreact = { "eslint_d", "eslint", "prettierd", "prettier", stop_after_first = true },
-- yaml = { "prettierd", "prettier", stop_after_first = true },
},
})

View File

@@ -0,0 +1 @@
require("copilot_cmp").setup()

View File

@@ -0,0 +1 @@
require("copilot").setup({})

View File

@@ -0,0 +1,7 @@
require("eyeliner").setup({
highlight_on_key = true,
dim = true,
})
vim.api.nvim_set_hl(0, "EyelinerPrimary", { bold = true, underline = true })
vim.api.nvim_set_hl(0, "EyelinerSecondary", { underline = true })

View File

@@ -0,0 +1,16 @@
local fzf = require("fzf-lua")
fzf.setup({ "max-perf" })
vim.keymap.set("n", "<leader>f<leader>", fzf.builtin) -- Help
vim.keymap.set("n", "<leader>fc", fzf.commands)
vim.keymap.set("n", "<leader>ff", fzf.files)
vim.keymap.set("n", "<leader>fg", fzf.live_grep_native)
vim.keymap.set("n", "<leader>fb", fzf.buffers)
vim.keymap.set("n", "<leader>fd", fzf.diagnostics_workspace)
vim.keymap.set("n", "<leader>fhe", fzf.help_tags)
vim.keymap.set("n", "<leader>fhi", fzf.search_history)
vim.keymap.set("n", "<leader>fma", fzf.marks)
vim.keymap.set("n", "<leader>fma", fzf.man_pages)
vim.keymap.set("i", "<c-f>", fzf.complete_path)

View File

@@ -0,0 +1,12 @@
local gitsigns = require("gitsigns")
gitsigns.setup({
current_line_blame_formatter = "<author>, <author_time:%R> - <summary>",
linehl = true,
current_line_blame_opts = {
delay = 0,
virt_text_pos = "right_align",
},
})
vim.api.nvim_create_user_command("Blame", gitsigns.toggle_current_line_blame, { nargs = "?" })

View File

@@ -0,0 +1,10 @@
require("image").setup({
backend = "kitty",
kitty_method = "normal",
processor = "magick_cli",
integrations = {
markdown = {
filetypes = { "markdown", "pandoc" },
},
},
})

View File

@@ -0,0 +1 @@
require("kitty-scrollback").setup()

View File

@@ -0,0 +1,7 @@
require("lsp_lines").setup()
vim.diagnostic.config({
virtual_text = false,
})
vim.keymap.set("", "<leader>dd", require("lsp_lines").toggle, { desc = "Toggle lsp_lines" })

View File

@@ -0,0 +1,178 @@
require("neodev").setup() -- should setup before lspconfig
-- vim.g.coq_settings = { auto_start = 'shut-up' }
-- local capabilities = coq.lsp_ensure_capabilities()
local cmp_nvim_lsp = require("cmp_nvim_lsp")
local capabilities = cmp_nvim_lsp.default_capabilities()
local servers = {
bashls = {},
eslint = {
settings = {
--Assuming prettier/prettierd will handle formatting, we don't need to see these errors
rulesCustomizations = {
{ rule = "prettier/prettier", severity = "off" },
},
format = false,
},
},
emmet_language_server = {},
gdscript = {},
helm_ls = {
filetypes = { "yaml", "helm", "yaml.helm-values" },
},
hls = { filetypes = { "haskell", "lhaskell", "cabal" } },
html = {},
jsonls = {
settings = {
json = {
schemas = require("schemastore").json.schemas(),
validate = { enable = true },
},
},
},
lua_ls = {
on_init = function(client)
if client.workspace_folders then
local path = client.workspace_folders[1].name
if
path ~= vim.fn.stdpath("config")
and (vim.uv.fs_stat(path .. "/.luarc.json") or vim.uv.fs_stat(path .. "/.luarc.jsonc"))
then
return
end
end
client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, {
runtime = {
version = "LuaJIT",
path = {
"lua/?.lua",
"lua/?/init.lua",
},
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME,
},
},
})
end,
settings = {
Lua = {},
},
},
-- marksman = {},
nixd = {},
pyright = {},
-- tsserver = {},
svelte = {
plugin = {
svelte = {
defaultScriptLanguage = "ts",
},
},
},
tailwindcss = {},
-- vtsls = {},
ts_ls = {},
-- vtsls = {
-- maxTsServerMemory = 16384,
-- filetypes = {
-- "javascript",
-- "javascriptreact",
-- "javascript.jsx",
-- "typescript",
-- "typescriptreact",
-- "typescript.tsx",
-- },
-- settings = {
-- complete_function_calls = true,
-- vtsls = {
-- enableMoveToFileCodeAction = true,
-- autoUseWorkspaceTsdk = true,
-- experimental = {
-- completion = {
-- enableServerSideFuzzyMatch = true,
-- },
-- },
-- },
-- typescript = {
-- updateImportsOnFileMove = { enabled = "always" },
-- suggest = {
-- completeFunctionCalls = true,
-- },
-- inlayHints = {
-- enumMemberValues = { enabled = true },
-- functionLikeReturnTypes = { enabled = true },
-- parameterNames = { enabled = "literals" },
-- parameterTypes = { enabled = true },
-- propertyDeclarationTypes = { enabled = true },
-- variableTypes = { enabled = false },
-- },
-- },
-- },
-- },
yamlls = {
settings = {
yaml = {
schemaStore = {
-- You must disable built-in schemaStore support if you want to use
-- this plugin and its advanced options like `ignore`.
enable = false,
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
url = "",
},
schemas = require("schemastore").yaml.schemas(),
},
},
},
}
for server, config in pairs(servers) do
config.capabilities = capabilities
vim.lsp.config(server, config)
end
vim.lsp.enable(vim.tbl_keys(servers))
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(e)
local opts = { buffer = e.bufnr }
local set = vim.keymap.set
local lsp_buf = vim.lsp.buf
set("n", "gD", lsp_buf.declaration, opts)
set("n", "gd", lsp_buf.definition, opts)
set("n", "K", lsp_buf.hover, opts)
set("n", "gi", lsp_buf.implementation, opts)
set("n", "<C-k>", lsp_buf.signature_help, opts)
set("n", "<space>wa", lsp_buf.add_workspace_folder, opts)
set("n", "<space>wr", lsp_buf.remove_workspace_folder, opts)
set("n", "<space>wl", function()
print(vim.inspect(lsp_buf.list_workspace_folders()))
end, opts)
set("n", "<space>D", lsp_buf.type_definition, opts)
set("n", "<space>rn", lsp_buf.rename, opts)
set({ "n", "v" }, "<space>ca", lsp_buf.code_action, opts)
set("n", "gr", lsp_buf.references, opts)
-- Taken from https://blog.viktomas.com/graph/neovim-lsp-rename-normal-mode-keymaps/
set("n", "<leader>r", vim.lsp.buf.rename)
-- function()
-- -- Automatically switch to `cmdwin` for normal mode renaming
-- -- (normally you would have to press <C-f> to open the `cmdwin`)
-- vim.api.nvim_create_autocmd({ "CmdlineEnter" }, {
-- callback = function()
-- local key = vim.api.nvim_replace_termcodes("<C-f>", true, false, true)
-- vim.api.nvim_feedkeys(key, "c", false)
-- vim.api.nvim_feedkeys("0", "n", false)
-- return true
-- end,
-- })
-- vim.lsp.buf.rename()
-- end, bufoptsWithDesc("Rename symbol")
-- )
end,
})

View File

@@ -0,0 +1,313 @@
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local l = require("luasnip.extras").lambda
local rep = require("luasnip.extras").rep
local p = require("luasnip.extras").partial
local m = require("luasnip.extras").match
local n = require("luasnip.extras").nonempty
local dl = require("luasnip.extras").dynamic_lambda
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local conds = require("luasnip.extras.expand_conditions")
ls.config.set_config({
history = true,
update_events = "TextChanged,TextChangedI",
delete_check_events = "TextChanged",
ext_prio_increase = 1,
enable_autosnippets = true,
store_selection_keys = "<Tab>",
})
local function copy(args)
return args[1]
end
local function bash(_, _, command)
local file = io.popen(command, "r")
local res = {}
if file then
for line in file:lines() do
table.insert(res, line)
end
end
return res
end
local date_input = function(args, snip, old_state, date_format)
print(args, snip, old_state)
return sn(nil, i(1, os.date(date_format or "%Y-%m-%d")))
end
-- -- FIXME: EXAMPLE
-- ls.add_snippets("all", {
-- -- arg1: trigger `fn`,
-- -- arg2: nodes to insert into buffer on expansion.
-- s("fn", {
-- t("//Parameters: "), -- Text.
-- f(copy, 2), -- 1: function, 2: placeholders to copy text from
-- t({ "", "function " }), -- placeholder/insert.
-- i(1),
-- t("("), -- placeholder with initial text.
-- i(2, "int foo"), -- linebreak
-- t({ ") {", "\t" }), -- last placeholder, snippet exit point
-- i(0),
-- t({ "", "}" }),
-- }),
-- s("class", {
-- -- Choice: Switch between two different Nodes, first parameter is its position, second a list of nodes.
-- c(1, {
-- t("public "),
-- t("private "),
-- }),
-- t("class "),
-- i(2),
-- t(" "),
-- c(3, {
-- t("{"),
-- -- sn: Nested Snippet. Instead of a trigger, it has a position, just like insert-nodes. !!! These don't expect a 0-node!!!!
-- -- Inside Choices, Nodes don't need a position as the choice node is the one being jumped to.
-- sn(nil, {
-- t("extends "),
-- -- restoreNode: stores and restores nodes.
-- -- pass position, store-key and nodes.
-- r(1, "other_class", i(1)),
-- t(" {"),
-- }),
-- sn(nil, {
-- t("implements "),
-- -- no need to define the nodes for a given key a second time.
-- r(1, "other_class"),
-- t(" {"),
-- }),
-- }),
-- t({ "", "\t" }),
-- i(0),
-- t({ "", "}" }),
-- }),
-- -- Alternative printf-like notation for defining snippets. It uses format
-- -- string with placeholders similar to the ones used with Python's .format().
-- s(
-- "fmt1",
-- fmt("To {title} {} {}.", {
-- i(2, "Name"),
-- i(3, "Surname"),
-- title = c(1, { t("Mr."), t("Ms.") }),
-- })
-- ),
-- -- To escape delimiters use double them, e.g. `{}` -> `{{}}`.
-- -- Multi-line format strings by default have empty first/last line removed.
-- -- Indent common to all lines is also removed. Use the third `opts` argument
-- -- to control this behaviour.
-- s(
-- "fmt2",
-- fmt(
-- [[
-- foo({1}, {3}) {{
-- return {2} * {4}
-- }}
-- ]],
-- {
-- i(1, "x"),
-- rep(1),
-- i(2, "y"),
-- rep(2),
-- }
-- )
-- ),
-- -- Empty placeholders are numbered automatically starting from 1 or the last
-- -- value of a numbered placeholder. Named placeholders do not affect numbering.
-- s(
-- "fmt3",
-- fmt("{} {a} {} {1} {}", {
-- t("1"),
-- t("2"),
-- a = t("A"),
-- })
-- ),
-- -- The delimiters can be changed from the default `{}` to something else.
-- s("fmt4", fmt("foo() { return []; }", i(1, "x"), { delimiters = "[]" })),
-- -- `fmta` is a convenient wrapper that uses `<>` instead of `{}`.
-- s("fmt5", fmta("foo() { return <>; }", i(1, "x"))),
-- -- By default all args must be used. Use strict=false to disable the check
-- s(
-- "fmt6",
-- fmt("use {} only", { t("this"), t("not this") }, { strict = false })
-- ),
-- -- Use a dynamic_node to interpolate the output of a
-- -- function (see date_input above) into the initial
-- -- value of an insert_node.
-- s("novel", {
-- t("It was a dark and stormy night on "),
-- d(1, date_input, {}, { user_args = { "%A, %B %d of %Y" } }),
-- t(" and the clocks were striking thirteen."),
-- }),
-- -- Parsing snippets: First parameter: Snippet-Trigger, Second: Snippet body.
-- -- Placeholders are parsed into choices with 1. the placeholder text(as a snippet) and 2. an empty string.
-- -- This means they are not SELECTed like in other editors/Snippet engines.
-- ls.parser.parse_snippet(
-- "lspsyn",
-- "Wow! This ${1:Stuff} really ${2:works. ${3:Well, a bit.}}"
-- ),
-- -- When wordTrig is set to false, snippets may also expand inside other words.
-- ls.parser.parse_snippet(
-- { trig = "te", wordTrig = false },
-- "${1:cond} ? ${2:true} : ${3:false}"
-- ),
-- -- When regTrig is set, trig is treated like a pattern, this snippet will expand after any number.
-- ls.parser.parse_snippet({ trig = "%d", regTrig = true }, "A Number!!"),
-- -- Using the condition, it's possible to allow expansion only in specific cases.
-- s("cond", {
-- t("will only expand in c-style comments"),
-- }, {
-- condition = function(line_to_cursor, matched_trigger, captures)
-- -- optional whitespace followed by //
-- return line_to_cursor:match("%s*//")
-- end,
-- }),
-- -- there's some built-in conditions in "luasnip.extras.expand_conditions".
-- s("cond2", {
-- t("will only expand at the beginning of the line"),
-- }, {
-- condition = conds.line_begin,
-- }),
-- -- The last entry of args passed to the user-function is the surrounding snippet.
-- s(
-- { trig = "a%d", regTrig = true },
-- f(function(_, snip)
-- return "Triggered with " .. snip.trigger .. "."
-- end, {})
-- ),
-- -- It's possible to use capture-groups inside regex-triggers.
-- s(
-- { trig = "b(%d)", regTrig = true },
-- f(function(_, snip)
-- return "Captured Text: " .. snip.captures[1] .. "."
-- end, {})
-- ),
-- s({ trig = "c(%d+)", regTrig = true }, {
-- t("will only expand for even numbers"),
-- }, {
-- condition = function(line_to_cursor, matched_trigger, captures)
-- return tonumber(captures[1]) % 2 == 0
-- end,
-- }),
-- -- Use a function to execute any shell command and print its text.
-- s("bash", f(bash, {}, "ls")),
-- -- Short version for applying String transformations using function nodes.
-- s("transform", {
-- i(1, "initial text"),
-- t({ "", "" }),
-- -- lambda nodes accept an l._1,2,3,4,5, which in turn accept any string transformations.
-- -- This list will be applied in order to the first node given in the second argument.
-- l(l._1:match("[^i]*$"):gsub("i", "o"):gsub(" ", "_"):upper(), 1),
-- }),
-- s("transform2", {
-- i(1, "initial text"),
-- t("::"),
-- i(2, "replacement for e"),
-- t({ "", "" }),
-- -- Lambdas can also apply transforms USING the text of other nodes:
-- l(l._1:gsub("e", l._2), { 1, 2 }),
-- }),
-- s({ trig = "trafo(%d+)", regTrig = true }, {
-- -- env-variables and captures can also be used:
-- l(l.CAPTURE1:gsub("1", l.TM_FILENAME), {}),
-- }),
-- -- Set store_selection_keys = "<Tab>" (for example) in your
-- -- luasnip.config.setup() call to populate
-- -- TM_SELECTED_TEXT/SELECT_RAW/SELECT_DEDENT.
-- -- In this case: select a URL, hit Tab, then expand this snippet.
-- s("link_url", {
-- t('<a href="'),
-- f(function(_, snip)
-- -- TM_SELECTED_TEXT is a table to account for multiline-selections.
-- -- In this case only the first line is inserted.
-- return snip.env.TM_SELECTED_TEXT[1] or {}
-- end, {}),
-- t('">'),
-- i(1),
-- t("</a>"),
-- i(0),
-- }),
-- -- Shorthand for repeating the text in a given node.
-- s("repeat", { i(1, "text"), t({ "", "" }), rep(1) }),
-- -- Directly insert the ouput from a function evaluated at runtime.
-- s("part", p(os.date, "%Y")),
-- -- use matchNodes (`m(argnode, condition, then, else)`) to insert text
-- -- based on a pattern/function/lambda-evaluation.
-- -- It's basically a shortcut for simple functionNodes:
-- s("mat", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(1, "%d", "contains a number", "no number :("),
-- }),
-- -- The `then`-text defaults to the first capture group/the entire
-- -- match if there are none.
-- s("mat2", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(1, "[abc][abc][abc]"),
-- }),
-- -- It is even possible to apply gsubs' or other transformations
-- -- before matching.
-- s("mat3", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(
-- 1,
-- l._1:gsub("[123]", ""):match("%d"),
-- "contains a number that isn't 1, 2 or 3!"
-- ),
-- }),
-- -- `match` also accepts a function in place of the condition, which in
-- -- turn accepts the usual functionNode-args.
-- -- The condition is considered true if the function returns any
-- -- non-nil/false-value.
-- -- If that value is a string, it is used as the `if`-text if no if is explicitly given.
-- s("mat4", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(1, function(args)
-- -- args is a table of multiline-strings (as usual).
-- return (#args[1][1] % 2 == 0 and args[1]) or nil
-- end),
-- }),
-- -- The nonempty-node inserts text depending on whether the arg-node is
-- -- empty.
-- s("nempty", {
-- i(1, "sample_text"),
-- n(1, "i(1) is not empty!"),
-- }),
-- -- dynamic lambdas work exactly like regular lambdas, except that they
-- -- don't return a textNode, but a dynamicNode containing one insertNode.
-- -- This makes it easier to dynamically set preset-text for insertNodes.
-- s("dl1", {
-- i(1, "sample_text"),
-- t({ ":", "" }),
-- dl(2, l._1, 1),
-- }),
-- -- Obviously, it's also possible to apply transformations, just like lambdas.
-- s("dl2", {
-- i(1, "sample_text"),
-- i(2, "sample_text_2"),
-- t({ "", "" }),
-- dl(3, l._1:gsub("\n", " linebreak ") .. l._2, { 1, 2 }),
-- }),
-- }, {
-- key = "all",
-- })
require("luasnip.loaders.from_lua").lazy_load({ paths = { "~/.config/nvim/snips" } })
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "~/.config/Code - Insiders/User/snippets" } })

View File

@@ -0,0 +1 @@
require("mcphub").setup({})

View File

@@ -0,0 +1,5 @@
vim.cmd([[
" Paste clipboard images
au FileType pandoc nmap <buffer><silent> <leader>v :call mdip#MarkdownClipboardImage()<CR>
au FileType markdown nmap <buffer><silent> <leader>v :call mdip#MarkdownClipboardImage()<CR>
]])

View File

@@ -0,0 +1,95 @@
local cmp = require("cmp")
local luasnip = require("luasnip")
-- TODO: Fix command mode completion (should behave similar to insert mode)
local c_j = cmp.mapping(function()
if cmp.visible() then
cmp.select_next_item()
else
cmp.complete()
cmp.select_next_item()
end
end, { "i", "s" })
local c_k = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
-- NOTE: Keep <C-k> fallback for digraphs
-- ```lua
-- cmp.complete()
-- cmp.select_prev_item()
-- ```
fallback()
end
end, { "i", "s" })
local c_h = cmp.mapping(function(fallback)
if luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" })
local c_l = cmp.mapping(function(fallback)
if cmp.visible() and cmp.get_active_entry() then
cmp.confirm()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { "i", "s" })
cmp.setup({
completion = {
autocomplete = false,
},
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
-- See `:h luasnip` for the commands
-- Note: have not added choice note mappings yet
mapping = cmp.mapping.preset.insert({
["<C-j>"] = c_j,
["<C-k>"] = c_k,
["<C-h>"] = c_h,
["<C-l>"] = c_l,
["<CR>"] = c_l,
}),
sources = {
{ name = "copilot", group_index = 2 },
{ name = "zk" },
{ name = "nvim_lsp", keyword_length = 8 },
{ name = "luasnip", max_item_count = 16 },
{ name = "path" },
{ name = "buffer", max_item_count = 8 },
},
window = {
completion = cmp.config.window.bordered({ border = { "", "", "", "", "", "", "", "" } }),
documentation = cmp.config.window.bordered({ border = { "", "", "", "", "", "", "", "" } }),
},
formatting = {
fields = {
"abbr",
"menu",
"kind",
},
format = function(entry, item)
-- Rename kind to shorthand
item.menu = ({
nvim_lsp = "[lsp]",
luasnip = "[snip]",
path = "[path]",
buffer = "[buf]",
})[entry.source.name]
return item
end,
expandable_indicator = true,
},
})

View File

@@ -0,0 +1 @@
require("dbee").setup()

View File

@@ -0,0 +1,3 @@
vim.opt.termguicolors = true
require("nvim-highlight-colors").setup({})

View File

@@ -0,0 +1,38 @@
vim.env.ESLINT_D_PPID = vim.fn.getpid()
local eslint_linter = "eslint_d"
require("lint").linters_by_ft = {
bash = { "shellcheck" },
c = { "clangtidy", "flawfinder" },
cmake = { "cmakelint" },
cpp = { "clangtidy", "flawfinder" }, -- "cpplint", "cppcheck", "flawfinder"
css = { "stylelint" },
dockerfile = { "hadolint" },
editorconfig = { "editorconfig-checker" },
haskell = { "hlint" },
-- html = { "htmlhint" },
-- javascript = { eslint_linter },
-- javascriptreact = { eslint_linter },
gdscript = { "gdlint" },
latex = { "chktex" },
-- lua = { "luacheck", "selene" },
make = { "checkmake" },
-- pandoc = { "proselint", "woke" },
-- python = { "pylint" },
sh = { "shellcheck" },
svelte = { eslint_linter },
systemd = { "systemdlint" },
-- typescript = { eslint_linter },
-- typescriptreact = { eslint_linter },
yaml = { "yamllint" },
}
-- TODO: Wouldn't it be possible / nice to only try to load the linters when they are
-- actually needed?
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
callback = function()
require("lint").try_lint()
end,
})

View File

@@ -0,0 +1,5 @@
vim.cmd([[
nmap s <Nop>
xmap s <Nop>
let g:sandwich#recipes = deepcopy(g:sandwich#default_recipes)
]])

View File

@@ -0,0 +1,4 @@
require("sniprun").setup({
selected_interpreters = { "JS_TS_deno" },
repl_enable = { "JS_TS_deno" },
})

View File

@@ -0,0 +1 @@
require("tailwind-fold").setup({ ft = { "html", "svelte", "tsx" } })

View File

@@ -0,0 +1,131 @@
local ts = require("treesj")
local vim = vim
local keymap = vim.keymap
local opt = vim.opt
local treesitter_configs = require("nvim-treesitter.configs")
treesitter_configs.setup({
-- Basically added what I might need from the docs
-- <https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#supported-languages>
ensure_installed = {
"awk",
"bash",
"bibtex",
"c",
"cmake",
"comment",
"cpp",
"css",
"csv",
"diff",
"dockerfile",
"dot",
"gdscript",
"gdshader",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"glsl",
"gnuplot",
"go",
"godot_resource",
"gpg",
"graphql",
"haskell",
"html",
"java",
"javascript",
"jq",
"jsdoc",
"json",
"jsonc",
"latex",
"lua",
"luadoc",
"make",
"python",
"query",
"r",
"racket",
"readline",
"regex",
"requirements",
"scheme",
"scss",
"sql",
"ssh_config",
"supercollider",
"svelte",
"tmux",
"toml",
"tsv",
"tsx",
"typescript",
"udev",
"vim",
"vimdoc",
"xml",
"yaml",
"zathurarc",
},
highlight = {
enable = true,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "vv",
node_incremental = "vv",
scope_incremental = "VV",
node_decremental = "vd",
},
},
indent = {
enable = true,
},
sync_install = false,
auto_install = true,
ignore_install = {},
modules = {},
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
-- Functions
["if"] = "@function.inner",
["af"] = "@function.outer",
["ip"] = "@parameter.inner",
["ap"] = "@parameter.outer",
},
},
},
node_movement = {
enable = true,
keymaps = {
move_up = "vk",
move_down = "vj",
move_left = "vh",
move_right = "vl",
swap_left = "vH",
swap_right = "vL",
select_current_node = "vi",
},
swappable_textobjects = { "@function.outer", "@parameter.inner", "@statement.outer" },
allow_switch_parents = true,
allow_next_parent = true,
},
})
opt.foldmethod = "expr"
opt.foldexpr = "nvim_treesitter#foldexpr()"
opt.foldenable = false
-- TreeSJ
require("treesj").setup({
use_default_keymaps = false,
})
keymap.set("n", ";", ts.toggle, { desc = "Toggle join/split (TreeTSJ)" })

View File

@@ -0,0 +1 @@
require("trouble").setup()

View File

@@ -0,0 +1,8 @@
vim.cmd([[
let g:javascript_plugin_jsdoc = 1 " jsdoc syntax highlighting
let g:javascript_plugin_flow = 1 " flow syntax highlighting
let g:javascript_conceal_function = "ƒ"
let g:javascript_conceal_return = "⇖"
let g:svelte_indent_script = 0
let g:svelte_indent_style = 0
]])

View File

@@ -0,0 +1,17 @@
vim.cmd([[
let g:pandoc#syntax#conceal#urls=1
let g:pandoc#syntax#codeblocks#embeds#langs=[
\ 'python',
\ 'bash',
\ 'javascript',
\ 'typescript',
\ 'html',
\ 'css',
\ 'scss',
\ 'json',
\ 'yaml'
\ ]
let g:pandoc#syntax#style#emphases=0 " Bug workaround
let g:pandoc#syntax#conceal#cchar_overrides = { "atx": " ", "li": "·" }
let g:pandoc#syntax#conceal#blacklist=[]
]])

View File

@@ -0,0 +1,9 @@
vim.cmd([[
au FileType pandoc call pandoc#completion#Init()
let g:pandoc#filetypes#pandoc_markdown=0
let g:pandoc#spell#enabled=0
let g:pandoc#spell#default_langs=['en_us', 'nl_be']
let g:pandoc#formatting#mode='a'
let g:pandoc#formatting#textwidth=90
let g:pandoc#modules#disabled = ["formatting", "dashes", "yaml", "metadata"]
]])

View File

@@ -0,0 +1,16 @@
vim.cmd([[
" Tidalcycles (sclang and vim-tidal)
let g:tidal_default_config = {"socket_name": "default", "target_pane": "tidal:1.1"}
let g:tidal_no_mappings = 1
au FileType tidal nm <buffer> <leader>ep <Plug>TidalParagraphSend
au FileType tidal nm <buffer> <leader>ee <Plug>TidalLineSend
au FileType tidal nnoremap <buffer> <leader>h :TidalHush<cr>
au FileType tidal com! -nargs=1 S :TidalSilence <args>
au FileType tidal com! -nargs=1 P :TidalPlay <args>
au FileType tidal com! -nargs=0 H :TidalHush
" SuperCollider
au BufEnter,BufWinEnter,BufNewFile,BufRead *.sc,*.scd se filetype=supercollider
au Filetype supercollider packadd scvim
]])

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